From e511b9ab654b831842a1ced1ce7c4556c6b9d96d Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期四, 15 五月 2025 11:50:38 +0800
Subject: [PATCH] art: 设备管理-二保,明细查询
---
lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml | 36 +++++++++++++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
index 7b7f06e..8440226 100644
--- a/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
+++ b/lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml
@@ -279,7 +279,8 @@
<select id="queryByProductionIdAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
SELECT
- me.*
+ me.*,
+ mpe.production_id
FROM
mdc_production_equipment mpe,
mdc_equipment me
@@ -324,4 +325,37 @@
</foreach>
</select>
+ <select id="findByProIdsAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+ SELECT
+ t1.*
+ FROM
+ mdc_equipment t1
+ LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id
+ WHERE t2.production_id IN
+ <foreach collection="mdcProductionIds" item = "productionId" index = "index" open = "(" close= ")" separator = ",">
+ #{productionId}
+ </foreach>
+ AND t1.equipment_type IN
+ <foreach collection="typeList" item = "equipmentType" index = "index" open = "(" close= ")" separator = ",">
+ #{equipmentType}
+ </foreach>
+ </select>
+ <select id="queryByDepartIdsAndType" resultType="org.jeecg.modules.mdc.entity.MdcEquipment">
+ SELECT
+ e.*,
+ ep.production_id
+ FROM
+ mdc_equipment e
+ INNER JOIN mdc_production_equipment ep ON e.id = ep.equipment_id
+ WHERE
+ ep.production_id IN
+ <foreach collection='productionIds' item='id' open='(' separator=',' close=')'>
+ #{id}
+ </foreach>
+ AND e.id IN
+ <foreach collection='deviceIds' item='deviceId' open='(' separator=',' close=')'>
+ #{deviceId}
+ </foreach>
+ </select>
+
</mapper>
--
Gitblit v1.9.3