yangman
2023-07-05 3f55d897a99de7befb7c9264053d312543b5634f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?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
        <if test="mdcTorqueConfig.equipmentName !=null and mdcTorqueConfig.equipmentName !='' ">
            and mtc.equipment_name like concat(concat('%',#{mdcTorqueConfig.equipmentName}),'%')
        </if>
        <if test="mdcTorqueConfig.equipmentId !=null and mdcTorqueConfig.equipmentId !='' ">
            and mtc.equipment_id like concat(concat('%',#{mdcTorqueConfig.equipmentId}),'%')
        </if>
        <if test="mdcTorqueConfig.mdcSectionIds !=null || mdcTorqueConfig.mdcSectionIds.size() > 0 ">
            and mtc.equipment_id in
            <foreach collection="mdcTorqueConfig.mdcSectionIds" item="id" index="index" open="(" close=")"
                     separator=",">
                #{id}
            </foreach>
        </if>
    </select>
</mapper>