Compare commits
6 Commits
2026-04
...
29b0a4f966
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29b0a4f966 | ||
|
|
c651b18e72 | ||
|
|
6fd180b4d4 | ||
|
|
282f9cf4eb | ||
|
|
1cfea7fd6c | ||
|
|
251e302e59 |
@@ -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());
|
||||||
|
|||||||
@@ -289,7 +289,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());
|
||||||
|
|||||||
@@ -39,4 +39,9 @@ public class DevReportParam implements Serializable {
|
|||||||
* 批量下载时传递的被检设备id列表
|
* 批量下载时传递的被检设备id列表
|
||||||
*/
|
*/
|
||||||
private List<String> devIdList;
|
private List<String> devIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测报告模板
|
||||||
|
*/
|
||||||
|
private String reportTemplateName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import com.njcn.gather.err.pojo.po.PqErrSys;
|
|||||||
import com.njcn.gather.err.service.IPqErrSysService;
|
import com.njcn.gather.err.service.IPqErrSysService;
|
||||||
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
||||||
import com.njcn.gather.monitor.service.IPqMonitorService;
|
import com.njcn.gather.monitor.service.IPqMonitorService;
|
||||||
|
import com.njcn.gather.plan.mapper.AdPlanMapper;
|
||||||
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
||||||
import com.njcn.gather.plan.pojo.enums.PlanReportStateEnum;
|
import com.njcn.gather.plan.pojo.enums.PlanReportStateEnum;
|
||||||
import com.njcn.gather.plan.pojo.po.AdPlan;
|
import com.njcn.gather.plan.pojo.po.AdPlan;
|
||||||
@@ -175,6 +176,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
|||||||
private final IPqDevSubService iPqDevSubService;
|
private final IPqDevSubService iPqDevSubService;
|
||||||
private final IDictDataService dictDataService;
|
private final IDictDataService dictDataService;
|
||||||
private final IAdPlanService adPlanService;
|
private final IAdPlanService adPlanService;
|
||||||
|
private final AdPlanMapper pqPlanMapper;
|
||||||
private final IPqScriptDtlsService pqScriptDtlsService;
|
private final IPqScriptDtlsService pqScriptDtlsService;
|
||||||
private final SimAndDigNonHarmonicService adNonHarmonicService;
|
private final SimAndDigNonHarmonicService adNonHarmonicService;
|
||||||
private final SimAndDigHarmonicService adHarmonicService;
|
private final SimAndDigHarmonicService adHarmonicService;
|
||||||
@@ -788,6 +790,9 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
|||||||
* @param devReportParam 设备信息
|
* @param devReportParam 设备信息
|
||||||
*/
|
*/
|
||||||
private void generateReportByPlanContrast(AdPlan plan, DevReportParam devReportParam) {
|
private void generateReportByPlanContrast(AdPlan plan, DevReportParam devReportParam) {
|
||||||
|
String reportTemplateName = devReportParam.getReportTemplateName();
|
||||||
|
String[] split = reportTemplateName.split("_");
|
||||||
|
String reportTemplateId = pqPlanMapper.getReportIdByNameAndVersion(split[0], split[1]);
|
||||||
// 支持批量生成报告
|
// 支持批量生成报告
|
||||||
devReportParam.getDevIdList().forEach(devId -> {
|
devReportParam.getDevIdList().forEach(devId -> {
|
||||||
// 准备被检设备的基础信息
|
// 准备被检设备的基础信息
|
||||||
@@ -802,7 +807,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
|||||||
if (Objects.isNull(devType)) {
|
if (Objects.isNull(devType)) {
|
||||||
throw new BusinessException(ReportResponseEnum.DEVICE_TYPE_NOT_EXIST);
|
throw new BusinessException(ReportResponseEnum.DEVICE_TYPE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
PqReport report = this.lambdaQuery().eq(PqReport::getId, plan.getReportTemplateId()).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
|
PqReport report = this.lambdaQuery().eq(PqReport::getId, reportTemplateId).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
|
||||||
if (Objects.isNull(report)) {
|
if (Objects.isNull(report)) {
|
||||||
throw new BusinessException(ReportResponseEnum.REPORT_TEMPLATE_NOT_EXIST);
|
throw new BusinessException(ReportResponseEnum.REPORT_TEMPLATE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
@@ -866,6 +871,9 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
|||||||
* @param devReportParam 设备信息
|
* @param devReportParam 设备信息
|
||||||
*/
|
*/
|
||||||
private void generateReportByPlan(AdPlan plan, DevReportParam devReportParam) {
|
private void generateReportByPlan(AdPlan plan, DevReportParam devReportParam) {
|
||||||
|
String reportTemplateName = devReportParam.getReportTemplateName();
|
||||||
|
String[] split = reportTemplateName.split("_");
|
||||||
|
String reportTemplateId = pqPlanMapper.getReportIdByNameAndVersion(split[0], split[1]);
|
||||||
// 支持批量生成报告
|
// 支持批量生成报告
|
||||||
devReportParam.getDevIdList().forEach(devId -> {
|
devReportParam.getDevIdList().forEach(devId -> {
|
||||||
// 准备被检设备的基础信息
|
// 准备被检设备的基础信息
|
||||||
@@ -879,7 +887,7 @@ public class PqReportServiceImpl extends ServiceImpl<PqReportMapper, PqReport> i
|
|||||||
if (Objects.isNull(devType)) {
|
if (Objects.isNull(devType)) {
|
||||||
throw new BusinessException(ReportResponseEnum.DEVICE_TYPE_NOT_EXIST);
|
throw new BusinessException(ReportResponseEnum.DEVICE_TYPE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
PqReport report = this.lambdaQuery().eq(PqReport::getId, plan.getReportTemplateId()).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
|
PqReport report = this.lambdaQuery().eq(PqReport::getId, reportTemplateId).eq(PqReport::getState, DataStateEnum.ENABLE.getCode()).one();
|
||||||
if (Objects.isNull(report)) {
|
if (Objects.isNull(report)) {
|
||||||
throw new BusinessException(ReportResponseEnum.REPORT_TEMPLATE_NOT_EXIST);
|
throw new BusinessException(ReportResponseEnum.REPORT_TEMPLATE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,4 +201,16 @@ public class ResultController extends BaseController {
|
|||||||
List<ContrastTestItemVO> result = resultService.getCheckItem(monitorQueryParam.getPlanId(), monitorQueryParam.getDevId(), monitorQueryParam.getChnNum(), monitorQueryParam.getNum(), monitorQueryParam.getCode());
|
List<ContrastTestItemVO> result = resultService.getCheckItem(monitorQueryParam.getPlanId(), monitorQueryParam.getDevId(), monitorQueryParam.getChnNum(), monitorQueryParam.getNum(), monitorQueryParam.getCode());
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/canTest")
|
||||||
|
@ApiOperation("是否还能进行检测")
|
||||||
|
@ApiImplicitParam(name = "devIds", value = "设备id", required = true)
|
||||||
|
public HttpResult<Boolean> canTest(@RequestBody List<String> devIds) {
|
||||||
|
String methodDescribe = getMethodDescribe("canTest");
|
||||||
|
LogUtil.njcnDebug(log, "{},查询数据为,devIds=:{}", methodDescribe, devIds);
|
||||||
|
|
||||||
|
boolean result = resultService.canTest(devIds);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,9 @@ public class FormContentVO {
|
|||||||
* 有多少次波形录制
|
* 有多少次波形录制
|
||||||
*/
|
*/
|
||||||
private Integer waveNumTotal;
|
private Integer waveNumTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报表模板
|
||||||
|
*/
|
||||||
|
private String reportTemplateName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,4 +138,12 @@ public interface IResultService {
|
|||||||
Map<Integer, List<ContrastTestResult>> getContrastResultForReport(DevReportParam devReportParam, PqDevVO pqDevVO);
|
Map<Integer, List<ContrastTestResult>> getContrastResultForReport(DevReportParam devReportParam, PqDevVO pqDevVO);
|
||||||
|
|
||||||
ContrastTestResult getContrastResultHarm(MonitorResultVO monitorResultVO, List<String> scriptId, Integer planCode, DictTree dictTree);
|
ContrastTestResult getContrastResultHarm(MonitorResultVO monitorResultVO, List<String> scriptId, Integer planCode, DictTree dictTree);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断设备是否可以测试
|
||||||
|
*
|
||||||
|
* @param devIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean canTest(List<String> devIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ import com.njcn.gather.device.service.IPqStandardDevService;
|
|||||||
import com.njcn.gather.err.service.IPqErrSysService;
|
import com.njcn.gather.err.service.IPqErrSysService;
|
||||||
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
import com.njcn.gather.monitor.pojo.po.PqMonitor;
|
||||||
import com.njcn.gather.monitor.service.IPqMonitorService;
|
import com.njcn.gather.monitor.service.IPqMonitorService;
|
||||||
|
import com.njcn.gather.plan.mapper.AdPlanMapper;
|
||||||
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.AdPlanTestConfig;
|
import com.njcn.gather.plan.pojo.po.AdPlanTestConfig;
|
||||||
@@ -52,6 +53,7 @@ import com.njcn.gather.report.pojo.constant.PowerConstant;
|
|||||||
import com.njcn.gather.report.pojo.enums.AffectEnum;
|
import com.njcn.gather.report.pojo.enums.AffectEnum;
|
||||||
import com.njcn.gather.report.pojo.enums.ItemReportKeyEnum;
|
import com.njcn.gather.report.pojo.enums.ItemReportKeyEnum;
|
||||||
import com.njcn.gather.report.pojo.enums.PowerIndexEnum;
|
import com.njcn.gather.report.pojo.enums.PowerIndexEnum;
|
||||||
|
import com.njcn.gather.report.pojo.po.PqReport;
|
||||||
import com.njcn.gather.report.pojo.result.ContrastTestResult;
|
import com.njcn.gather.report.pojo.result.ContrastTestResult;
|
||||||
import com.njcn.gather.report.pojo.result.SingleTestResult;
|
import com.njcn.gather.report.pojo.result.SingleTestResult;
|
||||||
import com.njcn.gather.result.pojo.enums.ResultUnitEnum;
|
import com.njcn.gather.result.pojo.enums.ResultUnitEnum;
|
||||||
@@ -112,6 +114,7 @@ import static com.njcn.gather.plan.pojo.enums.DataSourceEnum.*;
|
|||||||
public class ResultServiceImpl implements IResultService {
|
public class ResultServiceImpl implements IResultService {
|
||||||
|
|
||||||
private final IAdPlanService adPlanService;
|
private final IAdPlanService adPlanService;
|
||||||
|
private final AdPlanMapper adPlanMapper;
|
||||||
private final IAdPlanTestConfigService adPlanTestConfigService;
|
private final IAdPlanTestConfigService adPlanTestConfigService;
|
||||||
private final IPqDevService pqDevService;
|
private final IPqDevService pqDevService;
|
||||||
private final IPqStandardDevService pqStandardDevService;
|
private final IPqStandardDevService pqStandardDevService;
|
||||||
@@ -127,7 +130,6 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
private final DetectionServiceImpl detectionServiceImpl;
|
private final DetectionServiceImpl detectionServiceImpl;
|
||||||
private final IDictDataService dictDataService;
|
private final IDictDataService dictDataService;
|
||||||
private final IPqScriptCheckDataService iPqScriptCheckDataService;
|
private final IPqScriptCheckDataService iPqScriptCheckDataService;
|
||||||
private final IPqDevService iPqDevService;
|
|
||||||
private final IAdPariService adPairService;
|
private final IAdPariService adPairService;
|
||||||
private final IPqMonitorService pqMonitorService;
|
private final IPqMonitorService pqMonitorService;
|
||||||
private final IPqErrSysService pqErrSysService;
|
private final IPqErrSysService pqErrSysService;
|
||||||
@@ -144,6 +146,8 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
FormContentVO formContentVO = new FormContentVO();
|
FormContentVO formContentVO = new FormContentVO();
|
||||||
AdPlan plan = adPlanService.getById(queryParam.getPlanId());
|
AdPlan plan = adPlanService.getById(queryParam.getPlanId());
|
||||||
formContentVO.setErrorSysId(plan.getErrorSysId());
|
formContentVO.setErrorSysId(plan.getErrorSysId());
|
||||||
|
PqReport report = adPlanMapper.getPqReportById(plan.getReportTemplateId());
|
||||||
|
formContentVO.setReportTemplateName(report.getName() + "_" + report.getVersion());
|
||||||
String scriptId = null;
|
String scriptId = null;
|
||||||
if (ObjectUtil.isNotNull(plan)) {
|
if (ObjectUtil.isNotNull(plan)) {
|
||||||
formContentVO.setDataRule(plan.getDataRule());
|
formContentVO.setDataRule(plan.getDataRule());
|
||||||
@@ -2144,6 +2148,19 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canTest(List<String> devIds) {
|
||||||
|
for (String devId : devIds) {
|
||||||
|
PqDevVO pqDevVO = pqDevService.getPqDevById(devId);
|
||||||
|
AdPlanTestConfig adPlanTestConfig = adPlanTestConfigService.getByPlanId(pqDevVO.getPlanId());
|
||||||
|
Integer maxTime = adPlanTestConfig.getMaxTime();
|
||||||
|
if (maxTime != null && maxTime <= pqDevVO.getRecheckNum()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断值是否为零
|
* 判断值是否为零
|
||||||
*
|
*
|
||||||
@@ -3140,7 +3157,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
checkDataParam.setIsValueTypeName(false);
|
checkDataParam.setIsValueTypeName(false);
|
||||||
List<String> valueType = iPqScriptCheckDataService.getValueType(checkDataParam);
|
List<String> valueType = iPqScriptCheckDataService.getValueType(checkDataParam);
|
||||||
|
|
||||||
iPqDevService.updateResult(param.getDevIds(), valueType, param.getCode(), param.getUserId(), param.getTemperature(), param.getHumidity());
|
pqDevService.updateResult(param.getDevIds(), valueType, param.getCode(), param.getUserId(), param.getTemperature(), param.getHumidity());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -68,13 +70,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 +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());
|
||||||
@@ -974,7 +978,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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user