123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- <?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.ams.agv.ndc.mapper.AmsTaskMapper">
- <resultMap type="AmsTask" id="AmsTaskResult">
- <result property="id" column="id" />
- <result property="taskNo" column="task_no" />
- <result property="ikey" column="iKey" />
- <result property="aciIndex" column="aci_index" />
- <result property="stFrom" column="st_from" />
- <result property="stTo" column="st_to" />
- <result property="priority" column="priority" />
- <result property="systemStatus" column="system_status" />
- <result property="event" column="event" />
- <result property="serverAck" column="server_ack" />
- <result property="aciAccept" column="aci_accept" />
- <result property="isDelete" column="is_delete" />
- <result property="callbackurl" column="callBackUrl" />
- <result property="addtime" column="addtime" />
- <result property="addwho" column="addwho" />
- <result property="sysName" column="sys_name" />
- <result property="deviceName" column="device_name" />
- <result property="businessType" column="business_type" />
- <result property="heightLevel" column="height_level" />
- <result property="remark" column="remark" />
- <result property="roadway" column="roadway" />
- <result property="tier" column="tier" />
- <result property="ext1" column="ext1" />
- <result property="ext2" column="ext2" />
- <result property="ext3" column="ext3" />
- <result property="ext4" column="ext4" />
- <result property="ext5" column="ext5" />
- <result property="ext6" column="ext6" />
- <result property="ext7" column="ext7" />
- <result property="ext8" column="ext8" />
- </resultMap>
- <sql id="selectAmsTaskVo">
- select id, task_no, iKey, aci_index, st_from, st_to, priority, system_status, event, server_ack
- , aci_accept, is_delete, callBackUrl, addtime, addwho, sys_name, device_name, business_type
- , height_level, remark, roadway, tier, ext1, ext2, ext3, ext4, ext5, ext6, ext7, ext8
- from ams_task
- </sql>
- <select id="selectAmsTaskList" parameterType="AmsTask" resultMap="AmsTaskResult">
- <include refid="selectAmsTaskVo"/>
- <where>
- <if test="taskNo != null and taskNo != ''"> and task_no = #{taskNo}</if>
- <if test="ikey != null "> and iKey = #{ikey}</if>
- <if test="aciIndex != null "> and aci_index = #{aciIndex}</if>
- <if test="stFrom != null "> and st_from = #{stFrom}</if>
- <if test="stTo != null "> and st_to = #{stTo}</if>
- <if test="priority != null "> and priority = #{priority}</if>
- <if test="systemStatus != null "> and system_status = #{systemStatus}</if>
- <if test="event != null "> and event = #{event}</if>
- <if test="serverAck != null "> and server_ack = #{serverAck}</if>
- <if test="aciAccept != null "> and aci_accept = #{aciAccept}</if>
- <if test="isDelete != null "> and is_delete = #{isDelete}</if>
- <if test="callbackurl != null and callbackurl != ''"> and callBackUrl = #{callbackurl}</if>
- <if test="addtime != null "> and addtime = #{addtime}</if>
- <if test="addwho != null and addwho != ''"> and addwho = #{addwho}</if>
- <if test="sysName != null and sysName != ''"> and sys_name like concat('%', #{sysName}, '%')</if>
- <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
- <if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
- <if test="heightLevel != null and heightLevel != ''"> and height_level = #{heightLevel}</if>
- <if test="roadway != null and roadway != ''"> and roadway = #{roadway}</if>
- <if test="tier != null and tier != ''"> and tier = #{tier}</if>
- <if test="ext1 != null and ext1 != ''"> and ext1 = #{ext1}</if>
- <if test="ext2 != null and ext2 != ''"> and ext2 = #{ext2}</if>
- <if test="ext3 != null and ext3 != ''"> and ext3 = #{ext3}</if>
- <if test="ext4 != null and ext4 != ''"> and ext4 = #{ext4}</if>
- <if test="ext5 != null and ext5 != ''"> and ext5 = #{ext5}</if>
- <if test="ext6 != null and ext6 != ''"> and ext6 = #{ext6}</if>
- <if test="ext7 != null and ext7 != ''"> and ext7 = #{ext7}</if>
- <if test="ext8 != null and ext8 != ''"> and ext8 = #{ext8}</if>
- <if test="remark != null and remark != ''"> and remark = #{remark}</if>
- </where>
- order by addtime desc
- </select>
- <select id="selectAmsTaskById" parameterType="Long" resultMap="AmsTaskResult">
- <include refid="selectAmsTaskVo"/>
- where id = #{id}
- </select>
- <insert id="insertAmsTask" parameterType="AmsTask" useGeneratedKeys="true" keyProperty="id">
- insert into ams_task
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="taskNo != null">task_no,</if>
- <if test="ikey != null">iKey,</if>
- <if test="aciIndex != null">aci_index,</if>
- <if test="stFrom != null">st_from,</if>
- <if test="stTo != null">st_to,</if>
- <if test="priority != null">priority,</if>
- <if test="systemStatus != null">system_status,</if>
- <if test="event != null">event,</if>
- <if test="serverAck != null">server_ack,</if>
- <if test="aciAccept != null">aci_accept,</if>
- <if test="isDelete != null">is_delete,</if>
- <if test="callbackurl != null">callBackUrl,</if>
- <if test="addtime != null">addtime,</if>
- <if test="addwho != null">addwho,</if>
- <if test="sysName != null">sys_name,</if>
- <if test="deviceName != null">device_name,</if>
- <if test="businessType != null">business_type,</if>
- <if test="heightLevel != null">height_level,</if>
- <if test="remark != null">remark,</if>
- <if test="roadway != null">roadway,</if>
- <if test="tier != null">tier,</if>
- <if test="ext1 != null">ext1,</if>
- <if test="ext2 != null">ext2,</if>
- <if test="ext3 != null">ext3,</if>
- <if test="ext4 != null">ext4,</if>
- <if test="ext5 != null">ext5,</if>
- <if test="ext6 != null">ext6,</if>
- <if test="ext7 != null">ext7,</if>
- <if test="ext8 != null">ext8,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="taskNo != null">#{taskNo},</if>
- <if test="ikey != null">#{ikey},</if>
- <if test="aciIndex != null">#{aciIndex},</if>
- <if test="stFrom != null">#{stFrom},</if>
- <if test="stTo != null">#{stTo},</if>
- <if test="priority != null">#{priority},</if>
- <if test="systemStatus != null">#{systemStatus},</if>
- <if test="event != null">#{event},</if>
- <if test="serverAck != null">#{serverAck},</if>
- <if test="aciAccept != null">#{aciAccept},</if>
- <if test="isDelete != null">#{isDelete},</if>
- <if test="callbackurl != null">#{callbackurl},</if>
- <if test="addtime != null">#{addtime},</if>
- <if test="addwho != null">#{addwho},</if>
- <if test="sysName != null">#{sysName},</if>
- <if test="deviceName != null">#{deviceName},</if>
- <if test="businessType != null">#{businessType},</if>
- <if test="heightLevel != null">#{heightLevel},</if>
- <if test="remark != null">#{remark},</if>
- <if test="roadway != null">#{roadway},</if>
- <if test="tier != null">#{tier},</if>
- <if test="ext1 != null">#{ext1},</if>
- <if test="ext2 != null">#{ext2},</if>
- <if test="ext3 != null">#{ext3},</if>
- <if test="ext4 != null">#{ext4},</if>
- <if test="ext5 != null">#{ext5},</if>
- <if test="ext6 != null">#{ext6},</if>
- <if test="ext7 != null">#{ext7},</if>
- <if test="ext8 != null">#{ext8},</if>
- </trim>
- </insert>
- <update id="updateAmsTask" parameterType="AmsTask">
- update ams_task
- <trim prefix="SET" suffixOverrides=",">
- <if test="taskNo != null">task_no = #{taskNo},</if>
- <if test="ikey != null">iKey = #{ikey},</if>
- <if test="aciIndex != null">aci_index = #{aciIndex},</if>
- <if test="stFrom != null">st_from = #{stFrom},</if>
- <if test="stTo != null">st_to = #{stTo},</if>
- <if test="priority != null">priority = #{priority},</if>
- <if test="systemStatus != null">system_status = #{systemStatus},</if>
- <if test="event != null">event = #{event},</if>
- <if test="serverAck != null">server_ack = #{serverAck},</if>
- <if test="aciAccept != null">aci_accept = #{aciAccept},</if>
- <if test="isDelete != null">is_delete = #{isDelete},</if>
- <if test="callbackurl != null">callBackUrl = #{callbackurl},</if>
- <if test="addtime != null">addtime = #{addtime},</if>
- <if test="addwho != null">addwho = #{addwho},</if>
- <if test="sysName != null">sys_name = #{sysName},</if>
- <if test="deviceName != null">device_name = #{deviceName},</if>
- <if test="businessType != null">business_type = #{businessType},</if>
- <if test="heightLevel != null">height_level = #{heightLevel},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="roadway != null">roadway = #{roadway},</if>
- <if test="tier != null">tier = #{tier},</if>
- <if test="ext1 != null">ext1 = #{ext1},</if>
- <if test="ext2 != null">ext2 = #{ext2},</if>
- <if test="ext3 != null">ext3 = #{ext3},</if>
- <if test="ext4 != null">ext4 = #{ext4},</if>
- <if test="ext5 != null">ext5 = #{ext5},</if>
- <if test="ext6 != null">ext6 = #{ext6},</if>
- <if test="ext7 != null">ext7 = #{ext7},</if>
- <if test="ext8 != null">ext8 = #{ext8},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteAmsTaskById" parameterType="Long">
- delete from ams_task where id = #{id}
- </delete>
- <delete id="deleteAmsTaskByIds" parameterType="String">
- delete from ams_task where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <select id="selectTaskNotIssued" resultMap="AmsTaskResult">
- select * from ams_task
- where aci_accept = 0 and is_delete = 0
- and business_type not in ('03','power') order by addtime
- </select>
- </mapper>
|