cuijian
2023-10-16 a2bb2523a00f0085c94758c62280700e89b77fa7
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml
@@ -15,6 +15,10 @@
        t2.name equipmentName,
        t2.model equipmentModel,
        t2.specific_equipment specificEquipment,
        t1.fault_reason faultReason,
        t1.fault_phenomenon faultPhenomenon,
        t1.preventive_measure preventiveMeasure,
        t1.fault_remove faultRemove,
        t1.fault_description faultDescription,
        t1.fault_time faultTime,
        t1.photo photo,
@@ -67,12 +71,12 @@
        select
        t1.realname as realName,
        t1.id,
        t1.user_code as userCode,
        t3.name as teamName,
        t3.id as teamId
        t1.username as userCode
--         t3.name as teamName,
--         t3.id as teamId
        FROM sys_user t1
        LEFT JOIN mom_base_team_class t2 on t2.id =t1.team_class_id
        LEFT JOIN mom_base_team t3 on t3.id =t2.team_id
--         LEFT JOIN mom_base_team_class t2 on t2.id =t1.team_class_id
--         LEFT JOIN mom_base_team t3 on t3.id =t2.team_id
        where t1.realname IS NOT NULL
        <if test="realname != null and realname != ''">
            and t1.realname like concat('%',#{realname},'%')
@@ -104,7 +108,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  (ISNULL(t1.outbound_main_quantity,0)-ISNULL(t1.use_quantity,0)) != 0
        where t1.del_flag = 0 and t3.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>