From a6d22f16447c4b440b269fa8b43daf919e5a10c4 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期四, 12 十月 2023 10:11:25 +0800 Subject: [PATCH] update --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml | 66 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 1 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml index 26d708c..5964eff 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml @@ -58,6 +58,7 @@ WHERE med.equipment_id = me.id AND med.dep_id = #{ departId } + ORDER BY me.equipment_id </select> <!--鏍规嵁浜х嚎id鏌ヨ璁惧--> @@ -70,6 +71,7 @@ WHERE mpe.equipment_id = me.id AND mpe.production_id = #{ productionId } + ORDER BY me.equipment_id </select> <!--鏍规嵁浜х嚎id鏌ヨ璁惧id闆嗗悎--> @@ -129,7 +131,7 @@ k.equipment_type, k.equipment_type_pictures ORDER BY - equipmentName + EquipmentID </select> <!--鏍规嵁閮ㄩ棬id鏌ヨ璁惧id闆嗗悎--> @@ -146,5 +148,67 @@ </foreach> </select> + <!--鏍规嵁璁惧缂栧彿鏌ヨ璁惧淇℃伅鍜岄儴闂ㄤ俊鎭�--> + <select id="findEquDepList" resultType="org.jeecg.modules.mdc.dto.MdcEquDepDto"> + SELECT + sd.id, + sd.parent_id, + sd.depart_name, + sd.org_type, + me.equipment_id, + me.equipment_name, + me.equipment_type + FROM + mdc_equipment_depart med + LEFT JOIN sys_depart sd ON med.dep_id = sd.id + LEFT JOIN mdc_equipment me ON me.id = med.equipment_id + <where> + me.equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </where> + ORDER BY me.equipment_id + </select> + + <!--鏍规嵁璁惧缂栧彿鏌ヨ璁惧淇℃伅鍜屼骇绾夸俊鎭�--> + <select id="findEquProList" resultType="org.jeecg.modules.mdc.dto.MdcEquProDto"> + SELECT + mp.id, + mp.parent_id, + mp.production_name, + mp.org_type, + me.equipment_id, + me.equipment_name, + me.equipment_type + FROM + mdc_production_equipment mpe + LEFT JOIN mdc_production mp ON mpe.production_id = mp.id + LEFT JOIN mdc_equipment me ON me.id = mpe.equipment_id + <where> + me.equipment_id IN + <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </where> + ORDER BY me.equipment_id + </select> + + <!--鏍规嵁澶у睆杞﹂棿id鏌ヨ璁惧鍒楄〃--> + <select id="getEquipmentByWorkshopId" resultType="org.jeecg.modules.mdc.entity.MdcEquipment"> + SELECT + me.* + FROM + mdc_workshop_equipment mwe + LEFT JOIN mdc_equipment me ON me.equipment_id = mwe.equipment_id + <where> + AND mwe.workshop_id = #{ workshopEquipmentVo.workshopId } + <if test="workshopEquipmentVo.equipmentId != null and workshopEquipmentVo.equipmentId != ''"> + AND mwe.equipment_id = #{ workshopEquipmentVo.equipmentId } + </if> + </where> + ORDER BY me.equipment_id + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3