From d61b21c50e62298f185ecafa8e0b22f7ee8c4973 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期四, 21 八月 2025 18:13:17 +0800
Subject: [PATCH] 430报表接口与列表流程添加

---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/EamInspectionOrderMapper.xml |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 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 17d2d32..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>
 
@@ -124,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