From 56e8ccde7c982bc2a5b9746edb2e596c895f63e6 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期三, 13 十二月 2023 15:20:07 +0800
Subject: [PATCH] 利用率页面添加平均值和合计值

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/RepairOrderMapper.xml |   38 ++++++++++++++++++++++++++++++++++----
 1 files changed, 34 insertions(+), 4 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 87f5160..baa6a45 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
@@ -11,10 +11,6 @@
         t1.recipient_user_id recipientUserId,
         t1.report_repair_id reportRepairId,
         t1.project_maintenance_order_id projectMaintenanceOrderId,
-        t2.num equipmentNum,
-        t2.name equipmentName,
-        t2.model equipmentModel,
-        t2.specific_equipment specificEquipment,
         t1.fault_reason faultReason,
         t1.fault_phenomenon faultPhenomenon,
         t1.preventive_measure preventiveMeasure,
@@ -38,20 +34,46 @@
         t1.business_type businessType,
         t1.responsibility_id responsibilityId,
         t1.outsourcing_unit outsourcingUnit,
+        t1.actual_hour actualHour,
         t1.remark,
+        t1.repair_order_uda1 repairOrderUda1,
+        t1.repair_order_uda2 repairOrderUda2,
+        t1.repair_order_uda3 repairOrderUda3,
+        t1.repair_order_uda4 repairOrderUda4,
+        t1.repair_order_uda5 repairOrderUda5,
+        t1.spare_time spareTime,
+        t1.part_time partTime,
+        report.err_uda2 errUda2,
+        report.accept_time acceptTime,
+        report.err_uda3 errUda3,
+        report.fault_hour faultHour,
+        t2.num equipmentNum,
+        t2.name equipmentName,
+        t2.model equipmentModel,
+        t2.specific_equipment specificEquipment,
         t3.depart_name departName,
         t4.name outsourcingUnitName,
         t5.realname responsibilityName,
         t6.name teamName
         from mom_eam_repair_order t1
+        left join(select * from mom_eam_equipment_report_repair where del_flag = 0 ) report on report.id = t1.report_repair_id
         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
         left join mom_base_supplier t4 on t1.outsourcing_unit = t4.id
         left join sys_user t5 on t5.id = t1.responsibility_id
         left join mom_base_team t6 on t6.id=t1.team_id
         where t1.del_flag = 0
+        <if test="id != null and id != ''">
+            and t1.id = #{id}
+        </if>
         <if test="num != null and num != ''">
             and t1.num like concat('%',#{num},'%')
+        </if>
+        <if test="equipNums.size!=0">
+            and t2.num in
+            <foreach collection="equipNums" open="(" separator="," close=")" item="num">
+                #{num}
+            </foreach>
         </if>
         <if test="equipmentNum != null and equipmentNum != ''">
             and t2.num like concat('%',#{equipmentNum},'%')
@@ -62,6 +84,9 @@
         <if test="status != null and status != ''">
             and t1.status = #{status}
         </if>
+        <if test="repairOrderUda1 != null and repairOrderUda1 != ''">
+            and t1.repair_order_uda1 = #{repairOrderUda1}
+        </if>
         <if test="equipmentCategoryId != null and equipmentCategoryId != ''">
             and t2.equipment_category_id = #{equipmentCategoryId}
         </if>
@@ -71,7 +96,12 @@
         <if test="specificEquipment != null and specificEquipment != ''">
             and t2.specific_equipment = #{specificEquipment}
         </if>
+        <if test="teamId != null and teamId != ''">
+            and t1.team_id = #{teamId}
+        </if>
+        <if test="repairOrderType != null and repairOrderType != ''">
         and t1.repair_order_type = #{repairOrderType}
+        </if>
         order by t1.create_time desc
     </select>
 

--
Gitblit v1.9.3