10 Commits

Author SHA1 Message Date
caozehui
1cfea7fd6c 统一sourceId 2026-05-12 14:34:57 +08:00
caozehui
251e302e59 统一sourceId 2026-05-12 10:36:44 +08:00
caozehui
873e920add 微调 2026-04-22 09:36:35 +08:00
caozehui
fd7c6ada6b 回滚 2026-04-13 15:41:37 +08:00
caozehui
c148bddfc9 Revert "微调"
This reverts commit 4110a835c8.
2026-04-13 15:39:15 +08:00
caozehui
f0857b7c46 Revert "微调"
This reverts commit ef757c52ea.
2026-04-13 15:38:55 +08:00
9b1c6f61e6 revert e78ce544e3
revert 微调
2026-04-13 15:31:24 +08:00
caozehui
3f72c52cdc Revert "微调"
This reverts commit e78ce544e3.
2026-04-13 15:27:55 +08:00
caozehui
ef757c52ea 微调 2026-04-10 15:13:22 +08:00
caozehui
4110a835c8 微调 2026-04-10 14:13:27 +08:00
8 changed files with 28 additions and 13 deletions

View File

@@ -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.service.IPqScriptCheckDataService;
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.po.SimAndDigHarmonicResult;
import com.njcn.gather.storage.pojo.po.SimAndDigNonHarmonicResult;
@@ -76,6 +77,7 @@ public class SocketDevResponseService {
private final SimAndDigHarmonicService adHarmonicService;
private final IAdPlanService adPlanService;
private final IDictDataService dictDataService;
private final IPqSourceService pqSourceService;
/**
* 存储的装置相序数据
@@ -391,6 +393,7 @@ public class SocketDevResponseService {
if (param.getTestItemList().get(2)) {
//如果后续做正式检测
PqScriptIssueParam issueParam = new PqScriptIssueParam();
issueParam.setSourceId(param.getSourceName());
issueParam.setPlanId(param.getPlanId());
issueParam.setSourceId(param.getSourceId());
issueParam.setDevIds(param.getDevIds());
@@ -688,7 +691,7 @@ public class SocketDevResponseService {
*/
private Double reduceList(List<Double> valList) {
// 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();
}
@@ -894,7 +897,7 @@ public class SocketDevResponseService {
//开始下源控制脚本
PqScriptIssueParam issueParam = new PqScriptIssueParam();
issueParam.setPlanId(param.getPlanId());
issueParam.setSourceId(param.getSourceId());
issueParam.setSourceId(param.getSourceName());
issueParam.setDevIds(param.getDevIds());
issueParam.setScriptId(param.getScriptId());
@@ -1162,8 +1165,8 @@ public class SocketDevResponseService {
} else if (param.getTestItemList().get(2)) {
// 后续做正式检测
PqScriptIssueParam issueParam = new PqScriptIssueParam();
issueParam.setSourceId(param.getSourceName());
issueParam.setPlanId(param.getPlanId());
issueParam.setSourceId(param.getSourceId());
issueParam.setDevIds(param.getDevIds());
issueParam.setScriptId(param.getScriptId());
@@ -1816,8 +1819,8 @@ public class SocketDevResponseService {
XiNumberManager.devParameterList.add(devParameterSmall);
PqScriptIssueParam issueParam = new PqScriptIssueParam();
issueParam.setSourceId(param.getSourceName());
issueParam.setPlanId(param.getPlanId());
issueParam.setSourceId(param.getSourceId());
issueParam.setDevIds(param.getDevIds());
issueParam.setScriptId(param.getScriptId());
issueParam.setIsPhaseSequence(CommonEnum.COEFFICIENT_TEST.getValue());

View File

@@ -46,6 +46,11 @@ public class PreDetectionParam {
*/
private String sourceId;
/**
* 源名称
*/
private String sourceName;
/**
* 所属误差体系
*/

View File

@@ -135,6 +135,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
);
if (ObjectUtil.isNotNull(planSource)) {
SourceInitialize sourceParam = pqSourceService.getSourceInitializeParam(planSource.getSourceId());
param.setSourceName(sourceParam.getSourceId());
if (ObjectUtil.isNotNull(sourceParam)) {
//开始组装socket报文请求头
socketDevResponseService.initList(param);
@@ -181,6 +182,7 @@ public class PreDetectionServiceImpl implements PreDetectionService {
if (ObjectUtil.isNotNull(planSource)) {
//获取源初始化参数
SourceInitialize sourceParam = pqSourceService.getSourceInitializeParam(planSource.getSourceId());
param.setSourceName(sourceParam.getSourceId());
if (ObjectUtil.isNotNull(sourceParam)) {
//开始组装socket报文请求头
socketDevResponseService.initList(param);
@@ -243,6 +245,8 @@ public class PreDetectionServiceImpl implements PreDetectionService {
FormalTestManager.stopFlag = false;
socketDevResponseService.initRestart();
List<SourceIssue> sourceIssueList = SocketManager.getSourceList();
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
param.setSourceName(sourceInitialize.getSourceId());
if (CollUtil.isNotEmpty(sourceIssueList)) {
SourceIssue sourceIssues = SocketManager.getSourceList().get(0);
SocketMsg<String> xuMsg = new SocketMsg<>();
@@ -289,7 +293,8 @@ public class PreDetectionServiceImpl implements PreDetectionService {
}
//组装源控制脚本
PqScriptIssueParam issueParam = new PqScriptIssueParam();
issueParam.setSourceId(param.getSourceId());
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
issueParam.setSourceId(sourceInitialize.getSourceId());
issueParam.setScriptId(param.getScriptId());
issueParam.setType(1);
issueParam.setIsPhaseSequence(SourceOperateCodeEnum.SIMULATE_TEST.getValue());

View File

@@ -47,7 +47,7 @@ public class CnSocketUtil {
socketMsg.setRequestId(SourceOperateCodeEnum.QUITE_SOURCE.getValue());
socketMsg.setOperateCode(SourceOperateCodeEnum.CLOSE_GATHER.getValue());
JSONObject jsonObject = new JSONObject();
jsonObject.put("sourceId", param.getSourceId());
jsonObject.put("sourceId", param.getSourceName());
socketMsg.setData(jsonObject.toJSONString());
SocketManager.sendMsg(param.getUserPageId() + SOURCE_TAG, JSON.toJSONString(socketMsg));
WebServiceManager.removePreDetectionParam(param.getUserPageId());

View File

@@ -1265,7 +1265,7 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
for (int i = 1; i <= maxTime; i++) {
row2[i] = 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();
row3[i] = passCount + "";
row4[i] = total + "";

View File

@@ -2063,7 +2063,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
// 委托方
String delegate = pqDevVO.getDelegate();
if (StrUtil.isNotBlank(delegate)) {
DictData delegateDictData = dictDataService.getDictDataById(pqDevVO.getDelegate());
DictData delegateDictData = dictDataService.getDictDataById(pqDevVO.getManufacturer());
if (ObjectUtil.isNotNull(delegateDictData)) {
baseModelMap.put(BaseReportKeyEnum.DELEGATE.getKey(), delegateDictData.getName());
} else {

View File

@@ -34,6 +34,7 @@ import com.njcn.gather.script.service.IPqScriptCheckDataService;
import com.njcn.gather.script.service.IPqScriptDtlsService;
import com.njcn.gather.script.util.ScriptDtlsDesc;
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.service.IDictTreeService;
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 DIP = "Dip";
private final static String FLICKER = "Flicker";
// @Value("${Dip.fPreTime}")
// @Value("${Dip.fPreTime}")
// private Double fPreTime;
@Value("${Dip.fRampIn}")
private Double fRampIn;
@Value("${Dip.fRampOut}")
private Double fRampOut;
// @Value("${Dip.fAfterTime}")
// @Value("${Dip.fAfterTime}")
// private Double fAfterTime;
@Value("${Flicker.waveFluType}")
private String waveFluType;
@@ -91,6 +92,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
private final IDevTypeService devTypeService;
private final IDictTreeService dictTreeService;
private final AdPlanMapper adPlanMapper;
private final IPqSourceService pqSourceService;
@Override
@Transactional
@@ -781,7 +783,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
@Override
public Set<String> getScriptToIcdCheckInfo(PreDetectionParam param) {
PqScriptIssueParam issueParam = new PqScriptIssueParam();
issueParam.setSourceId(param.getSourceId());
issueParam.setSourceId(param.getSourceName());
issueParam.setDevIds(param.getDevIds());
issueParam.setScriptId(param.getScriptId());
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++) {
PqScriptDtls scriptDtls = pqScriptDtls.get(i);
// 注意此处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());
}
}

View File

@@ -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
# username: root
# 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
password: njcnpqs
#初始化建立物理连接的个数、最小、最大连接数