| | |
| | | if (checkUnit == null){
|
| | | throw new RuntimeException("基础检查点不存在");
|
| | | }
|
| | | System.out.println("通过一次检验");
|
| | | // System.out.println("通过一次检验");
|
| | | PreventRiskControlMeasure controlMeasure = riskControlMeasureService.getPreventRiskControlMeasureById(checkUnit.getControlMeasureId());
|
| | | if (controlMeasure == null){
|
| | | throw new RuntimeException("管控措施已经被删除");
|
| | | }
|
| | | System.out.println("通过二次检验");
|
| | | // System.out.println("通过二次检验");
|
| | | //封装数据
|
| | | checkAndMeasure.setCheckId(hdcp.getCheckId());
|
| | | checkAndMeasure.setDangerCheckPointId(id);
|
| | |
| | | checkAndMeasure.setControlMeasureId(controlMeasure.getId());
|
| | | checkAndMeasure.setCheckContent(controlMeasure.getCheckContent());
|
| | | checkAndMeasure.setCheckResult((byte) 4);
|
| | | System.out.println("数据封装完成");
|
| | | // System.out.println("数据封装完成");
|
| | | //写入核查任务检查点与管控措施信息
|
| | | int result = preventRiskDangerCheckAndMeasureService.insertCheckAndMeasure(checkAndMeasure);
|
| | | if (result <1){
|
| | |
| | |
|
| | | String dangerInfoUuid = UUID.randomUUID().toString();
|
| | | PreventRiskDangerInfo dangerInfo = new PreventRiskDangerInfo();
|
| | | // if (ObjectUtils.isEmpty(hdcp.getDangerSrc())){
|
| | | // throw new RuntimeException("隐患来源为空");
|
| | | // }
|
| | | // if (ObjectUtils.isEmpty(hdcp.getHazardDangerType())){
|
| | | // throw new RuntimeException("隐患类型为空");
|
| | | // }
|
| | |
|
| | | dangerInfo.setUuid(dangerInfoUuid);
|
| | | dangerInfo.setDangerCheckPointId(id);
|
| | |
| | | dangerInfo.setDangerReason(hdcp.getDangerReason());
|
| | | dangerInfo.setDangerResult(hdcp.getDangerResult());
|
| | | dangerInfo.setHazardDangerType(hdcp.getHazardDangerType());
|
| | | // if (ObjectUtils.isNotEmpty(hdcp.getsta))
|
| | | //隐患状态 0未验收 1验收通过 2验收未通过
|
| | | if (hdcp.getAcceptStatus() == null){
|
| | | //设置为 空
|
| | | dangerInfo.setDangerState(StatusEnum.RECTIFY_ING.getCode());
|
| | | } else if (hdcp.getAcceptStatus().equals(0)){
|
| | | } else if (hdcp.getAcceptStatus().equals("0")){
|
| | | //设置为整改中
|
| | | dangerInfo.setDangerState(StatusEnum.RECTIFY_ING.getCode());
|
| | | } else if (hdcp.getAcceptStatus().equals(1)) {
|
| | | } else if (hdcp.getAcceptStatus().equals("1")) {
|
| | | //设置为已验收
|
| | | dangerInfo.setDangerState(StatusEnum.ACCEPT_SUCCESS.getCode());
|
| | | }else if (hdcp.getAcceptStatus().equals(2)){
|
| | | }else if (hdcp.getAcceptStatus().equals("2")){
|
| | | //设置为超期未整改
|
| | | dangerInfo.setDangerState(StatusEnum.RECTIFY_TIMEOUT_AND_FAIL.getCode());
|
| | | }
|
| | |
| | | //设置本条数据上报开关为-关闭
|
| | | dangerInfo.setReportSwitch(SyncEnum.REPORT_OFF.getCode());
|
| | | }
|
| | |
|
| | | return preventRiskDangerInfoService.insertDangerInfo(dangerInfo);
|
| | | int result = preventRiskDangerInfoService.insertDangerInfo(dangerInfo);
|
| | | return result;
|
| | | }
|
| | |
|
| | | /**
|