@@ -33,7 +33,6 @@ 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.pojo.po.SourceInitialize;
|
||||
import com.njcn.gather.source.service.IPqSourceService;
|
||||
import com.njcn.gather.storage.pojo.param.StorageParam;
|
||||
import com.njcn.gather.storage.pojo.po.SimAndDigHarmonicResult;
|
||||
@@ -394,8 +393,7 @@ public class SocketDevResponseService {
|
||||
if (param.getTestItemList().get(2)) {
|
||||
//如果后续做正式检测
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||
issueParam.setSourceId(sourceInitialize.getSourceId());
|
||||
issueParam.setSourceId(param.getSourceName());
|
||||
issueParam.setPlanId(param.getPlanId());
|
||||
issueParam.setSourceId(param.getSourceId());
|
||||
issueParam.setDevIds(param.getDevIds());
|
||||
@@ -693,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();
|
||||
}
|
||||
|
||||
@@ -898,9 +896,10 @@ public class SocketDevResponseService {
|
||||
|
||||
//开始下源控制脚本
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||
issueParam.setSourceId(sourceInitialize.getSourceId());
|
||||
issueParam.setPlanId(param.getPlanId());
|
||||
issueParam.setSourceId(param.getSourceName());
|
||||
issueParam.setDevIds(param.getDevIds());
|
||||
issueParam.setScriptId(param.getScriptId());
|
||||
|
||||
socketMsg.setOperateCode(SourceOperateCodeEnum.OPER_GATHER.getValue());
|
||||
List<SourceIssue> sourceIssues;
|
||||
@@ -1166,8 +1165,7 @@ public class SocketDevResponseService {
|
||||
} else if (param.getTestItemList().get(2)) {
|
||||
// 后续做正式检测
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||
issueParam.setSourceId(sourceInitialize.getSourceId());
|
||||
issueParam.setSourceId(param.getSourceName());
|
||||
issueParam.setPlanId(param.getPlanId());
|
||||
issueParam.setDevIds(param.getDevIds());
|
||||
issueParam.setScriptId(param.getScriptId());
|
||||
@@ -1821,8 +1819,7 @@ public class SocketDevResponseService {
|
||||
XiNumberManager.devParameterList.add(devParameterSmall);
|
||||
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||
issueParam.setSourceId(sourceInitialize.getSourceId());
|
||||
issueParam.setSourceId(param.getSourceName());
|
||||
issueParam.setPlanId(param.getPlanId());
|
||||
issueParam.setDevIds(param.getDevIds());
|
||||
issueParam.setScriptId(param.getScriptId());
|
||||
|
||||
@@ -46,6 +46,11 @@ public class PreDetectionParam {
|
||||
*/
|
||||
private String sourceId;
|
||||
|
||||
/**
|
||||
* 源名称
|
||||
*/
|
||||
private String sourceName;
|
||||
|
||||
/**
|
||||
* 所属误差体系
|
||||
*/
|
||||
|
||||
@@ -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<>();
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -34,7 +34,6 @@ 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.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.service.IDictTreeService;
|
||||
@@ -784,8 +783,7 @@ public class PqScriptDtlsServiceImpl extends ServiceImpl<PqScriptDtlsMapper, PqS
|
||||
@Override
|
||||
public Set<String> getScriptToIcdCheckInfo(PreDetectionParam param) {
|
||||
PqScriptIssueParam issueParam = new PqScriptIssueParam();
|
||||
SourceInitialize sourceInitialize = pqSourceService.getSourceInitializeParam(param.getSourceId());
|
||||
issueParam.setSourceId(sourceInitialize.getSourceId());
|
||||
issueParam.setSourceId(param.getSourceName());
|
||||
issueParam.setDevIds(param.getDevIds());
|
||||
issueParam.setScriptId(param.getScriptId());
|
||||
issueParam.setIsPhaseSequence(CommonEnum.FORMAL_TEST.getValue());
|
||||
|
||||
Reference in New Issue
Block a user