From 0eb8b0635a2e50ff1f82bbea890804e73aae59af Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期五, 18 八月 2023 10:51:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml b/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml
index c8fb3d7..b01670d 100644
--- a/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml
+++ b/server/src/main/resources/mappers/WorkorderRecordExtMapper.xml
@@ -444,6 +444,7 @@
     left join unit d on a.UNIT_ID = d.ID
     left join procedures f on a.PROCEDURE_ID =f.ID
     where a.DELETED = 0
+      and a.TYPE = 1
     <if test="rootDepartId != null">
       AND  a.`ROOT_DEPART_ID` = #{rootDepartId}
     </if>
@@ -453,11 +454,11 @@
     <if test="materialName != null and materialName !=''">
       AND  (c.`name` like concat('%', #{materialName},'%') or c.`code` like concat('%', #{materialName},'%'))
     </if>
-    <if test="startDate != null">
-      AND  a.`CREATE_TIME` >= #{startDate}
+    <if test="startDate != null and startDate != ''">
+      AND  a.`CREATE_TIME` >= concat(#{startDate},' 00:00:00')
     </if>
-    <if test="endDate != null">
-      AND   #{endDate} >= a.`CREATE_TIME`
+    <if test="endDate != null and endDate != ''">
+      AND   concat(#{endDate},' 23:59:59') >= a.`CREATE_TIME`
     </if>
     <if test="userId != null">
       AND  a.`CREATE_USER` = #{userId}
@@ -478,11 +479,11 @@
     <if test="userId != null">
       AND  `CREATE_USER` = #{userId}
     </if>
-    <if test="startDate != null">
-      AND  a.`CREATE_TIME` >= #{startDate}
+    <if test="startDate != null and startDate != ''">
+      AND  `CREATE_TIME` >= concat(#{startDate},' 00:00:00')
     </if>
-    <if test="endDate != null">
-      AND   #{endDate} >= a.`CREATE_TIME`
+    <if test="endDate != null and endDate != ''">
+      AND   concat(#{endDate},' 23:59:59') >= `CREATE_TIME`
     </if>
     group by  `CREATE_USER`
    <!-- order by `CREATE_TIME` desc-->

--
Gitblit v1.9.3