From b441d4a71dd43bf7fb12bfa62938ccd3020878b5 Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期三, 16 七月 2025 19:21:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
lxzn-module-mdc-common/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 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 19bb11d..89873f7 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
@@ -108,6 +108,18 @@
<foreach collection="equipmentIds" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
+ <if test="status !=null and status == 1">
+ and t2.Oporation in ('1', '2')
+ </if>
+ <if test="status !=null and status == 2">
+ and t2.Oporation = '3'
+ </if>
+ <if test="status !=null and status == 3">
+ and t2.Oporation = '22'
+ </if>
+ <if test="status !=null and status == 4">
+ and t2.Oporation not in ('1', '2', '3', '22') or t2.Oporation is null
+ </if>
</select>
<!--鏍规嵁閮ㄩ棬id鏌ヨ璁惧id闆嗗悎-->
@@ -340,4 +352,45 @@
</foreach>
</select>
+ <select id="getEquIdsByProIds" resultType="java.lang.String">
+ SELECT
+ t1.equipment_id
+ FROM
+ mdc_equipment t1
+ LEFT JOIN mdc_production_equipment t2 ON t1.id = t2.equipment_id
+ <where>
+ t2.production_id IN
+ <foreach collection="proIds" index="index" item="id" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </where>
+ </select>
+
+ <select id="findByProIds" 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="proIds" index="index" item="id" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </where>
+ </select>
+
+ <select id="getByEquipmentId" resultType="org.jeecg.modules.mdc.vo.MdcBoardEquRealTImeVo">
+ SELECT
+ t1.*,
+ t2.equipment_manager equipmentManager,
+ t2.installation_position installationPosition,
+ t3.oporation operation
+ FROM
+ mdc_equipment t1
+ LEFT JOIN eam_equipment t2 ON t1.equipment_id = t2.equipment_code
+ LEFT JOIN Equipment t3 ON t1.equipment_id = t3.EquipmentID
+ WHERE t1.equipment_id = #{equipmentId}
+ </select>
+
</mapper>
--
Gitblit v1.9.3