From a862e80c1ee46a77fc8a2dacf59b0110b3669550 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期一, 22 四月 2024 16:32:02 +0800 Subject: [PATCH] 参数修改 --- lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcTorqueConfigMapper.xml | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 46 insertions(+), 5 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 260ec55..efe16ba 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 @@ -1,11 +1,52 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.jeecg.modules.mdc.mapper.MdcTorqueConfigMapper"> - <!--鏍规嵁鎵煩鍊肩敓鎴愪富杞磋繍琛屾洸绾�--> - <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 mtc.* from mdc_torque_config mtc,mdc_equipment me where mtc.equipment_id=me.equipment_id + 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> + + <!--鐢熸垚宸ヤ綔鏇茬嚎--> + <select id="getWorkLineList" resultType="org.jeecg.modules.mdc.dto.EquipmentMachingDto"> + SELECT + torque_date CollectTime, + torque_value torque, + feed_parameter + FROM + mdc_torque_config + WHERE + equipment_id = #{ equipmentId } AND torque_date BETWEEN #{ startTime } AND #{ endTime } + ORDER BY + torque_date ASC </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3