158 lines
9.3 KiB
XML
158 lines
9.3 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.wms.mapper.TaskMapper">
|
|
<resultMap type="Task" id="TaskMap">
|
|
<result property="taskId" column="task_id"/>
|
|
<result property="taskType" column="task_type"/>
|
|
<result property="taskStatus" column="task_status"/>
|
|
<result property="taskGroup" column="task_group"/>
|
|
<result property="origin" column="origin"/>
|
|
<result property="destination" column="destination"/>
|
|
<result property="pickStand" column="pick_stand"/>
|
|
<result property="weight" column="weight"/>
|
|
<result property="vehicleNo" column="vehicle_no"/>
|
|
<result property="vehicleSize" column="vehicle_size"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="userName" column="user_name"/>
|
|
<result property="goodsId" column="goods_id"/>
|
|
<result property="goodsName" column="goods_name"/>
|
|
<result property="operateNum" column="operate_num"/>
|
|
<result property="totalNum" column="total_num"/>
|
|
<result property="etagLocation" column="etag_location"/>
|
|
<result property="taskPriority" column="task_priority"/>
|
|
<result property="productionDate" column="production_date"/>
|
|
<result property="expirationDate" column="expiration_date"/>
|
|
<result property="kateTaskId" column="kate_task_id"/>
|
|
<result property="remark1" column="remark1"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectAll">
|
|
select task_id, task_type, task_status, task_group, origin, destination, pick_stand, weight, vehicle_no, vehicle_size,
|
|
create_time, user_name, goods_id, goods_name, operate_num, total_num, etag_location, task_priority,
|
|
production_date, expiration_date, kate_task_id, remark1
|
|
from tbl_app_task
|
|
</sql>
|
|
|
|
<select id="selTasks" parameterType="Task" resultMap="TaskMap">
|
|
<include refid="selectAll" />
|
|
<where>
|
|
<if test="taskId != null and taskId != ''"> and task_id = #{taskId}</if>
|
|
<if test="taskType != null"> and task_type = #{taskType}</if>
|
|
<if test="taskStatus != null"> and task_status = #{taskStatus}</if>
|
|
<if test="taskGroup != null and taskGroup != ''"> and task_group = #{taskGroup}</if>
|
|
<if test="origin != null and origin != ''"> and origin = #{origin}</if>
|
|
<if test="destination != null and destination != ''"> and destination = #{destination}</if>
|
|
<if test="pickStand != null and pickStand != ''"> and pick_stand = #{pickStand}</if>
|
|
<if test="weight != null"> and weight = #{weight}</if>
|
|
<if test="vehicleNo != null and vehicleNo != ''"> and vehicle_no = #{vehicleNo}</if>
|
|
<if test="vehicleSize != null"> and vehicle_size = #{vehicleSize}</if>
|
|
<if test="createTime != null"> and create_time = #{createTime}</if>
|
|
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
|
|
<if test="goodsId != null and goodsId != ''"> and goods_id = #{goodsId}</if>
|
|
<if test="goodsName != null and goodsName != ''"> and goods_name = #{goodsName}</if>
|
|
<if test="operateNum != null"> and operate_num = #{operateNum}</if>
|
|
<if test="totalNum != null"> and total_num = #{totalNum}</if>
|
|
<if test="etagLocation != null and etagLocation != ''"> and etag_location = #{etagLocation}</if>
|
|
<if test="taskPriority != null"> and task_priority = #{taskPriority}</if>
|
|
<if test="productionDate != null"> and production_date = #{productionDate}</if>
|
|
<if test="expirationDate != null"> and expiration_date = #{expirationDate}</if>
|
|
<if test="kateTaskId != null and kateTaskId != ''"> and kate_task_id = #{kateTaskId}</if>
|
|
<if test="remark1 != null and remark1 != ''"> and remark1 = #{remark1}</if>
|
|
</where>
|
|
order by task_priority desc, task_status desc, create_time desc
|
|
</select>
|
|
|
|
<insert id="addTask" parameterType="Task">
|
|
insert into tbl_app_task
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="taskId != null">task_id,</if>
|
|
<if test="taskType != null">task_type,</if>
|
|
<if test="taskStatus != null">task_status,</if>
|
|
<if test="taskGroup != null">task_group,</if>
|
|
<if test="origin != null">origin,</if>
|
|
<if test="destination != null">destination,</if>
|
|
<if test="pickStand != null">pick_stand,</if>
|
|
<if test="weight != null">weight,</if>
|
|
<if test="vehicleNo != null">vehicle_no,</if>
|
|
<if test="vehicleSize != null">vehicle_size,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="userName != null">user_name,</if>
|
|
<if test="goodsId != null">goods_id,</if>
|
|
<if test="goodsName != null">goods_name,</if>
|
|
<if test="operateNum != null">operate_num,</if>
|
|
<if test="totalNum != null">total_num,</if>
|
|
<if test="etagLocation != null">etag_location,</if>
|
|
<if test="taskPriority != null">task_priority,</if>
|
|
<if test="productionDate != null">production_date,</if>
|
|
<if test="expirationDate != null">expiration_date,</if>
|
|
<if test="kateTaskId != null">kate_task_id,</if>
|
|
<if test="remark1 != null">remark1,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="taskId != null">#{taskId},</if>
|
|
<if test="taskType != null">#{taskType},</if>
|
|
<if test="taskStatus != null">#{taskStatus},</if>
|
|
<if test="taskGroup != null">#{taskGroup},</if>
|
|
<if test="origin != null">#{origin},</if>
|
|
<if test="destination != null">#{destination},</if>
|
|
<if test="pickStand != null">#{pickStand},</if>
|
|
<if test="weight != null">#{weight},</if>
|
|
<if test="vehicleNo != null">#{vehicleNo},</if>
|
|
<if test="vehicleSize != null">#{vehicleSize},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="userName != null">#{userName},</if>
|
|
<if test="goodsId != null">#{goodsId},</if>
|
|
<if test="goodsName != null">#{goodsName},</if>
|
|
<if test="operateNum != null">#{operateNum},</if>
|
|
<if test="totalNum != null">#{totalNum},</if>
|
|
<if test="etagLocation != null">#{etagLocation},</if>
|
|
<if test="taskPriority != null">#{taskPriority},</if>
|
|
<if test="productionDate != null">#{productionDate},</if>
|
|
<if test="expirationDate != null">#{expirationDate},</if>
|
|
<if test="kateTaskId != null">#{kateTaskId},</if>
|
|
<if test="remark1 != null">#{remark1},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="executeTask" parameterType="Task">
|
|
update tbl_app_task
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="taskType != null">task_type = #{taskType},</if>
|
|
<if test="taskStatus != null">task_status = #{taskStatus},</if>
|
|
<if test="taskGroup != null">task_group = #{taskGroup},</if>
|
|
<if test="origin != null">origin = #{origin},</if>
|
|
<if test="destination != null">destination = #{destination},</if>
|
|
<if test="pickStand != null">pick_stand = #{pickStand},</if>
|
|
<if test="weight != null">weight = #{weight},</if>
|
|
<if test="vehicleNo != null">vehicle_no = #{vehicleNo},</if>
|
|
<if test="vehicleSize != null">vehicle_size = #{vehicleSize},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="userName != null">user_name = #{userName},</if>
|
|
<if test="goodsId != null">goods_id = #{goodsId},</if>
|
|
<if test="goodsName != null">goods_name = #{goodsName},</if>
|
|
<if test="operateNum != null">operate_num = #{operateNum},</if>
|
|
<if test="totalNum != null">total_num = #{totalNum},</if>
|
|
<if test="etagLocation != null">etag_location = #{etagLocation},</if>
|
|
<if test="taskPriority != null">task_priority = #{taskPriority},</if>
|
|
<if test="productionDate != null">production_date = #{productionDate},</if>
|
|
<if test="expirationDate != null">expiration_date = #{expirationDate},</if>
|
|
<if test="kateTaskId != null">kate_task_id = #{kateTaskId},</if>
|
|
<if test="remark1 != null">remark1 = #{remark1},</if>
|
|
</trim>
|
|
where task_id = #{taskId}
|
|
</update>
|
|
|
|
<delete id="deleteTask" parameterType="String">
|
|
delete from tbl_app_task where task_id = #{taskId}
|
|
</delete>
|
|
|
|
|
|
<select id="haveNotCompleteTask" resultMap="TaskMap" parameterType="string">
|
|
select task_id, task_type, task_status, task_group, origin, destination, pick_stand, weight, vehicle_no, vehicle_size, create_time,
|
|
user_name, goods_id, goods_name, operate_num, total_num, etag_location, task_priority, production_date, expiration_date, kate_task_id, remark1
|
|
from tbl_app_task
|
|
where task_status <![CDATA[<]]> 100 and (origin = #{location} or destination = #{location})
|
|
order by task_priority desc, task_status desc, create_time desc
|
|
</select>
|
|
</mapper> |