推送逻辑修改;
This commit is contained in:
@@ -70,47 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<!-- 任务大厅 tabType=2:排除 PC 端已处理/已指派的关联业务单(delive_task 作业人仍为空时,业务单可能已在 PC 作业) -->
|
||||
<sql id="deliveTaskHallExcludePcProcessedFilter">
|
||||
and NOT (
|
||||
(task_type = 1 AND EXISTS (
|
||||
SELECT 1 FROM stock_receipt_order biz
|
||||
WHERE biz.receipt_order_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND (biz.status >= 2 OR (biz.operators_by IS NOT NULL AND biz.operators_by != 0))
|
||||
))
|
||||
OR (task_type = 2 AND EXISTS (
|
||||
SELECT 1 FROM stock_shelf_order biz
|
||||
WHERE biz.shelf_order_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND (biz.status >= 2 OR (biz.operators_by IS NOT NULL AND biz.operators_by != 0))
|
||||
))
|
||||
OR (task_type = 3 AND EXISTS (
|
||||
SELECT 1 FROM stock_out_task_order biz
|
||||
WHERE biz.task_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND (biz.status >= 2 OR (biz.operators_by IS NOT NULL AND biz.operators_by != 0))
|
||||
))
|
||||
OR (task_type = 4 AND (
|
||||
EXISTS (
|
||||
SELECT 1 FROM review_order biz
|
||||
WHERE biz.review_order_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND biz.review_status >= 2
|
||||
)
|
||||
OR EXISTS (
|
||||
SELECT 1 FROM stock_out_order biz
|
||||
WHERE biz.out_order_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND (biz.check_status >= 2 OR (biz.check_operators_by IS NOT NULL AND biz.check_operators_by != 0))
|
||||
)
|
||||
))
|
||||
OR (task_type = 5 AND EXISTS (
|
||||
SELECT 1 FROM shift_manage biz
|
||||
WHERE biz.shift_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND (biz.shift_status >= 3 OR (biz.operators_by IS NOT NULL AND biz.operators_by != 0))
|
||||
))
|
||||
OR (task_type = 6 AND EXISTS (
|
||||
SELECT 1 FROM investigation_manage biz
|
||||
WHERE biz.investigation_number = delive_task.tracking_number AND biz.del_flag = 1
|
||||
AND (biz.investigation_status >= 3 OR (biz.operators_by IS NOT NULL AND biz.operators_by != 0))
|
||||
))
|
||||
)
|
||||
</sql>
|
||||
|
||||
|
||||
<sql id="selectDeliveTaskPo1">
|
||||
<where>
|
||||
@@ -257,7 +217,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="tabType != null and tabType==2">
|
||||
<if test="taskType == null or taskType != 7">
|
||||
<include refid="deliveTaskHallUnassignedFilter"/>
|
||||
<include refid="deliveTaskHallExcludePcProcessedFilter"/>
|
||||
</if>
|
||||
</if>
|
||||
<if test="operatorsName != null and operatorsName != ''">
|
||||
@@ -443,7 +402,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
WHERE
|
||||
del_flag = 1
|
||||
<include refid="deliveTaskHallUnassignedFilter"/>
|
||||
<include refid="deliveTaskHallExcludePcProcessedFilter"/>
|
||||
<include refid="selectDeliveTaskPo2"/>
|
||||
) taskSum
|
||||
|
||||
|
||||
Reference in New Issue
Block a user