163 lines
7.9 KiB
XML
163 lines
7.9 KiB
XML
<?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="com.ruoyi.queue.ddj.mapper.DdjDeviceExecutionQueueMapper">
|
|
|
|
<resultMap type="DdjDeviceExecutionQueue" id="DdjDeviceExecutionQueueResult">
|
|
<result property="uuid" column="uuid" />
|
|
<result property="rwh" column="rwh" />
|
|
<result property="devName" column="dev_name" />
|
|
<result property="devId" column="dev_id" />
|
|
<result property="rwzt" column="rwzt" />
|
|
<result property="yph" column="yph" />
|
|
<result property="ylh" column="ylh" />
|
|
<result property="ych" column="ych" />
|
|
<result property="mbph" column="mbph" />
|
|
<result property="mblh" column="mblh" />
|
|
<result property="mbch" column="mbch" />
|
|
<result property="ddjxf" column="ddjxf" />
|
|
<result property="rwlx" column="rwlx" />
|
|
<result property="scsj" column="scsj" />
|
|
<result property="xfsj" column="xfsj" />
|
|
<result property="jssj" column="jssj" />
|
|
<result property="mlfs" column="mlfs" />
|
|
<result property="spare1" column="spare1" />
|
|
<result property="spare2" column="spare2" />
|
|
<result property="spare3" column="spare3" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDdjDeviceExecutionQueueVo">
|
|
select uuid, rwh, dev_name, dev_id, rwzt, yph, ylh, ych, mbph, mblh, mbch, ddjxf, rwlx, scsj, xfsj, jssj, mlfs, spare1, spare2, spare3 from ddj_device_execution_queue
|
|
</sql>
|
|
|
|
<select id="selectDdjDeviceExecutionQueueList" parameterType="DdjDeviceExecutionQueue" resultMap="DdjDeviceExecutionQueueResult">
|
|
<include refid="selectDdjDeviceExecutionQueueVo"/>
|
|
<where>
|
|
<if test="rwh != null "> and rwh = #{rwh}</if>
|
|
<if test="devName != null and devName != ''"> and dev_name like concat('%', #{devName}, '%')</if>
|
|
<if test="devId != null "> and dev_id = #{devId}</if>
|
|
<if test="rwzt != null "> and rwzt = #{rwzt}</if>
|
|
<if test="yph != null "> and yph = #{yph}</if>
|
|
<if test="ylh != null "> and ylh = #{ylh}</if>
|
|
<if test="ych != null "> and ych = #{ych}</if>
|
|
<if test="mbph != null "> and mbph = #{mbph}</if>
|
|
<if test="mblh != null "> and mblh = #{mblh}</if>
|
|
<if test="mbch != null "> and mbch = #{mbch}</if>
|
|
<if test="ddjxf != null and ddjxf != ''"> and ddjxf = #{ddjxf}</if>
|
|
<if test="rwlx != null "> and rwlx = #{rwlx}</if>
|
|
<if test="scsj != null and scsj != ''"> and scsj = #{scsj}</if>
|
|
<if test="xfsj != null and xfsj != ''"> and xfsj = #{xfsj}</if>
|
|
<if test="jssj != null and jssj != ''"> and jssj = #{jssj}</if>
|
|
<if test="mlfs != null "> and mlfs = #{mlfs}</if>
|
|
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
|
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
|
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
|
</where>
|
|
order by scsj desc
|
|
</select>
|
|
|
|
<select id="selectDdjDeviceExecutionQueueByUuid" parameterType="String" resultMap="DdjDeviceExecutionQueueResult">
|
|
<include refid="selectDdjDeviceExecutionQueueVo"/>
|
|
where uuid = #{uuid}
|
|
</select>
|
|
<select id="selectDdjDeviceExecutionQueueListByRwlx"
|
|
resultMap="DdjDeviceExecutionQueueResult">
|
|
<include refid="selectDdjDeviceExecutionQueueVo"/>
|
|
where rwlx = #{rwlx} and dev_id = #{devId}
|
|
|
|
</select>
|
|
<select id="selectDdjDeviceExecutionQueueByRwhAndXd"
|
|
resultMap="DdjDeviceExecutionQueueResult">
|
|
<include refid="selectDdjDeviceExecutionQueueVo"/>
|
|
where rwh = #{rwh} and dev_id = #{devId}
|
|
</select>
|
|
|
|
|
|
<insert id="insertDdjDeviceExecutionQueue" parameterType="DdjDeviceExecutionQueue">
|
|
insert into ddj_device_execution_queue
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="uuid != null">uuid,</if>
|
|
<if test="rwh != null">rwh,</if>
|
|
<if test="devName != null and devName != ''">dev_name,</if>
|
|
<if test="devId != null">dev_id,</if>
|
|
<if test="rwzt != null">rwzt,</if>
|
|
<if test="yph != null">yph,</if>
|
|
<if test="ylh != null">ylh,</if>
|
|
<if test="ych != null">ych,</if>
|
|
<if test="mbph != null">mbph,</if>
|
|
<if test="mblh != null">mblh,</if>
|
|
<if test="mbch != null">mbch,</if>
|
|
<if test="ddjxf != null">ddjxf,</if>
|
|
<if test="rwlx != null">rwlx,</if>
|
|
<if test="scsj != null">scsj,</if>
|
|
<if test="xfsj != null">xfsj,</if>
|
|
<if test="jssj != null">jssj,</if>
|
|
<if test="mlfs != null">mlfs,</if>
|
|
<if test="spare1 != null">spare1,</if>
|
|
<if test="spare2 != null">spare2,</if>
|
|
<if test="spare3 != null">spare3,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="uuid != null">#{uuid},</if>
|
|
<if test="rwh != null">#{rwh},</if>
|
|
<if test="devName != null and devName != ''">#{devName},</if>
|
|
<if test="devId != null">#{devId},</if>
|
|
<if test="rwzt != null">#{rwzt},</if>
|
|
<if test="yph != null">#{yph},</if>
|
|
<if test="ylh != null">#{ylh},</if>
|
|
<if test="ych != null">#{ych},</if>
|
|
<if test="mbph != null">#{mbph},</if>
|
|
<if test="mblh != null">#{mblh},</if>
|
|
<if test="mbch != null">#{mbch},</if>
|
|
<if test="ddjxf != null">#{ddjxf},</if>
|
|
<if test="rwlx != null">#{rwlx},</if>
|
|
<if test="scsj != null">#{scsj},</if>
|
|
<if test="xfsj != null">#{xfsj},</if>
|
|
<if test="jssj != null">#{jssj},</if>
|
|
<if test="mlfs != null">#{mlfs},</if>
|
|
<if test="spare1 != null">#{spare1},</if>
|
|
<if test="spare2 != null">#{spare2},</if>
|
|
<if test="spare3 != null">#{spare3},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDdjDeviceExecutionQueue" parameterType="DdjDeviceExecutionQueue">
|
|
update ddj_device_execution_queue
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="rwh != null">rwh = #{rwh},</if>
|
|
<if test="devName != null and devName != ''">dev_name = #{devName},</if>
|
|
<if test="devId != null">dev_id = #{devId},</if>
|
|
<if test="rwzt != null">rwzt = #{rwzt},</if>
|
|
<if test="yph != null">yph = #{yph},</if>
|
|
<if test="ylh != null">ylh = #{ylh},</if>
|
|
<if test="ych != null">ych = #{ych},</if>
|
|
<if test="mbph != null">mbph = #{mbph},</if>
|
|
<if test="mblh != null">mblh = #{mblh},</if>
|
|
<if test="mbch != null">mbch = #{mbch},</if>
|
|
<if test="ddjxf != null">ddjxf = #{ddjxf},</if>
|
|
<if test="rwlx != null">rwlx = #{rwlx},</if>
|
|
<if test="scsj != null">scsj = #{scsj},</if>
|
|
<if test="xfsj != null">xfsj = #{xfsj},</if>
|
|
<if test="jssj != null">jssj = #{jssj},</if>
|
|
<if test="mlfs != null">mlfs = #{mlfs},</if>
|
|
<if test="spare1 != null">spare1 = #{spare1},</if>
|
|
<if test="spare2 != null">spare2 = #{spare2},</if>
|
|
<if test="spare3 != null">spare3 = #{spare3},</if>
|
|
</trim>
|
|
where uuid = #{uuid}
|
|
</update>
|
|
|
|
|
|
<delete id="deleteDdjDeviceExecutionQueueByUuid" parameterType="String">
|
|
delete from ddj_device_execution_queue where uuid = #{uuid}
|
|
</delete>
|
|
|
|
<delete id="deleteDdjDeviceExecutionQueueByUuids" parameterType="String">
|
|
delete from ddj_device_execution_queue where uuid in
|
|
<foreach item="uuid" collection="array" open="(" separator="," close=")">
|
|
#{uuid}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|