|
@@ -1574,7 +1574,6 @@
|
|
|
oo.ORDER_NUMBER as "orderNumber",
|
|
|
rc.CAPACITY_NUMBER as "capacityNumber",
|
|
|
RCE.CARRIER_NAME as "carrierName",
|
|
|
- actp.PRICE_VALUE as "priceValue",
|
|
|
twr.RESULT_NET_WEIGHT as "resultNetWeight",
|
|
|
RW.WAREHOUSE_NAME as "unloadName",
|
|
|
RW1.WAREHOUSE_NAME as "loadName",
|
|
@@ -1583,7 +1582,6 @@
|
|
|
GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME) as "netTime",
|
|
|
RMT.MATERIAL_TYPE_NAME as "materialTypeName",
|
|
|
decode(RMT.MATERIAL_ISINWARD,1,'是','否') as "materialIsWard",
|
|
|
- RTR.TRANS_RANGE_VALUE as "transRangeValue",
|
|
|
decode(oo.ORDER_TYPE,11,'纯内转',15,'拼装车皮进厂',16,'一焦化采购进厂',10,'新区专线-新区',20,'新区专线-老区',23,'厂外内转-老区',24,'厂外内转-新区') as "orderType"
|
|
|
FROM OMSTRUCK_ORDER OO
|
|
|
LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
@@ -1614,24 +1612,22 @@
|
|
|
ON RCE.CARRIER_ID = AIP.CARRIER_ID
|
|
|
LEFT JOIN RMS_CAPACITY rc
|
|
|
ON oo.CAPACITY_ID = rc.CAPACITY_ID
|
|
|
- LEFT JOIN AMS_CONTRACT_TRANSPORT_PRICE actp
|
|
|
- ON actp.PRICE_ID = bdo.PRICE_ID
|
|
|
- LEFT JOIN RMS_TRANS_RANGE RTR
|
|
|
- ON RTR.TRANS_RANGE_ID = AIR.LINE_ID
|
|
|
WHERE
|
|
|
BDO.DETAILS_ID IS NULL
|
|
|
AND OO.ORDER_TYPE in (11, 15, 16, 23, 24,10,20,25)
|
|
|
AND OO.ORDER_STATUS = 2
|
|
|
+ AND AIR.INSERT_UPDATE_REMARK not like '%计时且过计量%'
|
|
|
<if test="userId != null">
|
|
|
AND AIR.INSERT_USERNAME LIKE #{userId}
|
|
|
</if>
|
|
|
<if test="oneDate != null">
|
|
|
- and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= OO.ORDER_RECEIVE_REFUSE_TIME
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
<if test="startDate != null">
|
|
|
- and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= OO.ORDER_RECEIVE_REFUSE_TIME
|
|
|
- and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= OO.ORDER_RECEIVE_REFUSE_TIME
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= GREATEST(TWR.RESULT_GROSS_WEIGHT_TIME, TWR.RESULT_TARE_WEIGHT_TIME)
|
|
|
</if>
|
|
|
+
|
|
|
order by twr.result_tare_weight_time desc
|
|
|
)
|
|
|
<where>
|
|
@@ -1764,6 +1760,7 @@
|
|
|
ON actp.CAPACITY_TYPE_ID = r_c_type.CAPACITY_TYPE_ID
|
|
|
WHERE bdo.WETHER_TO_STATEMENT = #{detailStatus}
|
|
|
AND oo.ORDER_TYPE in (11,25)
|
|
|
+ AND AIR.INSERT_UPDATE_REMARK not like '%计时且过计量%'
|
|
|
<if test="userId != null" >
|
|
|
AND AIR.INSERT_USERNAME LIKE #{userId}
|
|
|
</if>
|