From 1a2258c4eca2e7514b6096004fa1c3e0036b402b Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 28 三月 2024 14:04:24 +0800
Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/mdc_430 into develop

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

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/PredictiveWorkOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/PredictiveWorkOrderMapper.xml
index b5e8b95..cc1c583 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/PredictiveWorkOrderMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/PredictiveWorkOrderMapper.xml
@@ -45,4 +45,60 @@
         </if>
         ORDER BY t1.create_time desc
     </select>
+    <select id="pageList" resultType="org.jeecg.modules.eam.entity.PredictiveWorkOrder">
+        select
+        t1.id id,
+        t1.num num,
+        t1.status status,
+        t1.item_id itemId,
+        t1.actual_start_time actualStartTime,
+        t1.actual_end_time actualEndTime,
+        t1.plan_start_time planStartTime,
+        t1.plan_end_time planEndTime,
+        t1.create_by createBy,
+        t1.create_time createTime,
+        t1.maintenance_user_id maintenanceUserId,
+        t1.recipient_user_id recipientUserId,
+        t2.monitor_type monitorType,
+        t2.num planNum,
+        t2.id workPlanId,
+        t2.team_id teamId,
+        t2.plan_version version,
+        t2.assign_mode assignMode,
+        t3.id equipmentId,
+        t3.num equipmentNum,
+        t3.name equipmentName,
+        t3.model model,
+        t3.use_id useId,
+        t6.actualWorkingHourQuota actualWorkingHourQuota
+        from
+        mom_eam_predictive_work_order t1
+        left join (select * from mom_eam_predictive_work_plan where del_flag = 0) t2
+        on t1.work_plan_id = t2.id
+        left join (select * from mom_eam_equipment where del_flag = 0) t3
+        on t1.equipment_id = t3.id
+        left join
+        (select
+        t4.id,
+        ISNULL(SUM(t5.actual_working_hour_quota),0) actualWorkingHourQuota
+        from
+        mom_eam_predictive_work_order t4
+        left join mom_eam_maintenance_order_actual_working_hour t5
+        on t4.id = t5.maintenance_order_id
+        group by t4.id) t6
+        on t6.id = t1.id
+        where t1.del_flag = 0
+        <if test="num != null and num != ''">
+            and t1.num like concat('%',#{num},'%')
+        </if>
+        <if test="status != null and status != ''">
+            and t1.status = #{status}
+        </if>
+        <if test="equipmentNum != null and equipmentNum != ''">
+            and t3.num like concat('%',#{equipmentNum},'%')
+        </if>
+        <if test="equipmentName != null and equipmentName != ''">
+            and t3.name like concat('%',#{equipmentName},'%')
+        </if>
+    </select>
 </mapper>

--
Gitblit v1.9.3