From 2837bdd57f72e386bbf9a725e7b3a13e5eb9e930 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 21 八月 2023 09:19:57 +0800
Subject: [PATCH] 修复bug
---
server/src/main/resources/mappers/WorkorderExtMapper.xml | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/server/src/main/resources/mappers/WorkorderExtMapper.xml b/server/src/main/resources/mappers/WorkorderExtMapper.xml
index e583b32..8ddc14a 100644
--- a/server/src/main/resources/mappers/WorkorderExtMapper.xml
+++ b/server/src/main/resources/mappers/WorkorderExtMapper.xml
@@ -243,7 +243,7 @@
</select>
<!-- 绠$悊椤甸潰鏌ヨ -->
<select id="sumOrderNum" parameterType="doumeemes.dao.ext.dto.QueryWorkorderExtDTO" resultType="java.lang.Integer">
- SELECT sum(`a`.num)
+ SELECT sum(`a`.id)
FROM `workorder` `a`
<where>
<if test="id != null">
@@ -469,7 +469,8 @@
`pgmodel`.`GROUP_ID` AS PGMODEL_GROUP_ID,
`pgmodel`.`SERIAL_NUM` AS PGMODEL_SERIAL_NUM,
p.name as procedureName,
- u.realname as proUserName,
+ u.realname as proUserName,
+ uc.realname as createUserName,
(select sum(ifnull(num,0)) from workorder_record r where r.deleted=0 and r.type=1 and r.workorder_id=a.id) as proNum
<if test="checkTouliao!=null and checkTouliao==1">
,(select r.id from workorder_record r where r.deleted=0 and r.type=0 and r.workorder_id=a.id limit 1) as touliaoId
@@ -487,6 +488,7 @@
LEFT JOIN `device` `pgmodel` ON a.PRO_GROUP_ID=pgmodel.ID
LEFT JOIN `procedures` `p` ON a.`PROCEDURE_ID`=p.ID
LEFT JOIN `system_user` `u` ON `a`.`PRO_USER_ID`=u.ID
+ LEFT JOIN `system_user` `uc` ON `a`.`CREATE_USER`=uc.ID
<where>
<if test="id != null">
AND `a`.`ID` = #{id}
@@ -955,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