From 904727f59b7e10a291ce7d1576e33192a619f2f2 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期二, 05 八月 2025 17:08:39 +0800 Subject: [PATCH] MDC设备树和设备权限改造 --- src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml b/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml index 4e876b7..3087928 100644 --- a/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml +++ b/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml @@ -12,7 +12,7 @@ <!--鏌ヨ璁惧鐨勬墍灞炰骇绾垮悕绉颁俊鎭�--> <select id="getProNamesByEquipmentIds" resultType="org.jeecg.modules.mdc.vo.MdcEquipmentProVo"> - SELECT p.production_name, pe.equipment_id FROM mdc_production_equipment pe, mdc_production p WHERE p.id = pe.production_id AND pe.equipment_id IN + SELECT f.factory_name, bef.equipment_id FROM base_equipment_factory bef, base_factory f WHERE f.id = bef.factory_id AND bef.equipment_id IN <foreach collection="equipmentIds" index="index" item="id" open="(" separator="," close=")"> #{id} </foreach> @@ -402,4 +402,29 @@ </where> </select> + <select id="queryByFactoryId" resultType="org.jeecg.modules.mdc.entity.MdcEquipment"> + SELECT + me.* + FROM + base_equipment_factory bef, + mdc_equipment me + WHERE + bef.equipment_id = me.id + AND bef.factory_id = #{ factoryId } + ORDER BY me.equipment_id + </select> + + <select id="queryIdsByFactorys" resultType="java.lang.String"> + SELECT + me.equipment_id + FROM + mdc_equipment me + LEFT JOIN base_equipment_factory bef ON me.id = bef.equipment_id + WHERE + bef.factory_id IN + <foreach collection="allFactoryIds" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </select> + </mapper> -- Gitblit v1.9.3