From ba11a11662a027e89f3e86d063b3234aeeb76d83 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 22 八月 2025 17:22:56 +0800
Subject: [PATCH] 设备管理首页

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

diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml
index de02038..c5ad973 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml
@@ -3,10 +3,14 @@
 <mapper namespace="org.jeecg.modules.eam.mapper.EamInspectionOrderMapper">
 
     <select id="queryPageList" resultType="org.jeecg.modules.eam.entity.EamInspectionOrder">
-        select wmo.*, e.equipment_code, e.equipment_name, e.equipment_model
+        select wmo.*, e.equipment_code, e.equipment_name, e.equipment_model,f.process_instance_id as 'procInstId',
+               f.process_definition_key,
+               f.process_definition_id,
+               f.process_instance_id
         from eam_inspection_order wmo
         inner join eam_equipment e
         on wmo.equipment_id = e.id
+        left join flow_my_business f on f.data_id=wmo.id
         ${ew.customSqlSegment}
     </select>
 
@@ -112,6 +116,7 @@
                 LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id
                 LEFT JOIN eam_inspection_order t3 ON t3.inspection_date = t1.plan_inspection_date
                 AND t3.equipment_id = t1.equipment_id
+                AND t1.inspector IS NOT NULL
         WHERE
             t2.equipment_code = #{equipmentCode}
             AND t3.inspection_date LIKE CONCAT(#{inspectionDate},'%')
@@ -123,5 +128,35 @@
         ORDER BY
             t1.plan_inspection_date ASC
     </select>
+    <select id="queryList" resultType="org.jeecg.modules.eam.dto.EamInspectionOrderExport">
+        SELECT
+            t2.equipment_name equipmentName,
+            t2.equipment_code equipmentCode,
+            t2.equipment_model equipmentModel,
+            SUBSTRING(t2.factory_org_code,1,6) factoryName,
+            DATEPART( YEAR, t1.inspection_date ) AS inspectionYear,
+            DATEPART( MONTH, t1.inspection_date ) AS inspectionMonth,
+            t1.hf_code hfCode
+        FROM
+            eam_inspection_order t1
+                LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.id
+        WHERE
+            1=1
+          <if test="ids != null and ids.size() > 0">
+            AND t1.id IN
+              <foreach collection="ids" item="id" index="index" open="(" close=")" separator=",">
+                #{id}
+            </foreach>
+          </if>
+          AND t1.inspection_status = 'COMPLETE'
+        GROUP BY
+        t2.equipment_name,
+        t2.equipment_code,
+        t2.equipment_model ,
+        t2.factory_org_code ,
+        DATEPART( YEAR, t1.inspection_date ),
+        DATEPART( MONTH, t1.inspection_date ),
+        t1.hf_code
+    </select>
 
 </mapper>

--
Gitblit v1.9.3