双重预防项目-国泰新华二开定制版
16639036659
2023-12-22 c8e1f4749f96282a31eb37c50fa869a431430a3f
隐患查询、台账添加未判定任务
已修改7个文件
125 ■■■■ 文件已修改
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerAcceptController.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerLedgerController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/mapper/HiddenDangerCheckPointMapper.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/IHiddenDangerCheckPointService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/impl/HiddenDangerCheckPointServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/doublePrevention/PreventRiskDangerCheckLogMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml 103 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerAcceptController.java
@@ -46,7 +46,7 @@
    }
    /**
     * 查询隐患排查列表头 todo
     * 查询隐患排查列表头
     */
    @PostMapping("/list")
    @ResponseBody
@@ -128,8 +128,10 @@
        //隐患排查实体
        HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id));
        PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(hiddenDangerCheckPoint.getId());
        if (ObjectUtils.isNotEmpty(dangerInfo.getReportTime())){
            hiddenDangerCheckPoint.setReportTime(dangerInfo.getReportTime());
        if (ObjectUtils.isNotEmpty(dangerInfo)){
            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
@@ -449,7 +449,7 @@
        }
        startPage();
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointListNewCount(hiddenDangerCheckPoint);
        for (HiddenDangerCheckPoint dangerCheckPoint : list) {
            PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoByDangerCheckPointId(dangerCheckPoint.getId());
            if (ObjectUtils.isNotEmpty(dangerInfo)){
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/mapper/HiddenDangerCheckPointMapper.java
@@ -31,6 +31,7 @@
     */
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointList(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNewCount(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    /**
     * 新增隐患排查检查点信息
     * 
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/IHiddenDangerCheckPointService.java
@@ -33,6 +33,9 @@
     */
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointList(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNewCount(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNew(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    /**
     * 新增隐患排查
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/impl/HiddenDangerCheckPointServiceImpl.java
@@ -77,6 +77,12 @@
        return hiddenDangerCheckPointMapper.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
    }
    @Override
    public List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNewCount(HiddenDangerCheckPoint hiddenDangerCheckPoint)
    {
        return hiddenDangerCheckPointMapper.selectHiddenDangerCheckPointListNewCount(hiddenDangerCheckPoint);
    }
    /**
     * 查询隐患信息列表
src/main/resources/mybatis/doublePrevention/PreventRiskDangerCheckLogMapper.xml
@@ -38,7 +38,7 @@
        where report_switch = 0 and (update_report_data_time > report_time or report_time is null) and mobile_code is not null
<!--        where report_switch = 0 and (update_report_data_time > report_time or report_time is null) and mobile_code is not null and job_id = 47-->
        order by update_report_data_time
        limit 30
        limit 10
    </select>
<!--    int updateEventReportStatus(HandlerReportParam handlerReportParam);-->
src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml
@@ -257,22 +257,18 @@
            <if test="planFormulateStatusExclude != null  and planFormulateStatusExclude != ''">and
                a.plan_formulate_status != #{planFormulateStatusExclude}
            </if>
            <if test="judgeQueryByUserId != null  and judgeQueryByUserId != ''">
                and a.danger_sources in (2,3)
                and (a.register_user_id = #{judgeQueryByUserId} or (a.judge_user_id = #{judgeQueryByUserId} and
                a.report_status IS NOT NULL) )
            </if>
            <if test="null != judgeQueryByUserIdList  and judgeQueryByUserIdList.size() > 0">
                and a.danger_sources in (2,3) and a.report_status IS NOT NULL and (a.judge_user_id in
                <foreach collection="judgeQueryByUserIdList" item="judgeQueryByUserId" open="(" separator="," close=")">
                    #{judgeQueryByUserId}
                </foreach>)
            </if>
            <if test="reportStatusByHasHandle != null  and reportStatusByHasHandle != ''">and (a.report_status = 1 or
                a.report_status = 2 or a.report_status = 3)
            </if>
            <if test="reportStatusIsNotNull != null  and reportStatusIsNotNull != ''">and (a.report_status IS NOT
                NULL)
@@ -348,7 +344,84 @@
                    #{companyId}
                </foreach>)
            </if>
            and (a.whether_danger = 1 or a.whether_danger is null)
            <if test="reportStatusByHasHandle != null  and reportStatusByHasHandle != ''">and (a.report_status = 0 or a.report_status = 1 or
                a.report_status = 2)
            </if>
            and (a.whether_danger = 1 or a.whether_danger is null) and  danger_name is not null
        </where>
        order by a.accept_status, a.create_time desc
    </select>
    <sql id="selectHiddenDangerCheckPointVoNewCount">
        select a.id,a.check_point_id,a.check_id, a.create_by, a.create_time, a.update_by, a.update_time,a.remark,a.accept_status,
        c.plan_create_user_id,
        c.plan_name, c.troubleshoot_type_id,
        c.troubleshoot_type_name, c.organization_dept_id,
        c.organization_dept_name, c.risk_id, c.risk_name,c.risk_type, c.check_user_id, c.check_user_name,
        c.be_checked_dept_id, c.be_checked_dept_name, c.check_begin_time, c.check_end_time,
        c.plan_formulate_status, c.plan_execute_status, c.check_status, a.whether_danger,
        a.danger_name, a.danger_description, a.danger_level, a.trouble_type_id, a.trouble_type_name,
        c.danger_place_id,c.danger_place_name, a.check_time, a.pre_rectify_photo, a.register_create_time, a.judge_create_time,
        a.danger_sources, a.report_status,
        a.examine_status, a.examine_opinion, a.examine_result, a.examine_create_time,
        a.treat_measure, a.rectify_user_id, a.rectify_user_name, a.rectify_dept_id, a.rectify_dept_name, a.rectify_deadline_time,
        a.rectify_type, a.rectify_attachment, a.rectify_measure, a.rectify_condition, a.rectify_fund, a.rectify_complete_time,
        a.rectify_status, a.rectify_create_time, a.accept_user_id, a.accept_user_name, a.post_rectify_photo, a.accept_result,
        a.accept_create_time,a.accept_status, a.accept_opinion, a.accept_file, a.stage,
        c.danger_dept_id,c.danger_dept_name,a.judge_user_id,a.judge_user_name,a.judge_create_user_id,
        a.register_submit_time,a.register_user_id,a.register_user_name,
        c.schedule_create_user_id, c.schedule_create_user_name,
        c.schedule_check_user_id, c.schedule_check_user_name, a.schedule_check_status,
        c.job_id, c.job_name, c.job_group, c.invoke_target, c.job_message, c.status, c.exception_info,
        c.check_type,a.company_id,
        b.type_cycle_num,b.type_cycle_type,
        a.examine_user_id, a.examine_user_name,
        a.check_person, a.find_time
        from tr_hidden_danger_check_point a
        left join tr_hidden_danger_check  c  on  c.check_id = a.check_id
        left join tr_troubleshoot_type  b  on  c.troubleshoot_type_id = b.type_id
    </sql>
    <!-- todo 查隐患台账-->
    <select id="selectHiddenDangerCheckPointListNewCount" parameterType="HiddenDangerCheckPoint"
            resultMap="HiddenDangerCheckPointResult">
        <include refid="selectHiddenDangerCheckPointVoNewCount"/>
        <where>
            <if test="id != null  and id != ''">and a.id = #{id}</if>
            <if test="dangerLevel != null  and dangerLevel != ''">and a.danger_level = #{dangerLevel}</if>
            <if test="registerUserId != null  and registerUserId != ''">and a.register_user_id = #{registerUserId}</if>
            <if test="registerUserName != null  and registerUserName != ''">and a.register_user_name =
                #{registerUserName}
            </if>
            <if test="registerCreateTime != null ">and a.register_create_time = #{registerCreateTime}</if>
            <if test="params.beginRegisterCreateTime != null and params.beginRegisterCreateTime != '' and params.endRegisterCreateTime != null and params.endRegisterCreateTime != ''">
                and a.register_create_time between #{params.beginRegisterCreateTime} and
                #{params.endRegisterCreateTime}
            </if>
            <if test="rectifyDeptId != null ">and a.rectify_dept_id = #{rectifyDeptId}</if>
            <if test="rectifyDeptName != null  and rectifyDeptName != ''">and a.rectify_dept_name like concat('%',
                #{rectifyDeptName}, '%')
            </if>
            <if test="rectifyStatus != null  and rectifyStatus != ''">and a.rectify_status = #{rectifyStatus}</if>
            <if test="acceptStatus != null  and acceptStatus != ''">and a.accept_status = #{acceptStatus}</if>
            <if test="stage != null  and stage != ''">and a.stage = #{stage}</if>
            <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
                AND date_format(a.register_create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
            </if>
            <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
                AND date_format(a.register_create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
            </if>
            <if test="overdueRectify != null  and overdueRectify != ''">
                and (Date(a.rectify_complete_time) > Date(a.rectify_deadline_time))
            </if>
            <if test="acceptStatus != null  and acceptStatus != ''">and a.accept_status  = #{acceptStatus}</if>
            <if test="dangerSources != null  and dangerSources != ''">and a.danger_sources = #{dangerSources}</if>
<!--            <if test="rectifyUserIdIsNotNull != null  and rectifyUserIdIsNotNull != ''">and a.rectify_user_id is not null</if>-->
            and (a.whether_danger = 1 or a.whether_danger is null) and  danger_name is not null
        </where>
        order by a.accept_status, a.create_time desc
    </select>
@@ -704,12 +777,12 @@
<!--    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNew(HiddenDangerCheckPoint hiddenDangerCheckPoint);-->
    <!-- todo 导出隐患台账-->
    <select id="selectHiddenDangerCheckPointListNew" parameterType="HiddenDangerCheckPoint"
            resultMap="HiddenDangerCheckPointResult">
        <include refid="selectHiddenDangerCheckPointVo"/>
        <where>
            danger_name is not null and rectify_user_id is not null
            danger_name is not null
            <if test="id != null  and id != ''">and a.id = #{id}</if>
            <if test="checkPointId != null  and checkPointId != ''">and a.check_point_id = #{checkPointId}</if>
            <if test="checkId != null  and checkId != ''">and a.check_id = #{checkId}</if>
@@ -829,7 +902,7 @@
                a.plan_formulate_status != #{planFormulateStatusExclude}
            </if>
            <if test="judgeQueryByUserId != null  and judgeQueryByUserId != ''">
                and a.danger_sources = 2
<!--                and a.danger_sources = 2-->
                and (a.register_user_id = #{judgeQueryByUserId} or (a.judge_user_id = #{judgeQueryByUserId} and
                a.report_status IS NOT NULL) )
            </if>
@@ -840,10 +913,6 @@
                <foreach collection="judgeQueryByUserIdList" item="judgeQueryByUserId" open="(" separator="," close=")">
                    #{judgeQueryByUserId}
                </foreach>)
            </if>
            <if test="reportStatusByHasHandle != null  and reportStatusByHasHandle != ''">and (a.report_status = 1 or
                a.report_status = 2)
            </if>
            <if test="reportStatusIsNotNull != null  and reportStatusIsNotNull != ''">and (a.report_status IS NOT
                NULL)
@@ -909,7 +978,7 @@
            <if test="companyId != null  and companyId != ''">and a.company_id  = #{companyId}</if>
            <if test="rectifyUserIdIsNotNull != null  and rectifyUserIdIsNotNull != ''">and a.rectify_user_id is not null</if>
<!--            <if test="rectifyUserIdIsNotNull != null  and rectifyUserIdIsNotNull != ''">and a.rectify_user_id is not null</if>-->
            <if test="null != companyIdList  and companyIdList.size() > 0">
                and (a.company_id in
@@ -917,6 +986,12 @@
                    #{companyId}
                </foreach>)
            </if>
<!--            <if test="reportStatusByHasHandle != null  and reportStatusByHasHandle != ''">and (a.report_status = 0 or a.report_status = 1 or-->
<!--                a.report_status = 2)-->
<!--            </if>-->
            and (a.whether_danger = 1 or a.whether_danger is null)
        </where>
        order by a.create_time desc
    </select>