Compare commits
10 Commits
2026-03
...
1cfea7fd6c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1cfea7fd6c | ||
|
|
251e302e59 | ||
|
|
873e920add | ||
|
|
fd7c6ada6b | ||
|
|
c148bddfc9 | ||
|
|
f0857b7c46 | ||
| 9b1c6f61e6 | |||
|
|
3f72c52cdc | ||
|
|
ef757c52ea | ||
|
|
4110a835c8 |
@@ -33,6 +33,7 @@ import com.njcn.gather.script.pojo.param.PqScriptIssueParam;
|
|||||||
import com.njcn.gather.script.pojo.po.SourceIssue;
|
import com.njcn.gather.script.pojo.po.SourceIssue;
|
||||||
import com.njcn.gather.script.service.IPqScriptCheckDataService;
|
import com.njcn.gather.script.service.IPqScriptCheckDataService;
|
||||||
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
||||||
|
import com.njcn.gather.source.service.IPqSourceService;
|
||||||
import com.njcn.gather.storage.pojo.param.StorageParam;
|
import com.njcn.gather.storage.pojo.param.StorageParam;
|
||||||
import com.njcn.gather.storage.pojo.po.SimAndDigHarmonicResult;
|
import com.njcn.gather.storage.pojo.po.SimAndDigHarmonicResult;
|
||||||
import com.njcn.gather.storage.pojo.po.SimAndDigNonHarmonicResult;
|
import com.njcn.gather.storage.pojo.po.SimAndDigNonHarmonicResult;
|
||||||
@@ -76,6 +77,7 @@ public class SocketDevResponseService {
|
|||||||
private final SimAndDigHarmonicService adHarmonicService;
|
private final SimAndDigHarmonicService adHarmonicService;
|
||||||
private final IAdPlanService adPlanService;
|
private final IAdPlanService adPlanService;
|
||||||
private final IDictDataService dictDataService;
|
private final IDictDataService dictDataService;
|
||||||
|
private final IPqSourceService pqSourceService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储的装置相序数据
|
* 存储的装置相序数据
|
||||||
@@ -391,6 +393,7 @@ public class SocketDevResponseService {
|
|||||||
if (param.getTestItemList().get(2)) {
|
if (param.getTestItemList().get(2)) {
|
||||||
//如果后续做正式检测
|
//如果后续做正式检测
|
||||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||||
|
issueParam.setSourceId(param.getSourceName());
|
||||||
issueParam.setPlanId(param.getPlanId());
|
issueParam.setPlanId(param.getPlanId());
|
||||||
issueParam.setSourceId(param.getSourceId());
|
issueParam.setSourceId(param.getSourceId());
|
||||||
issueParam.setDevIds(param.getDevIds());
|
issueParam.setDevIds(param.getDevIds());
|
||||||
@@ -688,7 +691,7 @@ public class SocketDevResponseService {
|
|||||||
*/
|
*/
|
||||||
private Double reduceList(List<Double> valList) {
|
private Double reduceList(List<Double> valList) {
|
||||||
// valList.subList(0, 5).clear();
|
// valList.subList(0, 5).clear();
|
||||||
valList.subList(valList.size() - 2, valList.size()).clear();
|
valList.subList(valList.size() - 2, valList.size()).clear();
|
||||||
return valList.stream().mapToDouble(Double::doubleValue).average().getAsDouble();
|
return valList.stream().mapToDouble(Double::doubleValue).average().getAsDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -894,7 +897,7 @@ public class SocketDevResponseService {
|
|||||||
//开始下源控制脚本
|
//开始下源控制脚本
|
||||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||||
issueParam.setPlanId(param.getPlanId());
|
issueParam.setPlanId(param.getPlanId());
|
||||||
issueParam.setSourceId(param.getSourceId());
|
issueParam.setSourceId(param.getSourceName());
|
||||||
issueParam.setDevIds(param.getDevIds());
|
issueParam.setDevIds(param.getDevIds());
|
||||||
issueParam.setScriptId(param.getScriptId());
|
issueParam.setScriptId(param.getScriptId());
|
||||||
|
|
||||||
@@ -1162,8 +1165,8 @@ public class SocketDevResponseService {
|
|||||||
} else if (param.getTestItemList().get(2)) {
|
} else if (param.getTestItemList().get(2)) {
|
||||||
// 后续做正式检测
|
// 后续做正式检测
|
||||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||||
|
issueParam.setSourceId(param.getSourceName());
|
||||||
issueParam.setPlanId(param.getPlanId());
|
issueParam.setPlanId(param.getPlanId());
|
||||||
issueParam.setSourceId(param.getSourceId());
|
|
||||||
issueParam.setDevIds(param.getDevIds());
|
issueParam.setDevIds(param.getDevIds());
|
||||||
issueParam.setScriptId(param.getScriptId());
|
issueParam.setScriptId(param.getScriptId());
|
||||||
|
|
||||||
@@ -1816,8 +1819,8 @@ public class SocketDevResponseService {
|
|||||||
XiNumberManager.devParameterList.add(devParameterSmall);
|
XiNumberManager.devParameterList.add(devParameterSmall);
|
||||||
|
|
||||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||||
|
issueParam.setSourceId(param.getSourceName());
|
||||||
issueParam.setPlanId(param.getPlanId());
|
issueParam.setPlanId(param.getPlanId());
|
||||||
issueParam.setSourceId(param.getSourceId());
|
|
||||||
issueParam.setDevIds(param.getDevIds());
|
issueParam.setDevIds(param.getDevIds());
|
||||||
issueParam.setScriptId(param.getScriptId());
|
issueParam.setScriptId(param.getScriptId());
|
||||||
issueParam.setIsPhaseSequence(CommonEnum.COEFFICIENT_TEST.getValue());
|
issueParam.setIsPhaseSequence(CommonEnum.COEFFICIENT_TEST.getValue());
|
||||||
|
|||||||
@@ -46,6 +46,11 @@ public class PreDetectionParam {
|
|||||||
*/
|
*/
|
||||||
private String sourceId;
|
private String sourceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 源名称
|
||||||
|
*/
|
||||||
|
private String sourceName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所属误差体系
|
* 所属误差体系
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
|
|||||||
);
|
);
|
||||||
if (ObjectUtil.isNotNull(planSource)) {
|
if (ObjectUtil.isNotNull(planSource)) {
|
||||||
SourceInitialize sourceParam = pqSourceService.getSourceInitializeParam(planSource.getSourceId());
|
SourceInitialize sourceParam = pqSourceService.getSourceInitializeParam(planSource.getSourceId());
|
||||||
|
param.setSourceName(sourceParam.getSourceId());
|
||||||
if (ObjectUtil.isNotNull(sourceParam)) {
|
if (ObjectUtil.isNotNull(sourceParam)) {
|
||||||
//开始组装socket报文请求头
|
//开始组装socket报文请求头
|
||||||
socketDevResponseService.initList(param);
|
socketDevResponseService.initList(param);
|
||||||
@@ -181,6 +182,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
|
|||||||
if (ObjectUtil.isNotNull(planSource)) {
|
if (ObjectUtil.isNotNull(planSource)) {
|
||||||
//获取源初始化参数
|
//获取源初始化参数
|
||||||
SourceInitialize sourceParam = pqSourceService.getSourceInitializeParam(planSource.getSourceId());
|
SourceInitialize sourceParam = pqSourceService.getSourceInitializeParam(planSource.getSourceId());
|
||||||
|
param.setSourceName(sourceParam.getSourceId());
|
||||||
if (ObjectUtil.isNotNull(sourceParam)) {
|
if (ObjectUtil.isNotNull(sourceParam)) {
|
||||||
//开始组装socket报文请求头
|
//开始组装socket报文请求头
|
||||||
socketDevResponseService.initList(param);
|
socketDevResponseService.initList(param);
|
||||||
@@ -243,6 +245,8 @@ public class PreDetectionServiceImpl implements PreDetectionService {
|
|||||||
FormalTestManager.stopFlag = false;
|
FormalTestManager.stopFlag = false;
|
||||||
socketDevResponseService.initRestart();
|
socketDevResponseService.initRestart();
|
||||||
List<SourceIssue> sourceIssueList = SocketManager.getSourceList();
|
List<SourceIssue> sourceIssueList = SocketManager.getSourceList();
|
||||||
|
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||||
|
param.setSourceName(sourceInitialize.getSourceId());
|
||||||
if (CollUtil.isNotEmpty(sourceIssueList)) {
|
if (CollUtil.isNotEmpty(sourceIssueList)) {
|
||||||
SourceIssue sourceIssues = SocketManager.getSourceList().get(0);
|
SourceIssue sourceIssues = SocketManager.getSourceList().get(0);
|
||||||
SocketMsg<String> xuMsg = new SocketMsg<>();
|
SocketMsg<String> xuMsg = new SocketMsg<>();
|
||||||
@@ -289,7 +293,8 @@ public class PreDetectionServiceImpl implements PreDetectionService {
|
|||||||
}
|
}
|
||||||
//组装源控制脚本
|
//组装源控制脚本
|
||||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||||
issueParam.setSourceId(param.getSourceId());
|
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||||
|
issueParam.setSourceId(sourceInitialize.getSourceId());
|
||||||
issueParam.setScriptId(param.getScriptId());
|
issueParam.setScriptId(param.getScriptId());
|
||||||
issueParam.setType(1);
|
issueParam.setType(1);
|
||||||
issueParam.setIsPhaseSequence(SourceOperateCodeEnum.SIMULATE_TEST.getValue());
|
issueParam.setIsPhaseSequence(SourceOperateCodeEnum.SIMULATE_TEST.getValue());
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class CnSocketUtil {
|
|||||||
socketMsg.setRequestId(SourceOperateCodeEnum.QUITE_SOURCE.getValue());
|
socketMsg.setRequestId(SourceOperateCodeEnum.QUITE_SOURCE.getValue());
|
||||||
socketMsg.setOperateCode(SourceOperateCodeEnum.CLOSE_GATHER.getValue());
|
socketMsg.setOperateCode(SourceOperateCodeEnum.CLOSE_GATHER.getValue());
|
||||||
JSONObject jsonObject = new JSONObject();
|
JSONObject jsonObject = new JSONObject();
|
||||||
jsonObject.put("sourceId", param.getSourceId());
|
jsonObject.put("sourceId", param.getSourceName());
|
||||||
socketMsg.setData(jsonObject.toJSONString());
|
socketMsg.setData(jsonObject.toJSONString());
|
||||||
SocketManager.sendMsg(param.getUserPageId() + SOURCE_TAG, JSON.toJSONString(socketMsg));
|
SocketManager.sendMsg(param.getUserPageId() + SOURCE_TAG, JSON.toJSONString(socketMsg));
|
||||||
WebServiceManager.removePreDetectionParam(param.getUserPageId());
|
WebServiceManager.removePreDetectionParam(param.getUserPageId());
|
||||||
|
|||||||
@@ -1265,7 +1265,7 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
|||||||
for (int i = 1; i <= maxTime; i++) {
|
for (int i = 1; i <= maxTime; i++) {
|
||||||
row2[i] = i + "次检测";
|
row2[i] = i + "次检测";
|
||||||
int tempI = i;
|
int tempI = i;
|
||||||
List<PqDevVO> tempDevList = devList.stream().filter(dev -> dev.getRecheckNum() <= tempI).collect(Collectors.toList());
|
List<PqDevVO> tempDevList = devList.stream().filter(dev -> dev.getRecheckNum() == tempI).collect(Collectors.toList());
|
||||||
long passCount = tempDevList.stream().filter(dev -> dev.getCheckResult() == CheckResultEnum.ACCORD.getValue()).count();
|
long passCount = tempDevList.stream().filter(dev -> dev.getCheckResult() == CheckResultEnum.ACCORD.getValue()).count();
|
||||||
row3[i] = passCount + "";
|
row3[i] = passCount + "";
|
||||||
row4[i] = total + "";
|
row4[i] = total + "";
|
||||||
|
|||||||
@@ -2063,7 +2063,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
|||||||
// 委托方
|
// 委托方
|
||||||
String delegate = pqDevVO.getDelegate();
|
String delegate = pqDevVO.getDelegate();
|
||||||
if (StrUtil.isNotBlank(delegate)) {
|
if (StrUtil.isNotBlank(delegate)) {
|
||||||
DictData delegateDictData = dictDataService.getDictDataById(pqDevVO.getDelegate());
|
DictData delegateDictData = dictDataService.getDictDataById(pqDevVO.getManufacturer());
|
||||||
if (ObjectUtil.isNotNull(delegateDictData)) {
|
if (ObjectUtil.isNotNull(delegateDictData)) {
|
||||||
baseModelMap.put(BaseReportKeyEnum.DELEGATE.getKey(), delegateDictData.getName());
|
baseModelMap.put(BaseReportKeyEnum.DELEGATE.getKey(), delegateDictData.getName());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.njcn.gather.script.service.IPqScriptCheckDataService;
|
|||||||
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
||||||
import com.njcn.gather.script.util.ScriptDtlsDesc;
|
import com.njcn.gather.script.util.ScriptDtlsDesc;
|
||||||
import com.njcn.gather.script.util.ThreePhaseUnbalance;
|
import com.njcn.gather.script.util.ThreePhaseUnbalance;
|
||||||
|
import com.njcn.gather.source.service.IPqSourceService;
|
||||||
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||||
import com.njcn.gather.system.dictionary.service.IDictTreeService;
|
import com.njcn.gather.system.dictionary.service.IDictTreeService;
|
||||||
import com.njcn.gather.system.pojo.enums.DicDataEnum;
|
import com.njcn.gather.system.pojo.enums.DicDataEnum;
|
||||||
@@ -68,13 +69,13 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
|||||||
private final static String INHARM_I = "InHarm_I";
|
private final static String INHARM_I = "InHarm_I";
|
||||||
private final static String DIP = "Dip";
|
private final static String DIP = "Dip";
|
||||||
private final static String FLICKER = "Flicker";
|
private final static String FLICKER = "Flicker";
|
||||||
// @Value("${Dip.fPreTime}")
|
// @Value("${Dip.fPreTime}")
|
||||||
// private Double fPreTime;
|
// private Double fPreTime;
|
||||||
@Value("${Dip.fRampIn}")
|
@Value("${Dip.fRampIn}")
|
||||||
private Double fRampIn;
|
private Double fRampIn;
|
||||||
@Value("${Dip.fRampOut}")
|
@Value("${Dip.fRampOut}")
|
||||||
private Double fRampOut;
|
private Double fRampOut;
|
||||||
// @Value("${Dip.fAfterTime}")
|
// @Value("${Dip.fAfterTime}")
|
||||||
// private Double fAfterTime;
|
// private Double fAfterTime;
|
||||||
@Value("${Flicker.waveFluType}")
|
@Value("${Flicker.waveFluType}")
|
||||||
private String waveFluType;
|
private String waveFluType;
|
||||||
@@ -91,6 +92,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
|||||||
private final IDevTypeService devTypeService;
|
private final IDevTypeService devTypeService;
|
||||||
private final IDictTreeService dictTreeService;
|
private final IDictTreeService dictTreeService;
|
||||||
private final AdPlanMapper adPlanMapper;
|
private final AdPlanMapper adPlanMapper;
|
||||||
|
private final IPqSourceService pqSourceService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -781,7 +783,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
|||||||
@Override
|
@Override
|
||||||
public Set<String> getScriptToIcdCheckInfo(PreDetectionParam param) {
|
public Set<String> getScriptToIcdCheckInfo(PreDetectionParam param) {
|
||||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||||
issueParam.setSourceId(param.getSourceId());
|
issueParam.setSourceId(param.getSourceName());
|
||||||
issueParam.setDevIds(param.getDevIds());
|
issueParam.setDevIds(param.getDevIds());
|
||||||
issueParam.setScriptId(param.getScriptId());
|
issueParam.setScriptId(param.getScriptId());
|
||||||
issueParam.setIsPhaseSequence(CommonEnum.FORMAL_TEST.getValue());
|
issueParam.setIsPhaseSequence(CommonEnum.FORMAL_TEST.getValue());
|
||||||
@@ -974,7 +976,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
|||||||
for (int i = 0; i < pqScriptDtls.size(); i++) {
|
for (int i = 0; i < pqScriptDtls.size(); i++) {
|
||||||
PqScriptDtls scriptDtls = pqScriptDtls.get(i);
|
PqScriptDtls scriptDtls = pqScriptDtls.get(i);
|
||||||
// 注意此处scriptDtls.getValue() < 1.0,考虑到有些已经投入运行的地方,可能没有改库,避免不必要的异常
|
// 注意此处scriptDtls.getValue() < 1.0,考虑到有些已经投入运行的地方,可能没有改库,避免不必要的异常
|
||||||
if(scriptDtls.getValueType().equalsIgnoreCase("CUR") && scriptDtls.getValue() < 1.0){
|
if (scriptDtls.getValueType().equalsIgnoreCase("CUR") && scriptDtls.getValue() < 1.0) {
|
||||||
scriptDtls.setValue(devCurr * scriptDtls.getValue());
|
scriptDtls.setValue(devCurr * scriptDtls.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ spring:
|
|||||||
# url: jdbc:mysql://192.168.1.24:13306/pqs91002?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
|
# url: jdbc:mysql://192.168.1.24:13306/pqs91002?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
|
||||||
# username: root
|
# username: root
|
||||||
# password: njcnpqs
|
# password: njcnpqs
|
||||||
url: jdbc:mysql://192.168.1.24:13306/pqs9100_nx?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
|
url: jdbc:mysql://127.0.0.1:3306/pqs9100?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true
|
||||||
username: root
|
username: root
|
||||||
password: njcnpqs
|
password: njcnpqs
|
||||||
#初始化建立物理连接的个数、最小、最大连接数
|
#初始化建立物理连接的个数、最小、最大连接数
|
||||||
|
|||||||
Reference in New Issue
Block a user