|
@@ -884,6 +884,132 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <!--获取承运商名字-->
|
|
|
+ <select id="getCarrierNameForDetail" resultType="java.lang.String">
|
|
|
+ select SU.USER_NAME from
|
|
|
+ "SSO".SYS_USER SU
|
|
|
+ WHERE SU.USER_ID=#{userId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getAmsContractTransportPriceForDetail" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
|
|
|
+ select p0.*,ROWNUM "ROW_ID" 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>
|
|
|
+ ) 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">
|
|
|
<if test="orderField != null and orderField != ''">
|
|
|
order by "${orderField}"
|