From 9de1d40d3a61ce166c63a2c07d02d89bf8bdabd0 Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期五, 07 三月 2025 16:16:18 +0800
Subject: [PATCH] art: 选择设备查询逻辑修改, 点检工单新增时产线逻辑修改

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderActualMaterialMapper.xml |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderActualMaterialMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderActualMaterialMapper.xml
index 642410e..9a0d493 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderActualMaterialMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderActualMaterialMapper.xml
@@ -28,9 +28,9 @@
 							 t1.outbound_order_detail_id outboundOrderDetailId,
 							 t8.id equipmentId,
 							 t1.is_lock isLock,
-							 IFNULL(t5.use_quantity,0) useQuantity,
-							 IFNULL(t5.outbound_main_quantity,0) mainQuantity,
-							 (IFNULL(t5.outbound_main_quantity,0)-IFNULL(t5.use_quantity,0)) as availableQuantity
+							 ISNULL(t5.use_quantity,0) useQuantity,
+							 ISNULL(t5.outbound_main_quantity,0) mainQuantity,
+							 (ISNULL(t5.outbound_main_quantity,0)-ISNULL(t5.use_quantity,0)) as availableQuantity
 
 
         FROM mom_eam_repair_order_actual_material t1
@@ -69,7 +69,7 @@
                  LEFT JOIN mom_eam_spare_part t2 on t2.id = t1.spare_part_id
                  LEFT JOIN mom_base_constructor t3 on t3.id = t2.constructor_id
                  LEFT JOIN mom_eam_spare_part_outbound t4 on t4.id = t1.outbound_order_id
-                 LEFT JOIN mom_eam_spare_part_outbound_detail t5 on t5.spare_part_outbound_id = t4.id
+--                  LEFT JOIN mom_eam_spare_part_outbound_detail t5 on t5.spare_part_outbound_id = t4.id
                  LEFT JOIN mom_base_unit t6 on t6.id = t2.main_unit_id
                  LEFT JOIN mom_eam_report_after_repair t7 on t7.id = t1.report_after_repair_id
                  LEFT JOIN mom_eam_equipment t8 on t8.id = t7.equipment_id

--
Gitblit v1.9.3