Browse Source

版本切换

anderx 3 years ago
parent
commit
74452f796d

+ 37 - 91
src/main/java/com/goafanti/common/dao/TChangeTaskMapper.java

@@ -8,96 +8,42 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface TChangeTaskMapper {
+    int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	long countByExample(TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int deleteByExample(TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int insert(TChangeTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int insertSelective(TChangeTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	List<TChangeTask> selectByExample(TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	TChangeTask selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") TChangeTask record, @Param("example") TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByExample(@Param("record") TChangeTask record, @Param("example") TChangeTaskExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByPrimaryKeySelective(TChangeTask record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_task
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	int updateByPrimaryKey(TChangeTask record);
-
-	void insertSelectiveList(@Param("list")List<TChangeTask> list);
-
-	List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);
-
-	/**
-	 *
-	 * @param tid 变更项目id
-	 * @param sid 变更拆分父项目id
-	 * @param type 处理类型
-	 * @return
-	 */
-	int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type);
-
-	int deleteByTid(Integer tid);
-
-	/**
-	 *   获取变更子项�???
-	 * @param splitSuper
-	 * @param cid
-	 * @return
-	 */
-	List<TChangeTask> selectBySuper(@Param("splitSuper")Integer splitSuper, @Param("cid")Integer cid);
-
-
-	TChangeTask selectBytid(Integer id);
+    int insert(TChangeTask record);
+
+    int insertSelective(TChangeTask record);
+
+    TChangeTask selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TChangeTask record);
+
+    int updateByPrimaryKey(TChangeTask record);
+
+
+    void insertSelectiveList(@Param("list")List<TChangeTask> list);
+
+    List<TChangeTaskOut> selectByCid(@Param("id")Integer id, @Param("splitStatus")Integer splitStatus);
+
+    /**
+     *
+     * @param tid 变更项目id
+     * @param sid 变更拆分父项目id
+     * @param type 处理类型
+     * @return
+     */
+    int updateByTid(@Param("tid")Integer tid,@Param("sid")Integer sid,@Param("cid")Integer cid,@Param("type")Integer type);
+
+    int deleteByTid(Integer tid);
+
+    /**
+     *   获取变更子项�???
+     * @param splitSuper
+     * @param cid
+     * @return
+     */
+    List<TChangeTask> selectBySuper(@Param("splitSuper")Integer splitSuper, @Param("cid")Integer cid);
+
+
+    TChangeTask selectBytid(Integer id);
 }

+ 60 - 251
src/main/java/com/goafanti/common/mapper/TChangeTaskMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TChangeTaskMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:53:59 CST 2020.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="cid" jdbcType="INTEGER" property="cid" />
@@ -24,160 +19,45 @@
     <result column="receiver_name" jdbcType="VARCHAR" property="receiverName" />
     <result column="official_cost" jdbcType="INTEGER" property="officialCost" />
     <result column="cost_reduction" jdbcType="INTEGER" property="costReduction" />
+    <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="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
   </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:53:59 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     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
+    task_comment, `type`, create_time, split_status, split_super, receiver_name, official_cost,
+    cost_reduction, service_life, service_year, year_sum, picture_url
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TChangeTaskExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from t_change_task
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     select
     <include refid="Base_Column_List" />
     from t_change_task
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     delete from t_change_task
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TChangeTaskExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    delete from t_change_task
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     insert into t_change_task (id, tid, cid,
       order_no, main, commodity_id,
       commodity_name, commodity_quantity, commodity_price,
-      task_comment, type, create_time,
+      task_comment, `type`, create_time,
       split_status, split_super, receiver_name,
-      official_cost, cost_reduction)
+      official_cost, cost_reduction, service_life,
+      service_year, year_sum, picture_url
+      )
     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})
+      #{officialCost,jdbcType=INTEGER}, #{costReduction,jdbcType=INTEGER}, #{serviceLife,jdbcType=VARCHAR},
+      #{serviceYear,jdbcType=VARCHAR}, #{yearSum,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     insert into t_change_task
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -211,7 +91,7 @@
         task_comment,
       </if>
       <if test="type != null">
-        type,
+        `type`,
       </if>
       <if test="createTime != null">
         create_time,
@@ -231,6 +111,18 @@
       <if test="costReduction != null">
         cost_reduction,
       </if>
+      <if test="serviceLife != null">
+        service_life,
+      </if>
+      <if test="serviceYear != null">
+        service_year,
+      </if>
+      <if test="yearSum != null">
+        year_sum,
+      </if>
+      <if test="pictureUrl != null">
+        picture_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -284,117 +176,21 @@
       <if test="costReduction != null">
         #{costReduction,jdbcType=INTEGER},
       </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TChangeTaskExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    select count(*) from t_change_task
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    update t_change_task
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.tid != null">
-        tid = #{record.tid,jdbcType=INTEGER},
-      </if>
-      <if test="record.cid != null">
-        cid = #{record.cid,jdbcType=INTEGER},
-      </if>
-      <if test="record.orderNo != null">
-        order_no = #{record.orderNo,jdbcType=VARCHAR},
+      <if test="serviceLife != null">
+        #{serviceLife,jdbcType=VARCHAR},
       </if>
-      <if test="record.main != null">
-        main = #{record.main,jdbcType=INTEGER},
+      <if test="serviceYear != null">
+        #{serviceYear,jdbcType=VARCHAR},
       </if>
-      <if test="record.commodityId != null">
-        commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      <if test="yearSum != null">
+        #{yearSum,jdbcType=INTEGER},
       </if>
-      <if test="record.commodityName != null">
-        commodity_name = #{record.commodityName,jdbcType=VARCHAR},
+      <if test="pictureUrl != null">
+        #{pictureUrl,jdbcType=VARCHAR},
       </if>
-      <if test="record.commodityQuantity != null">
-        commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
-      </if>
-      <if test="record.commodityPrice != null">
-        commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
-      </if>
-      <if test="record.taskComment != null">
-        task_comment = #{record.taskComment,jdbcType=VARCHAR},
-      </if>
-      <if test="record.type != null">
-        type = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.splitStatus != null">
-        split_status = #{record.splitStatus,jdbcType=INTEGER},
-      </if>
-      <if test="record.splitSuper != null">
-        split_super = #{record.splitSuper,jdbcType=INTEGER},
-      </if>
-      <if test="record.receiverName != null">
-        receiver_name = #{record.receiverName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.officialCost != null">
-        official_cost = #{record.officialCost,jdbcType=INTEGER},
-      </if>
-      <if test="record.costReduction != null">
-        cost_reduction = #{record.costReduction,jdbcType=INTEGER},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
-    update t_change_task
-    set id = #{record.id,jdbcType=INTEGER},
-      tid = #{record.tid,jdbcType=INTEGER},
-      cid = #{record.cid,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=VARCHAR},
-      main = #{record.main,jdbcType=INTEGER},
-      commodity_id = #{record.commodityId,jdbcType=VARCHAR},
-      commodity_name = #{record.commodityName,jdbcType=VARCHAR},
-      commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
-      commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
-      task_comment = #{record.taskComment,jdbcType=VARCHAR},
-      type = #{record.type,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      split_status = #{record.splitStatus,jdbcType=INTEGER},
-      split_super = #{record.splitSuper,jdbcType=INTEGER},
-      receiver_name = #{record.receiverName,jdbcType=VARCHAR},
-      official_cost = #{record.officialCost,jdbcType=INTEGER},
-      cost_reduction = #{record.costReduction,jdbcType=INTEGER}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
+    </trim>
+  </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     update t_change_task
     <set>
       <if test="tid != null">
@@ -425,7 +221,7 @@
         task_comment = #{taskComment,jdbcType=VARCHAR},
       </if>
       <if test="type != null">
-        type = #{type,jdbcType=INTEGER},
+        `type` = #{type,jdbcType=INTEGER},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -445,15 +241,22 @@
       <if test="costReduction != null">
         cost_reduction = #{costReduction,jdbcType=INTEGER},
       </if>
+      <if test="serviceLife != null">
+        service_life = #{serviceLife,jdbcType=VARCHAR},
+      </if>
+      <if test="serviceYear != null">
+        service_year = #{serviceYear,jdbcType=VARCHAR},
+      </if>
+      <if test="yearSum != null">
+        year_sum = #{yearSum,jdbcType=INTEGER},
+      </if>
+      <if test="pictureUrl != null">
+        picture_url = #{pictureUrl,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TChangeTask">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Oct 16 15:54:00 CST 2020.
-    -->
     update t_change_task
     set tid = #{tid,jdbcType=INTEGER},
       cid = #{cid,jdbcType=INTEGER},
@@ -464,13 +267,17 @@
       commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
       commodity_price = #{commodityPrice,jdbcType=DECIMAL},
       task_comment = #{taskComment,jdbcType=VARCHAR},
-      type = #{type,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       split_status = #{splitStatus,jdbcType=INTEGER},
       split_super = #{splitSuper,jdbcType=INTEGER},
       receiver_name = #{receiverName,jdbcType=VARCHAR},
       official_cost = #{officialCost,jdbcType=INTEGER},
-      cost_reduction = #{costReduction,jdbcType=INTEGER}
+      cost_reduction = #{costReduction,jdbcType=INTEGER},
+      service_life = #{serviceLife,jdbcType=VARCHAR},
+      service_year = #{serviceYear,jdbcType=VARCHAR},
+      year_sum = #{yearSum,jdbcType=INTEGER},
+      picture_url = #{pictureUrl,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -478,20 +285,22 @@
     insert into t_change_task ( tid, cid, split_status,
       order_no, commodity_id, commodity_name,
       commodity_quantity, commodity_price, task_comment,
-        split_super , receiver_name, create_time)
+        split_super , receiver_name, create_time,service_life,
+    service_year, year_sum, picture_url)
     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.splitSuper,jdbcType=INTEGER}, #{item.receiverName,jdbcType=VARCHAR}, now(), #{item.serviceLife,jdbcType=VARCHAR},
+      #{item.serviceYear,jdbcType=VARCHAR}, #{item.yearSum,jdbcType=INTEGER}, #{item.pictureUrl,jdbcType=VARCHAR})
     </foreach>
   </insert>
   <select id="selectByCid" resultType="com.goafanti.order.bo.TChangeTaskOut">
     select a.id,a.order_no as orderNo,a.main, c.cname,c.sort cSort,a.commodity_name as commodityName,a.official_cost officialCost,
 	a.official_cost officialCost, a.commodity_quantity as commodityQuantity,i.price,a.commodity_id as commodityId,a.type,a.tid,
 	a.receiver_name receiverName, a.task_comment as taskComment ,a.commodity_price as commodityPrice,a.split_status splitStatus,
-	a.split_super splitSuper
+	a.split_super splitSuper,a.picture_url pictureUrl, a.service_life serviceLife ,a.service_year serviceYear,a.year_sum yearSum
     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

+ 5 - 3
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -813,10 +813,12 @@
            c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,a.receiver_name receiverName,
            a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
            a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,  a.task_receiver as taskReceiver ,
-           a.split_status splitStatus,a.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime,a.patent_type patentType
+           a.split_status splitStatus,a.split_super splitSuper,a.split_aid splitAid,a.split_time splitTime,a.patent_type patentType,
+           a.picture_url pictureUrl, ttm.service_life serviceLife ,ttm.service_year serviceYear,ttm.year_sum yearSum
     from t_order_task a left join business_project b on a.commodity_id=b.id left join t_order_new e on a.order_no=e.order_no
-                        left join admin f on e.salesman_id=f.id left join department g on e.order_dep=g.id left join user h on e.buyer_id=h.id
-                        left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
+    left join admin f on e.salesman_id=f.id left join department g on e.order_dep=g.id left join user h on e.buyer_id=h.id
+    left join business_project i on a.commodity_id=i.id left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
+    left join t_task_member ttm on a.id=ttm.tid
     where a.super_id is null  and  a.order_no= #{orderNo,jdbcType=VARCHAR} order by a.id
   </select>
 

+ 280 - 393
src/main/java/com/goafanti/common/model/TChangeTask.java

@@ -1,399 +1,286 @@
 package com.goafanti.common.model;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
-public class TChangeTask {
-
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.tid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer tid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.cid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer cid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.order_no
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String orderNo;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.main
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer main;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String commodityId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String commodityName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_quantity
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer commodityQuantity;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.commodity_price
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private BigDecimal commodityPrice;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.task_comment
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String taskComment;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.type
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer type;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.create_time
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.split_status
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer splitStatus;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.split_super
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer splitSuper;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.receiver_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private String receiverName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.official_cost
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer officialCost;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_task.cost_reduction
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	private Integer costReduction;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.id
-	 * @return  the value of t_change_task.id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.id
-	 * @param id  the value for t_change_task.id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setId(Integer id) {
-		this.id = id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.tid
-	 * @return  the value of t_change_task.tid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getTid() {
-		return tid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.tid
-	 * @param tid  the value for t_change_task.tid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setTid(Integer tid) {
-		this.tid = tid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.cid
-	 * @return  the value of t_change_task.cid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getCid() {
-		return cid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.cid
-	 * @param cid  the value for t_change_task.cid
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCid(Integer cid) {
-		this.cid = cid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.order_no
-	 * @return  the value of t_change_task.order_no
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getOrderNo() {
-		return orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.order_no
-	 * @param orderNo  the value for t_change_task.order_no
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setOrderNo(String orderNo) {
-		this.orderNo = orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.main
-	 * @return  the value of t_change_task.main
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getMain() {
-		return main;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.main
-	 * @param main  the value for t_change_task.main
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setMain(Integer main) {
-		this.main = main;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_id
-	 * @return  the value of t_change_task.commodity_id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getCommodityId() {
-		return commodityId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_id
-	 * @param commodityId  the value for t_change_task.commodity_id
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityId(String commodityId) {
-		this.commodityId = commodityId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_name
-	 * @return  the value of t_change_task.commodity_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getCommodityName() {
-		return commodityName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_name
-	 * @param commodityName  the value for t_change_task.commodity_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityName(String commodityName) {
-		this.commodityName = commodityName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_quantity
-	 * @return  the value of t_change_task.commodity_quantity
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getCommodityQuantity() {
-		return commodityQuantity;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_quantity
-	 * @param commodityQuantity  the value for t_change_task.commodity_quantity
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityQuantity(Integer commodityQuantity) {
-		this.commodityQuantity = commodityQuantity;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.commodity_price
-	 * @return  the value of t_change_task.commodity_price
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public BigDecimal getCommodityPrice() {
-		return commodityPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.commodity_price
-	 * @param commodityPrice  the value for t_change_task.commodity_price
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCommodityPrice(BigDecimal commodityPrice) {
-		this.commodityPrice = commodityPrice;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.task_comment
-	 * @return  the value of t_change_task.task_comment
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getTaskComment() {
-		return taskComment;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.task_comment
-	 * @param taskComment  the value for t_change_task.task_comment
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setTaskComment(String taskComment) {
-		this.taskComment = taskComment;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.type
-	 * @return  the value of t_change_task.type
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getType() {
-		return type;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.type
-	 * @param type  the value for t_change_task.type
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setType(Integer type) {
-		this.type = type;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.create_time
-	 * @return  the value of t_change_task.create_time
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.create_time
-	 * @param createTime  the value for t_change_task.create_time
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.split_status
-	 * @return  the value of t_change_task.split_status
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getSplitStatus() {
-		return splitStatus;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.split_status
-	 * @param splitStatus  the value for t_change_task.split_status
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setSplitStatus(Integer splitStatus) {
-		this.splitStatus = splitStatus;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.split_super
-	 * @return  the value of t_change_task.split_super
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getSplitSuper() {
-		return splitSuper;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.split_super
-	 * @param splitSuper  the value for t_change_task.split_super
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setSplitSuper(Integer splitSuper) {
-		this.splitSuper = splitSuper;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.receiver_name
-	 * @return  the value of t_change_task.receiver_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public String getReceiverName() {
-		return receiverName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.receiver_name
-	 * @param receiverName  the value for t_change_task.receiver_name
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setReceiverName(String receiverName) {
-		this.receiverName = receiverName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.official_cost
-	 * @return  the value of t_change_task.official_cost
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getOfficialCost() {
-		return officialCost;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.official_cost
-	 * @param officialCost  the value for t_change_task.official_cost
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setOfficialCost(Integer officialCost) {
-		this.officialCost = officialCost;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_task.cost_reduction
-	 * @return  the value of t_change_task.cost_reduction
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public Integer getCostReduction() {
-		return costReduction;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_task.cost_reduction
-	 * @param costReduction  the value for t_change_task.cost_reduction
-	 * @mbg.generated  Fri Oct 16 15:53:59 CST 2020
-	 */
-	public void setCostReduction(Integer costReduction) {
-		this.costReduction = costReduction;
-	}
+/**
+ * t_change_task
+ * @author 
+ */
+public class TChangeTask implements Serializable {
+    /**
+     * 任务编号
+     */
+    private Integer id;
+
+    /**
+     * 订单任务编号
+     */
+    private Integer tid;
+
+    /**
+     * 变更编号
+     */
+    private Integer cid;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+    /**
+     * 是否为主要任务 0-否,1-是
+     */
+    private Integer main;
+
+    /**
+     * 商品id
+     */
+    private String commodityId;
+
+    /**
+     * 商品名称(冗余)
+     */
+    private String commodityName;
+
+    /**
+     * 商品数量
+     */
+    private Integer commodityQuantity;
+
+    /**
+     * 合同商品价格
+     */
+    private BigDecimal commodityPrice;
+
+    /**
+     * 任务说明
+     */
+    private String taskComment;
+
+    /**
+     * 状态 0正常 1新增 2修改 3删除 
+     */
+    private Integer type;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 0否 1父拆分 2子拆分
+     */
+    private Integer splitStatus;
+
+    /**
+     * 拆分父id
+     */
+    private Integer splitSuper;
+
+    /**
+     * 负责人
+     */
+    private String receiverName;
+
+    /**
+     * 官费 0否 1有
+     */
+    private Integer officialCost;
+
+    /**
+     * 费减 0否 1有 
+     */
+    private Integer costReduction;
+
+    /**
+     * 服务年限
+     */
+    private String serviceLife;
+
+    /**
+     * 本次年份
+     */
+    private String serviceYear;
+
+    /**
+     * 服务年限计数
+     */
+    private Integer yearSum;
+
+    /**
+     * 图片地址
+     */
+    private String pictureUrl;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
+    public Integer getCid() {
+        return cid;
+    }
+
+    public void setCid(Integer cid) {
+        this.cid = cid;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public Integer getMain() {
+        return main;
+    }
+
+    public void setMain(Integer main) {
+        this.main = main;
+    }
+
+    public String getCommodityId() {
+        return commodityId;
+    }
+
+    public void setCommodityId(String commodityId) {
+        this.commodityId = commodityId;
+    }
+
+    public String getCommodityName() {
+        return commodityName;
+    }
+
+    public void setCommodityName(String commodityName) {
+        this.commodityName = commodityName;
+    }
+
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+    public String getTaskComment() {
+        return taskComment;
+    }
+
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getSplitStatus() {
+        return splitStatus;
+    }
+
+    public void setSplitStatus(Integer splitStatus) {
+        this.splitStatus = splitStatus;
+    }
+
+    public Integer getSplitSuper() {
+        return splitSuper;
+    }
+
+    public void setSplitSuper(Integer splitSuper) {
+        this.splitSuper = splitSuper;
+    }
+
+    public String getReceiverName() {
+        return receiverName;
+    }
+
+    public void setReceiverName(String receiverName) {
+        this.receiverName = receiverName;
+    }
+
+    public Integer getOfficialCost() {
+        return officialCost;
+    }
+
+    public void setOfficialCost(Integer officialCost) {
+        this.officialCost = officialCost;
+    }
+
+    public Integer getCostReduction() {
+        return costReduction;
+    }
+
+    public void setCostReduction(Integer costReduction) {
+        this.costReduction = costReduction;
+    }
+
+    public String getServiceLife() {
+        return serviceLife;
+    }
+
+    public void setServiceLife(String serviceLife) {
+        this.serviceLife = serviceLife;
+    }
+
+    public String getServiceYear() {
+        return serviceYear;
+    }
+
+    public void setServiceYear(String serviceYear) {
+        this.serviceYear = serviceYear;
+    }
+
+    public Integer getYearSum() {
+        return yearSum;
+    }
+
+    public void setYearSum(Integer yearSum) {
+        this.yearSum = yearSum;
+    }
+
+    public String getPictureUrl() {
+        return pictureUrl;
+    }
+
+    public void setPictureUrl(String pictureUrl) {
+        this.pictureUrl = pictureUrl;
+    }
 }

+ 32 - 1
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -78,7 +78,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	@Autowired
 	private OrderRefundInvoiceMapper	orderRefundInvoiceMapper;
 	@Autowired
-	private OrganizationManagementMapper	organizationManagementMapper;
+	private TTaskMemberMapper	tTaskMemberMapper;
 	@Autowired
 	private NewOrderRefundMapper	newOrderRefundMapper;
 	@Autowired
@@ -171,6 +171,12 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 					ck.setReceiverName(tt.getReceiverName());
 					ck.setMain(tt.getMain());
 					ck.setTid(tt.getId());
+					if (tt.getPictureUrl()!=null)ck.setPictureUrl(tt.getPictureUrl());
+					if(tt.getServiceLife()!=null){
+						ck.setServiceLife(tt.getServiceLife());
+						ck.setServiceYear(tt.getServiceYear());
+						ck.setYearSum(tt.getYearSum());
+					}
 					listck.add(ck);
 				}
 				tChangeTaskMapper.insertSelectiveList(listck);
@@ -731,7 +737,12 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			ot.setTaskComment(cd.getTaskComment());
 			ot.setMain(cd.getMain());
 			ot.setTaskStatus(0);
+			if (cd.getPictureUrl()!=null)ot.setPictureUrl(cd.getPictureUrl());
+
 			tOrderTaskMapper.insertSelective(ot);
+			if (cd.getServiceLife()!=null){
+				addTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum());
+			}
 			cd.setTid(ot.getId());
 			tChangeTaskMapper.updateByPrimaryKeySelective(cd);
 			tChangeDunMapper.updateByCTid(cd.getId(), ot.getId());
@@ -740,6 +751,9 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				ot.setCommodityPrice(cd.getCommodityPrice());
 				ot.setCommodityQuantity(cd.getCommodityQuantity());
 				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
+				if (cd.getServiceLife()!=null){
+					updateTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum());
+				}
 			}else if(cd.getType()==3) {
 				tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
 			}
@@ -775,6 +789,23 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		}
 	}
 
+	private void updateTaskMember(Integer id, String serviceLife, String serviceYear, Integer yearSum) {
+		TTaskMember ttm=new TTaskMember();
+		ttm.setTid(id);
+		ttm.setServiceLife(serviceLife);
+		ttm.setServiceYear(serviceYear);
+		ttm.setYearSum(yearSum);
+		tTaskMemberMapper.updateByTid(ttm);
+	}
+
+	private void addTaskMember(Integer id, String serviceLife, String serviceYear, Integer yearSum) {
+		TTaskMember ttm=new TTaskMember();
+		ttm.setTid(id);
+		ttm.setServiceLife(serviceLife);
+		ttm.setServiceYear(serviceYear);
+		ttm.setYearSum(yearSum);
+		tTaskMemberMapper.insertSelective(ttm);
+	}
 
 
 	@Override