|
@@ -3209,7 +3209,7 @@
|
|
|
WHERE OO.ORDER_ID = #{orderId}
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status == 2">
|
|
|
AND OO.ORDER_STATUS = 2
|
|
@@ -3241,7 +3241,7 @@
|
|
|
WHERE OO.ORDER_ID = #{orderId}
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status == 2">
|
|
|
AND OO.ORDER_STATUS = 2
|
|
@@ -3290,7 +3290,7 @@
|
|
|
WHERE OO.ORDER_ID = #{orderId}
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status == 2">
|
|
|
AND OO.ORDER_STATUS = 2
|
|
@@ -3326,7 +3326,7 @@
|
|
|
WHERE OO.ORDER_ID = #{orderId}
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
AND OO.ORDER_STATUS = 2
|
|
@@ -3359,11 +3359,12 @@
|
|
|
LEFT JOIN RMS_RECEIVE_PLACE RRP ON RRP.PLACE_ID = ASOM.SALE_SHIPPING_ADDRESS_ID
|
|
|
LEFT JOIN RMS_RECEIVE_ADDRESS RDA ON RDA.ADDRESS_ID = RRP.ADDRESS_ID
|
|
|
WHERE
|
|
|
+ ASO.DELETED = 0
|
|
|
+ and
|
|
|
OO.ORDER_ID = #{orderId}
|
|
|
- and ASO.DELETED = 0
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status == 2">
|
|
|
AND OO.ORDER_STATUS = 2
|
|
@@ -3711,7 +3712,7 @@
|
|
|
where oo.order_id = #{orderId}
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status == 2">
|
|
|
AND OO.ORDER_STATUS = 2
|
|
@@ -3956,7 +3957,8 @@
|
|
|
OO.CAN_WORK "canWork",
|
|
|
OO.ORDER_STATUS "orderStatus",
|
|
|
ASO.SALE_ORDER_ID "saleOrderId",
|
|
|
- OO.DELETED "orderDeleted"
|
|
|
+ OO.DELETED "orderDeleted",
|
|
|
+ OO.UPDATE_USERNAME "deleteReason"
|
|
|
FROM
|
|
|
OMSTRUCK_ORDER OO
|
|
|
LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM ON ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
|
|
@@ -3972,17 +3974,18 @@
|
|
|
from OMSTRUCK_ORDER OO
|
|
|
left join OMSTRUCK_ORDER_MATERIAL OOM ON OO.ORDER_ID=OOM.ORDER_ID
|
|
|
left join RMS_MATERIAL RM ON OOM.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
+ where OO.ORDER_STATUS between 4 and 5
|
|
|
where OO.ORDER_STATUS in (4,5)
|
|
|
and (OOM.MATERIAL_PRIORITY !=71 OR OOM.MATERIAL_PRIORITY is null)
|
|
|
and
|
|
|
RM.MATERIAL_ID||'' in (select SPECTIONS_MODEL from QMS_MODEL_UNROOLED)
|
|
|
) TEMP ON TEMP."orderId"=OO.ORDER_ID
|
|
|
WHERE
|
|
|
- OO.ORDER_ID = #{orderId}
|
|
|
- AND ASO.DELETED = 0
|
|
|
+ ASO.DELETED = 0
|
|
|
+ AND OO.ORDER_ID = #{orderId}
|
|
|
AND rownum =1
|
|
|
<if test="status == null">
|
|
|
- AND OO.ORDER_STATUS in (4, 5, 6)
|
|
|
+ AND OO.ORDER_STATUS between 4 and 6
|
|
|
</if>
|
|
|
<if test="status == 2">
|
|
|
AND OO.ORDER_STATUS = 2
|