|
@@ -2021,12 +2021,32 @@
|
|
|
<if test="capacityNum != null">
|
|
|
and RCA.CAPACITY_NUMBER like #{capacityNum}
|
|
|
</if>
|
|
|
+ <if test="capacityList != null">
|
|
|
+ and <foreach collection="capacityList" item="item" open="(" separator="or" close=")">
|
|
|
+ RCA.CAPACITY_NUMBER like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="consigneeNames != null">
|
|
|
and RC.CONSIGNEE_COMPANY_NAME like #{consigneeNames}
|
|
|
</if>
|
|
|
+ <if test="consigneeNameList != null">
|
|
|
+ and <foreach collection="consigneeNameList" item="item" open="(" separator="or" close=")">
|
|
|
+ RC.CONSIGNEE_COMPANY_NAME like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
<if test="carrierNames != null">
|
|
|
and R_CARRIER.CARRIER_ABBREVIATION like #{carrierNames}
|
|
|
</if>
|
|
|
+ <if test="carrierList != null ">
|
|
|
+ and <foreach collection="carrierList" item="item" open="(" separator="or" close=")">
|
|
|
+ R_CARRIER.CARRIER_ABBREVIATION like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialNameList != null">
|
|
|
+ and <foreach collection="materialNameList" item="item" open="(" separator="or" close=")">
|
|
|
+ RM.MATERIAL_NAME like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
order by ASO.SALE_ORDER_ID DESC, OO.ORDER_ID DESC
|
|
|
)
|
|
|
</select>
|
|
@@ -2434,4 +2454,29 @@
|
|
|
select CAPACITY_NUMBER from RMS_CAPACITY
|
|
|
where CAPACITY_ID=#{capacitynumber}
|
|
|
</select>
|
|
|
+ <select id="getCarrierFilterList" resultType="java.util.Map" parameterType="map">
|
|
|
+ SELECT * FROM (
|
|
|
+ SELECT distinct
|
|
|
+ R_CARRIER.CARRIER_ABBREVIATION "value",
|
|
|
+ R_CARRIER.CARRIER_ABBREVIATION "text",
|
|
|
+ FROM AMS_SALE_ORDER ASO
|
|
|
+ LEFT JOIN AMS_SALE_ORDER_MATERIAL ASOM
|
|
|
+ ON ASOM.SALE_ORDER_ID = ASO.SALE_ORDER_ID
|
|
|
+ LEFT JOIN AMS_DISPATCH_SALE_ORDER ADSO
|
|
|
+ ON ADSO.SALE_ORDER_MATERIAL_ID = ASOM.SALE_ORDER_MATERIAL_ID
|
|
|
+ LEFT JOIN RMS_CARRIER R_CARRIER
|
|
|
+ ON R_CARRIER.CARRIER_ID = ADSO.CARRIER_ID
|
|
|
+ WHERE ASO.SALE_TYPE = 1
|
|
|
+ AND ASO.DELETED = 0
|
|
|
+ <if test="oneDate != null">
|
|
|
+ and to_date(#{oneDate}, 'yyyy-mm-dd') < = to_date(to_char(ASOM.SALE_DATE_OF_RECEIPT-1,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and to_date(#{startDate}, 'yyyy-mm-dd') <= to_date(to_char(ASOM.SALE_DATE_OF_RECEIPT-1,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
|
+ and to_date(#{endDate}, 'yyyy-mm-dd') >= to_date(to_char(ASOM.SALE_DATE_OF_RECEIPT-1,'yyyy-mm-dd'),'yyyy-mm-dd')
|
|
|
+ </if>
|
|
|
+ order by ASO.SALE_ORDER_ID DESC
|
|
|
+ )
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|