PDA任务大厅修改
This commit is contained in:
@@ -54,6 +54,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select deliver_task_id, task_number, tracking_number, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, task_type, task_status, task_distribution, task_distribution_time, task_distribution_id, task_distribution_name, operators_by, operators_name, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, reassign_time, reassign_by_id, reassign_by_name from delive_task
|
||||
</sql>
|
||||
|
||||
<!-- taskStatus=0 未接收:历史数据 task_status 可能为 NULL,与 0 等价 -->
|
||||
<sql id="deliveTaskStatusFilter">
|
||||
<if test="taskStatus != null and taskStatus == 0">
|
||||
and (task_status = 0 OR task_status IS NULL)
|
||||
</if>
|
||||
<if test="taskStatus != null and taskStatus != 0">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- 任务大厅 tabType=2:未指派作业人(按 operators_name 判断,与现场查询口径一致) -->
|
||||
<sql id="deliveTaskHallUnassignedFilter">
|
||||
and (operators_name IS NULL OR operators_name = '')
|
||||
</sql>
|
||||
|
||||
<sql id="selectDeliveTaskPo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
@@ -99,9 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskType != null and taskType == 7 and handoverQueryType == 2">
|
||||
and EXISTS (SELECT 1 FROM handover_task_order hto WHERE hto.task_number = delive_task.tracking_number AND hto.del_flag = 1 AND hto.status = 2)
|
||||
</if>
|
||||
<if test="taskStatus != null ">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<include refid="deliveTaskStatusFilter"/>
|
||||
<if test="taskDistribution != null ">
|
||||
and task_distribution = #{taskDistribution}
|
||||
</if>
|
||||
@@ -181,9 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskType != null and taskType == 7 and handoverQueryType == 2">
|
||||
and EXISTS (SELECT 1 FROM handover_task_order hto WHERE hto.task_number = delive_task.tracking_number AND hto.del_flag = 1 AND hto.status = 2)
|
||||
</if>
|
||||
<if test="taskStatus != null ">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<include refid="deliveTaskStatusFilter"/>
|
||||
<if test="taskDistribution != null ">
|
||||
and task_distribution = #{taskDistribution}
|
||||
</if>
|
||||
@@ -200,7 +211,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and operators_by = #{operatorsBy}
|
||||
</if>
|
||||
<if test="tabType != null and tabType==2">
|
||||
and operators_by IS NULL
|
||||
<include refid="deliveTaskHallUnassignedFilter"/>
|
||||
</if>
|
||||
<if test="operatorsName != null and operatorsName != ''">
|
||||
and operators_name like concat('%', #{operatorsName}, '%')
|
||||
@@ -254,9 +265,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="taskType != null and taskType == 7 and handoverQueryType == 2">
|
||||
and EXISTS (SELECT 1 FROM handover_task_order hto WHERE hto.task_number = delive_task.tracking_number AND hto.del_flag = 1 AND hto.status = 2)
|
||||
</if>
|
||||
<if test="taskStatus != null ">
|
||||
and task_status = #{taskStatus}
|
||||
</if>
|
||||
<include refid="deliveTaskStatusFilter"/>
|
||||
<if test="taskDistribution != null ">
|
||||
and task_distribution = #{taskDistribution}
|
||||
</if>
|
||||
@@ -386,8 +395,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
delive_task
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND (operators_by = ''
|
||||
OR operators_by IS NULL)
|
||||
<include refid="deliveTaskHallUnassignedFilter"/>
|
||||
<include refid="selectDeliveTaskPo2"/>
|
||||
) taskSum
|
||||
|
||||
|
||||
Reference in New Issue
Block a user