|
@@ -17,6 +17,7 @@
|
|
|
<result column="WETHER_TO_STATEMENT" jdbcType="DECIMAL" property="wetherToStatement" />
|
|
|
<result column="EAS_AMOUNT" jdbcType="DECIMAL" property="easAmount" />
|
|
|
<result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
|
|
|
+ <result column="PRICEIDS" jdbcType="VARCHAR" property="priceids"/>
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
DETAILS_ID, PURCHASE_ORDER_ID, WEIGHT_TASK_RESULT_ID, DETAILS_NO, DETAILS_TIME, PRICE_ID,
|
|
@@ -356,6 +357,9 @@
|
|
|
<if test="orderId != null">
|
|
|
ORDER_ID = #{orderId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="priceids !=null">
|
|
|
+ PRICEIDS = #{priceids,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where DETAILS_ID = #{detailsId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -601,7 +605,8 @@
|
|
|
rtcg.TRUCK_CALCULATE_NUMBER as "grossCalculateNumber",
|
|
|
tlfr.RESULT_OUT_GATE_TIME as "resultOutGateTime",
|
|
|
rgl.GATEPOST_NAME as "leaveGatepostName",
|
|
|
- twr.RESULT_NET_WEIGHT as "resultNetWeight"
|
|
|
+ twr.RESULT_NET_WEIGHT as "resultNetWeight",
|
|
|
+ bdo.PRICEIDS as "priceids"
|
|
|
FROM BMSTRUCK_DETAILS_ORDER bdo
|
|
|
LEFT JOIN TMSTRUCK_WEIGHT_RESULT twr
|
|
|
ON twr.WEIGHT_TASK_RESULT_ID = bdo.WEIGHT_TASK_RESULT_ID
|
|
@@ -1984,7 +1989,9 @@
|
|
|
ASM.MATERIAL_WEIGHT "theoryWeight",
|
|
|
rsa.area_name "areaName",
|
|
|
aso.sale_order_receive_customer "receiveMoneyCus",
|
|
|
- ASM.EAS_PRIMARY_ID "easPrimaryId"
|
|
|
+ ASM.EAS_PRIMARY_ID "easPrimaryId",
|
|
|
+ oo.ORDER_ISSUE_TIME "orderissuetime",
|
|
|
+ bdo.PRICEIDS "priceids"
|
|
|
FROM
|
|
|
BMSTRUCK_DETAILS_ORDER bdo
|
|
|
JOIN TMSTRUCK_WEIGHT_RESULT twr ON twr.WEIGHT_TASK_RESULT_ID = bdo.WEIGHT_TASK_RESULT_ID
|
|
@@ -2010,6 +2017,12 @@
|
|
|
WHERE
|
|
|
oo.ORDER_TYPE = 1
|
|
|
AND bdo.WETHER_TO_STATEMENT = 0
|
|
|
+ <if test="con !=null">
|
|
|
+ and rc.capacity_number||rco.consignee_company_name
|
|
|
+ ||RC2.Carrier_Abbreviation||RRA.ADDRESS_PROVINCE
|
|
|
+ || RRA.ADDRESS_DISTRICT ||RRA.ADDRESS_TOWN
|
|
|
+ || RRP.ADDRESS_DELIVERY_ADDRESS||rsa.area_name like #{con}
|
|
|
+ </if>
|
|
|
<if test="carrierId != null">
|
|
|
and RC2.CARRIER_ID = #{carrierId}
|
|
|
</if>
|
|
@@ -2022,6 +2035,117 @@
|
|
|
</if>
|
|
|
order by oo.order_id desc
|
|
|
)
|
|
|
+ <where>
|
|
|
+ <if test="preparationDate!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="preparationDate" item="item" open="(" separator="or" close=")">
|
|
|
+ to_char("preparationDate",'yyyy-mm-dd hh24:mi:ss') like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="carrierName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
|
|
|
+ "carrierName" 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="realAddress!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="realAddress" item="item" open="(" separator="or" close=")">
|
|
|
+ "realAddress" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="companyName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="companyName" item="item" open="(" separator="or" close=")">
|
|
|
+ "companyName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="priceValue!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="priceValue" item="item" open="(" separator="or" close=")">
|
|
|
+ "priceValue" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="detailsAmount!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="detailsAmount" item="item" open="(" separator="or" close=")">
|
|
|
+ "detailsAmount" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="companyName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="companyName" item="item" open="(" separator="or" close=")">
|
|
|
+ "companyName" 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="materialSpa!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialSpa" item="item" open="(" separator="or" close=")">
|
|
|
+ "materialSpa" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="materialNum!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="materialNum" item="item" open="(" separator="or" close=")">
|
|
|
+ "materialNum" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="theoryWeight!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="theoryWeight" item="item" open="(" separator="or" close=")">
|
|
|
+ "theoryWeight" 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="saleRemark!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="saleRemark" item="item" open="(" separator="or" close=")">
|
|
|
+ "saleRemark" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="areaName!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="areaName" item="item" open="(" separator="or" close=")">
|
|
|
+ "areaName" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="easPrimaryId!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="easPrimaryId" item="item" open="(" separator="or" close=")">
|
|
|
+ "easPrimaryId" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="receiveMoneyCus!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="receiveMoneyCus" item="item" open="(" separator="or" close=")">
|
|
|
+ "receiveMoneyCus" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="orderissuetime!= null">
|
|
|
+ and
|
|
|
+ <foreach collection="orderissuetime" item="item" open="(" separator="or" close=")">
|
|
|
+ "orderissuetime" like '%${item}%'
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <include refid="orderBy"></include>
|
|
|
</select>
|
|
|
<select id="selectDetailsByOrder" resultType="java.lang.Integer" parameterType="decimal">
|
|
|
SELECT count(BDO.DETAILS_ID) FROM BMSTRUCK_DETAILS_ORDER BDO
|
|
@@ -2030,7 +2154,6 @@
|
|
|
<select id="getDetailsIdByOrderId" resultType="java.math.BigDecimal" parameterType="java.lang.Integer">
|
|
|
SELECT BDO.DETAILS_ID FROM BMSTRUCK_DETAILS_ORDER BDO
|
|
|
WHERE
|
|
|
-
|
|
|
BDO.ORDER_ID = #{orderId}
|
|
|
</select>
|
|
|
<select id="selectNetWeight" resultType="java.math.BigDecimal" parameterType="decimal">
|
|
@@ -2040,4 +2163,19 @@
|
|
|
WHERE TTR.ORDER_ID = #{orderId}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryaddress" resultType="java.util.Map">
|
|
|
+ select t.place_id "placeid"
|
|
|
+ from AMS_CONTRACT_TRANSPORT_PRICE t
|
|
|
+ where t.price_id=#{s}
|
|
|
+ </select>
|
|
|
+ <select id="queryaddress1" resultType="String">
|
|
|
+ select distinct
|
|
|
+ RRA.ADDRESS_PROVINCE || RRA.ADDRESS_DISTRICT ||
|
|
|
+ RRA.ADDRESS_TOWN || RRP.ADDRESS_DELIVERY_ADDRESS AS "realAddress"
|
|
|
+ from AMS_CONTRACT_TRANSPORT_PRICE t
|
|
|
+ left join RMS_RECEIVE_PLACE RRP
|
|
|
+ on RRP.PLACE_ID=#{priceid}
|
|
|
+ left join RMS_RECEIVE_ADDRESS RRA
|
|
|
+ on RRA.ADDRESS_ID=RRP.ADDRESS_ID
|
|
|
+ </select>
|
|
|
</mapper>
|