堆垛机调度初始化

This commit is contained in:
liuhanqing
2025-09-22 16:12:18 +08:00
parent 1b44d350b0
commit baed4a312e
58 changed files with 3486 additions and 1228 deletions

View File

@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.device.agv.mapper.AgvQueueFinishMapper">
<mapper namespace="com.ruoyi.queue.agv.mapper.AgvQueueFinishMapper">
<resultMap type="AgvQueueFinish" id="AgvQueueFinishResult">
<result property="reqCode" column="req_code" />

View File

@@ -2,7 +2,7 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.device.agv.mapper.AgvQueueMapper">
<mapper namespace="com.ruoyi.queue.agv.mapper.AgvQueueMapper">
<resultMap type="AgvQueue" id="AgvQueueResult">
<result property="reqCode" column="req_code" />

View File

@@ -0,0 +1,143 @@
<?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.device.ddj.mapper.MsgDdjMapper">
<resultMap type="MsgDdj" id="MsgDdjResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="rwh" column="rwh" />
<result property="jdbz" column="jdbz" />
<result property="sbzt" column="sbzt" />
<result property="czfs" column="czfs" />
<result property="yxxf" column="yxxf" />
<result property="yp" column="yp" />
<result property="yl" column="yl" />
<result property="yc" column="yc" />
<result property="mbp" column="mbp" />
<result property="mbl" column="mbl" />
<result property="mbc" column="mbc" />
<result property="xtxh" column="xtxh" />
<result property="dqxd" column="dqxd" />
<result property="hczt" column="hczt" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectMsgDdjVo">
select id, name, rwh, jdbz, sbzt, czfs, yxxf, yp, yl, yc, mbp, mbl, mbc, xtxh, dqxd, hczt, spare1, spare2, spare3 from msg_ddj
</sql>
<select id="selectMsgDdjList" parameterType="MsgDdj" resultMap="MsgDdjResult">
<include refid="selectMsgDdjVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="rwh != null "> and rwh = #{rwh}</if>
<if test="jdbz != null "> and jdbz = #{jdbz}</if>
<if test="sbzt != null "> and sbzt = #{sbzt}</if>
<if test="czfs != null "> and czfs = #{czfs}</if>
<if test="yxxf != null "> and yxxf = #{yxxf}</if>
<if test="yp != null "> and yp = #{yp}</if>
<if test="yl != null "> and yl = #{yl}</if>
<if test="yc != null "> and yc = #{yc}</if>
<if test="mbp != null "> and mbp = #{mbp}</if>
<if test="mbl != null "> and mbl = #{mbl}</if>
<if test="mbc != null "> and mbc = #{mbc}</if>
<if test="xtxh != null "> and xtxh = #{xtxh}</if>
<if test="dqxd != null "> and dqxd = #{dqxd}</if>
<if test="hczt != null "> and hczt = #{hczt}</if>
<if test="spare1 != null "> and spare1 = #{spare1}</if>
<if test="spare2 != null "> and spare2 = #{spare2}</if>
<if test="spare3 != null "> and spare3 = #{spare3}</if>
</where>
</select>
<select id="selectMsgDdjById" parameterType="Long" resultMap="MsgDdjResult">
<include refid="selectMsgDdjVo"/>
where id = #{id}
</select>
<insert id="insertMsgDdj" parameterType="MsgDdj">
insert into msg_ddj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="name != null">name,</if>
<if test="rwh != null">rwh,</if>
<if test="jdbz != null">jdbz,</if>
<if test="sbzt != null">sbzt,</if>
<if test="czfs != null">czfs,</if>
<if test="yxxf != null">yxxf,</if>
<if test="yp != null">yp,</if>
<if test="yl != null">yl,</if>
<if test="yc != null">yc,</if>
<if test="mbp != null">mbp,</if>
<if test="mbl != null">mbl,</if>
<if test="mbc != null">mbc,</if>
<if test="xtxh != null">xtxh,</if>
<if test="dqxd != null">dqxd,</if>
<if test="hczt != null">hczt,</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="id != null">#{id},</if>
<if test="name != null">#{name},</if>
<if test="rwh != null">#{rwh},</if>
<if test="jdbz != null">#{jdbz},</if>
<if test="sbzt != null">#{sbzt},</if>
<if test="czfs != null">#{czfs},</if>
<if test="yxxf != null">#{yxxf},</if>
<if test="yp != null">#{yp},</if>
<if test="yl != null">#{yl},</if>
<if test="yc != null">#{yc},</if>
<if test="mbp != null">#{mbp},</if>
<if test="mbl != null">#{mbl},</if>
<if test="mbc != null">#{mbc},</if>
<if test="xtxh != null">#{xtxh},</if>
<if test="dqxd != null">#{dqxd},</if>
<if test="hczt != null">#{hczt},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateMsgDdj" parameterType="MsgDdj">
update msg_ddj
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="rwh != null">rwh = #{rwh},</if>
<if test="jdbz != null">jdbz = #{jdbz},</if>
<if test="sbzt != null">sbzt = #{sbzt},</if>
<if test="czfs != null">czfs = #{czfs},</if>
<if test="yxxf != null">yxxf = #{yxxf},</if>
<if test="yp != null">yp = #{yp},</if>
<if test="yl != null">yl = #{yl},</if>
<if test="yc != null">yc = #{yc},</if>
<if test="mbp != null">mbp = #{mbp},</if>
<if test="mbl != null">mbl = #{mbl},</if>
<if test="mbc != null">mbc = #{mbc},</if>
<if test="xtxh != null">xtxh = #{xtxh},</if>
<if test="dqxd != null">dqxd = #{dqxd},</if>
<if test="hczt != null">hczt = #{hczt},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMsgDdjById" parameterType="Long">
delete from msg_ddj where id = #{id}
</delete>
<delete id="deleteMsgDdjByIds" parameterType="String">
delete from msg_ddj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,148 @@
<?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.job.mapper.MydoJobMapper">
<resultMap type="MydoJob" id="MydoJobResult">
<result property="jobId" column="job_id" />
<result property="status" column="status" />
<result property="taskNo" column="task_no" />
<result property="roadwayId" column="roadway_id" />
<result property="cargoSpaceId" column="cargo_space_id" />
<result property="targetRoadwayId" column="target_roadway_id" />
<result property="targetCargoSpaceId" column="target_cargo_space_id" />
<result property="priority" column="priority" />
<result property="executionPhase" column="execution_phase" />
<result property="inOrOut" column="in_or_out" />
<result property="createTime" column="create_time" />
<result property="startTime" column="start_time" />
<result property="finishTime" column="finish_time" />
<result property="entranceId" column="entrance_id" />
<result property="exitId" column="exit_id" />
<result property="warehouseId" column="warehouse_id" />
<result property="faultFlag" column="fault_flag" />
</resultMap>
<sql id="selectMydoJobVo">
select job_id, status, task_no, roadway_id, cargo_space_id, target_roadway_id, target_cargo_space_id, priority, execution_phase, in_or_out, create_time, start_time, finish_time, entrance_id, exit_id, warehouse_id, fault_flag from mydo_job_wcs
</sql>
<select id="selectMydoJobList" parameterType="MydoJob" resultMap="MydoJobResult">
<include refid="selectMydoJobVo"/>
<where>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
<if test="roadwayId != null and roadwayId != ''"> and roadway_id = #{roadwayId}</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
<if test="targetRoadwayId != null and targetRoadwayId != ''"> and target_roadway_id = #{targetRoadwayId}</if>
<if test="targetCargoSpaceId != null and targetCargoSpaceId != ''"> and target_cargo_space_id = #{targetCargoSpaceId}</if>
<if test="priority != null "> and priority = #{priority}</if>
<if test="executionPhase != null and executionPhase != ''"> and execution_phase = #{executionPhase}</if>
<if test="inOrOut != null and inOrOut != ''"> and in_or_out = #{inOrOut}</if>
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
<if test="finishTime != null and finishTime != ''"> and finish_time = #{finishTime}</if>
<if test="entranceId != null and entranceId != ''"> and entrance_id = #{entranceId}</if>
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
<if test="faultFlag != null and faultFlag != ''"> and fault_flag = #{faultFlag}</if>
</where>
</select>
<select id="selectMydoJobByJobId" parameterType="String" resultMap="MydoJobResult">
<include refid="selectMydoJobVo"/>
where job_id = #{jobId}
</select>
<select id="ddjTaskFinish" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_mydojob_finish(
#{v_rwh,mode=IN,jdbcType=INTEGER},
#{v_ddj_id,mode=IN,jdbcType=INTEGER},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
<select id="InvalidMydoJob" parameterType="java.util.Map" statementType="CALLABLE">
{call proc_mydojob_invalid(
#{v_rwh,mode=IN,jdbcType=INTEGER},
#{v_ddj_id,mode=IN,jdbcType=INTEGER},
#{v_result,mode=OUT,jdbcType=INTEGER},
#{v_resultmsg,mode=OUT,jdbcType=VARCHAR}
)}
</select>
<insert id="insertMydoJob" parameterType="MydoJob">
insert into mydo_job_wcs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jobId != null">job_id,</if>
<if test="status != null and status != ''">status,</if>
<if test="taskNo != null and taskNo != ''">task_no,</if>
<if test="roadwayId != null">roadway_id,</if>
<if test="cargoSpaceId != null">cargo_space_id,</if>
<if test="targetRoadwayId != null">target_roadway_id,</if>
<if test="targetCargoSpaceId != null">target_cargo_space_id,</if>
<if test="priority != null">priority,</if>
<if test="executionPhase != null">execution_phase,</if>
<if test="inOrOut != null">in_or_out,</if>
<if test="createTime != null">create_time,</if>
<if test="startTime != null">start_time,</if>
<if test="finishTime != null">finish_time,</if>
<if test="entranceId != null">entrance_id,</if>
<if test="exitId != null">exit_id,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="faultFlag != null">fault_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jobId != null">#{jobId},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="taskNo != null and taskNo != ''">#{taskNo},</if>
<if test="roadwayId != null">#{roadwayId},</if>
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
<if test="targetRoadwayId != null">#{targetRoadwayId},</if>
<if test="targetCargoSpaceId != null">#{targetCargoSpaceId},</if>
<if test="priority != null">#{priority},</if>
<if test="executionPhase != null">#{executionPhase},</if>
<if test="inOrOut != null">#{inOrOut},</if>
<if test="createTime != null">#{createTime},</if>
<if test="startTime != null">#{startTime},</if>
<if test="finishTime != null">#{finishTime},</if>
<if test="entranceId != null">#{entranceId},</if>
<if test="exitId != null">#{exitId},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="faultFlag != null">#{faultFlag},</if>
</trim>
</insert>
<update id="updateMydoJob" parameterType="MydoJob">
update mydo_job_wcs
<trim prefix="SET" suffixOverrides=",">
<if test="status != null and status != ''">status = #{status},</if>
<if test="taskNo != null and taskNo != ''">task_no = #{taskNo},</if>
<if test="roadwayId != null">roadway_id = #{roadwayId},</if>
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
<if test="targetRoadwayId != null">target_roadway_id = #{targetRoadwayId},</if>
<if test="targetCargoSpaceId != null">target_cargo_space_id = #{targetCargoSpaceId},</if>
<if test="priority != null">priority = #{priority},</if>
<if test="executionPhase != null">execution_phase = #{executionPhase},</if>
<if test="inOrOut != null">in_or_out = #{inOrOut},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
<if test="entranceId != null">entrance_id = #{entranceId},</if>
<if test="exitId != null">exit_id = #{exitId},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="faultFlag != null">fault_flag = #{faultFlag},</if>
</trim>
where job_id = #{jobId}
</update>
<delete id="deleteMydoJobByJobId" parameterType="String">
delete from mydo_job_wcs where job_id = #{jobId}
</delete>
<delete id="deleteMydoJobByJobIds" parameterType="String">
delete from mydo_job_wcs where job_id in
<foreach item="jobId" collection="array" open="(" separator="," close=")">
#{jobId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,148 @@
<?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.DdjDeviceExecutionQueueFinishMapper">
<resultMap type="DdjDeviceExecutionQueueFinish" id="DdjDeviceExecutionQueueFinishResult">
<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="selectDdjDeviceExecutionQueueFinishVo">
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_finish
</sql>
<select id="selectDdjDeviceExecutionQueueFinishList" parameterType="DdjDeviceExecutionQueueFinish" resultMap="DdjDeviceExecutionQueueFinishResult">
<include refid="selectDdjDeviceExecutionQueueFinishVo"/>
<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>
</select>
<select id="selectDdjDeviceExecutionQueueFinishByUuid" parameterType="String" resultMap="DdjDeviceExecutionQueueFinishResult">
<include refid="selectDdjDeviceExecutionQueueFinishVo"/>
where uuid = #{uuid}
</select>
<insert id="insertDdjDeviceExecutionQueueFinish" parameterType="DdjDeviceExecutionQueueFinish">
insert into ddj_device_execution_queue_finish
<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="updateDdjDeviceExecutionQueueFinish" parameterType="DdjDeviceExecutionQueueFinish">
update ddj_device_execution_queue_finish
<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="deleteDdjDeviceExecutionQueueFinishByUuid" parameterType="String">
delete from ddj_device_execution_queue_finish where uuid = #{uuid}
</delete>
<delete id="deleteDdjDeviceExecutionQueueFinishByUuids" parameterType="String">
delete from ddj_device_execution_queue_finish where uuid in
<foreach item="uuid" collection="array" open="(" separator="," close=")">
#{uuid}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,149 @@
<?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>
<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>