Browse Source

变更新增项目、修改项目新增字段

anderx 3 years ago
parent
commit
e803e41be0

+ 52 - 20
src/main/java/com/goafanti/common/mapper/TChangeTaskMapper.xml

@@ -23,11 +23,14 @@
     <result column="service_year" jdbcType="VARCHAR" property="serviceYear" />
     <result column="year_sum" jdbcType="INTEGER" property="yearSum" />
     <result column="contract_term" jdbcType="VARCHAR" property="contractTerm" />
+    <result column="declaration_batch" jdbcType="INTEGER" property="declarationBatch" />
+    <result column="patent_type" jdbcType="INTEGER" property="patentType" />
   </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
+    cost_reduction, service_life, service_year, year_sum, contract_term, declaration_batch,
+    patent_type
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -39,25 +42,30 @@
     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,
-      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 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, contract_term,
+      declaration_batch, patent_type)
+    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}, #{contractTerm,jdbcType=VARCHAR},
+      #{declarationBatch,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER})
   </insert>
-  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TChangeTask" useGeneratedKeys="true">
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeTask">
     insert into t_change_task
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="tid != null">
         tid,
       </if>
@@ -118,8 +126,17 @@
       <if test="contractTerm != null">
         contract_term,
       </if>
+      <if test="declarationBatch != null">
+        declaration_batch,
+      </if>
+      <if test="patentType != null">
+        patent_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
       <if test="tid != null">
         #{tid,jdbcType=INTEGER},
       </if>
@@ -180,6 +197,12 @@
       <if test="contractTerm != null">
         #{contractTerm,jdbcType=VARCHAR},
       </if>
+      <if test="declarationBatch != null">
+        #{declarationBatch,jdbcType=INTEGER},
+      </if>
+      <if test="patentType != null">
+        #{patentType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TChangeTask">
@@ -245,6 +268,12 @@
       <if test="contractTerm != null">
         contract_term = #{contractTerm,jdbcType=VARCHAR},
       </if>
+      <if test="declarationBatch != null">
+        declaration_batch = #{declarationBatch,jdbcType=INTEGER},
+      </if>
+      <if test="patentType != null">
+        patent_type = #{patentType,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -269,7 +298,9 @@
       service_life = #{serviceLife,jdbcType=VARCHAR},
       service_year = #{serviceYear,jdbcType=VARCHAR},
       year_sum = #{yearSum,jdbcType=INTEGER},
-      contract_term = #{contractTerm,jdbcType=VARCHAR}
+      contract_term = #{contractTerm,jdbcType=VARCHAR},
+      declaration_batch = #{declarationBatch,jdbcType=INTEGER},
+      patent_type = #{patentType,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -278,14 +309,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, contract_term)
+    service_year, year_sum, contract_term,declaration_batch,patent_type)
     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.contractTerm,jdbcType=VARCHAR})
+      #{item.serviceYear,jdbcType=VARCHAR}, #{item.yearSum,jdbcType=INTEGER},#{item.contractTerm,jdbcType=VARCHAR},
+      #{declarationBatch,jdbcType=INTEGER},#{patentType,jdbcType=INTEGER})
     </foreach>
   </insert>
   <select id="selectByCid" resultType="com.goafanti.order.bo.TChangeTaskOut">

+ 26 - 0
src/main/java/com/goafanti/common/model/TChangeTask.java

@@ -114,6 +114,16 @@ public class TChangeTask implements Serializable {
      */
     private String contractTerm;
 
+    /**
+     * 申报批次
+     */
+    private Integer declarationBatch;
+
+    /**
+     * 专利分类 0申请 1变更 2复审 3优先权 4恢复请求权 5无效宣告请求费 6强制许可请求费 7 强制许可使用裁决请求费 8登录、印刷费、印花税
+     */
+    private Integer patentType;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -283,4 +293,20 @@ public class TChangeTask implements Serializable {
     public void setContractTerm(String contractTerm) {
         this.contractTerm = contractTerm;
     }
+
+    public Integer getDeclarationBatch() {
+        return declarationBatch;
+    }
+
+    public void setDeclarationBatch(Integer declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+
+    public Integer getPatentType() {
+        return patentType;
+    }
+
+    public void setPatentType(Integer patentType) {
+        this.patentType = patentType;
+    }
 }

+ 4 - 0
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -770,6 +770,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			ot.setTaskComment(cd.getTaskComment());
 			ot.setMain(cd.getMain());
 			ot.setTaskStatus(0);
+			if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
+			if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
 			tOrderTaskMapper.insertSelective(ot);
 			if (cd.getServiceLife()!=null){
 				addTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum(),cd.getContractTerm());
@@ -781,6 +783,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				ot.setId(cd.getTid());
 				ot.setCommodityPrice(cd.getCommodityPrice());
 				ot.setCommodityQuantity(cd.getCommodityQuantity());
+				if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
+				if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
 				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
 				if (cd.getServiceLife()!=null){
 					updateTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum(),cd.getContractTerm());