双重预防项目-国泰新华二开定制版
16639036659
2022-10-31 bec2f0453d651e8b567ba14c596eca452526a2bd
返回隐患信息
已修改8个文件
71 ■■■■■ 文件已修改
src/main/java/com/ruoyi/doublePrevention/repository/PreventRiskDangerInfoRepository.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/RiskService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/baseService/PreventRiskDangerInfoService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/doublePrevention/PreventRiskControlMeasureMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/doublePrevention/repository/PreventRiskDangerInfoRepository.java
@@ -43,4 +43,8 @@
     * 修改上报的数据的姿态
     */
    PreventRiskDangerInfo updateDangerInfoReportStatus(HandlerReportParam handlerReportParam);
    /**
     * 查询隐患附属表信息
     */
    PreventRiskDangerInfo getByHiddenDangerId(Long id);
}
src/main/java/com/ruoyi/doublePrevention/service/RiskService.java
@@ -1,9 +1,6 @@
package com.ruoyi.doublePrevention.service;
import com.ruoyi.doublePrevention.entity.PreventRiskCheckUnit;
import com.ruoyi.doublePrevention.entity.PreventRiskControlMeasure;
import com.ruoyi.doublePrevention.entity.PreventRiskEvent;
import com.ruoyi.doublePrevention.entity.PreventRiskJobAndMeasure;
import com.ruoyi.doublePrevention.entity.*;
import com.ruoyi.doublePrevention.entity.dto.req.*;
import com.ruoyi.doublePrevention.entity.dto.resp.*;
import com.ruoyi.doublePrevention.repository.param.PreventPointAndMeasureParams;
@@ -176,4 +173,8 @@
     * 查询管控措施信息
     */
    PreventRiskControlMeasure getRiskControlMeasureInfo(Long checkPointId);
    /**
     * 查询隐患附属表信息
     */
    PreventRiskDangerInfo getDangerInfoById(Long id);
}
src/main/java/com/ruoyi/doublePrevention/service/baseService/PreventRiskDangerInfoService.java
@@ -43,4 +43,8 @@
     * 修改上报的数据的姿态
     */
    PreventRiskDangerInfo updateDangerInfoReportStatus(HandlerReportParam handlerReportParam);
    /**
     * 查询隐患附属表信息
     */
    PreventRiskDangerInfo getByHiddenDangerId(Long id);
}
src/main/java/com/ruoyi/doublePrevention/service/baseService/impl/PreventRiskDangerInfoServiceImpl.java
@@ -49,7 +49,13 @@
    public int updateDangerInfoState(PreventRiskDangerInfo dangerInfo) {
        return preventRiskDangerInfoRepository.updateDangerInfoState(dangerInfo);
    }
    /**
     * 查询隐患附属表信息
     */
    @Override
    public PreventRiskDangerInfo getByHiddenDangerId(Long id) {
        return  preventRiskDangerInfoRepository.getByHiddenDangerId(id);
    }
    /**
     * @description 统计时间段内所有、死亡、重伤、轻伤的隐患数量
@@ -73,4 +79,5 @@
    public PreventRiskDangerInfo updateDangerInfoReportStatus(HandlerReportParam handlerReportParam) {
        return preventRiskDangerInfoRepository.updateDangerInfoReportStatus(handlerReportParam);
    }
}
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
@@ -1316,7 +1316,14 @@
        return riskControlMeasureService.getPreventRiskControlMeasureById(unitByBaseCheckPointId.getControlMeasureId());
    }
    /**
     * 查询隐患附属表信息
     */
    @Override
    public PreventRiskDangerInfo getDangerInfoById(Long id) {
        PreventRiskDangerInfo dangerInfobyHiddenDangerId = preventRiskDangerInfoService.getByHiddenDangerId(id);
        return dangerInfobyHiddenDangerId;
    }
    //    /**
//     * 全流程隐患上报-附属表信息插入
//     * */
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java
@@ -5,6 +5,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;
@@ -19,6 +20,7 @@
import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService;
import com.ruoyi.project.tr.hiddenTroubleType.domain.HiddenTroubleType;
import com.ruoyi.project.tr.hiddenTroubleType.service.IHiddenTroubleTypeService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
@@ -91,6 +93,7 @@
        hiddenDangerCheckPoint.setJudgeQueryByUserIdList(userIdList);//隐患整改人ID 为登陆账号companyId下的userId的
        startPage();
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
        return getDataTable(list);
    }
@@ -107,7 +110,22 @@
        // 第二:1.隐患上报创建人(register_user_id) 或者 2.(判定人(judge_user_id),report_status 不为null )------为本登录帐号userId的
        hiddenDangerCheckPoint.setJudgeQueryByUserId(getSysUser().getUserId());
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
        return getDataTable(list);
        List<HiddenDangerCheckPoint> resultList = new ArrayList<>();
        for (HiddenDangerCheckPoint dangerCheckPoint : list) {
            // todo-2022 修改前查询
            PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(dangerCheckPoint.getId());
            if (ObjectUtils.isNotEmpty(dangerInfo)){
                dangerCheckPoint.setHazardCode(dangerInfo.getHazardCode());
                dangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc());
                dangerCheckPoint.setDangerReason(dangerInfo.getDangerReason());
                dangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType());
                dangerCheckPoint.setDangerResult(dangerInfo.getDangerResult());
            }
            resultList.add(dangerCheckPoint);
        }
        return getDataTable(resultList);
    }
    /**
@@ -336,6 +354,15 @@
    @GetMapping("/editDangerReport/{id}")
    public String editDangerReport(@PathVariable("id") Long id, ModelMap mmap) {
        HiddenDangerCheckPoint hdcp = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(id);
        // todo-2022 修改前查询
        PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hdcp.getId());
        hdcp.setHazardCode(dangerInfo.getHazardCode());
        hdcp.setDangerSrc(dangerInfo.getDangerSrc());
        hdcp.setDangerReason(dangerInfo.getDangerReason());
        hdcp.setHazardDangerType(dangerInfo.getHazardDangerType());
        hdcp.setDangerResult(dangerInfo.getDangerResult());
        mmap.put("hiddenDangerCheckPoint", hdcp);
        //获取所在公司人员信息
src/main/resources/mybatis/doublePrevention/PreventRiskControlMeasureMapper.xml
@@ -152,6 +152,7 @@
        select * from prevent_risk_control_measure
        where id = #{id} and delete_status = 0
    </select>
    <select id="getPreventRiskControlMeasureByControlMeasureCode" resultMap="BaseResultMap">
        select * from prevent_risk_control_measure
        <where>
src/main/resources/mybatis/doublePrevention/PreventRiskDangerInfoMapper.xml
@@ -101,6 +101,12 @@
            report_time = #{reportTime}
        where id = #{id}
    </select>
<!--    PreventRiskDangerInfo getByHiddenDangerId(Long id);-->
    <select id="getByHiddenDangerId" resultMap="BaseResultMap">
        select * from prevent_risk_danger_info
        where danger_check_point_id = #{id}
    </select>
</mapper>