双重预防项目-国泰新华二开定制版
heheng
2025-06-24 e98eeaaa5766511fdb8e6d5e412eb1c59d1f07ce
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerExamineController.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.security.ShiroUtils;
import com.ruoyi.doublePrevention.entity.PreventRiskDangerConfirmLog;
import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo;
import com.ruoyi.doublePrevention.service.RiskService;
import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerConfirmLogService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
@@ -223,12 +224,12 @@
        if(hiddenDangerCheckPoint.getRectifyDeadlineTime()!=null) {
            rectifyRemindJPush(hiddenDangerCheckPoint);
        }
        //此处插入隐患附属表
        //此处插入隐患附属表   20250623 位置变更注释掉
        //HiddenDangerCheckPoint hiddenDangerCheckPointById = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hiddenDangerCheckPoint.getId());
        int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint);
        if (result< 1){
            throw new RuntimeException("添加隐患附属信息失败");
        }
//        int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint);
//        if (result< 1){
//            throw new RuntimeException("添加隐患附属信息失败");
//        }
        HiddenDangerCheckPoint hdcp = hiddenDangerCheckPointService.getHiddenDangerCheckPointById(hiddenDangerCheckPoint.getId());
        int confirmResult = confirmLogService.saveConfirmLog(hdcp);
@@ -272,6 +273,14 @@
    public String detailDangerExamine(@PathVariable("id") Long id, ModelMap mmap) {
        //隐患排查实体
        HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id));
        PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId());
        if (ObjectUtils.isNotEmpty(dangerInfo)){
            hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode());
            hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc());
            hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason());
            hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType());
            hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult());
        }
        mmap.put("hdcp", hiddenDangerCheckPoint);
        return prefix + "/detailDangerExamine";
    }