Browse Source

四长制增加姓名模糊查询

hanfucheng 1 year ago
parent
commit
2da22a65c1

+ 3 - 0
src/main/resources/mapper/digitalforest/ForestViewMapper.xml

@@ -94,6 +94,9 @@
         <if test="linJob != null and linJob != ''">
             and a.lin_job=#{linJob}
         </if>
+        <if test="name != null and name != ''">
+            and a.lin_name like concat('%', #{name}, '%')
+        </if>
         <choose>
             <when test="deptId != null  and deptId != ''">
                 and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )

+ 2 - 1
src/main/resources/mapper/digitalwater/WaterConservancyViewMapper.xml

@@ -103,7 +103,8 @@
             LEFT JOIN ${database_system}.sys_dept d ON a.dept_id = d.dept_id
         WHERE
             a.type = #{leadType}
-            AND a.post = #{dictType}
+        <if test="dictType != null  and dictType != ''">AND a.post = #{dictType}</if>
+        <if test="name != null  and name != ''">AND a.name like concat('%', #{name}, '%')</if>
         <choose>
             <when test="deptId != null and deptId != ''">and FIND_IN_SET( #{deptId}, CONCAT(d.ancestors,',',d.dept_id) )</when>
             <otherwise>${params.dataScope}</otherwise>