双重预防项目-国泰新华二开定制版
16639036659
2023-12-01 0e43a0eea3d00229ac206062f062d0de4ed6f696
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerAcceptController.java
@@ -4,6 +4,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.security.ShiroUtils;
import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo;
import com.ruoyi.doublePrevention.service.RiskService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -13,6 +14,7 @@
import com.ruoyi.project.system.user.domain.User;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.HiddenDangerCheckPoint;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
@@ -81,6 +83,9 @@
        User sysUser = getSysUser();
        hiddenDangerCheckPoint.setUpdateBy(ShiroUtils.getLoginName());
        hiddenDangerCheckPoint.setUpdateTime(DateUtils.getNowDate());
        if (ObjectUtils.isEmpty(hiddenDangerCheckPoint.getAcceptCreateTime())){
            throw new RuntimeException("请填写验收时间");
        }
        if (!StringUtils.isEmpty(hiddenDangerCheckPoint.getAcceptResult())) {
            //验收结果 (0不通过 打回上一级整改阶段  1通过)
            if ("0".equals(hiddenDangerCheckPoint.getAcceptResult())) {
@@ -114,6 +119,10 @@
    public String detailDangerAccept(@PathVariable("id") Long id, ModelMap mmap) {
        //隐患排查实体
        HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id));
        PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(hiddenDangerCheckPoint.getId());
        if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){
            hiddenDangerCheckPoint.setReportTime(dangerInfo.getReportTime());
        }
        mmap.put("hdcp", hiddenDangerCheckPoint);
        return prefix + "/detailDangerAccept";
    }