Browse Source

员工业务部门的查询

姜永辉 1 year ago
parent
commit
369f0c3916
1 changed files with 8 additions and 1 deletions
  1. 8 1
      src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

+ 8 - 1
src/main/java/com/dk/mdm/mapper/common/CommonMapper.xml

@@ -190,6 +190,10 @@
         <if test="flgBusiness != null">
             AND flg_business  = #{flgBusiness}
         </if>
+        <if test="searchText !=null">
+            AND ( org_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
+            or org_code LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
+        </if>
         <if test="ids != null and ids.size() > 0 ">
             order by case org_id
             <foreach collection="ids" index="index" item="item">
@@ -288,7 +292,10 @@
         <if test="staffName != null and staffName != ''">
             And position (#{staffName} in staff.staff_name)>0
         </if>
-
+        <if test="searchText !=null">
+            AND ( staff.staff_name LIKE concat('%', my_ex.likequery(#{searchText}), '%')
+            or staff.staff_code LIKE concat('%', my_ex.likequery(#{searchText}), '%'))
+        </if>
         <if test="ids != null and ids.size() > 0 ">
             order by case staff.staff_id
             <foreach collection="ids" index="index" item="item">