双重预防项目-国泰新华二开定制版
16639036659
2023-09-19 3246a2122cca77973c6131ed102afc156a150174
国泰双重预防数据导出功能修复与新增功能
已修改6个文件
284 ■■■■■ 文件已修改
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerLedgerController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPointExport.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/mapper/HiddenDangerCheckPointMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/IHiddenDangerCheckPointService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/impl/HiddenDangerCheckPointServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerLedgerController.java
@@ -23,6 +23,7 @@
import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.HiddenDangerCheckPoint;
import com.ruoyi.project.tr.hiddenDangerCheckPoint.domain.HiddenDangerCheckPointExport;
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.ui.ModelMap;
@@ -121,7 +122,7 @@
        if (!StringUtils.isEmpty(rectifyDeptIdLedger)) {
            hiddenDangerCheckPoint.setRectifyDeptId(Long.valueOf(rectifyDeptIdLedger));
        }
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointList(hiddenDangerCheckPoint);
        List<HiddenDangerCheckPoint> list = hiddenDangerCheckPointService.selectHiddenDangerCheckPointListNew(hiddenDangerCheckPoint);
        List<HiddenDangerCheckPointExport> exportList = new ArrayList<>();
@@ -166,9 +167,13 @@
                    export.setRiskPointType("工艺节点清单");
                }
                // 隐患责任部门
                export.setDangerDep(hcp.getRectifyDeptName()); // todo
                export.setDangerDep(hcp.getRectifyDeptName());
                //隐患名称
                export.setDangerName(hcp.getDangerName());
                //隐患描述   todo
                export.setDangerDescription(hcp.getDangerDescription());
                //隐患级别
                if ("0".equals(hcp.getDangerLevel())) {
@@ -192,6 +197,15 @@
                    export.setDangerSources("");
                }
                //整改完成期限
                if(ObjectUtils.isNotEmpty(hcp.getRectifyDeadlineTime())){
                    export.setRectifyDeadlineTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", hcp.getRectifyDeadlineTime()));
                }
                //整改完成时间
                if(ObjectUtils.isNotEmpty(hcp.getRectifyCompleteTime())){
                    export.setRectifyCompleteTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", hcp.getRectifyCompleteTime()));
                }
                //整改状态
                if (!StringUtils.isEmpty(hcp.getStage())) {
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/domain/HiddenDangerCheckPointExport.java
@@ -87,6 +87,41 @@
    @Excel(name = "验收人员")
    private String acceptUserName;
    @Excel(name = "隐患治理期限")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String rectifyDeadlineTime;
    @Excel(name = "整改完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String rectifyCompleteTime;
    @Excel(name = "隐患描述")
    private String dangerDescription;
    public String getRectifyDeadlineTime() {
        return rectifyDeadlineTime;
    }
    public void setRectifyDeadlineTime(String rectifyDeadlineTime) {
        this.rectifyDeadlineTime = rectifyDeadlineTime;
    }
    public String getRectifyCompleteTime() {
        return rectifyCompleteTime;
    }
    public void setRectifyCompleteTime(String rectifyCompleteTime) {
        this.rectifyCompleteTime = rectifyCompleteTime;
    }
    public String getDangerDescription() {
        return dangerDescription;
    }
    public void setDangerDescription(String dangerDescription) {
        this.dangerDescription = dangerDescription;
    }
    public String getPreRectifyPhoto() {
        return preRectifyPhoto;
    }
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/mapper/HiddenDangerCheckPointMapper.java
@@ -88,4 +88,6 @@
    int rectifyTimeOut(Long id , Date rectifyDeadlineTime);
    int updateConfirm(HiddenDangerCheckPoint hdcp);
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNew(HiddenDangerCheckPoint hiddenDangerCheckPoint);
}
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/IHiddenDangerCheckPointService.java
@@ -33,6 +33,7 @@
     */
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointList(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNew(HiddenDangerCheckPoint hiddenDangerCheckPoint);
    /**
     * 新增隐患排查
     * 
@@ -99,4 +100,5 @@
    int rectifyTimeOut(Long id , Date rectifyDeadlineTime);
    int updateConfirm(HiddenDangerCheckPoint hdcp);
}
src/main/java/com/ruoyi/project/tr/hiddenDangerCheckPoint/service/impl/HiddenDangerCheckPointServiceImpl.java
@@ -78,6 +78,16 @@
    }
    /**
     * 查询隐患信息列表
     */
    @Override
    public List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNew(HiddenDangerCheckPoint hiddenDangerCheckPoint) {
        return hiddenDangerCheckPointMapper.selectHiddenDangerCheckPointListNew(hiddenDangerCheckPoint);
    }
    /**
     * 新增隐患排查检查点信息
     * 
     * @param hiddenDangerCheckPoint 隐患排查检查点信息
src/main/resources/mybatis/tr/HiddenDangerCheckPointMapper.xml
@@ -699,6 +699,223 @@
        where id = #{id}
    </update>
<!--    List<HiddenDangerCheckPoint> selectHiddenDangerCheckPointListNew(HiddenDangerCheckPoint hiddenDangerCheckPoint);-->
    <select id="selectHiddenDangerCheckPointListNew" parameterType="HiddenDangerCheckPoint"
            resultMap="HiddenDangerCheckPointResult">
        <include refid="selectHiddenDangerCheckPointVo"/>
        <where>
            danger_name is not null and rectify_user_id 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>
            <if test="planCreateUserId != null  and planCreateUserId != ''">and c.plan_create_user_id =
                #{planCreateUserId}
            </if>
            <if test="planName != null  and planName != ''">and c.plan_name like concat('%', #{planName}, '%')</if>
            <if test="troubleshootTypeId != null ">and c.troubleshoot_type_id = #{troubleshootTypeId}</if>
            <if test="troubleshootTypeName != null  and troubleshootTypeName != ''">and c.troubleshoot_type_name like
                concat('%', #{troubleshootTypeName}, '%')
            </if>
            <if test="organizationDeptId != null ">and c.organization_dept_id = #{organizationDeptId}</if>
            <if test="organizationDeptName != null  and organizationDeptName != ''">and c.organization_dept_name like
                concat('%', #{organizationDeptName}, '%')
            </if>
            <if test="riskType != null  and riskType != ''">and c.risk_type = #{riskType}</if>
            <if test="riskId != null ">and c.risk_id = #{riskId}</if>
            <if test="riskName != null  and riskName != ''">and c.risk_name like concat('%', #{riskName}, '%')</if>
            <if test="checkUserId != null ">and c.check_user_id = #{checkUserId}</if>
            <if test="checkUserName != null  and checkUserName != ''">and c.check_user_name like concat('%',
                #{checkUserName}, '%')
            </if>
            <if test="beCheckedDeptId != null ">and c.be_checked_dept_id = #{beCheckedDeptId}</if>
            <if test="beCheckedDeptName != null  and beCheckedDeptName != ''">and c.be_checked_dept_name like
                concat('%', #{beCheckedDeptName}, '%')
            </if>
            <if test="checkBeginTime != null  and checkBeginTime != ''">and c.check_begin_time = #{checkBeginTime}</if>
            <if test="checkEndTime != null  and checkEndTime != ''">and c.check_end_time = #{checkEndTime}</if>
            <if test="planFormulateStatus != null  and planFormulateStatus != ''">and c.plan_formulate_status =
                #{planFormulateStatus}
            </if>
            <if test="planExecuteStatus != null  and planExecuteStatus != ''">and c.plan_execute_status =
                #{planExecuteStatus}
            </if>
            <if test="checkStatus != null  and checkStatus != ''">and c.check_status = #{checkStatus}</if>
            <if test="whetherDanger != null  and whetherDanger != ''">and a.whether_danger = #{whetherDanger}</if>
            <if test="dangerName != null  and dangerName != ''">and a.danger_name like concat('%', #{dangerName}, '%')
            </if>
            <if test="dangerDescription != null  and dangerDescription != ''">and a.danger_description =
                #{dangerDescription}
            </if>
            <if test="dangerLevel != null  and dangerLevel != ''">and a.danger_level = #{dangerLevel}</if>
            <if test="troubleTypeId != null ">and a.trouble_type_id = #{troubleTypeId}</if>
            <if test="troubleTypeName != null  and troubleTypeName != ''">and a.trouble_type_name like concat('%',
                #{troubleTypeName}, '%')
            </if>
            <if test="dangerDeptId != null  and dangerDeptId != ''">and a.danger_dept_id = #{dangerDeptId}</if>
            <if test="dangerDeptName != null  and dangerDeptName != ''">and a.danger_dept_name = #{dangerDeptName}</if>
            <if test="dangerPlaceId != null  and dangerPlaceId != ''">and a.danger_place_id = #{dangerPlaceId}</if>
            <if test="dangerPlaceName != null  and dangerPlaceName != ''">and a.danger_place_name = #{dangerPlaceName}
            </if>
            <if test="checkTime != null ">and a.check_time = #{checkTime}</if>
            <if test="preRectifyPhoto != null  and preRectifyPhoto != ''">and a.pre_rectify_photo = #{preRectifyPhoto}
            </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="registerSubmitTime != null ">and a.register_submit_time = #{registerSubmitTime}</if>
            <if test="judgeUserId != null  and judgeUserId != ''">and a.judge_user_id = #{judgeUserId}</if>
            <if test="judgeUserName != null  and judgeUserName != ''">and a.judge_user_name = #{judgeUserName}</if>
            <if test="judgeCreateTime != null ">and a.judge_create_time = #{judgeCreateTime}</if>
            <if test="judgeCreateUserId != null  and judgeCreateUserId != ''">and a.judge_create_user_id =
                #{judgeCreateUserId}
            </if>
            <if test="dangerSources != null  and dangerSources != ''">and a.danger_sources = #{dangerSources}</if>
            <if test="reportStatus != null  and reportStatus != ''">and a.report_status = #{reportStatus}</if>
            <if test="examineUserId != null ">and a.examine_user_id = #{examineUserId}</if>
            <if test="examineUserName != null  and examineUserName != ''">and a.examine_user_name like concat('%',
                #{examineUserName}, '%')
            </if>
            <if test="examineStatus != null  and examineStatus != ''">and a.examine_status = #{examineStatus}</if>
            <if test="examineOpinion != null  and examineOpinion != ''">and a.examine_opinion = #{examineOpinion}</if>
            <if test="examineResult != null  and examineResult != ''">and a.examine_result = #{examineResult}</if>
            <if test="examineCreateTime != null ">and a.examine_create_time = #{examineCreateTime}</if>
            <if test="treatMeasure != null  and treatMeasure != ''">and a.treat_measure = #{treatMeasure}</if>
            <if test="rectifyUserId != null ">and a.rectify_user_id = #{rectifyUserId}</if>
            <if test="rectifyUserName != null  and rectifyUserName != ''">and a.rectify_user_name like concat('%',
                #{rectifyUserName}, '%')
            </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="rectifyDeadlineTime != null ">and a.rectify_deadline_time = #{rectifyDeadlineTime}</if>
            <if test="rectifyType != null  and rectifyType != ''">and a.rectify_type = #{rectifyType}</if>
            <if test="rectifyAttachment != null  and rectifyAttachment != ''">and a.rectify_attachment =
                #{rectifyAttachment}
            </if>
            <if test="rectifyMeasure != null  and rectifyMeasure != ''">and a.rectify_measure = #{rectifyMeasure}</if>
            <if test="rectifyCondition != null  and rectifyCondition != ''">and a.rectify_condition =
                #{rectifyCondition}
            </if>
            <if test="rectifyFund != null  and rectifyFund != ''">and a.rectify_fund = #{rectifyFund}</if>
            <if test="rectifyCompleteTime != null ">and a.rectify_complete_time = #{rectifyCompleteTime}</if>
            <if test="rectifyStatus != null  and rectifyStatus != ''">and a.rectify_status = #{rectifyStatus}</if>
            <if test="rectifyCreateTime != null ">and a.rectify_create_time = #{rectifyCreateTime}</if>
            <if test="acceptUserId != null ">and a.accept_user_id = #{acceptUserId}</if>
            <if test="acceptUserName != null  and acceptUserName != ''">and a.accept_user_name like concat('%',
                #{acceptUserName}, '%')
            </if>
            <if test="postRectifyPhoto != null  and postRectifyPhoto != ''">and a.post_rectify_photo =
                #{postRectifyPhoto}
            </if>
            <if test="acceptResult != null  and acceptResult != ''">and a.accept_result = #{acceptResult}</if>
            <if test="acceptOpinion != null  and acceptOpinion != ''">and a.accept_opinion = #{acceptOpinion}</if>
            <if test="acceptFile != null  and acceptFile != ''">and a.accept_file = #{acceptFile}</if>
            <if test="acceptCreateTime != null ">and a.accept_create_time = #{acceptCreateTime}</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="planFormulateStatusExclude != null  and planFormulateStatusExclude != ''">and
                a.plan_formulate_status != #{planFormulateStatusExclude}
            </if>
            <if test="judgeQueryByUserId != null  and judgeQueryByUserId != ''">
                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>
            <if test="null != judgeQueryByUserIdList  and judgeQueryByUserIdList.size() > 0">
                and a.danger_sources = 2 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)
            </if>
            <if test="reportStatusIsNotNull != null  and reportStatusIsNotNull != ''">and (a.report_status IS NOT
                NULL)
            </if>
            <if test="scheduleCreateUserId != null ">and c.schedule_create_user_id = #{scheduleCreateUserId}</if>
            <if test="scheduleCreateUserName != null  and scheduleCreateUserName != ''">and c.schedule_create_user_name
                like concat('%', #{scheduleCreateUserName}, '%')
            </if>
            <if test="scheduleCheckUserId != null ">and c.schedule_check_user_id = #{scheduleCheckUserId}</if>
            <if test="scheduleCheckUserName != null  and scheduleCheckUserName != ''">and c.schedule_check_user_name
                like concat('%', #{scheduleCheckUserName}, '%')
            </if>
            <if test="scheduleCheckStatus != null  and scheduleCheckStatus != ''">and a.schedule_check_status =
                #{scheduleCheckStatus}
            </if>
            <if test="jobId != null ">and c.job_id = #{jobId}</if>
            <if test="jobName != null  and jobName != ''">and c.job_name like concat('%', #{jobName}, '%')</if>
            <if test="jobGroup != null  and jobGroup != ''">and c.job_group = #{jobGroup}</if>
            <if test="invokeTarget != null  and invokeTarget != ''">and c.invoke_target = #{invokeTarget}</if>
            <if test="jobMessage != null  and jobMessage != ''">and c.job_message = #{jobMessage}</if>
            <if test="status != null  and status != ''">and c.status = #{status}</if>
            <if test="exceptionInfo != null  and exceptionInfo != ''">and c.exception_info = #{exceptionInfo}</if>
            <if test="checkType != null  and checkType != ''">and a.check_type = #{checkType}</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="ledgerUserId != null ">
                and (a.examine_user_id = #{ledgerUserId}
                or a.rectify_user_id = #{ledgerUserId}
                or a.accept_user_id = #{ledgerUserId})
            </if>
            <if test="null != ledgerUserIdList  and ledgerUserIdList.size() > 0">
                and (a.rectify_user_id in
                <foreach collection="ledgerUserIdList" item="ledgerUserId" open="(" separator="," close=")">
                    #{ledgerUserId}
                </foreach>)
            </if>
            <if test="null != examineUserIdList  and examineUserIdList.size() > 0">
                and (a.examine_user_id in
                <foreach collection="examineUserIdList" item="examineUserId" open="(" separator="," close=")">
                    #{examineUserId}
                </foreach>)
            </if>
            <if test="overdueRectify != null  and overdueRectify != ''">
                and (Date(a.rectify_complete_time) > Date(a.rectify_deadline_time))
            </if>
            <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="null != companyIdList  and companyIdList.size() > 0">
                and (a.company_id in
                <foreach collection="companyIdList" item="companyId" open="(" separator="," close=")">
                    #{companyId}
                </foreach>)
            </if>
        </where>
        order by a.create_time desc
    </select>
</mapper>