|
@@ -1336,6 +1336,24 @@
|
|
|
"orderNumber" like '%${item}%'
|
|
|
</foreach>
|
|
|
</if>
|
|
|
+ <if test="gatepostName1 != null">
|
|
|
+ and
|
|
|
+ <foreach collection="gatepostName1" item="item" open="(" separator="or" close=")">
|
|
|
+ "gatepostName1" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="gatepostName2 != null">
|
|
|
+ and
|
|
|
+ <foreach collection="gatepostName2" item="item" open="(" separator="or" close=")">
|
|
|
+ "gatepostName2" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialName != null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
+ "materialName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
<include refid="orderBy"></include>
|
|
|
</select>
|
|
@@ -1934,6 +1952,8 @@
|
|
|
RRA.ADDRESS_TOWN "addressTown",
|
|
|
OO.ORDER_LINE_SEQUENCE "lineSqe",
|
|
|
OO.DRIVER_TEL "capacityTel",
|
|
|
+ QQR.RESULT_START_TIME "queueStartTime",
|
|
|
+ QQR.UPDATE_TIME "allowEnfactoryTime",
|
|
|
TWR.RESULT_GROSS_WEIGHT "grossWeight",
|
|
|
TWR.RESULT_GROSS_WEIGHT_TIME "grossWeightTime",
|
|
|
TWR.RESULT_TARE_WEIGHT "tareWeight",
|
|
@@ -1956,15 +1976,15 @@
|
|
|
ASO.sale_remark "saleRemark",
|
|
|
DECODE(OO.PRINTNUMBER,1,'已打印','未打印') "isPrintDelivery",
|
|
|
decode(TSR.RESULT_ID,null,'未发送','已发送') "smsResultId",
|
|
|
- DECODE(ASO.SALE_ORDER_STATUS,1,'销售订单已上报',
|
|
|
- 2,'销售已提交',
|
|
|
- 4,'财务已审批',
|
|
|
- 0,'销售订单未上报') "saleOrderStatus",
|
|
|
+ DECODE(ASO.SALE_ORDER_STATUS,1,'保存',
|
|
|
+ 2,'提交',
|
|
|
+ 4,'审核',
|
|
|
+ 0,'未上报') "saleOrderStatus",
|
|
|
(CASE
|
|
|
when OO.ORDER_STATUS =2
|
|
|
- then '作业已完成'
|
|
|
+ then '已完成'
|
|
|
when OO.ORDER_STATUS=4
|
|
|
- then '物流公司已派单'
|
|
|
+ then '已派单'
|
|
|
when nvl(OO.ORDER_STATUS,0)=0
|
|
|
then '未派发'
|
|
|
when OO.ORDER_STATUS=7
|
|
@@ -1977,8 +1997,10 @@
|
|
|
THEN '已出厂'
|
|
|
WHEN TER.RESULT_ENTRY_GATE_TIME IS NOT NULL
|
|
|
THEN '已进厂'
|
|
|
+ WHEN QQR.RESULT_START_TIME IS NOT NULL
|
|
|
+ THEN '排队中'
|
|
|
when OO.ORDER_STATUS=5
|
|
|
- then '司机已接单'
|
|
|
+ then '已接单'
|
|
|
WHEN TER.INSERT_TIME IS NULL
|
|
|
THEN ' '
|
|
|
WHEN TLFR.INSERT_TIME IS NULL THEN ' '
|
|
@@ -2016,6 +2038,8 @@
|
|
|
ON RCA.CAPACITY_ID = OO.CAPACITY_ID
|
|
|
LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
ON TTR.ORDER_ID = OO.ORDER_ID
|
|
|
+ LEFT JOIN QMS_QUEUE_RESULT QQR
|
|
|
+ ON QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
|
|
|
ON TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
|
|
@@ -2063,7 +2087,12 @@
|
|
|
</if>
|
|
|
<if test="capacityList != null">
|
|
|
and <foreach collection="capacityList" item="item" open="(" separator="or" close=")">
|
|
|
- RCA.CAPACITY_NUMBER like '%${item}%'
|
|
|
+ <if test="item == null">
|
|
|
+ RCA.CAPACITY_NUMBER is null
|
|
|
+ </if>
|
|
|
+ <if test="item != null">
|
|
|
+ RCA.CAPACITY_NUMBER like '%${item}%'
|
|
|
+ </if>
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="consigneeNames != null">
|
|
@@ -2102,7 +2131,31 @@
|
|
|
</if>
|
|
|
<if test="orderStatusList != null">
|
|
|
and <foreach collection="orderStatusList" item="item" open="(" separator="or" close=")">
|
|
|
- DECODE(OO.ORDER_STATUS ,2,'作业已完成',4,'物流公司已派单',5,'司机已接单',0,'未派发',7,'已关闭',8,'已关闭') like '%${item}%'
|
|
|
+ (CASE
|
|
|
+ when OO.ORDER_STATUS =2
|
|
|
+ then '作业已完成'
|
|
|
+ when OO.ORDER_STATUS=4
|
|
|
+ then '物流公司已派单'
|
|
|
+ when nvl(OO.ORDER_STATUS,0)=0
|
|
|
+ then '未派发'
|
|
|
+ when OO.ORDER_STATUS=7
|
|
|
+ then '已关闭'
|
|
|
+ when OO.ORDER_STATUS=8
|
|
|
+ then '已关闭'
|
|
|
+ WHEN TRR.INSERT_TIME IS NOT NULL
|
|
|
+ THEN '已完成'
|
|
|
+ WHEN TLFR.RESULT_OUT_GATE_TIME IS NOT NULL
|
|
|
+ THEN '已出厂'
|
|
|
+ WHEN TER.RESULT_ENTRY_GATE_TIME IS NOT NULL
|
|
|
+ THEN '已进厂'
|
|
|
+ WHEN QQR.RESULT_START_TIME IS NOT NULL
|
|
|
+ THEN '排队中'
|
|
|
+ when OO.ORDER_STATUS=5
|
|
|
+ then '司机已接单'
|
|
|
+ WHEN TER.INSERT_TIME IS NULL
|
|
|
+ THEN ' '
|
|
|
+ WHEN TLFR.INSERT_TIME IS NULL THEN ' '
|
|
|
+ END) like '%${item}%'
|
|
|
</foreach>
|
|
|
</if>
|
|
|
<if test="addressPlaceList != null">
|
|
@@ -2116,7 +2169,15 @@
|
|
|
RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL like '%${item}%'
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- order by ASO.SALE_ORDER_ID DESC, OO.ORDER_ID DESC
|
|
|
+ <if test="saleOrderStatusList != null">
|
|
|
+ and <foreach collection="saleOrderStatusList" item="item" open="(" separator="or" close=")">
|
|
|
+ DECODE(ASO.SALE_ORDER_STATUS,1,'保存',
|
|
|
+ 2,'提交',
|
|
|
+ 4,'审核',
|
|
|
+ 0,'未上报') like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ order by ASO.SALE_ORDER_ID DESC, ASOM.SALE_ORDER_MATERIAL_ID DESC,OO.ORDER_ID DESC
|
|
|
)
|
|
|
</select>
|
|
|
<select id="getInwardSaleSteelReport" resultType="java.util.Map" parameterType="java.util.Map">
|
|
@@ -2744,8 +2805,6 @@
|
|
|
WHEN TER.INSERT_TIME IS NULL
|
|
|
THEN ' '
|
|
|
WHEN TLFR.INSERT_TIME IS NULL THEN ' ' end
|
|
|
- END
|
|
|
- "status"
|
|
|
from OMSTRUCK_ORDER OO
|
|
|
LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
|
|
|
ON TTR.ORDER_ID=OO.ORDER_ID
|