From faee962a89c0b2379be11e66b6ada1e0379c9144 Mon Sep 17 00:00:00 2001 From: 16639036659 <577530412@qq.com> Date: 星期二, 19 三月 2024 15:46:00 +0800 Subject: [PATCH] 新增检索条件 --- src/main/resources/mybatis/tr/HiddenDangerCheckMapper.xml | 95 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mybatis/tr/HiddenDangerCheckMapper.xml b/src/main/resources/mybatis/tr/HiddenDangerCheckMapper.xml index dea7ea7..37aaada 100644 --- a/src/main/resources/mybatis/tr/HiddenDangerCheckMapper.xml +++ b/src/main/resources/mybatis/tr/HiddenDangerCheckMapper.xml @@ -149,7 +149,6 @@ <if test="exceptionInfo != null and exceptionInfo != ''"> and a.exception_info = #{exceptionInfo}</if> - <if test="checkType != null and checkType != ''"> and a.check_type = #{checkType}</if> <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> @@ -177,6 +176,100 @@ order by a.create_time desc </select> + <select id="selectHiddenDangerCheckListNew" parameterType="HiddenDangerCheck" resultMap="HiddenDangerCheckResult"> + <include refid="selectHiddenDangerCheckVo"/> + + <where> + <if test="checkId != null and checkId != ''"> and a.check_id = #{checkId}</if> + <if test="planCreateUserId != null and planCreateUserId != ''"> and a.plan_create_user_id = #{planCreateUserId}</if> + <if test="planName != null and planName != ''"> and a.plan_name like concat('%', #{planName}, '%')</if> + <if test="troubleshootTypeId != null "> and a.troubleshoot_type_id = #{troubleshootTypeId}</if> + <if test="troubleshootTypeName != null and troubleshootTypeName != ''"> and a.troubleshoot_type_name like concat('%', #{troubleshootTypeName}, '%')</if> + <if test="organizationDeptId != null "> and a.organization_dept_id = #{organizationDeptId}</if> + <if test="organizationDeptName != null and organizationDeptName != ''"> and a.organization_dept_name like concat('%', #{organizationDeptName}, '%')</if> + <if test="riskType != null and riskType != ''"> and a.risk_type = #{riskType}</if> + <if test="riskId != null "> and a.risk_id = #{riskId}</if> + <if test="riskName != null and riskName != ''"> and a.risk_name like concat('%', #{riskName}, '%')</if> + <if test="checkUserId != null "> and a.check_user_id = #{checkUserId}</if> + + + <if test="null != checkUserIdList and checkUserIdList.size() > 0"> + and (a.check_user_id in + <foreach collection="checkUserIdList" item="checkUserId" open="(" separator="," close=")"> + #{checkUserId} + </foreach>) + </if> + + <if test="checkUserName != null and checkUserName != ''"> and a.check_user_name like concat('%', #{checkUserName}, '%')</if> + <if test="beCheckedDeptId != null "> and a.be_checked_dept_id = #{beCheckedDeptId}</if> + <if test="beCheckedDeptName != null and beCheckedDeptName != ''"> and a.be_checked_dept_name like concat('%', #{beCheckedDeptName}, '%')</if> + <if test="checkBeginTime != null and checkBeginTime != ''"> and a.check_begin_time = #{checkBeginTime}</if> + <if test="checkEndTime != null and checkEndTime != ''"> and a.check_end_time = #{checkEndTime}</if> + <if test="planFormulateStatus != null and planFormulateStatus != ''"> and a.plan_formulate_status = #{planFormulateStatus}</if> + <if test="planExecuteStatus != null and planExecuteStatus != ''"> and a.plan_execute_status = #{planExecuteStatus}</if> + <if test="checkStatus != null and checkStatus != ''"> and a.check_status = #{checkStatus}</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="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="stage != null and stage != ''"> and a.stage = #{stage}</if> + <if test="planFormulateStatusExclude != null and planFormulateStatusExclude != ''"> and a.plan_formulate_status != #{planFormulateStatusExclude}</if> + + + + <if test="scheduleCreateUserId != null "> and a.schedule_create_user_id = #{scheduleCreateUserId}</if> + <if test="scheduleCreateUserName != null and scheduleCreateUserName != ''"> and a.schedule_create_user_name like concat('%', #{scheduleCreateUserName}, '%')</if> + <if test="scheduleCheckUserId != null "> and a.schedule_check_user_id = #{scheduleCheckUserId}</if> + + <if test="null != scheduleCheckUserIdList and scheduleCheckUserIdList.size() > 0"> + and (a.schedule_check_user_id in + <foreach collection="scheduleCheckUserIdList" item="scheduleCheckUserId" open="(" separator="," close=")"> + #{scheduleCheckUserId} + </foreach>) + </if> + + <if test="scheduleCheckUserName != null and scheduleCheckUserName != ''"> and a.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 a.job_id = #{jobId}</if> + <if test="jobName != null and jobName != ''"> and a.job_name like concat('%', #{jobName}, '%')</if> + <if test="jobGroup != null and jobGroup != ''"> and a.job_group = #{jobGroup}</if> + <if test="invokeTarget != null and invokeTarget != ''"> and a.invoke_target = #{invokeTarget}</if> + <if test="jobMessage != null and jobMessage != ''"> and a.job_message = #{jobMessage}</if> + <if test="status != null and status != ''"> and a.status = #{status}</if> + <if test="exceptionInfo != null and exceptionInfo != ''"> and a.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.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') + </if> + <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> + AND date_format(#{params.endTime},'%y%m%d') >= date_format(a.create_time,'%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> + + </where> + order by a.create_time desc + </select> + <select id="selectHiddenDangerCheckById" parameterType="Long" resultMap="HiddenDangerCheckResult"> <include refid="selectHiddenDangerCheckVo"/> where a.check_id = #{checkId} -- Gitblit v1.9.2