From 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 06 十二月 2023 08:41:32 +0800
Subject: [PATCH] bug

---
 server/src/main/resources/mappers/WorkorderExtMapper.xml |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/src/main/resources/mappers/WorkorderExtMapper.xml b/server/src/main/resources/mappers/WorkorderExtMapper.xml
index 220473e..a2cc437 100644
--- a/server/src/main/resources/mappers/WorkorderExtMapper.xml
+++ b/server/src/main/resources/mappers/WorkorderExtMapper.xml
@@ -944,8 +944,8 @@
           <choose>
             <when test="departIds != null and departIds.size()>0">
               AND (  `a`.`CREATE_USER` = #{createUser}  or
-              exists (select d.id from workorder_user d where d.WORKORDER_ID=a.id and d.DELETED=0 and d.PRO_USER_ID=#{createUser} )
-              or exists (select d.id from company_user d where  d.user_id= a.CREATE_USER  and d.department_id
+              exists ( select d.id from workorder_user d where d.WORKORDER_ID=a.id and d.DELETED=0 and d.PRO_USER_ID=#{createUser} )
+              or exists ( select d.id from company_user d where  d.user_id= a.CREATE_USER  and d.department_id
               in <foreach collection="departIds" item="item" separator="," open="(" close=")">#{item}</foreach>)
               or exists (select d.id from workorder_user wu left join  company_user d on wu.PRO_USER_ID=d.USER_ID and d.DELETED=0 where  wu.WORKORDER_ID= a.id  and d.department_id
               in <foreach collection="departIds" item="item" separator="," open="(" close=")">#{item}</foreach>)
@@ -957,10 +957,10 @@
               </if>
             </otherwise>
           </choose>
-      <if test="startDate != null">
+      <if test="startDate != null and startDate!=''">
         AND `a`.`PLAN_DATE` >= #{startDate}
       </if>
-      <if test="endDate != null">
+      <if test="endDate != null and endDate!=''">
         AND   #{endDate} >= `a`.`PLAN_DATE`
       </if>
       <if test="mixParam != null and mixParam!=''">

--
Gitblit v1.9.3