|
|
@@ -22,11 +22,12 @@
|
|
|
<result column="service_life" jdbcType="VARCHAR" property="serviceLife" />
|
|
|
<result column="service_year" jdbcType="VARCHAR" property="serviceYear" />
|
|
|
<result column="year_sum" jdbcType="INTEGER" property="yearSum" />
|
|
|
+ <result column="contract_term" jdbcType="VARCHAR" property="contractTerm" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id, tid, cid, order_no, main, commodity_id, commodity_name, commodity_quantity, commodity_price,
|
|
|
task_comment, `type`, create_time, split_status, split_super, receiver_name, official_cost,
|
|
|
- cost_reduction, service_life, service_year, year_sum
|
|
|
+ cost_reduction, service_life, service_year, year_sum, contract_term
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -38,28 +39,25 @@
|
|
|
delete from t_change_task
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.goafanti.common.model.TChangeTask">
|
|
|
- insert into t_change_task (id, tid, cid,
|
|
|
- order_no, main, commodity_id,
|
|
|
- commodity_name, commodity_quantity, commodity_price,
|
|
|
- task_comment, `type`, create_time,
|
|
|
- split_status, split_super, receiver_name,
|
|
|
- official_cost, cost_reduction, service_life,
|
|
|
- service_year, year_sum)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER},
|
|
|
- #{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR},
|
|
|
- #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL},
|
|
|
- #{taskComment,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
- #{splitStatus,jdbcType=INTEGER}, #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR},
|
|
|
- #{officialCost,jdbcType=INTEGER}, #{costReduction,jdbcType=INTEGER}, #{serviceLife,jdbcType=VARCHAR},
|
|
|
- #{serviceYear,jdbcType=VARCHAR}, #{yearSum,jdbcType=INTEGER})
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TChangeTask" useGeneratedKeys="true">
|
|
|
+ insert into t_change_task (tid, cid, order_no,
|
|
|
+ main, commodity_id, commodity_name,
|
|
|
+ commodity_quantity, commodity_price, task_comment,
|
|
|
+ `type`, create_time, split_status,
|
|
|
+ split_super, receiver_name, official_cost,
|
|
|
+ cost_reduction, service_life, service_year,
|
|
|
+ year_sum, contract_term)
|
|
|
+ values (#{tid,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR},
|
|
|
+ #{main,jdbcType=INTEGER}, #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR},
|
|
|
+ #{commodityQuantity,jdbcType=INTEGER}, #{commodityPrice,jdbcType=DECIMAL}, #{taskComment,jdbcType=VARCHAR},
|
|
|
+ #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{splitStatus,jdbcType=INTEGER},
|
|
|
+ #{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR}, #{officialCost,jdbcType=INTEGER},
|
|
|
+ #{costReduction,jdbcType=INTEGER}, #{serviceLife,jdbcType=VARCHAR}, #{serviceYear,jdbcType=VARCHAR},
|
|
|
+ #{yearSum,jdbcType=INTEGER}, #{contractTerm,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeTask">
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TChangeTask" useGeneratedKeys="true">
|
|
|
insert into t_change_task
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
<if test="tid != null">
|
|
|
tid,
|
|
|
</if>
|
|
|
@@ -117,11 +115,11 @@
|
|
|
<if test="yearSum != null">
|
|
|
year_sum,
|
|
|
</if>
|
|
|
+ <if test="contractTerm != null">
|
|
|
+ contract_term,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
<if test="tid != null">
|
|
|
#{tid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
@@ -179,6 +177,9 @@
|
|
|
<if test="yearSum != null">
|
|
|
#{yearSum,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="contractTerm != null">
|
|
|
+ #{contractTerm,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TChangeTask">
|
|
|
@@ -241,6 +242,9 @@
|
|
|
<if test="yearSum != null">
|
|
|
year_sum = #{yearSum,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="contractTerm != null">
|
|
|
+ contract_term = #{contractTerm,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -264,7 +268,8 @@
|
|
|
cost_reduction = #{costReduction,jdbcType=INTEGER},
|
|
|
service_life = #{serviceLife,jdbcType=VARCHAR},
|
|
|
service_year = #{serviceYear,jdbcType=VARCHAR},
|
|
|
- year_sum = #{yearSum,jdbcType=INTEGER}
|
|
|
+ year_sum = #{yearSum,jdbcType=INTEGER},
|
|
|
+ contract_term = #{contractTerm,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -273,14 +278,15 @@
|
|
|
order_no, commodity_id, commodity_name,
|
|
|
commodity_quantity, commodity_price, task_comment,
|
|
|
split_super , receiver_name, create_time,service_life,
|
|
|
- service_year, year_sum, picture_url)
|
|
|
+ service_year, year_sum, contract_term)
|
|
|
values
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
( #{item.tid,jdbcType=INTEGER}, #{item.cid,jdbcType=INTEGER}, #{item.splitStatus,jdbcType=INTEGER},
|
|
|
#{item.orderNo,jdbcType=VARCHAR}, #{item.commodityId,jdbcType=VARCHAR}, #{item.commodityName,jdbcType=VARCHAR},
|
|
|
#{item.commodityQuantity,jdbcType=INTEGER}, #{item.commodityPrice,jdbcType=DECIMAL}, #{item.taskComment,jdbcType=VARCHAR},
|
|
|
#{item.splitSuper,jdbcType=INTEGER}, #{item.receiverName,jdbcType=VARCHAR}, now(), #{item.serviceLife,jdbcType=VARCHAR},
|
|
|
- #{item.serviceYear,jdbcType=VARCHAR}, #{item.yearSum,jdbcType=INTEGER}, #{item.pictureUrl,jdbcType=VARCHAR})
|
|
|
+ #{item.serviceYear,jdbcType=VARCHAR}, #{item.yearSum,jdbcType=INTEGER}, #{item.pictureUrl,jdbcType=VARCHAR},
|
|
|
+ #{item.contractTerm,jdbcType=VARCHAR})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
<select id="selectByCid" resultType="com.goafanti.order.bo.TChangeTaskOut">
|