|
|
@@ -26,12 +26,15 @@
|
|
|
<result column="declaration_batch" jdbcType="INTEGER" property="declarationBatch" />
|
|
|
<result column="patent_type" jdbcType="INTEGER" property="patentType" />
|
|
|
<result column="change_split_super" jdbcType="INTEGER" property="changeSplitSuper" />
|
|
|
+ <result column="last_year" jdbcType="VARCHAR" property="lastYear" />
|
|
|
+ <result column="last_year_capital" jdbcType="DECIMAL" property="lastYearCapital" />
|
|
|
+ <result column="last_year_income" jdbcType="DECIMAL" property="lastYearIncome" />
|
|
|
</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, contract_term, declaration_batch,
|
|
|
- patent_type, change_split_super
|
|
|
+ patent_type, change_split_super, last_year, last_year_capital, last_year_income
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -43,7 +46,6 @@
|
|
|
delete from t_change_task
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
-
|
|
|
<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,
|
|
|
@@ -52,7 +54,8 @@
|
|
|
split_super, receiver_name, official_cost,
|
|
|
cost_reduction, service_life, service_year,
|
|
|
year_sum, contract_term, declaration_batch,
|
|
|
- patent_type, change_split_super)
|
|
|
+ patent_type, change_split_super, last_year,
|
|
|
+ last_year_capital, last_year_income)
|
|
|
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},
|
|
|
@@ -60,7 +63,8 @@
|
|
|
#{splitSuper,jdbcType=INTEGER}, #{receiverName,jdbcType=VARCHAR}, #{officialCost,jdbcType=INTEGER},
|
|
|
#{costReduction,jdbcType=INTEGER}, #{serviceLife,jdbcType=VARCHAR}, #{serviceYear,jdbcType=VARCHAR},
|
|
|
#{yearSum,jdbcType=INTEGER}, #{contractTerm,jdbcType=VARCHAR}, #{declarationBatch,jdbcType=INTEGER},
|
|
|
- #{patentType,jdbcType=INTEGER}, #{changeSplitSuper,jdbcType=INTEGER})
|
|
|
+ #{patentType,jdbcType=INTEGER}, #{changeSplitSuper,jdbcType=INTEGER}, #{lastYear,jdbcType=VARCHAR},
|
|
|
+ #{lastYearCapital,jdbcType=DECIMAL}, #{lastYearIncome,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TChangeTask" useGeneratedKeys="true">
|
|
|
insert into t_change_task
|
|
|
@@ -134,6 +138,15 @@
|
|
|
<if test="changeSplitSuper != null">
|
|
|
change_split_super,
|
|
|
</if>
|
|
|
+ <if test="lastYear != null">
|
|
|
+ last_year,
|
|
|
+ </if>
|
|
|
+ <if test="lastYearCapital != null">
|
|
|
+ last_year_capital,
|
|
|
+ </if>
|
|
|
+ <if test="lastYearIncome != null">
|
|
|
+ last_year_income,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="tid != null">
|
|
|
@@ -205,6 +218,15 @@
|
|
|
<if test="changeSplitSuper != null">
|
|
|
#{changeSplitSuper,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="lastYear != null">
|
|
|
+ #{lastYear,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="lastYearCapital != null">
|
|
|
+ #{lastYearCapital,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="lastYearIncome != null">
|
|
|
+ #{lastYearIncome,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TChangeTask">
|
|
|
@@ -279,6 +301,15 @@
|
|
|
<if test="changeSplitSuper != null">
|
|
|
change_split_super = #{changeSplitSuper,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="lastYear != null">
|
|
|
+ last_year = #{lastYear,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="lastYearCapital != null">
|
|
|
+ last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="lastYearIncome != null">
|
|
|
+ last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -306,7 +337,10 @@
|
|
|
contract_term = #{contractTerm,jdbcType=VARCHAR},
|
|
|
declaration_batch = #{declarationBatch,jdbcType=INTEGER},
|
|
|
patent_type = #{patentType,jdbcType=INTEGER},
|
|
|
- change_split_super = #{changeSplitSuper,jdbcType=INTEGER}
|
|
|
+ change_split_super = #{changeSplitSuper,jdbcType=INTEGER},
|
|
|
+ last_year = #{lastYear,jdbcType=VARCHAR},
|
|
|
+ last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
|
|
|
+ last_year_income = #{lastYearIncome,jdbcType=DECIMAL}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -315,7 +349,8 @@
|
|
|
order_no, commodity_id, commodity_name,
|
|
|
commodity_quantity, commodity_price, task_comment,
|
|
|
split_super , receiver_name, create_time,service_life,
|
|
|
- service_year, year_sum, contract_term,declaration_batch,patent_type)
|
|
|
+ service_year, year_sum, contract_term,declaration_batch,patent_type,
|
|
|
+ last_year,last_year_capital,last_year_income)
|
|
|
values
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
( #{item.tid,jdbcType=INTEGER}, #{item.cid,jdbcType=INTEGER}, #{item.splitStatus,jdbcType=INTEGER},
|
|
|
@@ -323,7 +358,8 @@
|
|
|
#{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.contractTerm,jdbcType=VARCHAR},
|
|
|
- #{item.declarationBatch,jdbcType=INTEGER},#{item.patentType,jdbcType=INTEGER})
|
|
|
+ #{item.declarationBatch,jdbcType=INTEGER},#{item.patentType,jdbcType=INTEGER},
|
|
|
+ #{item.lastYear,jdbcType=VARCHAR}, #{item.lastYearCapital,jdbcType=DECIMAL},#{item.lastYearIncome,jdbcType=DECIMAL})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
<select id="selectByCid" resultType="com.goafanti.order.bo.TChangeTaskOut">
|
|
|
@@ -332,7 +368,7 @@
|
|
|
a.receiver_name receiverName, a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,
|
|
|
a.split_super splitSuper, a.service_life serviceLife ,a.service_year serviceYear,a.year_sum yearSum,i.patent_transfer patentTransfer,
|
|
|
i.type taskType, a.declaration_batch declarationBatch,a.patent_type patentType,a.contract_term contractTerm,
|
|
|
- a.change_split_super changeSplitSuper
|
|
|
+ a.change_split_super changeSplitSuper,a.last_year lastYear,a.last_year_income lastYearIncome,a.last_year_capital lastYearCapital
|
|
|
from t_change_task a left join business_project i on a.commodity_id=i.id
|
|
|
left join business_category c on i.cid=c.id
|
|
|
where 1=1
|