From 56c84cd7fb04407536eb0135162313029828a81f Mon Sep 17 00:00:00 2001 From: 16639036659 <577530412@qq.com> Date: 星期一, 11 十二月 2023 10:14:41 +0800 Subject: [PATCH] 暂时提交 --- src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java b/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java index 78ca05c..82a44f7 100644 --- a/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java +++ b/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java @@ -481,7 +481,6 @@ controlMeasure.setCreateByUserName(sysUser.getUserName()); controlMeasure.setRiskEventUuid(riskEvent.getUuid()); - //todo 对所属企业id和uuid没有进行设置 PreventReportConfig reportConfigById = preventReportConfigService.getReportConfigById(SyncEnum.REPORT_CONFIG_RISK_ANA_UNIT.getCode()); //设置上报时间为空 controlMeasure.setReportTime(null); @@ -815,7 +814,7 @@ jobAndMeasure.setJobId(jobId); jobAndMeasure.setJobUuid(jobUuid); jobAndMeasure.setMeasureId(checkUnit.getControlMeasureId()); - jobAndMeasure.setMeasureUuid(preventRiskControlMeasureById.getUuid());//todo 如果删除了措施 此处可能为空,后续处理 + jobAndMeasure.setMeasureUuid(preventRiskControlMeasureById.getUuid());//如果删除了措施 此处可能为空,后续处理 //获取上报主配置信息 PreventReportConfig reportConfigById = preventReportConfigService.getReportConfigById(SyncEnum.REPORT_CONFIG_TASK_FROM_WORK.getCode()); //设置上报时间为空 @@ -877,7 +876,7 @@ //使用保存下来的uuid,再次添加关联关系 jobAndMeasure.setJobUuid(jobUuid); jobAndMeasure.setMeasureId(checkUnit.getControlMeasureId()); - jobAndMeasure.setMeasureUuid(preventRiskControlMeasureById.getUuid());//todo 如果删除了措施 此处可能为空,后续处理 + jobAndMeasure.setMeasureUuid(preventRiskControlMeasureById.getUuid());//如果删除了措施 此处可能为空,后续处理 //获取上报主配置信息 PreventReportConfig reportConfigById = preventReportConfigService.getReportConfigById(SyncEnum.REPORT_CONFIG_TASK_FROM_WORK.getCode()); @@ -983,12 +982,12 @@ 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); @@ -996,7 +995,7 @@ 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){ @@ -1038,6 +1037,12 @@ 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); @@ -1047,17 +1052,18 @@ 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()); } @@ -1278,7 +1284,6 @@ return listQueryRespDTOs; } - /** * 管控措施-不分页查询 */ @@ -1298,6 +1303,7 @@ ResultVO<List<PreventRiskControlMeasureListQueryRespDTO>> resultVO = new ResultVO<>(ResultCodes.OK,pageResult); return resultVO; } + /** * 通过排查点,查找管控措施id */ @@ -1305,6 +1311,7 @@ public PreventRiskCheckUnit getRiskControlMeasureByCheckPointId(Long checkPointId) { return preventRiskCheckUnitService.getUnitByBaseCheckPointId(checkPointId); } + /** * 查询管控措施信息 */ @@ -1342,7 +1349,7 @@ // /** -// * 全流程隐患上报-附属表信息插入 +// * 全流程 隐患上报-附属表信息插入 // * */ // @Override // public int insertAllDangerInfo(Long id, HiddenDangerCheckPoint hdcp) { -- Gitblit v1.9.2