|
@@ -23,18 +23,23 @@
|
|
|
<result column="OILPRICE_BASE" jdbcType="DECIMAL" property="oilpriceBase" />
|
|
|
<result column="OIL_TYPE_ID" jdbcType="DECIMAL" property="oilTypeId" />
|
|
|
<result column="OILPRICE_CHANGE_THRESHOLD" jdbcType="DECIMAL" property="oilpriceChangeThreshold" />
|
|
|
+ <result column="OLD_DATE" jdbcType="TIMESTAMP" property="oldDate" />
|
|
|
+ <result column="HAUL_DISTANCE" jdbcType="DECIMAL" property="haulDistance" />
|
|
|
+ <result column="REFERENCE_HT" jdbcType="DECIMAL" property="referenceHt" />
|
|
|
+ <result column="INVENTORY" jdbcType="DECIMAL" property="inventory" />
|
|
|
</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, PLACE_ID, TYPE, DEPARTMENT, OILPRICE_BASE, OIL_TYPE_ID,
|
|
|
- OILPRICE_CHANGE_THRESHOLD
|
|
|
+ OILPRICE_CHANGE_THRESHOLD, OLD_DATE, HAUL_DISTANCE, REFERENCE_HT, INVENTORY
|
|
|
</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.PLACE_ID,
|
|
|
- t.TYPE, t.DEPARTMENT, t.OILPRICE_BASE, t.OIL_TYPE_ID, t.OILPRICE_CHANGE_THRESHOLD
|
|
|
+ t.TYPE, t.DEPARTMENT, t.OILPRICE_BASE, t.OIL_TYPE_ID, t.OILPRICE_CHANGE_THRESHOLD,
|
|
|
+ t.OLD_DATE, t.HAUL_DISTANCE, t.REFERENCE_HT, t.INVENTORY
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM AMS_CONTRACT_TRANSPORT_PRICE
|
|
@@ -107,6 +112,18 @@
|
|
|
<if test="oilpriceChangeThreshold != null">
|
|
|
and OILPRICE_CHANGE_THRESHOLD = #{oilpriceChangeThreshold}
|
|
|
</if>
|
|
|
+ <if test="oldDate != null">
|
|
|
+ and TO_CHAR(OLD_DATE,'yyyy-MM-dd') = #{oldDate}
|
|
|
+ </if>
|
|
|
+ <if test="haulDistance != null">
|
|
|
+ and HAUL_DISTANCE = #{haulDistance}
|
|
|
+ </if>
|
|
|
+ <if test="referenceHt != null">
|
|
|
+ and REFERENCE_HT = #{referenceHt}
|
|
|
+ </if>
|
|
|
+ <if test="inventory != null">
|
|
|
+ and INVENTORY = #{inventory}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -174,6 +191,18 @@
|
|
|
<if test="oilpriceChangeThreshold != null">
|
|
|
and OILPRICE_CHANGE_THRESHOLD = #{oilpriceChangeThreshold}
|
|
|
</if>
|
|
|
+ <if test="oldDate != null">
|
|
|
+ and TO_CHAR(OLD_DATE,'yyyy-MM-dd') = #{oldDate}
|
|
|
+ </if>
|
|
|
+ <if test="haulDistance != null">
|
|
|
+ and HAUL_DISTANCE = #{haulDistance}
|
|
|
+ </if>
|
|
|
+ <if test="referenceHt != null">
|
|
|
+ and REFERENCE_HT = #{referenceHt}
|
|
|
+ </if>
|
|
|
+ <if test="inventory != null">
|
|
|
+ and INVENTORY = #{inventory}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLikeForeach">
|
|
@@ -247,7 +276,7 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
delete from AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</delete>
|
|
@@ -314,24 +343,30 @@
|
|
|
<if test="oilpriceChangeThreshold != null">
|
|
|
or OILPRICE_CHANGE_THRESHOLD = #{oilpriceChangeThreshold}
|
|
|
</if>
|
|
|
+ <if test="oldDate != null">
|
|
|
+ or TO_CHAR(OLD_DATE,'yyyy-MM-dd') = '#{oldDate}'
|
|
|
+ </if>
|
|
|
+ <if test="haulDistance != null">
|
|
|
+ or HAUL_DISTANCE = #{haulDistance}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
|
insert into AMS_CONTRACT_TRANSPORT_PRICE (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
|
|
|
- )
|
|
|
+ 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,
|
|
|
+ OLD_DATE, HAUL_DISTANCE)
|
|
|
values (#{priceId,jdbcType=DECIMAL}, #{shipperId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
|
|
|
- #{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},
|
|
|
- #{placeId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{department,jdbcType=DECIMAL},
|
|
|
- #{oilpriceBase,jdbcType=DECIMAL}, #{oilTypeId,jdbcType=DECIMAL}, #{oilpriceChangeThreshold,jdbcType=DECIMAL}
|
|
|
- )
|
|
|
+ #{lineId,jdbcType=DECIMAL}, #{capacityTypeId,jdbcType=DECIMAL}, #{cargonameId,jdbcType=CHAR},
|
|
|
+ #{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},
|
|
|
+ #{placeId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{department,jdbcType=DECIMAL},
|
|
|
+ #{oilpriceBase,jdbcType=DECIMAL}, #{oilTypeId,jdbcType=DECIMAL}, #{oilpriceChangeThreshold,jdbcType=DECIMAL},
|
|
|
+ #{oldDate,jdbcType=TIMESTAMP}, #{haulDistance,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
|
insert into AMS_CONTRACT_TRANSPORT_PRICE
|
|
@@ -399,6 +434,12 @@
|
|
|
<if test="oilpriceChangeThreshold != null">
|
|
|
OILPRICE_CHANGE_THRESHOLD,
|
|
|
</if>
|
|
|
+ <if test="oldDate != null">
|
|
|
+ OLD_DATE,
|
|
|
+ </if>
|
|
|
+ <if test="haulDistance != null">
|
|
|
+ HAUL_DISTANCE,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="priceId != null">
|
|
@@ -417,7 +458,7 @@
|
|
|
#{capacityTypeId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="cargonameId != null">
|
|
|
- #{cargonameId,jdbcType=DECIMAL},
|
|
|
+ #{cargonameId,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="priceTonKilometer != null">
|
|
|
#{priceTonKilometer,jdbcType=DECIMAL},
|
|
@@ -464,30 +505,38 @@
|
|
|
<if test="oilpriceChangeThreshold != null">
|
|
|
#{oilpriceChangeThreshold,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="oldDate != null">
|
|
|
+ #{oldDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="haulDistance != null">
|
|
|
+ #{haulDistance,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
|
update AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
set SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
|
|
|
- CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
- LINE_ID = #{lineId,jdbcType=DECIMAL},
|
|
|
- CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
|
|
|
- CARGONAME_ID = #{cargonameId,jdbcType=DECIMAL},
|
|
|
- PRICE_TON_KILOMETER = #{priceTonKilometer,jdbcType=DECIMAL},
|
|
|
- PRICE_VALUE = #{priceValue,jdbcType=DECIMAL},
|
|
|
- PRICE_DATE = #{priceDate,jdbcType=TIMESTAMP},
|
|
|
- INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
- INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
- UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
- UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
- INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
- DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
- PLACE_ID = #{placeId,jdbcType=DECIMAL},
|
|
|
- TYPE = #{type,jdbcType=DECIMAL},
|
|
|
- DEPARTMENT = #{department,jdbcType=DECIMAL},
|
|
|
- OILPRICE_BASE = #{oilpriceBase,jdbcType=DECIMAL},
|
|
|
- OIL_TYPE_ID = #{oilTypeId,jdbcType=DECIMAL},
|
|
|
- OILPRICE_CHANGE_THRESHOLD = #{oilpriceChangeThreshold,jdbcType=DECIMAL}
|
|
|
+ CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
|
|
|
+ LINE_ID = #{lineId,jdbcType=DECIMAL},
|
|
|
+ CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
|
|
|
+ CARGONAME_ID = #{cargonameId,jdbcType=CHAR},
|
|
|
+ PRICE_TON_KILOMETER = #{priceTonKilometer,jdbcType=DECIMAL},
|
|
|
+ PRICE_VALUE = #{priceValue,jdbcType=DECIMAL},
|
|
|
+ PRICE_DATE = #{priceDate,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
+ DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
+ PLACE_ID = #{placeId,jdbcType=DECIMAL},
|
|
|
+ TYPE = #{type,jdbcType=DECIMAL},
|
|
|
+ DEPARTMENT = #{department,jdbcType=DECIMAL},
|
|
|
+ OILPRICE_BASE = #{oilpriceBase,jdbcType=DECIMAL},
|
|
|
+ OIL_TYPE_ID = #{oilTypeId,jdbcType=DECIMAL},
|
|
|
+ OILPRICE_CHANGE_THRESHOLD = #{oilpriceChangeThreshold,jdbcType=DECIMAL},
|
|
|
+ OLD_DATE = #{oldDate,jdbcType=TIMESTAMP},
|
|
|
+ HAUL_DISTANCE = #{haulDistance,jdbcType=DECIMAL}
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
@@ -506,7 +555,7 @@
|
|
|
CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
<if test="cargonameId != null">
|
|
|
- CARGONAME_ID = #{cargonameId,jdbcType=DECIMAL},
|
|
|
+ CARGONAME_ID = #{cargonameId,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="priceTonKilometer != null">
|
|
|
PRICE_TON_KILOMETER = #{priceTonKilometer,jdbcType=DECIMAL},
|
|
@@ -553,10 +602,16 @@
|
|
|
<if test="oilpriceChangeThreshold != null">
|
|
|
OILPRICE_CHANGE_THRESHOLD = #{oilpriceChangeThreshold,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="oldDate != null">
|
|
|
+ OLD_DATE = #{oldDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="haulDistance != null">
|
|
|
+ HAUL_DISTANCE = #{haulDistance,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
<include refid="select" />
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
@@ -578,18 +633,20 @@
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
DELETED, PLACE_ID, TYPE,
|
|
|
DEPARTMENT, OILPRICE_BASE, OIL_TYPE_ID,
|
|
|
- OILPRICE_CHANGE_THRESHOLD)
|
|
|
+ OILPRICE_CHANGE_THRESHOLD, OLD_DATE,
|
|
|
+ HAUL_DISTANCE)
|
|
|
( <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=DECIMAL}, #{item.priceTonKilometer,jdbcType=DECIMAL},
|
|
|
+ #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.cargonameId,jdbcType=CHAR}, #{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.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
|
|
|
+ #{item.oilpriceChangeThreshold,jdbcType=DECIMAL}, #{item.oldDate,jdbcType=TIMESTAMP},
|
|
|
+ #{item.haulDistance,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -617,7 +674,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=DECIMAL}
|
|
|
+ when #{item.priceId,jdbcType=DECIMAL} then #{item.cargonameId,jdbcType=CHAR}
|
|
|
</foreach>
|
|
|
,PRICE_TON_KILOMETER=
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
@@ -679,6 +736,14 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.oilpriceChangeThreshold,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,OLD_DATE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
+ when #{item.priceId,jdbcType=DECIMAL} then #{item.oldDate,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,HAUL_DISTANCE=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
+ when #{item.priceId,jdbcType=DECIMAL} then #{item.haulDistance,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where PRICE_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.priceId,jdbcType=DECIMAL}
|
|
@@ -914,9 +979,13 @@
|
|
|
a_t_price.OILPRICE_BASE "oilpriceBase",
|
|
|
a_t_price.OILPRICE_CHANGE_THRESHOLD "oilpriceChangeThreshold",
|
|
|
a_t_price.CARGONAME_ID "cargonameId",
|
|
|
- a_t_price.haul_distance "haulDistance"
|
|
|
+ a_t_price.haul_distance "haulDistance",
|
|
|
+ a_t_price.REFERENCE_HT "referenceHt",
|
|
|
+ a_t_price.inventory "inventory",
|
|
|
+ a_t_price.place_id "placeId"
|
|
|
from AMS_CONTRACT_TRANSPORT_PRICE a_t_price
|
|
|
where a_t_price.OIL_TYPE_ID = #{oilTypeId} and a_t_price.DELETED = 0
|
|
|
+ order by reference_ht desc
|
|
|
</select>
|
|
|
|
|
|
<select id="getPriceValueAndPriceTonKilometer" resultType="java.util.LinkedHashMap">
|
|
@@ -1105,4 +1174,86 @@
|
|
|
<update id="updateDCnew">
|
|
|
update AMS_CONTRACT_TRANSPORT_PRICE set deleted =0 where capacity_type_id in (20,21,22,23,24,25,26,27,28,41,42,40) and price_date = to_date('2022-09-26', 'yyyy-mm-dd');
|
|
|
</update>
|
|
|
+
|
|
|
+ <select id="selectByPlaceId" resultType="java.util.Map">
|
|
|
+ select price_id "priceId",
|
|
|
+ haul_distance "haulDistance",
|
|
|
+ reference_ht "referenceHt",
|
|
|
+ price_value "priceValue"
|
|
|
+ from AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
+ where place_id in (select place_id from RMS_RECEIVE_PLACE t where address_id =
|
|
|
+ (select address_id from RMS_RECEIVE_PLACE t where place_id=#{placeId} )) and reference_ht is not null
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateByPriceId" parameterType="map">
|
|
|
+ update AMS_CONTRACT_TRANSPORT_PRICE set price_value=#{priceValue} where price_id=#{priceId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="updateDelectByPlaceId" parameterType="map">
|
|
|
+ update AMS_CONTRACT_TRANSPORT_PRICE set deleted =1 where place_id =#{placeId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectshdz" resultType="java.lang.String">
|
|
|
+ select t.address_id "addressId" from RMS_RECEIVE_ADDRESS t where address_province =#{addressProvince} and address_district =#{addressDistrict}
|
|
|
+ <if test="addressTown!=null">
|
|
|
+ and address_town =#{addressTown}
|
|
|
+ </if>
|
|
|
+ <if test="addressTown==null">
|
|
|
+ and address_town is null
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectxxdz" resultType="java.util.Map">
|
|
|
+ select t.place_id "placeId" from RMS_RECEIVE_PLACE t
|
|
|
+ where
|
|
|
+ <if test="addressDeliveryAddress!=null">
|
|
|
+ t.address_delivery_address =#{addressDeliveryAddress}
|
|
|
+ </if>
|
|
|
+ <if test="addressDeliveryAddress!=null and addressId!=null">
|
|
|
+ and
|
|
|
+ </if>
|
|
|
+ <if test="addressId!=null ">
|
|
|
+ t.address_id in
|
|
|
+ <foreach collection="addressId" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ fetch next 1 rows only
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertxxdz" parameterType="map">
|
|
|
+ insert into RMS_RECEIVE_PLACE (PLACE_ID, ADDRESS_ID
|
|
|
+ <if test="addressDeliveryAddress!=null">
|
|
|
+ , ADDRESS_DELIVERY_ADDRESS
|
|
|
+ </if>)
|
|
|
+ values (#{placeId},#{addressId}
|
|
|
+ <if test="addressDeliveryAddress!=null">
|
|
|
+ ,#{addressDeliveryAddress}
|
|
|
+ </if>)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="selectcys" resultType="map">
|
|
|
+ select t.carrier_id "carrierId" from RMS_CARRIER t where carrier_abbreviation like #{carrierAbbreviation}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMaxIdrrp" resultType="int">
|
|
|
+ select max(PLACE_ID) from RMS_RECEIVE_PLACE
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectMaxIdrra" resultType="int">
|
|
|
+ select max(address_id) from RMS_RECEIVE_ADDRESS
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertshdz" parameterType="map">
|
|
|
+ insert into RMS_RECEIVE_ADDRESS (ADDRESS_ID, ADDRESS_PROVINCE, ADDRESS_DISTRICT
|
|
|
+ <if test="addressTown!=null">
|
|
|
+ ,ADDRESS_TOWN
|
|
|
+ </if>
|
|
|
+ )
|
|
|
+ values (#{addressId},#{addressProvince} , #{addressDistrict}
|
|
|
+ <if test="addressTown!=null">
|
|
|
+ , #{addressTown}
|
|
|
+ </if>
|
|
|
+ );
|
|
|
+ </insert>
|
|
|
</mapper>
|