|
@@ -934,80 +934,6 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
) p0
|
|
|
-
|
|
|
- <!--<where>
|
|
|
- <if test="addressProvince != null">
|
|
|
- and
|
|
|
- <foreach collection="addressProvince" item="item" open="(" separator="or" close=")">
|
|
|
- "addressProvince" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="shipperName != null">
|
|
|
- and
|
|
|
- <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
|
|
|
- "shipperName" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="addressDistrict != null">
|
|
|
- and
|
|
|
- <foreach collection="addressDistrict" item="item" open="(" separator="or" close=")">
|
|
|
- "addressDistrict" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="addressTown != null">
|
|
|
- and
|
|
|
- <foreach collection="addressTown" item="item" open="(" separator="or" close=")">
|
|
|
- "addressTown" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="addressDeliveryAddress != null">
|
|
|
- and
|
|
|
- <foreach collection="addressDeliveryAddress" item="item" open="(" separator="or" close=")">
|
|
|
- "addressDeliveryAddress" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="linePathLength != null">
|
|
|
- and
|
|
|
- <foreach collection="linePathLength" item="item" open="(" separator="or" close=")">
|
|
|
- "linePathLength" 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="capacityTypeName != null">
|
|
|
- and
|
|
|
- <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
|
|
|
- "capacityTypeName" 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="priceTonKilometer != null">
|
|
|
- and
|
|
|
- <foreach collection="priceTonKilometer" item="item" open="(" separator="or" close=")">
|
|
|
- "priceTonKilometer" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="priceDate != null">
|
|
|
- and
|
|
|
- <foreach collection="priceDate" item="item" open="(" separator="or" close=")">
|
|
|
- "priceDate" like '%${item}%'
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- <include refid="orderBy"></include>
|
|
|
- <if test="orderField == null ">
|
|
|
- order by "priceDate" desc
|
|
|
- </if>-->
|
|
|
</select>
|
|
|
|
|
|
<sql id="orderBy">
|
|
@@ -1070,6 +996,75 @@
|
|
|
order by RRRA."pricevalue" asc nulls last
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getAddressDeliveryAddressForDetails" resultType="java.util.LinkedHashMap">
|
|
|
+ <!--SELECT *
|
|
|
+ FROM (SELECT
|
|
|
+ distinct
|
|
|
+ RRA.ADDRESS_ID "addressId",
|
|
|
+ RRA.ADDRESS_PROVINCE "province",
|
|
|
+ RRA.ADDRESS_DISTRICT "district",
|
|
|
+ RRA.ADDRESS_TOWN "town",
|
|
|
+ RRP.ADDRESS_DELIVERY_ADDRESS "address1",
|
|
|
+ RRA.ADDRESS_PROVINCE ||RRA.ADDRESS_DISTRICT|| RRA.ADDRESS_TOWN||RRP.ADDRESS_DELIVERY_ADDRESS "address",
|
|
|
+ RRP.PLACE_ID "placeId",
|
|
|
+ TO_CHAR(ACTP.PRICE_VALUE, '9999999990.99') "pricevalue",
|
|
|
+ ACTP.PRICE_ID "priceid"
|
|
|
+ FROM RMS_RECEIVE_ADDRESS RRA
|
|
|
+ LEFT JOIN RMS_RECEIVE_PLACE RRP
|
|
|
+ ON RRP.ADDRESS_ID=RRA.ADDRESS_ID
|
|
|
+ LEFT JOIN AMS_CONTRACT_TRANSPORT_PRICE ACTP
|
|
|
+ ON ACTP.PLACE_ID=RRP.PLACE_ID
|
|
|
+ WHERE ACTP.DELETED = 0
|
|
|
+ and ACTP.ISSTANDARD IS NULL
|
|
|
+ ) RRRA
|
|
|
+ <if test="con != null" >
|
|
|
+ WHERE RRRA."address" LIKE #{con}
|
|
|
+ </if>
|
|
|
+ order by RRRA."pricevalue" asc nulls last-->
|
|
|
+ select * from(
|
|
|
+ select a_t_price.PRICE_ID "priceId",
|
|
|
+ r_r_address.ADDRESS_PROVINCE "addressProvince",
|
|
|
+ r_r_address.ADDRESS_DISTRICT "addressDistrict",
|
|
|
+ r_r_address.ADDRESS_TOWN "addressTown",
|
|
|
+ rrp.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
|
|
|
+ r_carrier.CARRIER_NAME "carrierName",
|
|
|
+ r_line.LINE_PATH_LENGTH "linePathLength",
|
|
|
+ a_t_price.PRICE_VALUE "priceValue",
|
|
|
+ a_t_price.PRICE_TON_KILOMETER "priceTonKilometer",
|
|
|
+ a_t_price.PRICE_DATE "priceDate",
|
|
|
+ a_t_price.INSERT_TIME "insertTime"
|
|
|
+ from AMS_CONTRACT_TRANSPORT_PRICE a_t_price
|
|
|
+ left join RMS_RECEIVE_PLACE rrp
|
|
|
+ on a_t_price.PLACE_ID=rrp.PLACE_ID
|
|
|
+ left join RMS_RECEIVE_ADDRESS r_r_address
|
|
|
+ on rrp.ADDRESS_ID = r_r_address.ADDRESS_ID
|
|
|
+ left join RMS_CAPACITY_TYPE r_c_type
|
|
|
+ on a_t_price.CAPACITY_TYPE_ID=r_c_type.CAPACITY_TYPE_ID
|
|
|
+ left join RMS_CARRIER r_carrier
|
|
|
+ on a_t_price.CARRIER_ID=r_carrier.CARRIER_ID
|
|
|
+ left join RMS_LINE r_line
|
|
|
+ on a_t_price.LINE_ID=r_line.LINE_ID
|
|
|
+ left join RMS_OIL_TYPE r_o_type
|
|
|
+ on a_t_price.OIL_TYPE_ID = r_o_type.OIL_TYPE_ID
|
|
|
+ left join RMS_SHIPPER rs
|
|
|
+ on rs.SHIPPER_ID = a_t_price.SHIPPER_ID
|
|
|
+ <where>
|
|
|
+ TYPE=1
|
|
|
+ and a_t_price.ISSTANDARD is null
|
|
|
+ and a_t_price.DELETED = 0
|
|
|
+ <if test="carrierName1!=null and carrierName1 != ''.toString() ">
|
|
|
+ and r_carrier.CARRIER_NAME like CONCAT('%',CONCAT(#{carrierName1},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="con !=null and con != ''.toString()">
|
|
|
+ and
|
|
|
+ r_r_address.ADDRESS_PROVINCE || r_r_address.ADDRESS_DISTRICT || r_r_address.ADDRESS_TOWN
|
|
|
+ || rrp.ADDRESS_DELIVERY_ADDRESS || r_carrier.CARRIER_NAME || r_c_type.CAPACITY_TYPE_NAME
|
|
|
+ like CONCAT('%',CONCAT(#{con},'%'))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ )
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectByPriceId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
|
|
|
select a_t_price.SHIPPER_ID "shipperId",
|
|
|
a_t_price.CARRIER_ID "carrierId",
|