From 560b21b2b373ef818d54dea866bc6b62f2508490 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 28 十二月 2023 09:52:30 +0800
Subject: [PATCH] 优化代码

---
 java110-db/src/main/resources/mapper/oa/WorkTaskV1ServiceDaoImplMapper.xml |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/java110-db/src/main/resources/mapper/oa/WorkTaskV1ServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/oa/WorkTaskV1ServiceDaoImplMapper.xml
index dfe0576..95c5f3b 100644
--- a/java110-db/src/main/resources/mapper/oa/WorkTaskV1ServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/oa/WorkTaskV1ServiceDaoImplMapper.xml
@@ -34,6 +34,9 @@
         <if test="createUserNameLike !=null and createUserNameLike != ''">
             and wp.create_user_name like concat('%', #{createUserNameLike},'%')
         </if>
+        <if test="workNameLike !=null and workNameLike != ''">
+            and wp.work_name like concat('%', #{workNameLike},'%')
+        </if>
         <if test="staffName !=null and staffName != ''">
             and t.staff_name= #{staffName}
         </if>
@@ -129,10 +132,21 @@
     <select id="queryWorkTasksCount" parameterType="Map" resultType="Map">
         select count(1) count
         from work_task t
-        where 1 =1
+        left join t_dict td on t.state = td.status_cd and td.table_name = 'work_pool' and td.table_columns = 'state'
+        left join work_pool wp on t.work_id = wp.work_id and wp.status_cd = '0'
+        left join work_type wt on wp.wt_id = wt.wt_id
+        where 1=1
+        and wp.status_cd = '0'
+        <if test="createUserNameLike !=null and createUserNameLike != ''">
+            and wp.create_user_name like concat('%', #{createUserNameLike},'%')
+        </if>
+        <if test="workNameLike !=null and workNameLike != ''">
+            and wp.work_name like concat('%', #{workNameLike},'%')
+        </if>
         <if test="staffName !=null and staffName != ''">
             and t.staff_name= #{staffName}
         </if>
+
         <if test="staffNameLike !=null and staffNameLike != ''">
             and t.staff_name like concat('%', #{staffNameLike},'%')
         </if>

--
Gitblit v1.8.0