|
@@ -7,7 +7,7 @@
|
|
|
<result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
|
|
|
<result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
|
|
|
<result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId" />
|
|
|
- <result column="CARGONAME_ID" jdbcType="CHAR" property="cargonameId" />
|
|
|
+ <result column="CARGONAME_ID" jdbcType="DECIMAL" property="cargonameId" />
|
|
|
<result column="PRICE_TON_KILOMETER" jdbcType="DECIMAL" property="priceTonKilometer" />
|
|
|
<result column="PRICE_VALUE" jdbcType="DECIMAL" property="priceValue" />
|
|
|
<result column="PRICE_DATE" jdbcType="TIMESTAMP" property="priceDate" />
|
|
@@ -17,7 +17,7 @@
|
|
|
<result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
<result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
<result column="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
- <result column="ADDRESS_ID" jdbcType="DECIMAL" property="addressId" />
|
|
|
+ <result column="PLACE_ID" jdbcType="DECIMAL" property="placeId" />
|
|
|
<result column="TYPE" jdbcType="DECIMAL" property="type" />
|
|
|
<result column="DEPARTMENT" jdbcType="DECIMAL" property="department" />
|
|
|
<result column="OILPRICE_BASE" jdbcType="DECIMAL" property="oilpriceBase" />
|
|
@@ -25,15 +25,15 @@
|
|
|
<result column="OILPRICE_CHANGE_THRESHOLD" jdbcType="DECIMAL" property="oilpriceChangeThreshold" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- PRICE_ID, SHIPPER_ID, CARRIER_ID, LINE_ID, CAPACITY_TYPE_ID, CARGONAME_ID, PRICE_TON_KILOMETER,
|
|
|
- PRICE_VALUE, PRICE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
- INSERT_UPDATE_REMARK, DELETED, ADDRESS_ID, TYPE, DEPARTMENT, OILPRICE_BASE, OIL_TYPE_ID,
|
|
|
+ PRICE_ID, SHIPPER_ID, CARRIER_ID, LINE_ID, CAPACITY_TYPE_ID, CARGONAME_ID, PRICE_TON_KILOMETER,
|
|
|
+ PRICE_VALUE, PRICE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK, DELETED, PLACE_ID, TYPE, DEPARTMENT, OILPRICE_BASE, OIL_TYPE_ID,
|
|
|
OILPRICE_CHANGE_THRESHOLD
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.PRICE_ID, t.SHIPPER_ID, t.CARRIER_ID, t.LINE_ID, t.CAPACITY_TYPE_ID, t.CARGONAME_ID,
|
|
|
- t.PRICE_TON_KILOMETER, t.PRICE_VALUE, t.PRICE_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
- t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.ADDRESS_ID,
|
|
|
+ t.PRICE_ID, t.SHIPPER_ID, t.CARRIER_ID, t.LINE_ID, t.CAPACITY_TYPE_ID, t.CARGONAME_ID,
|
|
|
+ t.PRICE_TON_KILOMETER, t.PRICE_VALUE, t.PRICE_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
|
|
|
+ t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, t.PLACE_ID,
|
|
|
t.TYPE, t.DEPARTMENT, t.OILPRICE_BASE, t.OIL_TYPE_ID, t.OILPRICE_CHANGE_THRESHOLD
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
@@ -89,8 +89,8 @@
|
|
|
<if test="deleted != null">
|
|
|
and DELETED = #{deleted}
|
|
|
</if>
|
|
|
- <if test="addressId != null">
|
|
|
- and ADDRESS_ID = #{addressId}
|
|
|
+ <if test="placeId != null">
|
|
|
+ and PLACE_ID = #{placeId}
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
and TYPE = #{type}
|
|
@@ -156,8 +156,8 @@
|
|
|
<if test="deleted != null">
|
|
|
and DELETED = #{deleted}
|
|
|
</if>
|
|
|
- <if test="addressId != null">
|
|
|
- and ADDRESS_ID = #{addressId}
|
|
|
+ <if test="placeId != null">
|
|
|
+ and PLACE_ID = #{placeId}
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
and TYPE = #{type}
|
|
@@ -225,8 +225,8 @@
|
|
|
<if test="deleted != null">
|
|
|
or DELETED = #{deleted}
|
|
|
</if>
|
|
|
- <if test="addressId != null">
|
|
|
- or ADDRESS_ID = #{addressId}
|
|
|
+ <if test="placeId != null">
|
|
|
+ or PLACE_ID = #{placeId}
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
or TYPE = #{type}
|
|
@@ -250,15 +250,15 @@
|
|
|
PRICE_TON_KILOMETER, PRICE_VALUE, PRICE_DATE,
|
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
- ADDRESS_ID, TYPE, DEPARTMENT,
|
|
|
+ PLACE_ID, TYPE, DEPARTMENT,
|
|
|
OILPRICE_BASE, OIL_TYPE_ID, OILPRICE_CHANGE_THRESHOLD
|
|
|
)
|
|
|
values (#{priceId,jdbcType=DECIMAL}, #{shipperId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
|
|
|
- #{lineId,jdbcType=DECIMAL}, #{capacityTypeId,jdbcType=DECIMAL}, #{cargonameId,jdbcType=CHAR},
|
|
|
+ #{lineId,jdbcType=DECIMAL}, #{capacityTypeId,jdbcType=DECIMAL}, #{cargonameId,jdbcType=DECIMAL},
|
|
|
#{priceTonKilometer,jdbcType=DECIMAL}, #{priceValue,jdbcType=DECIMAL}, #{priceDate,jdbcType=TIMESTAMP},
|
|
|
#{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL},
|
|
|
- #{addressId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{department,jdbcType=DECIMAL},
|
|
|
+ #{placeId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{department,jdbcType=DECIMAL},
|
|
|
#{oilpriceBase,jdbcType=DECIMAL}, #{oilTypeId,jdbcType=DECIMAL}, #{oilpriceChangeThreshold,jdbcType=DECIMAL}
|
|
|
)
|
|
|
</insert>
|
|
@@ -310,8 +310,8 @@
|
|
|
<if test="deleted != null">
|
|
|
DELETED,
|
|
|
</if>
|
|
|
- <if test="addressId != null">
|
|
|
- ADDRESS_ID,
|
|
|
+ <if test="placeId != null">
|
|
|
+ PLACE_ID,
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
TYPE,
|
|
@@ -346,7 +346,7 @@
|
|
|
#{capacityTypeId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="cargonameId != null">
|
|
|
- #{cargonameId,jdbcType=CHAR},
|
|
|
+ #{cargonameId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="priceTonKilometer != null">
|
|
|
#{priceTonKilometer,jdbcType=DECIMAL},
|
|
@@ -375,8 +375,8 @@
|
|
|
<if test="deleted != null">
|
|
|
#{deleted,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="addressId != null">
|
|
|
- #{addressId,jdbcType=DECIMAL},
|
|
|
+ <if test="placeId != null">
|
|
|
+ #{placeId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
#{type,jdbcType=DECIMAL},
|
|
@@ -401,7 +401,7 @@
|
|
|
CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
LINE_ID = #{lineId,jdbcType=DECIMAL},
|
|
|
CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
|
|
|
- CARGONAME_ID = #{cargonameId,jdbcType=CHAR},
|
|
|
+ CARGONAME_ID = #{cargonameId,jdbcType=DECIMAL},
|
|
|
PRICE_TON_KILOMETER = #{priceTonKilometer,jdbcType=DECIMAL},
|
|
|
PRICE_VALUE = #{priceValue,jdbcType=DECIMAL},
|
|
|
PRICE_DATE = #{priceDate,jdbcType=TIMESTAMP},
|
|
@@ -411,7 +411,7 @@
|
|
|
UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
- ADDRESS_ID = #{addressId,jdbcType=DECIMAL},
|
|
|
+ PLACE_ID = #{placeId,jdbcType=DECIMAL},
|
|
|
TYPE = #{type,jdbcType=DECIMAL},
|
|
|
DEPARTMENT = #{department,jdbcType=DECIMAL},
|
|
|
OILPRICE_BASE = #{oilpriceBase,jdbcType=DECIMAL},
|
|
@@ -435,7 +435,7 @@
|
|
|
CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="cargonameId != null">
|
|
|
- CARGONAME_ID = #{cargonameId,jdbcType=CHAR},
|
|
|
+ CARGONAME_ID = #{cargonameId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="priceTonKilometer != null">
|
|
|
PRICE_TON_KILOMETER = #{priceTonKilometer,jdbcType=DECIMAL},
|
|
@@ -464,8 +464,8 @@
|
|
|
<if test="deleted != null">
|
|
|
DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
- <if test="addressId != null">
|
|
|
- ADDRESS_ID = #{addressId,jdbcType=DECIMAL},
|
|
|
+ <if test="placeId != null">
|
|
|
+ PLACE_ID = #{placeId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="type != null">
|
|
|
TYPE = #{type,jdbcType=DECIMAL},
|
|
@@ -505,18 +505,18 @@
|
|
|
PRICE_VALUE, PRICE_DATE, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETED, ADDRESS_ID, TYPE,
|
|
|
+ DELETED, PLACE_ID, TYPE,
|
|
|
DEPARTMENT, OILPRICE_BASE, OIL_TYPE_ID,
|
|
|
OILPRICE_CHANGE_THRESHOLD)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.priceId,jdbcType=DECIMAL},
|
|
|
#{item.shipperId,jdbcType=DECIMAL}, #{item.carrierId,jdbcType=DECIMAL}, #{item.lineId,jdbcType=DECIMAL},
|
|
|
- #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.cargonameId,jdbcType=CHAR}, #{item.priceTonKilometer,jdbcType=DECIMAL},
|
|
|
+ #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.cargonameId,jdbcType=DECIMAL}, #{item.priceTonKilometer,jdbcType=DECIMAL},
|
|
|
#{item.priceValue,jdbcType=DECIMAL}, #{item.priceDate,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
|
|
|
#{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
|
|
|
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- #{item.deleted,jdbcType=DECIMAL}, #{item.addressId,jdbcType=DECIMAL}, #{item.type,jdbcType=DECIMAL},
|
|
|
+ #{item.deleted,jdbcType=DECIMAL}, #{item.placeId,jdbcType=DECIMAL}, #{item.type,jdbcType=DECIMAL},
|
|
|
#{item.department,jdbcType=DECIMAL}, #{item.oilpriceBase,jdbcType=DECIMAL}, #{item.oilTypeId,jdbcType=DECIMAL},
|
|
|
#{item.oilpriceChangeThreshold,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
@@ -546,7 +546,7 @@
|
|
|
</foreach>
|
|
|
,CARGONAME_ID=
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
- when #{item.priceId,jdbcType=DECIMAL} then #{item.cargonameId,jdbcType=CHAR}
|
|
|
+ when #{item.priceId,jdbcType=DECIMAL} then #{item.cargonameId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,PRICE_TON_KILOMETER=
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
@@ -584,9 +584,9 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
- ,ADDRESS_ID=
|
|
|
+ ,PLACE_ID=
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
- when #{item.priceId,jdbcType=DECIMAL} then #{item.addressId,jdbcType=DECIMAL}
|
|
|
+ when #{item.priceId,jdbcType=DECIMAL} then #{item.placeId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,TYPE=
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
@@ -629,7 +629,7 @@
|
|
|
r_r_address.ADDRESS_PROVINCE "addressProvince",
|
|
|
r_r_address.ADDRESS_DISTRICT "addressDistrict",
|
|
|
r_r_address.ADDRESS_TOWN "addressTown",
|
|
|
- r_r_address.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
|
|
|
+ rrp.ADDRESS_DELIVERY_ADDRESS "addressDeliveryAddress",
|
|
|
r_carrier.CARRIER_NAME "carrierName",
|
|
|
r_line.LINE_PATH_LENGTH "linePathLength",
|
|
|
r_o_type.OIL_TYPE_NAME "oilTypeName",
|
|
@@ -638,10 +638,14 @@
|
|
|
a_t_price.PRICE_TON_KILOMETER "priceTonKilometer",
|
|
|
a_t_price.PRICE_DATE "priceDate",
|
|
|
a_t_price.OILPRICE_BASE "oilpriceBase",
|
|
|
- a_t_price.INSERT_TIME "insertTime"
|
|
|
+ a_t_price.INSERT_TIME "insertTime",
|
|
|
+ rs.SHIPPER_NAME "shipperName",
|
|
|
+ a_t_price.OILPRICE_CHANGE_THRESHOLD "oilpriceChangeThreshold"
|
|
|
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 a_t_price.ADDRESS_ID=r_r_address.ADDRESS_ID
|
|
|
+ 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
|
|
@@ -650,6 +654,8 @@
|
|
|
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 a_t_price.DELETED = 0
|
|
|
-- and a_t_price.TYPE = 1 and a_t_price.DEPARTMENT = 2
|
|
|
<where>
|
|
@@ -666,6 +672,12 @@
|
|
|
"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=")">
|
|
@@ -777,7 +789,7 @@
|
|
|
a_t_price.LINE_ID "lineId",
|
|
|
a_t_price.CAPACITY_ID "capacityId",
|
|
|
a_t_price.MATERIAL_ID "materialId",
|
|
|
- a_t_price.ADDRESS_ID "addressId",
|
|
|
+ a_t_price.PLACE_ID "placeId",
|
|
|
a_t_price.PRICE_VALUE "priceValue",
|
|
|
a_t_price.PRICE_DATE "priceDate"
|
|
|
from AMS_CONTRACT_TRANSPORT_PRICE a_t_price
|
|
@@ -848,4 +860,22 @@
|
|
|
OIL_TYPE_NAME "label"
|
|
|
from RMS_OIL_TYPE
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getRealAddressByLike" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
+ SELECT
|
|
|
+ RRP.PLACE_ID AS "placeId",
|
|
|
+ RRP.ADDRESS_DELIVERY_ADDRESS AS "value",
|
|
|
+ RRP.ADDRESS_DELIVERY_ADDRESS AS "placeName"
|
|
|
+ FROM RMS_RECEIVE_PLACE RRP
|
|
|
+ WHERE RRP.ADDRESS_ID = #{addressId}
|
|
|
+ <if test="index != null">
|
|
|
+ AND RRP.ADDRESS_DELIVERY_ADDRESS LIKE #{index}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFormulaId" parameterType="DECIMAL" resultType="DECIMAL" >
|
|
|
+ SELECT ACTP.CARGONAME_ID AS "formulaId"
|
|
|
+ FROM AMS_CONTRACT_TRANSPORT_PRICE ACTP
|
|
|
+ WHERE ACTP.PRICE_ID = #{priceId}
|
|
|
+ </select>
|
|
|
</mapper>
|