|
@@ -86,7 +86,6 @@
|
|
|
on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
|
|
|
left join RMS_CONSIGNEE RCON
|
|
|
on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
|
|
|
-
|
|
|
where OO.ORDER_STATUS in (5, 8, 9, 1, 2)
|
|
|
and OO.ORDER_TYPE = #{orderTypee}
|
|
|
<if test="oneDate != null">
|
|
@@ -96,6 +95,10 @@
|
|
|
and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
</if>
|
|
|
+ <if test="con!=null">
|
|
|
+ and (instr(RM.MATERIAL_NAME, #{con}) > 0 or instr(RS.SUPPLIER_NAME, #{con}) > 0 or
|
|
|
+ instr(RCON.CONSIGNEE_COMPANY_NAME, #{con}) > 0 or instr(RC.CAPACITY_NUMBER, #{con}) > 0)
|
|
|
+ </if>
|
|
|
)
|
|
|
<where>
|
|
|
<if test="capacityNumber != null">
|
|
@@ -246,6 +249,10 @@
|
|
|
and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
</if>
|
|
|
+ <if test="con!=null">
|
|
|
+ and (instr(RM.MATERIAL_NAME, #{con}) > 0 or instr(RS.SUPPLIER_NAME, #{con}) > 0 or
|
|
|
+ instr(RCON.CONSIGNEE_COMPANY_NAME, #{con}) > 0 or instr(RC.CAPACITY_NUMBER, #{con}) > 0)
|
|
|
+ </if>
|
|
|
)
|
|
|
<where>
|
|
|
<if test="capacityNumber != null">
|
|
@@ -326,7 +333,6 @@
|
|
|
<!-- 查询销售统计报表 -->
|
|
|
<!-- 查询销售统计报表 -->
|
|
|
<select id="getAllSaleReport" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
- select * from (
|
|
|
select
|
|
|
*
|
|
|
from (
|
|
@@ -350,11 +356,13 @@
|
|
|
RM.MATERIAL_NAME "materialName",
|
|
|
TLR.INSERT_UPDATE_REMARK "materialRemark",
|
|
|
ASO.SALE_NUMBER "saleNumber",
|
|
|
+ ASM.SALE_WAREHOUSE "saleWarehouse",
|
|
|
TLR.CASE_NUMBER "caseNumber",
|
|
|
RC2.CARRIER_NAME "carrierName",
|
|
|
TAR.RESULT_ARRIVAL_ADDRESS "arrivalAddress",
|
|
|
TRR.RESULT_ARRIVAL_ADDRESS "receiptAddress",
|
|
|
- CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
|
|
|
+ RM.MATERIAL_SPECIFICATION || RM.MATERIAL_MODEL "materialCode",
|
|
|
+ RM.MATERIAL_NAME || TLR.INSERT_UPDATE_REMARK || ASM.SALE_WAREHOUSE || RW.WAREHOUSE_NAME "likeRemark"
|
|
|
from TMSTRUCK_WEIGHT_RESULT TWR
|
|
|
left join TMSTRUCK_TOTAL_RESULT TTR
|
|
|
on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
@@ -362,6 +370,10 @@
|
|
|
on TTR.ORDER_ID = OO.ORDER_ID
|
|
|
left join AMS_SALE_ORDER_MATERIAL ASOM
|
|
|
on ASOM.SALE_ORDER_MATERIAL_ID = OO.ORDER_PLAN_ID
|
|
|
+ left join AMS_SALE_TRUCKNO_MATERIAL ASTM
|
|
|
+ on ASTM.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
|
|
|
+ left join AMS_SALE_MATERIAL ASM
|
|
|
+ on ASM.SALE_MATERIAL_ID = ASTM.MATERIAL_ID
|
|
|
left join AMS_DISPATCH_SALE_ORDER ADSO
|
|
|
on ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
|
|
|
left join RMS_CARRIER RC2
|
|
@@ -397,7 +409,7 @@
|
|
|
on TAR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
left join TMStRUCK_RECEIPT_RESULT TRR
|
|
|
on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
|
|
|
- WHERE OO.ORDER_TYPE = #{orderType}
|
|
|
+ WHERE OO.ORDER_TYPE = #{orderTypee}
|
|
|
AND ASO.SHIPPER_ID = #{shipperId}
|
|
|
<if test="carrierSsoId != null">
|
|
|
and RC2.CARRIER_SSO_ID = #{carrierSsoId}
|
|
@@ -412,104 +424,10 @@
|
|
|
and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_GROSS_WEIGHT_TIME
|
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
|
|
|
</if>
|
|
|
- ) RRR
|
|
|
- <where>
|
|
|
- <if test="remark != null" >
|
|
|
- and RRR."materialName" LIKE #{remark} or RRR."materialRemark" LIKE #{remark}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
)
|
|
|
<where>
|
|
|
- <if test="orderNumber != null">
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "orderNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="carrierName != null">
|
|
|
- <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
|
|
|
- "carrierName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="enGatepostName != null">
|
|
|
- <foreach collection="enGatepostName" item="item" open="(" separator="or" close=")">
|
|
|
- "enGatepostName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="outGatepostName != null">
|
|
|
- <foreach collection="outGatepostName" item="item" open="(" separator="or" close=")">
|
|
|
- "outGatepostName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="caseNumber != null">
|
|
|
- <foreach collection="caseNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "caseNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="capacityNumber != null">
|
|
|
- and
|
|
|
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "capacityNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="receiveName != null">
|
|
|
- and
|
|
|
- <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
|
|
|
- "receiveName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="materialRemark != null">
|
|
|
- and
|
|
|
- <foreach collection="materialRemark" item="item" open="(" separator="or" close=")">
|
|
|
- "materialRemark" = #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="sendName != null">
|
|
|
- and
|
|
|
- <foreach collection="sendName" item="item" open="(" separator="or" close=")">
|
|
|
- "sendName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultEntryGateTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultEntryGateTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultTareWeightTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultTareWeightTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultTareWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultTareWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultLoadEndTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultLoadEndTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="warehouseName != null">
|
|
|
- and
|
|
|
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
- "warehouseName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultGrossWeightTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultGrossWeightTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultGrossWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultGrossWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
+ <if test="remark != null">
|
|
|
+ and "likeRemark" like #{remark}
|
|
|
</if>
|
|
|
<if test="materialName != null">
|
|
|
and
|
|
@@ -517,18 +435,6 @@
|
|
|
"materialName" like '%${item}%'
|
|
|
</foreach>
|
|
|
</if>
|
|
|
- <if test="resultNetWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultNetWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultOutGateTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultOutGateTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
</where>
|
|
|
<include refid="orderBy"></include>
|
|
|
<if test="orderField == null">
|
|
@@ -562,6 +468,7 @@
|
|
|
RCON.CONSIGNEE_COMPANY_NAME "receiveName",
|
|
|
RS.SUPPLIER_NAME "sendName",
|
|
|
RM.MATERIAL_NAME "materialName",
|
|
|
+ RS.SUPPLIER_NAME||RM.MATERIAL_NAME||RC.CAPACITY_NUMBER "conLike",
|
|
|
CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
|
|
|
from OMSTRUCK_ORDER OO
|
|
|
join TMSTRUCK_TOTAL_RESULT TTR
|
|
@@ -611,10 +518,6 @@
|
|
|
and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_TARE_WEIGHT_TIME
|
|
|
</if>
|
|
|
- <if test="con!=null">
|
|
|
- where "receiveName" like #{con} or "sendName" like #{con} or "materialName" like #{con}
|
|
|
- or "capacityNumber" like #{con}
|
|
|
- </if>
|
|
|
<if test="userId!=null">
|
|
|
and ASO.INSERT_USERNAME=#{userId}
|
|
|
</if>
|
|
@@ -623,100 +526,8 @@
|
|
|
</if>
|
|
|
)
|
|
|
<where>
|
|
|
- <if test="receiveName != null">
|
|
|
- and
|
|
|
- <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
|
|
|
- "receiveName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="sendName != null">
|
|
|
- and
|
|
|
- <foreach collection="sendName" item="item" open="(" separator="or" close=")">
|
|
|
- "sendName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="materialName != null">
|
|
|
- and
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
- "materialName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="orderNumber != null">
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "orderNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="capacityNumber != null">
|
|
|
- and
|
|
|
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "capacityNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultEntryGateTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultEntryGateTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultTareWeightTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
|
|
|
- to_char("resultTareWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultTareWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultTareWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultEndTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
|
|
|
- to_char("resultEndTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="warehouseName != null">
|
|
|
- and
|
|
|
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
- "warehouseName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultGrossWeightTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
|
|
|
- to_char("resultGrossWeightTime",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultGrossWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultGrossWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultNetWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultNetWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultOutGateTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultOutGateTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="gatepostEntryName != null">
|
|
|
- and
|
|
|
- <foreach collection="gatepostEntryName" item="item" open="(" separator="or" close=")">
|
|
|
- "gatepostEntryName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="gatepostOutName != null">
|
|
|
- and
|
|
|
- <foreach collection="gatepostOutName" item="item" open="(" separator="or" close=")">
|
|
|
- "gatepostOutName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
+ <if test="con != null">
|
|
|
+ and "conLike" like #{con}
|
|
|
</if>
|
|
|
</where>
|
|
|
<include refid="orderBy"></include>
|
|
@@ -751,8 +562,8 @@
|
|
|
RCON.CONSIGNEE_COMPANY_NAME "receiveName",
|
|
|
RS.SUPPLIER_NAME "sendName",
|
|
|
RM.MATERIAL_NAME "materialName",
|
|
|
+ RCON.CONSIGNEE_COMPANY_NAME||RM.MATERIAL_NAME||RC.CAPACITY_NUMBER "conlike",
|
|
|
CONCAT(CONCAT(RM.MATERIAL_SPECIFICATION, '('), CONCAT(RM.MATERIAL_MODEL, ')')) "materialCode"
|
|
|
-
|
|
|
from OMSTRUCK_ORDER OO
|
|
|
join TMSTRUCK_TOTAL_RESULT TTR
|
|
|
on TTR.ORDER_ID = OO.ORDER_ID
|
|
@@ -801,10 +612,6 @@
|
|
|
and to_date(#{startDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR.RESULT_GROSS_WEIGHT_TIME
|
|
|
and to_date(#{endDate}, 'yyyy-mm-dd hh24:mi:ss') >= TWR.RESULT_GROSS_WEIGHT_TIME
|
|
|
</if>
|
|
|
- <if test="con!=null">
|
|
|
- where "receiveName" like #{con} or "sendName" like #{con} or "materialName" like #{con}
|
|
|
- or "capacityNumber" like #{con}
|
|
|
- </if>
|
|
|
<if test="userId!=null">
|
|
|
and ASO.INSERT_USERNAME=#{userId}
|
|
|
</if>
|
|
@@ -813,100 +620,8 @@
|
|
|
</if>
|
|
|
)
|
|
|
<where>
|
|
|
- <if test="receiveName != null">
|
|
|
- and
|
|
|
- <foreach collection="receiveName" item="item" open="(" separator="or" close=")">
|
|
|
- "receiveName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="sendName != null">
|
|
|
- and
|
|
|
- <foreach collection="sendName" item="item" open="(" separator="or" close=")">
|
|
|
- "sendName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="materialName != null">
|
|
|
- and
|
|
|
- <foreach collection="materialName" item="item" open="(" separator="or" close=")">
|
|
|
- "materialName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="orderNumber != null">
|
|
|
- <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "orderNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="capacityNumber != null">
|
|
|
- and
|
|
|
- <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
|
|
|
- "capacityNumber" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultEntryGateTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultEntryGateTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultEntryGateTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultTareWeightTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultTareWeightTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultTareWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultTareWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultLoadEndTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultLoadEndTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultLoadEndTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="warehouseName != null">
|
|
|
- and
|
|
|
- <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
|
|
|
- "warehouseName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultGrossWeightTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultGrossWeightTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultGrossWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultGrossWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultNetWeight != null">
|
|
|
- and
|
|
|
- <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
|
|
|
- "resultNetWeight" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="resultOutGateTime != null">
|
|
|
- and
|
|
|
- <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
|
|
|
- "resultOutGateTime" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="gatepostEntryName != null">
|
|
|
- and
|
|
|
- <foreach collection="gatepostEntryName" item="item" open="(" separator="or" close=")">
|
|
|
- "gatepostEntryName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="gatepostOutName != null">
|
|
|
- and
|
|
|
- <foreach collection="gatepostOutName" item="item" open="(" separator="or" close=")">
|
|
|
- "gatepostOutName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
+ <if test="con != null">
|
|
|
+ and "conlike" like #{con}
|
|
|
</if>
|
|
|
</where>
|
|
|
<include refid="orderBy"></include>
|
|
@@ -1383,7 +1098,8 @@
|
|
|
TLFR2.RESULT_OUT_GATE_TIME "outGatepostTimeSecond",
|
|
|
TLFR2.RESULT_OUT_GATE_TIME "resultOutGateTime",
|
|
|
TLFR2.RESULT_OUT_MODE "outModeSecond",
|
|
|
- RG4.GATEPOST_NAME "gatepostNameSecond"
|
|
|
+ RG4.GATEPOST_NAME "gatepostNameSecond",
|
|
|
+ RC.CAPACITY_NUMBER || RM.MATERIAL_NAME || RS.SUPPLIER_NAME || RCE.CONSIGNEE_COMPANY_NAME "likeCon"
|
|
|
FROM OMSTRUCK_ORDER OO
|
|
|
LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM ON OOM.ORDER_ID = OO.ORDER_ID
|
|
|
LEFT JOIN RMS_MATERIAL RM ON RM.MATERIAL_ID = OOM.MATERIAL_ID
|
|
@@ -1412,8 +1128,7 @@
|
|
|
LEFT JOIN RMS_TRUCK_CALCULATE RTC4 ON RTC4.TRUCK_CALCULATE_ID = TWR4.RESULT_TARE_PLACE_ID
|
|
|
LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR2 ON TLFR2.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
|
|
|
LEFT JOIN RMS_GATEPOST RG4 ON TLFR2.GATEPOST_ID = RG4.GATEPOST_ID
|
|
|
- WHERE OO.ORDER_TYPE = 14
|
|
|
- AND TER1.SEGMEN_SQE = 1
|
|
|
+ WHERE TER1.SEGMEN_SQE = 1
|
|
|
AND TWR1.TARE_SEGMENT_SQE = 2
|
|
|
AND TLR.SEGMENT_SQE = 3
|
|
|
AND TWR2.GROSS_SEGMENT_SQE = 4
|
|
@@ -1424,6 +1139,7 @@
|
|
|
AND TWR4.TARE_SEGMENT_SQE = 9
|
|
|
AND TLFR2.SEGMENT_SQE = 10
|
|
|
AND TWR2.RESULT_GROSS_WEIGHT_TIME IS NOT NULL
|
|
|
+ AND OO.ORDER_TYPE = 14
|
|
|
<if test="oneDate != null">
|
|
|
and to_date(#{oneDate}, 'yyyy-mm-dd hh24:mi:ss') <= TWR4.RESULT_TARE_WEIGHT_TIME
|
|
|
</if>
|
|
@@ -1433,8 +1149,11 @@
|
|
|
</if>
|
|
|
)
|
|
|
<where>
|
|
|
+ <if test="con != null">
|
|
|
+ and "likeCon" like #{con}
|
|
|
+ </if>
|
|
|
<if test="consigneeName != null">
|
|
|
- <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
|
|
|
+ and <foreach collection="consigneeName" item="item" open="(" separator="or" close=")">
|
|
|
"consigneeName" like '%${item}%'
|
|
|
</foreach>
|
|
|
</if>
|
|
@@ -2049,7 +1768,6 @@
|
|
|
TWR.RESULT_NET_WEIGHT "resultNetWeight",
|
|
|
RL.LINE_NAME "lineName",
|
|
|
RC3.CARRIER_NAME "carrierName"
|
|
|
-
|
|
|
from OMSTRUCK_ORDER OO
|
|
|
LEFT JOIN OMSTRUCK_ORDER_MATERIAL OOM
|
|
|
ON OO.ORDER_ID=OOM.ORDER_ID
|
|
@@ -2109,7 +1827,8 @@
|
|
|
TWR.RESULT_GROSS_WEIGHT_TIME "grossweightTime",
|
|
|
TWR.RESULT_GROSS_WEIGHT "grossWeight",
|
|
|
RL.LINE_NAME "lineName",
|
|
|
- RC2.CARRIER_NAME "carrierName"
|
|
|
+ RC2.CARRIER_NAME "carrierName",
|
|
|
+ RMT.MATERIAL_TYPE_NAME "materialTypeName"
|
|
|
from OMSTRUCK_ORDER OO
|
|
|
left join TMSTRUCK_TOTAL_RESULT TTR on OO.ORDER_ID = TTR.ORDER_ID
|
|
|
left join RMS_LINE RL ON OO.LINE_ID=RL.LINE_ID
|
|
@@ -2126,6 +1845,7 @@
|
|
|
left join RMS_MATERIAL RM on ARM.MATERIAL_ID = RM.MATERIAL_ID
|
|
|
left join RMS_WAREHOUSE RW1 on ARM.REQUIREMENT_UNLOAD_UNIT_ID = RW1.WAREHOUSE_ID
|
|
|
left join RMS_WAREHOUSE RW2 on ARM.REQUIREMENT_PLATFORM_ID = RW2.WAREHOUSE_ID
|
|
|
+ left join RMS_MATERIAL_TYPE RMT ON RMT.MATERIAL_TYPE_ID = RM.MATERIAL_TYPE_ID
|
|
|
<where>
|
|
|
OO.ORDER_TYPE in (11,15,16) AND TWR.RESULT_NET_WEIGHT IS NOT NULL
|
|
|
<if test="orgCode!=null">
|