From 56e8ccde7c982bc2a5b9746edb2e596c895f63e6 Mon Sep 17 00:00:00 2001 From: Lius <Lius2225@163.com> Date: 星期三, 13 十二月 2023 15:20:07 +0800 Subject: [PATCH] 利用率页面添加平均值和合计值 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml index 4340f0f..ef4f0c3 100644 --- a/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml +++ b/lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml @@ -5,4 +5,38 @@ <select id="findSpindleRunningCurve" resultType="org.jeecg.modules.mdc.entity.MdcTorqueConfig"> select mtc.* from mdc_torque_config mtc where mtc.torque_value=#{torqueValue} and mtc.equipment_id=#{equipmentId} </select> + + <!--鏍规嵁杞﹂棿灞傜骇鏌ヨ鎵煩閰嶇疆鍒楄〃--> + <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcTorqueConfig"> + select * from mdc_torque_config + <where> + <if test="mdcTorqueConfig.equipmentId != null and mdcTorqueConfig.equipmentId != '' "> + AND equipment_id LIKE CONCAT(CONCAT('%',#{mdcTorqueConfig.equipmentId}),'%') + </if> + <if test="mdcTorqueConfig.equipmentName != null and mdcTorqueConfig.equipmentName != '' "> + AND equipment_name LIKE CONCAT(CONCAT('%',#{mdcTorqueConfig.equipmentName}),'%') + </if> + <if test="mdcTorqueConfig.startTime != null and mdcTorqueConfig.endTime != null"> + AND torque_date BETWEEN #{ mdcTorqueConfig.startTime } AND #{ mdcTorqueConfig.endTime } + </if> + <if test="mdcTorqueConfig.mdcSectionIds != null and mdcTorqueConfig.mdcSectionIds.size() > 0 "> + AND equipment_id IN + <foreach collection="mdcTorqueConfig.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> + #{ id } + </foreach> + </if> + ORDER BY torque_date ASC + </where> + </select> + + <select id="findLast" resultType="org.jeecg.modules.mdc.entity.MdcTorqueConfig"> + SELECT TOP + 1 * + FROM + mdc_torque_config + WHERE + equipment_id = #{ equipmentId } + ORDER BY + torque_date DESC + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3