From 375a541c825729247ace6a7ebe8722755436c1e0 Mon Sep 17 00:00:00 2001
From: “linengliang” <vanSuperEnergy@163.com>
Date: 星期一, 21 八月 2023 16:47:49 +0800
Subject: [PATCH] 维修

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml
index 1abdcd8..d135d5c 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml
@@ -38,7 +38,7 @@
         t3.depart_name departName,
         t4.name outsourcingUnitName,
         t5.realname responsibilityName,
-        t6.`name` teamName
+        t6.name teamName
         from mom_eam_repair_order t1
         left join(select * from mom_eam_equipment where del_flag = 0 and status = 1) t2 on t1.equipment_id= t2.id
         left join sys_depart t3 on t3.id = t1.depart_id
@@ -58,7 +58,8 @@
         <if test="status != null and status != ''">
             and t1.status = #{status}
         </if>
-        and t1.repair_order_type = #{repairOrderType} order by t1.create_time desc
+        and t1.repair_order_type = #{repairOrderType}
+        order by t1.create_time desc
     </select>
 
 
@@ -85,11 +86,11 @@
         select
         t1.id,
         t1.spare_part_id as sparePartId,
-        IFNULL(t1.use_quantity,0) as useQuantity,
+        ISNULL(t1.use_quantity,0) as useQuantity,
         t2.num,
         t2.id as outboundOrderId,
-        IFNULL(t1.outbound_main_quantity,0) as mainQuantity,
-        (IFNULL(t1.outbound_main_quantity,0)-IFNULL(t1.use_quantity,0)) as availableQuantity,
+        ISNULL(t1.outbound_main_quantity,0) as mainQuantity,
+        (ISNULL(t1.outbound_main_quantity,0)-ISNULL(t1.use_quantity,0)) as availableQuantity,
         t3.num as spareNum,
         t3.name as  spareName,
         t3.model,
@@ -103,7 +104,7 @@
         LEFT JOIN  mom_eam_spare_part   t3  on  t3.id =t1.spare_part_id
         LEFT JOIN  mom_base_constructor   t4  on  t4.id =t3.constructor_id
         LEFT JOIN  mom_base_unit   t5  on  t5.id =t1.main_unit_id
-        where t1.del_flag = 0 and t1.outbound_main_quantity != 0 and  (IFNULL(t1.outbound_main_quantity,0)-IFNULL(t1.use_quantity,0)) != 0
+        where t1.del_flag = 0 and t1.outbound_main_quantity != 0 and  (ISNULL(t1.outbound_main_quantity,0)-ISNULL(t1.use_quantity,0)) != 0
         <if test="status != null and status != ''">
             and t1.status = #{status}
         </if>

--
Gitblit v1.9.3