|
@@ -19,23 +19,24 @@
|
|
|
<result column="DELETED" jdbcType="DECIMAL" property="deleted" />
|
|
|
<result column="ADDRESS_ID" jdbcType="DECIMAL" property="addressId" />
|
|
|
<result column="TYPE" jdbcType="DECIMAL" property="type" />
|
|
|
+ <result column="DEPARTMENT" jdbcType="DECIMAL" property="department" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- PRICE_ID, SHIPPER_ID, CARRIER_ID, LINE_ID, CAPACITY_ID, MATERIAL_ID, PRICE_TON_KILOMETER,
|
|
|
- PRICE_VALUE, PRICE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
- INSERT_UPDATE_REMARK, DELETED, ADDRESS_ID, TYPE
|
|
|
+ PRICE_ID, SHIPPER_ID, CARRIER_ID, LINE_ID, CAPACITY_ID, MATERIAL_ID, PRICE_TON_KILOMETER,
|
|
|
+ PRICE_VALUE, PRICE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK, DELETED, ADDRESS_ID, TYPE, DEPARTMENT
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.PRICE_ID, t.SHIPPER_ID, t.CARRIER_ID, t.LINE_ID, t.CAPACITY_ID, t.MATERIAL_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.TYPE
|
|
|
+ t.PRICE_ID, t.SHIPPER_ID, t.CARRIER_ID, t.LINE_ID, t.CAPACITY_ID, t.MATERIAL_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.TYPE, t.DEPARTMENT
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
- SELECT <include refid="columns"/> FROM AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
+ SELECT <include refid="columns" /> FROM AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
</sql>
|
|
|
<sql id="select_alias">
|
|
|
- SELECT <include refid="columns_alias"/> FROM AMS_CONTRACT_TRANSPORT_PRICE t
|
|
|
+ SELECT <include refid="columns_alias" /> FROM AMS_CONTRACT_TRANSPORT_PRICE t
|
|
|
</sql>
|
|
|
<sql id="where">
|
|
|
<where>
|
|
@@ -90,6 +91,9 @@
|
|
|
<if test="type != null">
|
|
|
and TYPE = #{type}
|
|
|
</if>
|
|
|
+ <if test="department != null">
|
|
|
+ and DEPARTMENT = #{department}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -145,9 +149,12 @@
|
|
|
<if test="type != null">
|
|
|
and TYPE = #{type}
|
|
|
</if>
|
|
|
+ <if test="department != null">
|
|
|
+ and DEPARTMENT = #{department}
|
|
|
+ </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>
|
|
@@ -202,6 +209,9 @@
|
|
|
<if test="type != null">
|
|
|
or TYPE = #{type}
|
|
|
</if>
|
|
|
+ <if test="department != null">
|
|
|
+ or DEPARTMENT = #{department}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
|
insert into AMS_CONTRACT_TRANSPORT_PRICE (PRICE_ID, SHIPPER_ID, CARRIER_ID,
|
|
@@ -209,13 +219,15 @@
|
|
|
PRICE_TON_KILOMETER, PRICE_VALUE, PRICE_DATE,
|
|
|
INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED,
|
|
|
- ADDRESS_ID, TYPE)
|
|
|
+ ADDRESS_ID, TYPE, DEPARTMENT
|
|
|
+ )
|
|
|
values (#{priceId,jdbcType=DECIMAL}, #{shipperId,jdbcType=DECIMAL}, #{carrierId,jdbcType=DECIMAL},
|
|
|
#{lineId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, #{materialId,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},
|
|
|
- #{addressId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL})
|
|
|
+ #{addressId,jdbcType=DECIMAL}, #{type,jdbcType=DECIMAL}, #{department,jdbcType=DECIMAL}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
|
insert into AMS_CONTRACT_TRANSPORT_PRICE
|
|
@@ -271,6 +283,9 @@
|
|
|
<if test="type != null">
|
|
|
TYPE,
|
|
|
</if>
|
|
|
+ <if test="department != null">
|
|
|
+ DEPARTMENT,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="priceId != null">
|
|
@@ -324,6 +339,9 @@
|
|
|
<if test="type != null">
|
|
|
#{type,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="department != null">
|
|
|
+ #{department,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
@@ -343,7 +361,8 @@
|
|
|
INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
|
|
|
DELETED = #{deleted,jdbcType=DECIMAL},
|
|
|
ADDRESS_ID = #{addressId,jdbcType=DECIMAL},
|
|
|
- TYPE = #{type,jdbcType=DECIMAL}
|
|
|
+ TYPE = #{type,jdbcType=DECIMAL},
|
|
|
+ DEPARTMENT = #{department,jdbcType=DECIMAL}
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsContractTransportPrice">
|
|
@@ -397,20 +416,23 @@
|
|
|
<if test="type != null">
|
|
|
TYPE = #{type,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="department != null">
|
|
|
+ DEPARTMENT = #{department,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
where PRICE_ID = #{priceId,jdbcType=DECIMAL}
|
|
|
</select>
|
|
|
<select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="where"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
</select>
|
|
|
<select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
- <include refid="select"/>
|
|
|
- <include refid="whereLike"/>
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="whereLike" />
|
|
|
</select>
|
|
|
<insert id="batchInsert" parameterType="java.util.List">
|
|
|
insert into AMS_CONTRACT_TRANSPORT_PRICE
|
|
@@ -420,8 +442,8 @@
|
|
|
PRICE_VALUE, PRICE_DATE, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME,
|
|
|
UPDATE_TIME, INSERT_UPDATE_REMARK,
|
|
|
- DELETED, ADDRESS_ID, TYPE
|
|
|
- )
|
|
|
+ DELETED, ADDRESS_ID, TYPE,
|
|
|
+ DEPARTMENT)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.priceId,jdbcType=DECIMAL},
|
|
@@ -430,90 +452,94 @@
|
|
|
#{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}
|
|
|
- from dual
|
|
|
+ #{item.deleted,jdbcType=DECIMAL}, #{item.addressId,jdbcType=DECIMAL}, #{item.type,jdbcType=DECIMAL},
|
|
|
+ #{item.department,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
update AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
set
|
|
|
PRICE_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.priceId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,SHIPPER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,CARRIER_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,LINE_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,CAPACITY_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,MATERIAL_ID=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=CHAR}
|
|
|
</foreach>
|
|
|
,PRICE_TON_KILOMETER=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.priceTonKilometer,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,PRICE_VALUE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.priceValue,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,PRICE_DATE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.priceDate,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,INSERT_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,UPDATE_USERNAME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,UPDATE_TIME=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
</foreach>
|
|
|
,INSERT_UPDATE_REMARK=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
,DELETED=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <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=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.addressId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
,TYPE=
|
|
|
- <foreach collection="list" item="item" index="index" separator=" " open="case PRICE_ID" close="end">
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
when #{item.priceId,jdbcType=DECIMAL} then #{item.type,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,DEPARTMENT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case PRICE_ID" separator=" ">
|
|
|
+ when #{item.priceId,jdbcType=DECIMAL} then #{item.department,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where PRICE_ID in
|
|
|
- <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.priceId,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
<delete id="batchDelete" parameterType="java.util.List">
|
|
|
delete from AMS_CONTRACT_TRANSPORT_PRICE
|
|
|
where PRICE_ID in
|
|
|
- <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|