@@ -201,16 +201,4 @@ 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,12 +138,4 @@ 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);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ 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;
|
||||||
@@ -2148,19 +2149,6 @@ 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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断值是否为零
|
* 判断值是否为零
|
||||||
*
|
*
|
||||||
@@ -3157,7 +3145,7 @@ public class ResultServiceImpl implements IResultService {
|
|||||||
checkDataParam.setIsValueTypeName(false);
|
checkDataParam.setIsValueTypeName(false);
|
||||||
List<String> valueType = iPqScriptCheckDataService.getValueType(checkDataParam);
|
List<String> valueType = iPqScriptCheckDataService.getValueType(checkDataParam);
|
||||||
|
|
||||||
pqDevService.updateResult(param.getDevIds(), valueType, param.getCode(), param.getUserId(), param.getTemperature(), param.getHumidity());
|
iPqDevService.updateResult(param.getDevIds(), valueType, param.getCode(), param.getUserId(), param.getTemperature(), param.getHumidity());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user