|
@@ -86,7 +86,7 @@
|
|
on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
|
|
on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
|
|
left join RMS_CONSIGNEE RCON
|
|
left join RMS_CONSIGNEE RCON
|
|
on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
|
|
on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
|
|
- where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
|
|
|
|
|
|
+ where OO.ORDER_STATUS in (5,2)
|
|
and OO.ORDER_TYPE = #{orderTypee}
|
|
and OO.ORDER_TYPE = #{orderTypee}
|
|
<if test="oneDate != null">
|
|
<if test="oneDate != null">
|
|
and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
@@ -239,8 +239,7 @@
|
|
on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
|
|
on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
|
|
left join RMS_CONSIGNEE RCON
|
|
left join RMS_CONSIGNEE RCON
|
|
on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
|
|
on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
|
|
-
|
|
|
|
- where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
|
|
|
|
|
|
+ where OO.ORDER_STATUS in (5, 2)
|
|
and OO.ORDER_TYPE = #{orderTypee}
|
|
and OO.ORDER_TYPE = #{orderTypee}
|
|
<if test="oneDate != null">
|
|
<if test="oneDate != null">
|
|
and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
@@ -550,6 +549,7 @@
|
|
on RCA.CARRIER_ID = RC.CARRIER_ID
|
|
on RCA.CARRIER_ID = RC.CARRIER_ID
|
|
</if>
|
|
</if>
|
|
where OO.ORDER_TYPE = 12
|
|
where OO.ORDER_TYPE = 12
|
|
|
|
+ and OO.ORDER_STATUS IN (2,5)
|
|
<if test="carrierSsoId != null">
|
|
<if test="carrierSsoId != null">
|
|
and RCA.CARRIER_SSO_ID = #{carrierSsoId}
|
|
and RCA.CARRIER_SSO_ID = #{carrierSsoId}
|
|
</if>
|
|
</if>
|
|
@@ -644,6 +644,7 @@
|
|
on RCA.CARRIER_ID = RC.CARRIER_ID
|
|
on RCA.CARRIER_ID = RC.CARRIER_ID
|
|
</if>
|
|
</if>
|
|
where OO.ORDER_TYPE = 13
|
|
where OO.ORDER_TYPE = 13
|
|
|
|
+ and oo.ORDER_STATUS in (2,5)
|
|
<if test="carrierSsoId != null">
|
|
<if test="carrierSsoId != null">
|
|
and RCA.CARRIER_SSO_ID = #{carrierSsoId}
|
|
and RCA.CARRIER_SSO_ID = #{carrierSsoId}
|
|
</if>
|
|
</if>
|
|
@@ -718,11 +719,13 @@
|
|
twr4.result_tare_weight "tareWeightSecond",
|
|
twr4.result_tare_weight "tareWeightSecond",
|
|
twr4.result_tare_weight_time "tareWeightTimeSecond",
|
|
twr4.result_tare_weight_time "tareWeightTimeSecond",
|
|
twr4.result_net_weight "netWeightSecond",
|
|
twr4.result_net_weight "netWeightSecond",
|
|
|
|
+ twr4.RESULT_POUND_NO "poundNo",
|
|
rtc4.truck_calculate_number "tareTruckCalculateSecond",
|
|
rtc4.truck_calculate_number "tareTruckCalculateSecond",
|
|
tlfr2.result_out_gate_time "outGatepostTimeSecond",
|
|
tlfr2.result_out_gate_time "outGatepostTimeSecond",
|
|
tlfr2.result_out_gate_time "resultOutGateTime",
|
|
tlfr2.result_out_gate_time "resultOutGateTime",
|
|
tlfr2.result_out_mode "outModeSecond",
|
|
tlfr2.result_out_mode "outModeSecond",
|
|
- rg4.gatepost_name "gatepostNameSecond"
|
|
|
|
|
|
+ rg4.gatepost_name "gatepostNameSecond",
|
|
|
|
+ apo.EAS_ENTRY_ID "easPrimaryId"
|
|
from omstruck_order oo
|
|
from omstruck_order oo
|
|
left join omstruck_order_material oom
|
|
left join omstruck_order_material oom
|
|
on oom.order_id = oo.order_id
|
|
on oom.order_id = oo.order_id
|
|
@@ -1940,6 +1943,7 @@
|
|
OO.CAN_WORK "canwork",
|
|
OO.CAN_WORK "canwork",
|
|
OO.ORDER_STATUS "carStatus",
|
|
OO.ORDER_STATUS "carStatus",
|
|
DECODE(OO.PRINTNUMBER,1,'已打印','未打印') "isPrintDelivery",
|
|
DECODE(OO.PRINTNUMBER,1,'已打印','未打印') "isPrintDelivery",
|
|
|
|
+ decode(TSR.RESULT_ID,null,'未发送','已发送') "smsResultId",
|
|
DECODE(ASO.SALE_ORDER_STATUS,1,'销售订单已上报',
|
|
DECODE(ASO.SALE_ORDER_STATUS,1,'销售订单已上报',
|
|
2,'销售已提交',
|
|
2,'销售已提交',
|
|
4,'财务已审批',
|
|
4,'财务已审批',
|
|
@@ -1990,6 +1994,8 @@
|
|
ON TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
ON TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
LEFT JOIN TMStRUCK_RECEIPT_RESULT TRR
|
|
LEFT JOIN TMStRUCK_RECEIPT_RESULT TRR
|
|
ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
ON TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
|
+ LEFT JOIN TMSTRUCK_SMS_RUSULT TSR
|
|
|
|
+ ON TSR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
|
|
WHERE ASO.SALE_TYPE = 1
|
|
WHERE ASO.SALE_TYPE = 1
|
|
AND ASO.DELETED = 0
|
|
AND ASO.DELETED = 0
|
|
and ASM.SALE_MATERIAL_ID IS NOT NULL
|
|
and ASM.SALE_MATERIAL_ID IS NOT NULL
|