qushaowei
2024-07-25 a7ecb4b14c2e5a56f425f46decc9c203580edd35
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