更改稽核查询为模糊查询

This commit is contained in:
xiaodong.hu
2023-07-26 10:09:11 +08:00
parent a62ec0dc2d
commit 12de722de0
2 changed files with 9 additions and 9 deletions

View File

@@ -73,19 +73,19 @@
AND hoai.deleted = 0 AND hoai.deleted = 0
<where> <where>
<if test="userId !=null and userId !=''"> <if test="userId !=null and userId !=''">
and (his.inspection_user_id = #{userId} OR hi.operator_user_id = #{userId}) and ((his.inspection_user_id = #{userId} and hi.`status`=0 ) OR hi.operator_user_id = #{userId})
</if> </if>
<if test="interviewerName !=null and interviewerName !=''"> <if test="interviewerName !=null and interviewerName !=''">
and eu.`name` like concat('%',#{interviewerName},'%') and eu.`name` like concat('%',#{interviewerName},'%')
</if> </if>
<if test="interviewerMobile !=null and interviewerMobile !=''"> <if test="interviewerMobile !=null and interviewerMobile !=''">
and eu.mobile=#{interviewerMobile} and eu.mobile like concat('%',#{interviewerMobile},'%')
</if> </if>
<if test="intervieweeName !=null and intervieweeName !=''"> <if test="intervieweeName !=null and intervieweeName !=''">
and hpui.username like concat('%',#{intervieweeName},'%') and hpui.username like concat('%',#{intervieweeName},'%')
</if> </if>
<if test="intervieweeMobile !=null and intervieweeMobile !=''"> <if test="intervieweeMobile !=null and intervieweeMobile !=''">
and hpui.mobile=#{intervieweeMobile} and hpui.mobile like concat('%',#{intervieweeMobile},'%')
</if> </if>
<if test="status !=null"> <if test="status !=null">
and hi.`status`=#{status} and hi.`status`=#{status}
@@ -140,7 +140,7 @@
and hpui.username like concat('%',#{intervieweeName},'%') and hpui.username like concat('%',#{intervieweeName},'%')
</if> </if>
<if test="intervieweeMobile !=null and intervieweeMobile !=''"> <if test="intervieweeMobile !=null and intervieweeMobile !=''">
and hpui.mobile=#{intervieweeMobile} and hpui.mobile like concat('%',#{intervieweeMobile},'%')
</if> </if>
<if test="status !=null"> <if test="status !=null">
and hi.`status`=#{status} and hi.`status`=#{status}
@@ -196,19 +196,19 @@
and mdd.id is not null and mdd.id is not null
</if> </if>
<if test="userId !=null and userId !=''"> <if test="userId !=null and userId !=''">
and (his.inspection_user_id = #{userId} OR hi.operator_user_id = #{userId}) and ((his.inspection_user_id = #{userId} and hi.`status`=0 ) OR hi.operator_user_id = #{userId})
</if> </if>
<if test="interviewerName !=null and interviewerName !=''"> <if test="interviewerName !=null and interviewerName !=''">
and eu.`name` like concat('%',#{interviewerName},'%') and eu.`name` like concat('%',#{interviewerName},'%')
</if> </if>
<if test="interviewerMobile !=null and interviewerMobile !=''"> <if test="interviewerMobile !=null and interviewerMobile !=''">
and eu.mobile=#{interviewerMobile} and eu.mobile like concat('%',#{interviewerMobile},'%')
</if> </if>
<if test="intervieweeName !=null and intervieweeName !=''"> <if test="intervieweeName !=null and intervieweeName !=''">
and hpui.username like concat('%',#{intervieweeName},'%') and hpui.username like concat('%',#{intervieweeName},'%')
</if> </if>
<if test="intervieweeMobile !=null and intervieweeMobile !=''"> <if test="intervieweeMobile !=null and intervieweeMobile !=''">
and hpui.mobile=#{intervieweeMobile} and hpui.mobile like concat('%',{intervieweeMobile},'%')
</if> </if>
<if test="status !=null"> <if test="status !=null">
and hi.`status`=#{status} and hi.`status`=#{status}
@@ -260,7 +260,7 @@
and hpui.username like concat('%',#{intervieweeName},'%') and hpui.username like concat('%',#{intervieweeName},'%')
</if> </if>
<if test="intervieweeMobile !=null and intervieweeMobile !=''"> <if test="intervieweeMobile !=null and intervieweeMobile !=''">
and hpui.mobile=#{intervieweeMobile} and hpui.mobile like concat('%',#{intervieweeMobile},'%')
</if> </if>
<if test="status !=null"> <if test="status !=null">
and hi.`status`=#{status} and hi.`status`=#{status}

View File

@@ -27,7 +27,7 @@
</select> </select>
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo"> <select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
SELECT a.id, b.`name` as operatorUserName, b.mobile as operatorUserMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr SELECT a.id, b.`name` as operatorUserName, b.mobile as operatorUserMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY a.id FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY operation_time desc
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from hy_interview_inspection_log delete from hy_interview_inspection_log