From 9cc00de219965372f23708fa08d04347745668f9 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期三, 31 一月 2024 17:51:48 +0800 Subject: [PATCH] Merge branch 'master' of http://117.34.109.166:18448/r/mdc_430 into develop --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentMapper.xml | 32 +++++++++++++++++++++++++++++++- 1 files changed, 31 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 298d26e..492e4b3 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 @@ -239,7 +239,7 @@ AND t1.drive_type = #{mdcEquipment.driveType} </if> <if test="mdcEquipment.productionName != null and mdcEquipment.productionName != '' "> - AND t3.production_name LIKE CONCAT(CONCAT('%',#{mdcEquipment.productionName}),'%') + AND t3.id = #{ mdcEquipment.productionName } OR t3.parent_id = #{ mdcEquipment.productionName } </if> </where> order by t1.sort_no @@ -250,4 +250,34 @@ select top 1 spindlespeed, actualspindlespeed from [${tableName}] order by CollectTime desc </select> + <select id="exportXlsList" 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 + LEFT JOIN mdc_production t3 ON t2.production_id = t3.id + <where> + <if test="mdcEquipment.equipmentId != null and mdcEquipment.equipmentId != '' "> + AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentId}),'%') + </if> + <if test="mdcEquipment.equipmentName != null and mdcEquipment.equipmentName != '' "> + AND t1.equipment_name LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentName}),'%') + </if> + <if test="mdcEquipment.equipmentModel != null and mdcEquipment.equipmentModel != '' "> + AND t1.equipment_name = #{mdcEquipment.equipmentModel} + </if> + <if test="mdcEquipment.equipmentType != null and mdcEquipment.equipmentType != '' "> + AND t1.equipmentType = #{mdcEquipment.equipmentType} + </if> + <if test="mdcEquipment.driveType != null and mdcEquipment.driveType != '' "> + AND t1.drive_type = #{mdcEquipment.driveType} + </if> + <if test="mdcEquipment.productionName != null and mdcEquipment.productionName != '' "> + AND t3.id = #{ mdcEquipment.productionName } OR t3.parent_id = #{ mdcEquipment.productionName } + </if> + </where> + order by t1.sort_no + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.3