双重预防项目-国泰新华二开定制版
16639036659
2023-12-01 3c2db2a49c212c948fa3fa62d7a86930b8bbb9fc
临时提交
已修改4个文件
43 ■■■■■ 文件已修改
src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerAcceptController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerLedgerController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/mobile/service/ApiHiddenDangerCheckService.java
@@ -7,6 +7,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.doublePrevention.service.baseService.PreventRiskDangerCheckAndMeasureService;
import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerConfirmLogService;
@@ -123,6 +124,14 @@
                    return ApiResult.success("传输hiddenDangerCheckType有误", new ArrayList<HiddenDangerCheck>());
                }
                List<HiddenDangerCheckPoint> resultList = hdcpService.selectHiddenDangerCheckPointList(hdcp);
                for (HiddenDangerCheckPoint dangerCheckPoint : resultList) {
                    PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(dangerCheckPoint.getId());
                    if (ObjectUtils.isNotEmpty(dangerInfo)){
                        if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){
                            dangerCheckPoint.setReportTime(dangerInfo.getReportTime());
                        }
                    }
                }
                return ApiResult.success("请求数据成功", resultList);
            }
        } catch (Exception e) {
@@ -473,6 +482,10 @@
        try {
            HiddenDangerCheckPoint hdcp = new ObjectMapper().readValue(str, HiddenDangerCheckPoint.class);
            HiddenDangerCheckPoint hiddenDangerCheckPoint = hdcpService.selectHiddenDangerCheckPointById(hdcp.getId());
            PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(hiddenDangerCheckPoint.getId());
            if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){
                hiddenDangerCheckPoint.setReportTime(dangerInfo.getReportTime());
            }
            return ApiResult.success("隐患查看--成功",hiddenDangerCheckPoint);
        } catch (Exception e) {
            return ApiResult.error("异常");
@@ -567,7 +580,14 @@
                    }
                }
            }
            for (HiddenDangerCheckPoint dangerCheckPoint : resultList) {
                PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(dangerCheckPoint.getId());
                if (ObjectUtils.isNotEmpty(dangerInfo)){
                    if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){
                        dangerCheckPoint.setReportTime(dangerInfo.getReportTime());
                    }
                }
            }
            resultMap.put("resultList", resultList);
            //companyId下总的数据统计
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;
@@ -118,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";
    }
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerLedgerController.java
@@ -6,6 +6,8 @@
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.utils.poi.ExcelUtilByDangerLedger;
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;
import com.ruoyi.framework.web.controller.BaseController;
@@ -62,6 +64,8 @@
    @Autowired
    private ICompanyService companyService;
    @Autowired
    private RiskService riskService;
    @PostMapping("/export")
@@ -431,7 +435,14 @@
        startPage();
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
        for (HiddenDangerCheckPoint dangerCheckPoint : list) {
            PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(dangerCheckPoint.getId());
            if (ObjectUtils.isNotEmpty(dangerInfo)){
                if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){
                    dangerCheckPoint.setReportTime(dangerInfo.getReportTime());
                }
            }
        }
        return getDataTable(list);
    }
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPoint.java
@@ -441,7 +441,8 @@
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date findTime;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date reportTime;