Explorar o código

修改变更

Signed-off-by: anderx <312518615@qq.com>
anderx %!s(int64=6) %!d(string=hai) anos
pai
achega
48ffc88848

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="XMLMAPPER" />
-    <table schema="aft" tableName="t_changge_task"/>
+    <table schema="aft" tableName="new_order_change"/>
   </context>
 </generatorConfiguration>

+ 11 - 11
src/main/java/com/goafanti/common/dao/NewOrderChangeMapper.java

@@ -12,68 +12,68 @@ public interface NewOrderChangeMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	long countByExample(NewOrderChangeExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int deleteByExample(NewOrderChangeExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int insert(NewOrderChange record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int insertSelective(NewOrderChange record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	List<NewOrderChange> selectByExample(NewOrderChangeExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	NewOrderChange selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int updateByExampleSelective(@Param("record") NewOrderChange record,
 			@Param("example") NewOrderChangeExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int updateByExample(@Param("record") NewOrderChange record, @Param("example") NewOrderChangeExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int updateByPrimaryKeySelective(NewOrderChange record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	int updateByPrimaryKey(NewOrderChange record);
 

+ 22 - 22
src/main/java/com/goafanti/common/dao/TChangeDunMapper.java

@@ -10,68 +10,68 @@ import org.apache.ibatis.annotations.Param;
 public interface TChangeDunMapper {
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	long countByExample(TChangeDunExample example);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int deleteByExample(TChangeDunExample example);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int insert(TChangeDun record);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int insertSelective(TChangeDun record);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	List<TChangeDun> selectByExample(TChangeDunExample example);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	TChangeDun selectByPrimaryKey(Integer id);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int updateByExampleSelective(@Param("record") TChangeDun record, @Param("example") TChangeDunExample example);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int updateByExample(@Param("record") TChangeDun record, @Param("example") TChangeDunExample example);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int updateByPrimaryKeySelective(TChangeDun record);
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	int updateByPrimaryKey(TChangeDun record);
 

+ 1 - 0
src/main/java/com/goafanti/common/dao/TOrderNewMapper.java

@@ -97,4 +97,5 @@ public interface TOrderNewMapper {
 	Map<String, Object> countTotalAndActually(@Param("o")OrderListBo o, @Param("fids")List<String> fids);
 	TOrderBillNew getLastPayment(String orderNo);
 	int updateSalesmanId(@Param("aid")String aid, @Param("transferId")String transferId);
+	List<TOrderNewBo> selectUsedOrderByOrder(String orderNo);
 }

+ 39 - 23
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
@@ -34,12 +34,13 @@
     <result column="estimate_cost" jdbcType="DECIMAL" property="estimateCost" />
     <result column="estimate_refundable" jdbcType="DECIMAL" property="estimateRefundable" />
     <result column="refund_Invoice" jdbcType="DECIMAL" property="refundInvoice" />
+    <result column="used_order" jdbcType="VARCHAR" property="usedOrder" />
   </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 Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -73,7 +74,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -107,18 +108,19 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     id, order_no, process_state, status, type, create_time, remarks, voucher_url, total_amount, 
     settlement_amount, change_amount, applicant, dep_name, project_state, zxs_cost, zxs_remarks, 
     payment_time, payment_amount, invoice_time, invoice_amount, invoice_type, cw_cost, 
-    refundable_amount, cw_remarks, estimate_cost, estimate_refundable, refund_Invoice
+    refundable_amount, cw_remarks, estimate_cost, estimate_refundable, refund_Invoice, 
+    used_order
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     select
     <if test="distinct">
@@ -137,7 +139,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -148,7 +150,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     delete from new_order_change
     where id = #{id,jdbcType=INTEGER}
@@ -157,7 +159,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     delete from new_order_change
     <if test="_parameter != null">
@@ -168,7 +170,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     insert into new_order_change (id, order_no, process_state, 
       status, type, create_time, 
@@ -178,8 +180,8 @@
       zxs_remarks, payment_time, payment_amount, 
       invoice_time, invoice_amount, invoice_type, 
       cw_cost, refundable_amount, cw_remarks, 
-      estimate_cost, estimate_refundable, refund_Invoice
-      )
+      estimate_cost, estimate_refundable, refund_Invoice, 
+      used_order)
     values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, 
       #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{remarks,jdbcType=VARCHAR}, #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, 
@@ -188,14 +190,14 @@
       #{zxsRemarks,jdbcType=VARCHAR}, #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, 
       #{invoiceTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, 
       #{cwCost,jdbcType=DECIMAL}, #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, 
-      #{estimateCost,jdbcType=DECIMAL}, #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}
-      )
+      #{estimateCost,jdbcType=DECIMAL}, #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, 
+      #{usedOrder,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.NewOrderChange">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     insert into new_order_change
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -280,6 +282,9 @@
       <if test="refundInvoice != null">
         refund_Invoice,
       </if>
+      <if test="usedOrder != null">
+        used_order,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -363,13 +368,16 @@
       <if test="refundInvoice != null">
         #{refundInvoice,jdbcType=DECIMAL},
       </if>
+      <if test="usedOrder != null">
+        #{usedOrder,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.NewOrderChangeExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     select count(*) from new_order_change
     <if test="_parameter != null">
@@ -380,7 +388,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     update new_order_change
     <set>
@@ -465,6 +473,9 @@
       <if test="record.refundInvoice != null">
         refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL},
       </if>
+      <if test="record.usedOrder != null">
+        used_order = #{record.usedOrder,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -474,7 +485,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     update new_order_change
     set id = #{record.id,jdbcType=INTEGER},
@@ -503,7 +514,8 @@
       cw_remarks = #{record.cwRemarks,jdbcType=VARCHAR},
       estimate_cost = #{record.estimateCost,jdbcType=DECIMAL},
       estimate_refundable = #{record.estimateRefundable,jdbcType=DECIMAL},
-      refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL}
+      refund_Invoice = #{record.refundInvoice,jdbcType=DECIMAL},
+      used_order = #{record.usedOrder,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -512,7 +524,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     update new_order_change
     <set>
@@ -594,6 +606,9 @@
       <if test="refundInvoice != null">
         refund_Invoice = #{refundInvoice,jdbcType=DECIMAL},
       </if>
+      <if test="usedOrder != null">
+        used_order = #{usedOrder,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -601,7 +616,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 18 14:33:46 CST 2019.
+      This element was generated on Mon Jan 13 14:39:13 CST 2020.
     -->
     update new_order_change
     set order_no = #{orderNo,jdbcType=VARCHAR},
@@ -629,7 +644,8 @@
       cw_remarks = #{cwRemarks,jdbcType=VARCHAR},
       estimate_cost = #{estimateCost,jdbcType=DECIMAL},
       estimate_refundable = #{estimateRefundable,jdbcType=DECIMAL},
-      refund_Invoice = #{refundInvoice,jdbcType=DECIMAL}
+      refund_Invoice = #{refundInvoice,jdbcType=DECIMAL},
+      used_order = #{usedOrder,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByorderNo" resultType="com.goafanti.order.bo.NewOrderChangeBo">
@@ -853,7 +869,7 @@ select
 	 and   a.status = 4
 	</if>
 	</select>
-	<update id="addRefundInvoice" >
+	<update id="addRefundInvoice">
 	update  new_order_change
 	set `refund_Invoice`=ifnull(`refund_Invoice`,0)+ #{amount}
 	where order_no= #{orderNo}

+ 51 - 37
src/main/java/com/goafanti/common/mapper/TChanggeDunMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="did" jdbcType="INTEGER" property="did" />
@@ -23,12 +23,13 @@
     <result column="money" jdbcType="DECIMAL" property="money" />
     <result column="appropriation_ratio" jdbcType="DECIMAL" property="appropriationRatio" />
     <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="ctid" jdbcType="INTEGER" property="ctid" />
   </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 Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -62,7 +63,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -96,23 +97,23 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
     id, did, cid, order_no, tid, project_type, dun_type, wait_day, effective_count, aid, 
-    status, create_time, start_time, money, appropriation_ratio, type
+    status, create_time, start_time, money, appropriation_ratio, type, ctid
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TChangeDunExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
     select
     <if test="distinct">
       distinct
     </if>
     <include refid="Base_Column_List" />
-    from t_changge_dun
+    from t_change_dun
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -124,29 +125,29 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
     select 
     <include refid="Base_Column_List" />
-    from t_changge_dun
+    from t_change_dun
     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 Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    delete from t_changge_dun
+    delete from t_change_dun
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <delete id="deleteByExample" parameterType="com.goafanti.common.model.TChangeDunExample">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    delete from t_changge_dun
+    delete from t_change_dun
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -155,28 +156,28 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    insert into t_changge_dun (id, did, cid, 
+    insert into t_change_dun (id, did, cid, 
       order_no, tid, project_type, 
       dun_type, wait_day, effective_count, 
       aid, status, create_time, 
       start_time, money, appropriation_ratio, 
-      type)
+      type, ctid)
     values (#{id,jdbcType=INTEGER}, #{did,jdbcType=INTEGER}, #{cid,jdbcType=INTEGER}, 
       #{orderNo,jdbcType=VARCHAR}, #{tid,jdbcType=INTEGER}, #{projectType,jdbcType=INTEGER}, 
       #{dunType,jdbcType=INTEGER}, #{waitDay,jdbcType=INTEGER}, #{effectiveCount,jdbcType=INTEGER}, 
       #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{startTime,jdbcType=TIMESTAMP}, #{money,jdbcType=DECIMAL}, #{appropriationRatio,jdbcType=DECIMAL}, 
-      #{type,jdbcType=INTEGER})
+      #{type,jdbcType=INTEGER}, #{ctid,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TChangeDun">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    insert into t_changge_dun
+    insert into t_change_dun
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
@@ -226,6 +227,9 @@
       <if test="type != null">
         type,
       </if>
+      <if test="ctid != null">
+        ctid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -276,15 +280,18 @@
       <if test="type != null">
         #{type,jdbcType=INTEGER},
       </if>
+      <if test="ctid != null">
+        #{ctid,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.TChangeDunExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    select count(*) from t_changge_dun
+    select count(*) from t_change_dun
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -293,9 +300,9 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    update t_changge_dun
+    update t_change_dun
     <set>
       <if test="record.id != null">
         id = #{record.id,jdbcType=INTEGER},
@@ -345,6 +352,9 @@
       <if test="record.type != null">
         type = #{record.type,jdbcType=INTEGER},
       </if>
+      <if test="record.ctid != null">
+        ctid = #{record.ctid,jdbcType=INTEGER},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -354,9 +364,9 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    update t_changge_dun
+    update t_change_dun
     set id = #{record.id,jdbcType=INTEGER},
       did = #{record.did,jdbcType=INTEGER},
       cid = #{record.cid,jdbcType=INTEGER},
@@ -372,7 +382,8 @@
       start_time = #{record.startTime,jdbcType=TIMESTAMP},
       money = #{record.money,jdbcType=DECIMAL},
       appropriation_ratio = #{record.appropriationRatio,jdbcType=DECIMAL},
-      type = #{record.type,jdbcType=INTEGER}
+      type = #{record.type,jdbcType=INTEGER},
+      ctid = #{record.ctid,jdbcType=INTEGER}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -381,9 +392,9 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    update t_changge_dun
+    update t_change_dun
     <set>
       <if test="did != null">
         did = #{did,jdbcType=INTEGER},
@@ -430,6 +441,9 @@
       <if test="type != null">
         type = #{type,jdbcType=INTEGER},
       </if>
+      <if test="ctid != null">
+        ctid = #{ctid,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -437,9 +451,9 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Mon Jan 13 09:27:23 CST 2020.
+      This element was generated on Mon Jan 13 11:34:14 CST 2020.
     -->
-    update t_changge_dun
+    update t_change_dun
     set did = #{did,jdbcType=INTEGER},
       cid = #{cid,jdbcType=INTEGER},
       order_no = #{orderNo,jdbcType=VARCHAR},
@@ -454,12 +468,13 @@
       start_time = #{startTime,jdbcType=TIMESTAMP},
       money = #{money,jdbcType=DECIMAL},
       appropriation_ratio = #{appropriationRatio,jdbcType=DECIMAL},
-      type = #{type,jdbcType=INTEGER}
+      type = #{type,jdbcType=INTEGER},
+      ctid = #{ctid,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   
    <insert id="insertSelectiveList" parameterType="java.util.List">
-    insert into t_changge_dun (did, cid, 
+    insert into t_change_dun (did, cid, 
       order_no, tid, project_type, 
       dun_type, wait_day, effective_count, 
       aid, status, create_time, 
@@ -476,11 +491,10 @@
   </insert>
   
   <select id="selectByCid" resultType="com.goafanti.order.bo.TChangeDunOut">
-  select a.id,a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 
-  	  b.set_up_amount setUpAmount, a.effective_count effectiveCount, a.aid, a.create_time createTime ,
-  	  ifnull(c.commodity_name,d.commodity_name) commodityName,a.money,a.status, a.appropriation_ratio appropriationRatio
-  	  from t_changge_dun a left join t_order_task b on a.tid=b.id left join t_changge_task c on a.tid=c.tid 
-  	  left join t_changge_task d on a.tid=d.id
+	select a.id,a.order_no orderNo,ifnull(a.tid,c.tid)tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 
+  	  b.set_up_amount setUpAmount, a.effective_count effectiveCount, a.aid, a.create_time createTime,a.type,
+  	  ifnull(b.commodity_name,c.commodity_name) commodityName,a.money,a.status, a.appropriation_ratio appropriationRatio
+  	  from t_change_dun a left join t_order_task b on a.tid=b.id left join t_change_task c on a.ctid=c.id
     	where a.cid= #{id}
   </select>
 </mapper>

+ 14 - 14
src/main/java/com/goafanti/common/mapper/TChanggeTaskMapper.xml

@@ -108,7 +108,7 @@
       distinct
     </if>
     <include refid="Base_Column_List" />
-    from t_changge_task
+    from t_change_task
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -124,7 +124,7 @@
     -->
     select 
     <include refid="Base_Column_List" />
-    from t_changge_task
+    from t_change_task
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
@@ -133,7 +133,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    delete from t_changge_task
+    delete from t_change_task
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <delete id="deleteByExample" parameterType="com.goafanti.common.model.TChangeTaskExample">
@@ -142,7 +142,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    delete from t_changge_task
+    delete from t_change_task
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -153,7 +153,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    insert into t_changge_task (id, tid, cid, 
+    insert into t_change_task (id, tid, cid, 
       order_no, main, commodity_id, 
       commodity_name, commodity_quantity, commodity_price, 
       task_comment, create_time, type
@@ -170,7 +170,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    insert into t_changge_task
+    insert into t_change_task
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
@@ -254,7 +254,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    select count(*) from t_changge_task
+    select count(*) from t_change_task
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
     </if>
@@ -265,7 +265,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    update t_changge_task
+    update t_change_task
     <set>
       <if test="record.id != null">
         id = #{record.id,jdbcType=INTEGER},
@@ -314,7 +314,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    update t_changge_task
+    update t_change_task
     set id = #{record.id,jdbcType=INTEGER},
       tid = #{record.tid,jdbcType=INTEGER},
       cid = #{record.cid,jdbcType=INTEGER},
@@ -337,7 +337,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    update t_changge_task
+    update t_change_task
     <set>
       <if test="tid != null">
         tid = #{tid,jdbcType=INTEGER},
@@ -381,7 +381,7 @@
       This element is automatically generated by MyBatis Generator, do not modify.
       This element was generated on Mon Jan 13 09:27:33 CST 2020.
     -->
-    update t_changge_task
+    update t_change_task
     set tid = #{tid,jdbcType=INTEGER},
       cid = #{cid,jdbcType=INTEGER},
       order_no = #{orderNo,jdbcType=VARCHAR},
@@ -397,7 +397,7 @@
   </update>
   
   <insert id="insertSelectiveList" parameterType="java.util.List">
-    insert into t_changge_task ( tid, cid, 
+    insert into t_change_task ( tid, cid, 
       order_no, commodity_id, commodity_name, 
       commodity_quantity, commodity_price, task_comment, 
       create_time)
@@ -411,9 +411,9 @@
   </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.commodity_quantity as commodityQuantity,i.price,a.commodity_id as commodityId,
+  	 a.commodity_quantity as commodityQuantity,i.price,a.commodity_id as commodityId,a.type,
   a.task_comment as taskComment ,a.commodity_price as commodityPrice
-    from t_changge_task a left join business_project i on a.commodity_id=i.id
+    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 a.cid= #{id}
   </select>

+ 22 - 0
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -1495,6 +1495,8 @@ where super_id is null ) e on e.order_no=a.order_no
     where a.order_no = #{orderNo,jdbcType=VARCHAR}
   </select>
   
+  
+  
    <select id="selectOrderRefundListByPage" resultType="com.goafanti.order.bo.TOrderRefundBo">
   	select a.id, date_format(a.create_time,'%Y-%m-%d') as createDate,a.order_no as orderNo,
     c.nickname as userName,b.order_status as orderStatus,a.refund_status as refundStatus,
@@ -1629,4 +1631,24 @@ where super_id is null ) e on e.order_no=a.order_no
   	update t_order_new set salesman_id= #{transferId},old_salesman_id= #{aid}
 	where delete_sign !=1 and salesman_id= #{aid}
   </update>
+  
+  <select id="selectUsedOrderByOrder" resultType="com.goafanti.order.bo.TOrderNewBo">
+  	  select 
+    a.order_no as orderNo, a.order_type as orderType, a.creater, a.create_time as createTime,a.update_time as updateTime, a.buyer_id as buyerId,
+    a.first_amount as firstAmount,a.total_amount as totalAmount, a.settlement_amount as settlementAmount, order_status as orderStatus,
+    a.liquidation_status as liquidationStatus, a.process_status as processStatus, a.project_status as projectStatus, a.approval,
+    a.order_remarks as orderRemarks, a.delete_sign as deleteSign, a.salesman_id as salesmanId, a.finance_id as financeId, technician_id as technicianId, 
+    a.sign_time as signTime, a.settlement_time as settlementTime, a.contract_no as contractNo, a.contract_type as contractType, a.contacts,
+    a.contact_mobile as contactMobile, a.legal_person as legalPerson, a.legal_person_tel as legalPersonTel, a.proof_count as proofCount,
+    a.proof_aid as proofAid,contract_picture_url as contractPictureUrl, c.name as salesmanName,dep.name as depName,d.name as financeName,
+    c.contact_mobile as salesmanMobile,d.contact_mobile as financeMobile,b.nickname as userName ,e.back_status as backStatus,f.name as initiateName,
+    e.reason,date_format(e.create_time,'%Y-%m-%d') as backDate,a.buyer_id as uid,a.order_dep as orderDep, g.location_province as locationProvince,
+    g.location_city as locationCity,g.location_area locationArea,g.postal_address postalAddress,outsource,a.primary_order primaryOrder,
+    h.name NowFinance,h.contact_mobile NowFinanceMobile,a.additional_order additionalOrder,i.name as oldSalesmanName, i.contact_mobile oldSalesmanMobile
+    from new_order_change noc left join t_order_new a on noc.used_order=a.order_no left join `user` b on a.buyer_id=b.id left join admin i on a.old_salesman_id=i.id
+    left join admin c on a.salesman_id=c.id left join department dep on a.order_dep=dep.id left join admin d on a.finance_id=d.id
+    left join admin h on dep.finance_id=h.id left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
+  	left join admin f on e.initiate=f.id left join organization_identity g on a.buyer_id=g.uid
+  	where noc.order_no= #{orderNo} order by noc.create_time
+  </select>
 </mapper>

+ 104 - 81
src/main/java/com/goafanti/common/model/NewOrderChange.java

@@ -7,144 +7,149 @@ public class NewOrderChange {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.id
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.order_no
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.process_state
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Integer processState;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.status
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.type
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.create_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String remarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.voucher_url
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String voucherUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.total_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal totalAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.settlement_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal settlementAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.change_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal changeAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.applicant
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String applicant;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.dep_name
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String depName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.project_state
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String projectState;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.zxs_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal zxsCost;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.zxs_remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String zxsRemarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.payment_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Date paymentTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.payment_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal paymentAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.invoice_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private Date invoiceTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.invoice_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal invoiceAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.invoice_type
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String invoiceType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.cw_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal cwCost;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.refundable_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal refundableAmount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.cw_remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private String cwRemarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.estimate_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal estimateCost;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.estimate_refundable
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal estimateRefundable;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.refund_Invoice
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	private BigDecimal refundInvoice;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_change.used_order
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
+	 */
+	private String usedOrder;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.id
 	 * @return  the value of new_order_change.id
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Integer getId() {
 		return id;
@@ -153,7 +158,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.id
 	 * @param id  the value for new_order_change.id
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -162,7 +167,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.order_no
 	 * @return  the value of new_order_change.order_no
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getOrderNo() {
 		return orderNo;
@@ -171,7 +176,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.order_no
 	 * @param orderNo  the value for new_order_change.order_no
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
@@ -180,7 +185,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.process_state
 	 * @return  the value of new_order_change.process_state
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Integer getProcessState() {
 		return processState;
@@ -189,7 +194,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.process_state
 	 * @param processState  the value for new_order_change.process_state
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setProcessState(Integer processState) {
 		this.processState = processState;
@@ -198,7 +203,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.status
 	 * @return  the value of new_order_change.status
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Integer getStatus() {
 		return status;
@@ -207,7 +212,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.status
 	 * @param status  the value for new_order_change.status
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -216,7 +221,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.type
 	 * @return  the value of new_order_change.type
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Integer getType() {
 		return type;
@@ -225,7 +230,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.type
 	 * @param type  the value for new_order_change.type
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -234,7 +239,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.create_time
 	 * @return  the value of new_order_change.create_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -243,7 +248,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.create_time
 	 * @param createTime  the value for new_order_change.create_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -252,7 +257,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.remarks
 	 * @return  the value of new_order_change.remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -261,7 +266,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.remarks
 	 * @param remarks  the value for new_order_change.remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks;
@@ -270,7 +275,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.voucher_url
 	 * @return  the value of new_order_change.voucher_url
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getVoucherUrl() {
 		return voucherUrl;
@@ -279,7 +284,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.voucher_url
 	 * @param voucherUrl  the value for new_order_change.voucher_url
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setVoucherUrl(String voucherUrl) {
 		this.voucherUrl = voucherUrl;
@@ -288,7 +293,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.total_amount
 	 * @return  the value of new_order_change.total_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getTotalAmount() {
 		return totalAmount;
@@ -297,7 +302,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.total_amount
 	 * @param totalAmount  the value for new_order_change.total_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setTotalAmount(BigDecimal totalAmount) {
 		this.totalAmount = totalAmount;
@@ -306,7 +311,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.settlement_amount
 	 * @return  the value of new_order_change.settlement_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getSettlementAmount() {
 		return settlementAmount;
@@ -315,7 +320,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.settlement_amount
 	 * @param settlementAmount  the value for new_order_change.settlement_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setSettlementAmount(BigDecimal settlementAmount) {
 		this.settlementAmount = settlementAmount;
@@ -324,7 +329,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.change_amount
 	 * @return  the value of new_order_change.change_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getChangeAmount() {
 		return changeAmount;
@@ -333,7 +338,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.change_amount
 	 * @param changeAmount  the value for new_order_change.change_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setChangeAmount(BigDecimal changeAmount) {
 		this.changeAmount = changeAmount;
@@ -342,7 +347,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.applicant
 	 * @return  the value of new_order_change.applicant
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getApplicant() {
 		return applicant;
@@ -351,7 +356,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.applicant
 	 * @param applicant  the value for new_order_change.applicant
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setApplicant(String applicant) {
 		this.applicant = applicant;
@@ -360,7 +365,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.dep_name
 	 * @return  the value of new_order_change.dep_name
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getDepName() {
 		return depName;
@@ -369,7 +374,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.dep_name
 	 * @param depName  the value for new_order_change.dep_name
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setDepName(String depName) {
 		this.depName = depName;
@@ -378,7 +383,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.project_state
 	 * @return  the value of new_order_change.project_state
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getProjectState() {
 		return projectState;
@@ -387,7 +392,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.project_state
 	 * @param projectState  the value for new_order_change.project_state
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setProjectState(String projectState) {
 		this.projectState = projectState;
@@ -396,7 +401,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.zxs_cost
 	 * @return  the value of new_order_change.zxs_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getZxsCost() {
 		return zxsCost;
@@ -405,7 +410,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.zxs_cost
 	 * @param zxsCost  the value for new_order_change.zxs_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setZxsCost(BigDecimal zxsCost) {
 		this.zxsCost = zxsCost;
@@ -414,7 +419,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.zxs_remarks
 	 * @return  the value of new_order_change.zxs_remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getZxsRemarks() {
 		return zxsRemarks;
@@ -423,7 +428,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.zxs_remarks
 	 * @param zxsRemarks  the value for new_order_change.zxs_remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setZxsRemarks(String zxsRemarks) {
 		this.zxsRemarks = zxsRemarks;
@@ -432,7 +437,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.payment_time
 	 * @return  the value of new_order_change.payment_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Date getPaymentTime() {
 		return paymentTime;
@@ -441,7 +446,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.payment_time
 	 * @param paymentTime  the value for new_order_change.payment_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setPaymentTime(Date paymentTime) {
 		this.paymentTime = paymentTime;
@@ -450,7 +455,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.payment_amount
 	 * @return  the value of new_order_change.payment_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getPaymentAmount() {
 		return paymentAmount;
@@ -459,7 +464,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.payment_amount
 	 * @param paymentAmount  the value for new_order_change.payment_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setPaymentAmount(BigDecimal paymentAmount) {
 		this.paymentAmount = paymentAmount;
@@ -468,7 +473,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.invoice_time
 	 * @return  the value of new_order_change.invoice_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Date getInvoiceTime() {
 		return invoiceTime;
@@ -477,7 +482,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.invoice_time
 	 * @param invoiceTime  the value for new_order_change.invoice_time
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setInvoiceTime(Date invoiceTime) {
 		this.invoiceTime = invoiceTime;
@@ -486,7 +491,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.invoice_amount
 	 * @return  the value of new_order_change.invoice_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getInvoiceAmount() {
 		return invoiceAmount;
@@ -495,7 +500,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.invoice_amount
 	 * @param invoiceAmount  the value for new_order_change.invoice_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setInvoiceAmount(BigDecimal invoiceAmount) {
 		this.invoiceAmount = invoiceAmount;
@@ -504,7 +509,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.invoice_type
 	 * @return  the value of new_order_change.invoice_type
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getInvoiceType() {
 		return invoiceType;
@@ -513,7 +518,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.invoice_type
 	 * @param invoiceType  the value for new_order_change.invoice_type
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setInvoiceType(String invoiceType) {
 		this.invoiceType = invoiceType;
@@ -522,7 +527,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.cw_cost
 	 * @return  the value of new_order_change.cw_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getCwCost() {
 		return cwCost;
@@ -531,7 +536,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.cw_cost
 	 * @param cwCost  the value for new_order_change.cw_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setCwCost(BigDecimal cwCost) {
 		this.cwCost = cwCost;
@@ -540,7 +545,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.refundable_amount
 	 * @return  the value of new_order_change.refundable_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getRefundableAmount() {
 		return refundableAmount;
@@ -549,7 +554,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.refundable_amount
 	 * @param refundableAmount  the value for new_order_change.refundable_amount
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setRefundableAmount(BigDecimal refundableAmount) {
 		this.refundableAmount = refundableAmount;
@@ -558,7 +563,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.cw_remarks
 	 * @return  the value of new_order_change.cw_remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getCwRemarks() {
 		return cwRemarks;
@@ -567,7 +572,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.cw_remarks
 	 * @param cwRemarks  the value for new_order_change.cw_remarks
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setCwRemarks(String cwRemarks) {
 		this.cwRemarks = cwRemarks;
@@ -576,7 +581,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.estimate_cost
 	 * @return  the value of new_order_change.estimate_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getEstimateCost() {
 		return estimateCost;
@@ -585,7 +590,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.estimate_cost
 	 * @param estimateCost  the value for new_order_change.estimate_cost
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setEstimateCost(BigDecimal estimateCost) {
 		this.estimateCost = estimateCost;
@@ -594,7 +599,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.estimate_refundable
 	 * @return  the value of new_order_change.estimate_refundable
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getEstimateRefundable() {
 		return estimateRefundable;
@@ -603,7 +608,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.estimate_refundable
 	 * @param estimateRefundable  the value for new_order_change.estimate_refundable
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setEstimateRefundable(BigDecimal estimateRefundable) {
 		this.estimateRefundable = estimateRefundable;
@@ -612,7 +617,7 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.refund_Invoice
 	 * @return  the value of new_order_change.refund_Invoice
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public BigDecimal getRefundInvoice() {
 		return refundInvoice;
@@ -621,9 +626,27 @@ public class NewOrderChange {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.refund_Invoice
 	 * @param refundInvoice  the value for new_order_change.refund_Invoice
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setRefundInvoice(BigDecimal refundInvoice) {
 		this.refundInvoice = refundInvoice;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_change.used_order
+	 * @return  the value of new_order_change.used_order
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
+	 */
+	public String getUsedOrder() {
+		return usedOrder;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_change.used_order
+	 * @param usedOrder  the value for new_order_change.used_order
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
+	 */
+	public void setUsedOrder(String usedOrder) {
+		this.usedOrder = usedOrder;
+	}
 }

+ 86 - 16
src/main/java/com/goafanti/common/model/NewOrderChangeExample.java

@@ -8,23 +8,23 @@ import java.util.List;
 public class NewOrderChangeExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public NewOrderChangeExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class NewOrderChangeExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1873,11 +1873,81 @@ public class NewOrderChangeExample {
 			addCriterion("refund_Invoice not between", value1, value2, "refundInvoice");
 			return (Criteria) this;
 		}
+
+		public Criteria andUsedOrderIsNull() {
+			addCriterion("used_order is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderIsNotNull() {
+			addCriterion("used_order is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderEqualTo(String value) {
+			addCriterion("used_order =", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderNotEqualTo(String value) {
+			addCriterion("used_order <>", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderGreaterThan(String value) {
+			addCriterion("used_order >", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderGreaterThanOrEqualTo(String value) {
+			addCriterion("used_order >=", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderLessThan(String value) {
+			addCriterion("used_order <", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderLessThanOrEqualTo(String value) {
+			addCriterion("used_order <=", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderLike(String value) {
+			addCriterion("used_order like", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderNotLike(String value) {
+			addCriterion("used_order not like", value, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderIn(List<String> values) {
+			addCriterion("used_order in", values, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderNotIn(List<String> values) {
+			addCriterion("used_order not in", values, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderBetween(String value1, String value2) {
+			addCriterion("used_order between", value1, value2, "usedOrder");
+			return (Criteria) this;
+		}
+
+		public Criteria andUsedOrderNotBetween(String value1, String value2) {
+			addCriterion("used_order not between", value1, value2, "usedOrder");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table new_order_change
-	 * @mbg.generated  Wed Sep 18 14:33:46 CST 2019
+	 * @mbg.generated  Mon Jan 13 14:39:13 CST 2020
 	 */
 	public static class Criterion {
 		private String condition;

+ 151 - 128
src/main/java/com/goafanti/common/model/TChangeDun.java

@@ -6,371 +6,394 @@ import java.util.Date;
 public class TChangeDun {
 
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.id
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.id
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer id;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.did
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.did
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer did;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.cid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.cid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer cid;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.order_no
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.order_no
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private String orderNo;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.tid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.tid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer tid;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.project_type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.project_type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer projectType;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.dun_type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.dun_type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer dunType;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.wait_day
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.wait_day
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer waitDay;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.effective_count
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.effective_count
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer effectiveCount;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.aid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.aid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private String aid;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.status
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.status
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer status;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.create_time
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.create_time
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Date createTime;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.start_time
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.start_time
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Date startTime;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.money
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.money
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private BigDecimal money;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.appropriation_ratio
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.appropriation_ratio
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private BigDecimal appropriationRatio;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_changge_dun.type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_change_dun.ctid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
+	 */
+	private Integer ctid;
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.id
-	 * @return  the value of t_changge_dun.id
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.id
+	 * @return  the value of t_change_dun.id
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getId() {
 		return id;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.id
-	 * @param id  the value for t_changge_dun.id
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.id
+	 * @param id  the value for t_change_dun.id
+	 * @mbg.generated  Mon Jan 13 11:34:14 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_changge_dun.did
-	 * @return  the value of t_changge_dun.did
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.did
+	 * @return  the value of t_change_dun.did
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getDid() {
 		return did;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.did
-	 * @param did  the value for t_changge_dun.did
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.did
+	 * @param did  the value for t_change_dun.did
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setDid(Integer did) {
 		this.did = did;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.cid
-	 * @return  the value of t_changge_dun.cid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.cid
+	 * @return  the value of t_change_dun.cid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getCid() {
 		return cid;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.cid
-	 * @param cid  the value for t_changge_dun.cid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.cid
+	 * @param cid  the value for t_change_dun.cid
+	 * @mbg.generated  Mon Jan 13 11:34:14 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_changge_dun.order_no
-	 * @return  the value of t_changge_dun.order_no
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.order_no
+	 * @return  the value of t_change_dun.order_no
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public String getOrderNo() {
 		return orderNo;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.order_no
-	 * @param orderNo  the value for t_changge_dun.order_no
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.order_no
+	 * @param orderNo  the value for t_change_dun.order_no
+	 * @mbg.generated  Mon Jan 13 11:34:14 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_changge_dun.tid
-	 * @return  the value of t_changge_dun.tid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.tid
+	 * @return  the value of t_change_dun.tid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getTid() {
 		return tid;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.tid
-	 * @param tid  the value for t_changge_dun.tid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.tid
+	 * @param tid  the value for t_change_dun.tid
+	 * @mbg.generated  Mon Jan 13 11:34:14 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_changge_dun.project_type
-	 * @return  the value of t_changge_dun.project_type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.project_type
+	 * @return  the value of t_change_dun.project_type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getProjectType() {
 		return projectType;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.project_type
-	 * @param projectType  the value for t_changge_dun.project_type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.project_type
+	 * @param projectType  the value for t_change_dun.project_type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setProjectType(Integer projectType) {
 		this.projectType = projectType;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.dun_type
-	 * @return  the value of t_changge_dun.dun_type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.dun_type
+	 * @return  the value of t_change_dun.dun_type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getDunType() {
 		return dunType;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.dun_type
-	 * @param dunType  the value for t_changge_dun.dun_type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.dun_type
+	 * @param dunType  the value for t_change_dun.dun_type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setDunType(Integer dunType) {
 		this.dunType = dunType;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.wait_day
-	 * @return  the value of t_changge_dun.wait_day
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.wait_day
+	 * @return  the value of t_change_dun.wait_day
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getWaitDay() {
 		return waitDay;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.wait_day
-	 * @param waitDay  the value for t_changge_dun.wait_day
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.wait_day
+	 * @param waitDay  the value for t_change_dun.wait_day
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setWaitDay(Integer waitDay) {
 		this.waitDay = waitDay;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.effective_count
-	 * @return  the value of t_changge_dun.effective_count
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.effective_count
+	 * @return  the value of t_change_dun.effective_count
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getEffectiveCount() {
 		return effectiveCount;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.effective_count
-	 * @param effectiveCount  the value for t_changge_dun.effective_count
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.effective_count
+	 * @param effectiveCount  the value for t_change_dun.effective_count
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setEffectiveCount(Integer effectiveCount) {
 		this.effectiveCount = effectiveCount;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.aid
-	 * @return  the value of t_changge_dun.aid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.aid
+	 * @return  the value of t_change_dun.aid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public String getAid() {
 		return aid;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.aid
-	 * @param aid  the value for t_changge_dun.aid
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.aid
+	 * @param aid  the value for t_change_dun.aid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.status
-	 * @return  the value of t_changge_dun.status
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.status
+	 * @return  the value of t_change_dun.status
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getStatus() {
 		return status;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.status
-	 * @param status  the value for t_changge_dun.status
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.status
+	 * @param status  the value for t_change_dun.status
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.create_time
-	 * @return  the value of t_changge_dun.create_time
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.create_time
+	 * @return  the value of t_change_dun.create_time
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Date getCreateTime() {
 		return createTime;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.create_time
-	 * @param createTime  the value for t_changge_dun.create_time
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.create_time
+	 * @param createTime  the value for t_change_dun.create_time
+	 * @mbg.generated  Mon Jan 13 11:34:14 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_changge_dun.start_time
-	 * @return  the value of t_changge_dun.start_time
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.start_time
+	 * @return  the value of t_change_dun.start_time
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Date getStartTime() {
 		return startTime;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.start_time
-	 * @param startTime  the value for t_changge_dun.start_time
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.start_time
+	 * @param startTime  the value for t_change_dun.start_time
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setStartTime(Date startTime) {
 		this.startTime = startTime;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.money
-	 * @return  the value of t_changge_dun.money
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.money
+	 * @return  the value of t_change_dun.money
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public BigDecimal getMoney() {
 		return money;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.money
-	 * @param money  the value for t_changge_dun.money
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.money
+	 * @param money  the value for t_change_dun.money
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setMoney(BigDecimal money) {
 		this.money = money;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.appropriation_ratio
-	 * @return  the value of t_changge_dun.appropriation_ratio
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.appropriation_ratio
+	 * @return  the value of t_change_dun.appropriation_ratio
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public BigDecimal getAppropriationRatio() {
 		return appropriationRatio;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.appropriation_ratio
-	 * @param appropriationRatio  the value for t_changge_dun.appropriation_ratio
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.appropriation_ratio
+	 * @param appropriationRatio  the value for t_change_dun.appropriation_ratio
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setAppropriationRatio(BigDecimal appropriationRatio) {
 		this.appropriationRatio = appropriationRatio;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_changge_dun.type
-	 * @return  the value of t_changge_dun.type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_change_dun.type
+	 * @return  the value of t_change_dun.type
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Integer getType() {
 		return type;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_changge_dun.type
-	 * @param type  the value for t_changge_dun.type
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.type
+	 * @param type  the value for t_change_dun.type
+	 * @mbg.generated  Mon Jan 13 11:34:14 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_dun.ctid
+	 * @return  the value of t_change_dun.ctid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
+	 */
+	public Integer getCtid() {
+		return ctid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_change_dun.ctid
+	 * @param ctid  the value for t_change_dun.ctid
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
+	 */
+	public void setCtid(Integer ctid) {
+		this.ctid = ctid;
+	}
 }

+ 92 - 32
src/main/java/com/goafanti/common/model/TChangeDunExample.java

@@ -7,80 +7,80 @@ import java.util.List;
 
 public class TChangeDunExample {
     /**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	protected String orderByClause;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	protected boolean distinct;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public TChangeDunExample() {
 		oredCriteria = new ArrayList<Criteria>();
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public boolean isDistinct() {
 		return distinct;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,8 +89,8 @@ public class TChangeDunExample {
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,8 +101,8 @@ public class TChangeDunExample {
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,8 +110,8 @@ public class TChangeDunExample {
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,8 +120,8 @@ public class TChangeDunExample {
 	}
 
 	/**
-	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1143,11 +1143,71 @@ public class TChangeDunExample {
 			addCriterion("type not between", value1, value2, "type");
 			return (Criteria) this;
 		}
+
+		public Criteria andCtidIsNull() {
+			addCriterion("ctid is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidIsNotNull() {
+			addCriterion("ctid is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidEqualTo(Integer value) {
+			addCriterion("ctid =", value, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidNotEqualTo(Integer value) {
+			addCriterion("ctid <>", value, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidGreaterThan(Integer value) {
+			addCriterion("ctid >", value, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidGreaterThanOrEqualTo(Integer value) {
+			addCriterion("ctid >=", value, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidLessThan(Integer value) {
+			addCriterion("ctid <", value, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidLessThanOrEqualTo(Integer value) {
+			addCriterion("ctid <=", value, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidIn(List<Integer> values) {
+			addCriterion("ctid in", values, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidNotIn(List<Integer> values) {
+			addCriterion("ctid not in", values, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidBetween(Integer value1, Integer value2) {
+			addCriterion("ctid between", value1, value2, "ctid");
+			return (Criteria) this;
+		}
+
+		public Criteria andCtidNotBetween(Integer value1, Integer value2) {
+			addCriterion("ctid not between", value1, value2, "ctid");
+			return (Criteria) this;
+		}
 	}
 
 	/**
-	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_changge_dun
-	 * @mbg.generated  Mon Jan 13 09:27:23 CST 2020
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_change_dun
+	 * @mbg.generated  Mon Jan 13 11:34:14 CST 2020
 	 */
 	public static class Criterion {
 		private String condition;

+ 16 - 0
src/main/java/com/goafanti/order/bo/TOrderNewBo.java

@@ -1,6 +1,7 @@
 package com.goafanti.order.bo;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.time.DateFormatUtils;
@@ -46,6 +47,9 @@ public class TOrderNewBo extends TOrderNew{
 	private Integer dunStatus;
 	private BigDecimal appropriationRatio;
 	private BigDecimal setUpAmount;
+	
+	private List<?> dunList;
+	private List<?> taskList;
 	/**
 	 * 是否变更 0否 1是
 	 */
@@ -345,5 +349,17 @@ public class TOrderNewBo extends TOrderNew{
 	public void setIschange(Integer ischange) {
 		this.ischange = ischange;
 	}
+	public List<?> getDunList() {
+		return dunList;
+	}
+	public void setDunList(List<?> dunList) {
+		this.dunList = dunList;
+	}
+	public List<?> getTaskList() {
+		return taskList;
+	}
+	public void setTaskList(List<?> taskList) {
+		this.taskList = taskList;
+	}
 	
 }

+ 45 - 2
src/main/java/com/goafanti/order/controller/OrderChangeApiController.java

@@ -120,6 +120,36 @@ public class OrderChangeApiController extends CertifyApiController {
 	}
 	
 	/**
+	 *  删除变更项目
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/updateChangeTask", method = RequestMethod.POST)
+	public Result updateChangeTask(TChangeTask t){
+		Result res = new Result();
+		if (null==t.getId()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","变更项目id"));
+			return res;
+		}
+		res.setData(orderChangeService.updateChangeTask(t));
+		return res;
+	}
+	/**
+	 *  删除变更催款
+	 * @param t
+	 * @return
+	 */
+	@RequestMapping(value = "/updateChangeDun", method = RequestMethod.POST)
+	public Result updateChangeDun(TChangeDun t){
+		Result res = new Result();
+		if (null==t.getId()) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","变更任务id"));
+			return res;
+		}
+		res.setData(orderChangeService.updateChangeDun(t));
+		return res;
+	}
+	/**
 	 *  删除变更催款
 	 * @param t
 	 * @return
@@ -137,7 +167,7 @@ public class OrderChangeApiController extends CertifyApiController {
 	@RequestMapping(value = "/addChangeDun", method = RequestMethod.POST)
 	public Result addChangeDun(TChangeDun d){
 		Result res = new Result();
-		if(StringUtils.isBlank(d.getOrderNo())||null==d.getTid()) {
+		if(StringUtils.isBlank(d.getOrderNo())||null==d.getCtid()) {
 			res.getError().add(buildError("", "订单编号与项目编号必须指定"));
 			return res;
 		}
@@ -149,7 +179,7 @@ public class OrderChangeApiController extends CertifyApiController {
 		return res;
 	}
 	/**
-	 *    订单查看变更详情
+	 *    订单查看变更列表
 	 */
 	@RequestMapping(value = "/orderChangeDetails", method = RequestMethod.GET)
 	public Result orderChangeDetails(String orderNo){
@@ -162,6 +192,19 @@ public class OrderChangeApiController extends CertifyApiController {
 		return res;
 	}
 	/**
+	 *    订单查看变更原订单
+	 */
+	@RequestMapping(value = "/orderChangeUsed", method = RequestMethod.GET)
+	public Result orderChangeUsed(String orderNo){
+		Result res = new Result();
+		if(null==orderNo){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "订单编号"));
+			return res;
+		}
+		res.setData(orderChangeService.orderChangeUsed( orderNo));
+		return res;
+	}
+	/**
 	 *    id查看变更详情
 	 */
 	@RequestMapping(value = "/orderChangeDetailsById", method = RequestMethod.GET)

+ 1 - 1
src/main/java/com/goafanti/order/enums/OrderChangeType.java

@@ -10,7 +10,7 @@ public enum OrderChangeType {
 	JXMBG(2,"仅项目变更"),
 	JJEBG(3,"仅金额变更"),
 	CB(4,"重报"),
-	ZC(5,"赠送"),
+	ZS(5,"赠送"),
 	/** 无效 **/
 	INVALID(10, "INVALID");
 	

+ 8 - 0
src/main/java/com/goafanti/order/service/OrderChangeService.java

@@ -9,12 +9,14 @@ import javax.servlet.http.HttpServletResponse;
 import com.goafanti.common.model.OrderRefundInvoice;
 import com.goafanti.common.model.TChangeDun;
 import com.goafanti.common.model.TChangeTask;
+import com.goafanti.common.model.TOrderNew;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.NewOderCahngeListBo;
 import com.goafanti.order.bo.NewOrderChangeBo;
 import com.goafanti.order.bo.OrderChangeLogBo;
 import com.goafanti.order.bo.TChangeDunOut;
 import com.goafanti.order.bo.TChangeTaskOut;
+import com.goafanti.order.bo.TOrderNewBo;
 
 public interface OrderChangeService {
 
@@ -63,5 +65,11 @@ public interface OrderChangeService {
 	
 	List<TChangeDunOut> selectChangeDun(Integer cid);
 
+	int updateChangeTask(TChangeTask t);
+
+	int updateChangeDun(TChangeDun t);
+
+	List<TOrderNewBo> orderChangeUsed(String orderNo);
+
 
 }

+ 86 - 66
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -3,7 +3,6 @@ package com.goafanti.order.service.impl;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.math.BigDecimal;
-import java.sql.ResultSet;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
@@ -13,7 +12,6 @@ import java.util.Map;
 import java.util.UUID;
 
 import javax.servlet.http.HttpServletResponse;
-import javax.swing.text.html.parser.Entity;
 
 import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
@@ -68,10 +66,12 @@ import com.goafanti.order.bo.OutNewOrderDunBo;
 import com.goafanti.order.bo.TChangeDunOut;
 import com.goafanti.order.bo.TChangeTaskOut;
 import com.goafanti.order.bo.TOrderLogBo;
+import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.enums.OrderChangeType;
 import com.goafanti.order.enums.OrderNewState;
 import com.goafanti.order.enums.OrderType;
+import com.goafanti.order.service.NewOrderDunService;
 import com.goafanti.order.service.OrderChangeService;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderService;
@@ -111,6 +111,8 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	@Autowired
 	private OrderNewService	orderNewService;
 	@Autowired
+	private NewOrderDunService	newOrderDunService;
+	@Autowired
 	private TChangeTaskMapper	TChangeTaskMapper;
 	@Autowired
 	private TChangeDunMapper	TChangeDunMapper;
@@ -120,7 +122,6 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		TOrderNew ton=new TOrderNew();
 		ton.setOrderNo(t.getOrderNo());
 		ton.setDeleteSign(2);//将订单置为锁定
-		t.setProcessState(0);//设置营销管理员来审核
 		tOrderNewMapper.updateByPrimaryKeySelective(ton);
 		BigDecimal invoiceAmount=tOrderInvoiceMapper.conutAmountByOrderNo(t.getOrderNo());
 		t.setInvoiceAmount(invoiceAmount);//开票金额
@@ -133,42 +134,48 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		t.setZxsRemarks(startRemarks);
 		newOrderChangeMapper.insertSelective(t);
 		NewOrderChangeBo ncb=newOrderChangeMapper.selectByorderNoAndStatus(t.getOrderNo());
-		List<OutNewOrderDunBo> listDun=newOrderDunMapper.selectListNewOrderDun(t.getOrderNo(),null,null);
-		List<TChangeDun> listcd=new ArrayList<>();
-		for (OutNewOrderDunBo d : listDun) {
-			TChangeDun cd=new TChangeDun();
-			cd.setOrderNo(d.getOrderNo());
-			cd.setAid(d.getAid());
-			cd.setAppropriationRatio(d.getAppropriationRatio());
-			cd.setCid(ncb.getId());
-			cd.setDid(d.getId());
-			cd.setTid(d.getTid());
-			cd.setProjectType(d.getProjectType());
-			cd.setDunType(d.getDunType());
-			cd.setMoney(d.getMoney());
-			cd.setWaitDay(d.getWaitDay());
-			cd.setStartTime(d.getStartTime());
-			cd.setEffectiveCount(d.getEffectiveCount());
-			listcd.add(cd);
-		}
-		TChangeDunMapper.insertSelectiveList(listcd);
-		List<TOrderTaskBo> listTask=tOrderTaskMapper.selectOrderTask(t.getOrderNo());
-		List<TChangeTask> listck=new ArrayList<>();
-		for (TOrderTaskBo tt : listTask) {
-			TChangeTask ck=new TChangeTask();
-			ck.setOrderNo(tt.getOrderNo());
-			ck.setCid(ncb.getId());
-			ck.setCommodityId(tt.getCommodityId());
-			ck.setOrderNo(tt.getOrderNo());
-			ck.setCommodityName(tt.getCommodityName());
-			ck.setCommodityPrice(tt.getCommodityPrice());
-			ck.setCommodityQuantity(tt.getCommodityQuantity());
-			ck.setTaskComment(tt.getTaskComment());
-			ck.setMain(tt.getMain());
-			ck.setTid(tt.getId());
-			listck.add(ck);
-		}
-		TChangeTaskMapper.insertSelectiveList(listck);
+
+			List<OutNewOrderDunBo> listDun=newOrderDunMapper.selectListNewOrderDun(t.getOrderNo(),null,null);
+			List<TChangeDun> listcd=new ArrayList<>();
+			if (listDun!=null&&!listDun.isEmpty()) {
+				for (OutNewOrderDunBo d : listDun) {
+					TChangeDun cd=new TChangeDun();
+					cd.setOrderNo(d.getOrderNo());
+					cd.setAid(d.getAid());
+					cd.setAppropriationRatio(d.getAppropriationRatio());
+					cd.setCid(ncb.getId());
+					cd.setDid(d.getId());
+					cd.setTid(d.getTid());
+					cd.setProjectType(d.getProjectType());
+					cd.setDunType(d.getDunType());
+					cd.setMoney(d.getMoney());
+					cd.setWaitDay(d.getWaitDay());
+					cd.setStartTime(d.getStartTime());
+					cd.setEffectiveCount(d.getEffectiveCount());
+					listcd.add(cd);
+				}
+				TChangeDunMapper.insertSelectiveList(listcd);
+			}
+			List<TOrderTaskBo> listTask=tOrderTaskMapper.selectOrderTask(t.getOrderNo());
+			List<TChangeTask> listck=new ArrayList<>();
+			if (listTask!=null&&!listTask.isEmpty()) {
+				for (TOrderTaskBo tt : listTask) {
+					TChangeTask ck=new TChangeTask();
+					ck.setOrderNo(tt.getOrderNo());
+					ck.setCid(ncb.getId());
+					ck.setCommodityId(tt.getCommodityId());
+					ck.setOrderNo(tt.getOrderNo());
+					ck.setCommodityName(tt.getCommodityName());
+					ck.setCommodityPrice(tt.getCommodityPrice());
+					ck.setCommodityQuantity(tt.getCommodityQuantity());
+					ck.setTaskComment(tt.getTaskComment());
+					ck.setMain(tt.getMain());
+					ck.setTid(tt.getId());
+					listck.add(ck);
+				}
+				TChangeTaskMapper.insertSelectiveList(listck);
+			}
+		
 		OrderChangeLog ocl=new OrderChangeLog();
 		ocl.setAuditor(TokenManager.getAdminId());
 		ocl.setOrderNo(t.getOrderNo());
@@ -396,6 +403,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		List<TOrderLogBo> tl1=tOrderLogMapper.selectOrderByNo(nb.getOrderNo());
 		String newOrderNo=idGenerator.generateId().toString();
 		t1.setOrderNo(newOrderNo);
+		nb.setUsedOrder(newOrderNo);
 		t1.setDeleteSign(1);//将原订单作废,只能查看
 		tOrderNewMapper.insertSelective(t1);
 		for (TOrderTaskBo tOrderTaskBo : tt1) {
@@ -422,7 +430,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 		//将订单恢复正常
 		TOrderNew orderNew =new TOrderNew();
 		orderNew.setOrderNo(nb.getOrderNo());
-		orderNew.setDeleteSign(3);//设置为变更中
+		orderNew.setDeleteSign(0);
 		orderNew.setPrimaryOrder(newOrderNo);
 		tOrderNewMapper.updateByPrimaryKeySelective(orderNew);
 		
@@ -536,7 +544,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			pushTaskAndDun(nob.getId(),nob.getOrderNo());
 		}else if (nob.getType()==OrderChangeType.JJEBG.getCode()) {
 			o.setTotalAmount(nob.getTotalAmount());
-		}else if (nob.getType()==OrderChangeType.CB.getCode()||nob.getType()==OrderChangeType.ZC.getCode()) {
+		}else if (nob.getType()==OrderChangeType.CB.getCode()||nob.getType()==OrderChangeType.ZS.getCode()) {
 			pushTaskAndDun(nob.getId(),nob.getOrderNo());
 		}
 		tOrderNewMapper.updateByPrimaryKeySelective(o);
@@ -544,21 +552,10 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 	}
 
 	private void pushTaskAndDun(Integer id,String orderNo) {
-		List<TOrderTaskBo> listot=tOrderTaskMapper.selectOrderTask(orderNo);
 		List<TChangeTaskOut> listct=TChangeTaskMapper.selectByCid(id);
-		for (TOrderTaskBo ot : listot) {
-			boolean flag=true;
-			for (TChangeTaskOut ct : listct) {
-				if (ot.getId()==ct.getTid()) {
-					flag=false;
-				}
-				if (!flag) continue;
-			}
-			if(flag)tOrderTaskMapper.deleteByPrimaryKey(ot.getId());
-		}
 		for (TChangeTaskOut cd : listct) {
-			if (cd.getTid()==null) {
 			TOrderTask ot=new TOrderTask();
+			if (cd.getType()==1) {
 			ot.setOrderNo(cd.getOrderNo());
 			ot.setCommodityId(cd.getCommodityId());
 			ot.setOrderNo(cd.getOrderNo());
@@ -571,23 +568,18 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			tOrderTaskMapper.insertSelective(ot);
 			cd.setTid(ot.getId());
 			TChangeTaskMapper.updateByPrimaryKeySelective(cd);
+			}else if (cd.getType()==2) {
+				ot.setId(cd.getTid());
+				ot.setCommodityPrice(cd.getCommodityPrice());
+				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
+			}else if(cd.getType()==3) {
+				tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
 			}
 		}
-		List<TChangeDunOut> listcd=TChangeDunMapper.selectByCid(id);new ArrayList<>();
-		List<OutNewOrderDunBo> listDun=newOrderDunMapper.selectListNewOrderDun(orderNo,null,null);
-		for (OutNewOrderDunBo nb2 : listDun) {
-			boolean flag=true;
-			for (TChangeDunOut cd2 : listcd) {
-				if (nb2.getId()==cd2.getDid()) {
-					flag=false;
-				}
-				if (!flag) continue;
-			}
-			if(flag)newOrderDunMapper.deleteByPrimaryKey(nb2.getId());
-		}
+		List<TChangeDunOut> listcd=TChangeDunMapper.selectByCid(id);
 		for (TChangeDunOut cd : listcd) {
-			if (cd.getDid()==null) {
 			NewOrderDun nd=new NewOrderDun();
+			if (cd.getType()==1) {
 			nd.setOrderNo(cd.getOrderNo());
 			nd.setAid(cd.getAid());
 			nd.setAppropriationRatio(cd.getAppropriationRatio());
@@ -599,6 +591,12 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			nd.setStartTime(cd.getStartTime());
 			nd.setEffectiveCount(cd.getEffectiveCount());
 			newOrderDunMapper.insertSelective(nd);
+			}else if (cd.getType()==2) {
+				nd.setId(cd.getTid());
+				nd.setMoney(cd.getMoney());
+				newOrderDunMapper.updateByPrimaryKeySelective(nd);
+			}else if(cd.getType()==3) {
+				newOrderDunMapper.deleteByPrimaryKey(cd.getTid());
 			}
 		}
 		
@@ -724,12 +722,14 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 
 			@Override
 			public int addChangeTask(TChangeTask t) {
+				t.setType(1);
 				return TChangeTaskMapper.insertSelective(t);
 			}
 
 			@Override
 			public int addChangeDun(TChangeDun d) {
 				d.setAid(TokenManager.getAdminId());
+				d.setType(1);
 				return TChangeDunMapper.insertSelective(d);
 			}
 
@@ -752,6 +752,26 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 			public List<TChangeDunOut> selectChangeDun(Integer cid) {
 				return TChangeDunMapper.selectByCid(cid);
 			}
+
+			@Override
+			public int updateChangeTask(TChangeTask t) {
+				return TChangeTaskMapper.updateByPrimaryKeySelective(t);
+			}
+
+			@Override
+			public int updateChangeDun(TChangeDun t) {
+				return TChangeDunMapper.updateByPrimaryKeySelective(t);
+			}
+
+			@Override
+			public List<TOrderNewBo> orderChangeUsed(String orderNo) {
+				List<TOrderNewBo> list=tOrderNewMapper.selectUsedOrderByOrder(orderNo);
+				for (TOrderNewBo t : list) {
+					t.setDunList(newOrderDunService.selectListNewOrderDun(orderNo));
+					t.setTaskList(orderNewService.selectOrderTask(orderNo));
+				}
+				return list;
+			}
 		
 
 }

+ 1 - 2
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -229,8 +229,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public List<TOrderTaskBo> selectOrderTask(String orderNo) {
-		List<TOrderTaskBo> list=new ArrayList<>();
-		list=tOrderTaskMapper.selectOrderTask(orderNo);
+		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
 		if (TokenManager.hasRole(AFTConstants.SALESMAN)) {
 			for (TOrderTaskBo t : list) {
 				t.setOutsourceName("****");