双重预防项目-国泰新华二开定制版
e0f82ed6833f63c7aab924ca46c2c698f96be18e..e4d73d7b94999729c3f7c5e42de4161e5cc53c2f
2023-12-01 16639036659
Merge remote-tracking branch 'origin/master'
e4d73d 对比 | 目录
2023-12-01 16639036659
临时提交
0e43a0 对比 | 目录
2023-12-01 16639036659
临时提交
3c2db2 对比 | 目录
已修改9个文件
64 ■■■■ 文件已修改
src/main/java/com/ruoyi/doublePrevention/repository/PreventRiskDangerInfoRepository.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/RiskService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/baseService/PreventRiskDangerInfoService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/doublePrevention/repository/PreventRiskDangerInfoRepository.java
@@ -47,4 +47,5 @@
     * 查询隐患附属表信息
     */
    PreventRiskDangerInfo getByHiddenDangerId(Long id);
}
src/main/java/com/ruoyi/doublePrevention/service/RiskService.java
@@ -179,4 +179,6 @@
    PreventRiskDangerInfo getDangerInfoById(Long id);
    int updateCheckLog(Long checkId, HiddenDangerCheckPoint hdcp);
    PreventRiskDangerInfo getDangerInfoByDangerCheckPointId(Long checkId);
}
src/main/java/com/ruoyi/doublePrevention/service/baseService/PreventRiskDangerInfoService.java
@@ -47,4 +47,6 @@
     * 查询隐患附属表信息
     */
    PreventRiskDangerInfo getByHiddenDangerId(Long id);
    PreventRiskDangerInfo getDangerInfoByDangerCheckPointId(Long checkId);
}
src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java
@@ -57,6 +57,11 @@
        return  preventRiskDangerInfoRepository.getByHiddenDangerId(id);
    }
    @Override
    public PreventRiskDangerInfo getDangerInfoByDangerCheckPointId(Long checkId) {
        return  preventRiskDangerInfoRepository.getByHiddenDangerId(checkId);
    }
    /**
     * @description 统计时间段内所有、死亡、重伤、轻伤的隐患数量
     */
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
@@ -1339,13 +1339,10 @@
        return preventRiskDangerCheckLogService.updateCheckLog(checkId, hdcp.getMobileCode());
    }
    @Override
    public PreventRiskDangerInfo getDangerInfoByDangerCheckPointId(Long checkId) {
        return preventRiskDangerInfoService.getDangerInfoByDangerCheckPointId(checkId);
    }
    //    /**
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;