5 Commits

Author SHA1 Message Date
caozehui
0787901d60 微调 2026-06-08 08:43:42 +08:00
caozehui
4afcec7fb9 Revert "sntp"
This reverts commit a48dad40f6.
2026-06-04 17:34:02 +08:00
caozehui
a48dad40f6 sntp 2026-06-04 17:23:44 +08:00
caozehui
c8217046c6 忽略中断事件 2026-06-04 11:08:51 +08:00
caozehui
0a16a1fee5 统一sourceId 2026-05-12 10:34:46 +08:00
5 changed files with 35 additions and 17 deletions

View File

@@ -33,6 +33,8 @@ 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.pojo.po.SourceInitialize;
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 +78,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 +394,8 @@ public class SocketDevResponseService {
if (param.getTestItemList().get(2)) { if (param.getTestItemList().get(2)) {
//如果后续做正式检测 //如果后续做正式检测
PqScriptIssueParam issueParam = new PqScriptIssueParam(); PqScriptIssueParam issueParam = new PqScriptIssueParam();
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
issueParam.setSourceId(sourceInitialize.getSourceId());
issueParam.setPlanId(param.getPlanId()); issueParam.setPlanId(param.getPlanId());
issueParam.setSourceId(param.getSourceId()); issueParam.setSourceId(param.getSourceId());
issueParam.setDevIds(param.getDevIds()); issueParam.setDevIds(param.getDevIds());
@@ -893,10 +898,9 @@ public class SocketDevResponseService {
//开始下源控制脚本 //开始下源控制脚本
PqScriptIssueParam issueParam = new PqScriptIssueParam(); PqScriptIssueParam issueParam = new PqScriptIssueParam();
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
issueParam.setSourceId(sourceInitialize.getSourceId());
issueParam.setPlanId(param.getPlanId()); issueParam.setPlanId(param.getPlanId());
issueParam.setSourceId(param.getSourceId());
issueParam.setDevIds(param.getDevIds());
issueParam.setScriptId(param.getScriptId());
socketMsg.setOperateCode(SourceOperateCodeEnum.OPER_GATHER.getValue()); socketMsg.setOperateCode(SourceOperateCodeEnum.OPER_GATHER.getValue());
List<SourceIssue> sourceIssues; List<SourceIssue> sourceIssues;
@@ -1162,8 +1166,9 @@ public class SocketDevResponseService {
} else if (param.getTestItemList().get(2)) { } else if (param.getTestItemList().get(2)) {
// 后续做正式检测 // 后续做正式检测
PqScriptIssueParam issueParam = new PqScriptIssueParam(); PqScriptIssueParam issueParam = new PqScriptIssueParam();
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
issueParam.setSourceId(sourceInitialize.getSourceId());
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 +1821,9 @@ public class SocketDevResponseService {
XiNumberManager.devParameterList.add(devParameterSmall); XiNumberManager.devParameterList.add(devParameterSmall);
PqScriptIssueParam issueParam = new PqScriptIssueParam(); PqScriptIssueParam issueParam = new PqScriptIssueParam();
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
issueParam.setSourceId(sourceInitialize.getSourceId());
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());

View File

@@ -275,6 +275,9 @@ public class SocketFreqConverterDevService {
if (DetectionCodeEnum.MAG.getCode().equalsIgnoreCase(sqlDataDTO.getDesc())) { if (DetectionCodeEnum.MAG.getCode().equalsIgnoreCase(sqlDataDTO.getDesc())) {
residualVoltage = value; residualVoltage = value;
if (residualVoltage <= 6) {
return;
}
} else if (DetectionCodeEnum.DUR.getCode().equalsIgnoreCase(sqlDataDTO.getDesc())) { } else if (DetectionCodeEnum.DUR.getCode().equalsIgnoreCase(sqlDataDTO.getDesc())) {
durationMs = (int) Math.round(value * 1000); durationMs = (int) Math.round(value * 1000);
} }

View File

@@ -228,14 +228,15 @@ public class SocketFreqConverterService {
} }
private void handleCloseSerial(String converterChannelTag, FreqConverterRespDTO respDTO) { private void handleCloseSerial(String converterChannelTag, FreqConverterRespDTO respDTO) {
if (respDTO.getCode() == 0 && respDTO.getSuccess()) {
if (FormalTestManager.currentFreqConverterId != null) { if (FormalTestManager.currentFreqConverterId != null) {
pqFreqConverterConfigService.updateTestStatus(FormalTestManager.currentFreqConverterId, 1); pqFreqConverterConfigService.updateTestStatus(FormalTestManager.currentFreqConverterId, 1);
} }
cleanup(converterChannelTag); cleanup(converterChannelTag);
} else { // if (respDTO.getCode() == 0 && respDTO.getSuccess()) {
this.sendClose(converterChannelTag); //
} // } else {
// this.sendClose(converterChannelTag);
// }
} }

View File

@@ -25,6 +25,7 @@ import com.njcn.gather.detection.util.socket.websocket.WebServiceManager;
import com.njcn.gather.device.pojo.po.PqDev; import com.njcn.gather.device.pojo.po.PqDev;
import com.njcn.gather.device.pojo.vo.PreDetection; import com.njcn.gather.device.pojo.vo.PreDetection;
import com.njcn.gather.device.service.IPqDevService; import com.njcn.gather.device.service.IPqDevService;
import com.njcn.gather.freqConverter.service.IPqFreqConverterConfigService;
import com.njcn.gather.plan.pojo.enums.DataSourceEnum; import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
import com.njcn.gather.plan.pojo.po.AdPlan; import com.njcn.gather.plan.pojo.po.AdPlan;
import com.njcn.gather.plan.pojo.po.AdPlanSource; import com.njcn.gather.plan.pojo.po.AdPlanSource;
@@ -79,6 +80,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
private final IPqScriptCheckDataService iPqScriptCheckDataService; private final IPqScriptCheckDataService iPqScriptCheckDataService;
private final SocketManager socketManager; private final SocketManager socketManager;
private final ISysTestConfigService sysTestConfigService; private final ISysTestConfigService sysTestConfigService;
private final IPqFreqConverterConfigService pqFreqConverterConfigService;
@Value("${report.reportDir}") @Value("${report.reportDir}")
@@ -289,7 +291,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());
@@ -421,6 +424,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
@Override @Override
public void stopFreqConverter(String converterTag, String devTag) { public void stopFreqConverter(String converterTag, String devTag) {
pqFreqConverterConfigService.updateTestStatus(FormalTestManager.currentFreqConverterId, 1);
socketFreqConverterService.stopTest(converterTag, devTag); socketFreqConverterService.stopTest(converterTag, devTag);
socketFreqConverterDevService.stopTest(converterTag, devTag); socketFreqConverterDevService.stopTest(converterTag, devTag);
} }

View File

@@ -34,6 +34,8 @@ 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.pojo.po.SourceInitialize;
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;
@@ -91,6 +93,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 +784,8 @@ 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()); SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
issueParam.setSourceId(sourceInitialize.getSourceId());
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());