Browse Source

新增法务转交

anderx 4 years ago
parent
commit
9ce535faad

+ 44 - 0
.idea/free-mybatis-generator-config.xml

@@ -119,6 +119,29 @@
             </Config>
           </value>
         </entry>
+        <entry key="t_order_mid">
+          <value>
+            <Config>
+              <option name="comment" value="true" />
+              <option name="daoMvnPath" value="src/main/java" />
+              <option name="daoName" value="TOrderMidMapper" />
+              <option name="daoPackage" value="com.goafanti.common.dao" />
+              <option name="daoPostfix" value="Mapper" />
+              <option name="modelMvnPath" value="src/main/java" />
+              <option name="modelName" value="TOrderMid" />
+              <option name="modelPackage" value="com.goafanti.common.model" />
+              <option name="name" value="t_order_mid" />
+              <option name="needToStringHashcodeEquals" value="true" />
+              <option name="overrideJava" value="true" />
+              <option name="overrideXML" value="true" />
+              <option name="primaryKey" value="id" />
+              <option name="projectFolder" value="$PROJECT_DIR$" />
+              <option name="tableName" value="t_order_mid" />
+              <option name="xmlMvnPath" value="src/main/java" />
+              <option name="xmlPackage" value="com.goafanti.common.mapper" />
+            </Config>
+          </value>
+        </entry>
         <entry key="t_task_mid">
           <value>
             <Config>
@@ -209,5 +232,26 @@
         </entry>
       </map>
     </option>
+    <option name="initConfig">
+      <map>
+        <entry key="initConfig">
+          <value>
+            <Config>
+              <option name="comment" value="true" />
+              <option name="daoPackage" value="com.goafanti.common.dao" />
+              <option name="daoPostfix" value="mapper" />
+              <option name="modelPackage" value="com.goafanti.common.model" />
+              <option name="name" value="initConfig" />
+              <option name="overrideJava" value="true" />
+              <option name="overrideXML" value="true" />
+              <option name="projectFolder" value="$PROJECT_DIR$" />
+              <option name="useLombokPlugin" value="true" />
+              <option name="useSchemaPrefix" value="true" />
+              <option name="xmlPackage" value="com.goafanti.common.mapper" />
+            </Config>
+          </value>
+        </entry>
+      </map>
+    </option>
   </component>
 </project>

+ 32 - 86
src/main/java/com/goafanti/common/dao/TOrderMidMapper.java

@@ -1,95 +1,41 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TOrderMid;
-import com.goafanti.common.model.TOrderMidExample;
+import org.apache.ibatis.annotations.Param;
 
 import java.math.BigDecimal;
 import java.util.Date;
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface TOrderMidMapper {
-    /**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	long countByExample(TOrderMidExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int deleteByExample(TOrderMidExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int insert(TOrderMid record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int insertSelective(TOrderMid record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	List<TOrderMid> selectByExample(TOrderMidExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	TOrderMid selectByPrimaryKey(Integer id);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int updateByExampleSelective(@Param("record") TOrderMid record, @Param("example") TOrderMidExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int updateByExample(@Param("record") TOrderMid record, @Param("example") TOrderMidExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int updateByPrimaryKeySelective(TOrderMid record);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_mid
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	int updateByPrimaryKey(TOrderMid record);
-
-	TOrderMid selectByOrderNo(String orderNo);
-
-	void updateSalesmanId(@Param("aid")String aid, @Param("transferId")String transferId);
-
-	void updateFinanceId(@Param("id")String id, @Param("financeId")String financeId);
-
-	void updatefinalReceivables(@Param("orderNo")String orderNo,@Param("amount")BigDecimal amount, @Param("receivablesTime")Date receivablesTime);
-
-	void updateInvoice(String orderNo);
-
-	void addOrderReceivables(@Param("orderNo")String orderNo, @Param("money")BigDecimal money);
-
-	String selectDepNameByDepid(String orderDep);
-
-	void updateCostAmount(@Param("tid")Integer tid, @Param("cost")BigDecimal cost, @Param("payment")BigDecimal payment);
-
-	void updateAddCostAmount(@Param("tid")Integer tid, @Param("cost")BigDecimal cost);
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(TOrderMid record);
+
+    int insertSelective(TOrderMid record);
+
+    TOrderMid selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TOrderMid record);
+
+    int updateByPrimaryKey(TOrderMid record);
+
+    TOrderMid selectByOrderNo(String orderNo);
+
+    void updateSalesmanId(@Param("aid")String aid, @Param("transferId")String transferId);
+
+    void updateFinanceId(@Param("id")String id, @Param("financeId")String financeId);
+
+    void updatefinalReceivables(@Param("orderNo")String orderNo, @Param("amount") BigDecimal amount, @Param("receivablesTime") Date receivablesTime);
+
+    void updateInvoice(String orderNo);
+
+    void addOrderReceivables(@Param("orderNo")String orderNo, @Param("money")BigDecimal money);
+
+    String selectDepNameByDepid(String orderDep);
+
+    void updateCostAmount(@Param("tid")Integer tid, @Param("cost")BigDecimal cost, @Param("payment")BigDecimal payment);
+
+    void updateAddCostAmount(@Param("tid")Integer tid, @Param("cost")BigDecimal cost);
+
+    int updateByOrderNo(TOrderMid tm);
 }

+ 110 - 274
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TOrderMidMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
     <result column="salesman_id" jdbcType="VARCHAR" property="salesmanId" />
@@ -20,168 +15,46 @@
     <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
     <result column="order_receivables" jdbcType="DECIMAL" property="orderReceivables" />
     <result column="order_arrears" jdbcType="DECIMAL" property="orderArrears" />
+    <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
     <result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
     <result column="dep_name" jdbcType="VARCHAR" property="depName" />
-    <result column="payment_amount" jdbcType="DECIMAL" property="paymentAmount" />
+    <result column="province_name" jdbcType="VARCHAR" property="provinceName" />
+    <result column="legal_affairs" jdbcType="INTEGER" property="legalAffairs" />
   </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 23 11:31:19 CST 2020.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
     id, order_no, salesman_id, finance_id, salesman_name, finance_name, final_receivables, 
     final_Receivables_time, invoice_amount, create_time, buyer_name, order_receivables, 
-    order_arrears, cost_amount, dep_name, payment_amount
+    order_arrears, payment_amount, cost_amount, dep_name, province_name, legal_affairs
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderMidExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from t_order_mid
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
     select 
     <include refid="Base_Column_List" />
     from t_order_mid
     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 Wed Sep 23 11:31:19 CST 2020.
-    -->
     delete from t_order_mid
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderMidExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
-    delete from t_order_mid
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.TOrderMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
-    insert into t_order_mid (id, order_no, salesman_id, 
-      finance_id, salesman_name, finance_name, 
-      final_receivables, final_Receivables_time, 
-      invoice_amount, create_time, buyer_name, 
-      order_receivables, order_arrears, cost_amount, 
-      dep_name, payment_amount)
-    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, 
-      #{financeId,jdbcType=VARCHAR}, #{salesmanName,jdbcType=VARCHAR}, #{financeName,jdbcType=VARCHAR}, 
-      #{finalReceivables,jdbcType=DECIMAL}, #{finalReceivablesTime,jdbcType=TIMESTAMP}, 
-      #{invoiceAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{buyerName,jdbcType=VARCHAR}, 
-      #{orderReceivables,jdbcType=DECIMAL}, #{orderArrears,jdbcType=DECIMAL}, #{costAmount,jdbcType=DECIMAL}, 
-      #{depName,jdbcType=VARCHAR}, #{paymentAmount,jdbcType=DECIMAL})
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderMid" useGeneratedKeys="true">
+    insert into t_order_mid (order_no, salesman_id, finance_id, 
+      salesman_name, finance_name, final_receivables, 
+      final_Receivables_time, invoice_amount, 
+      create_time, buyer_name, order_receivables, 
+      order_arrears, payment_amount, cost_amount, 
+      dep_name, province_name, legal_affairs
+      )
+    values (#{orderNo,jdbcType=VARCHAR}, #{salesmanId,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR}, 
+      #{salesmanName,jdbcType=VARCHAR}, #{financeName,jdbcType=VARCHAR}, #{finalReceivables,jdbcType=DECIMAL}, 
+      #{finalReceivablesTime,jdbcType=TIMESTAMP}, #{invoiceAmount,jdbcType=DECIMAL}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{buyerName,jdbcType=VARCHAR}, #{orderReceivables,jdbcType=DECIMAL}, 
+      #{orderArrears,jdbcType=DECIMAL}, #{paymentAmount,jdbcType=DECIMAL}, #{costAmount,jdbcType=DECIMAL}, 
+      #{depName,jdbcType=VARCHAR}, #{provinceName,jdbcType=VARCHAR}, #{legalAffairs,jdbcType=INTEGER}
+      )
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderMid" useGeneratedKeys="true">
     insert into t_order_mid
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="orderNo != null">
         order_no,
       </if>
@@ -218,20 +91,23 @@
       <if test="orderArrears != null">
         order_arrears,
       </if>
+      <if test="paymentAmount != null">
+        payment_amount,
+      </if>
       <if test="costAmount != null">
         cost_amount,
       </if>
       <if test="depName != null">
         dep_name,
       </if>
-      <if test="paymentAmount != null">
-        payment_amount,
+      <if test="provinceName != null">
+        province_name,
+      </if>
+      <if test="legalAffairs != null">
+        legal_affairs,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
       <if test="orderNo != null">
         #{orderNo,jdbcType=VARCHAR},
       </if>
@@ -268,122 +144,24 @@
       <if test="orderArrears != null">
         #{orderArrears,jdbcType=DECIMAL},
       </if>
+      <if test="paymentAmount != null">
+        #{paymentAmount,jdbcType=DECIMAL},
+      </if>
       <if test="costAmount != null">
         #{costAmount,jdbcType=DECIMAL},
       </if>
       <if test="depName != null">
         #{depName,jdbcType=VARCHAR},
       </if>
-      <if test="paymentAmount != null">
-        #{paymentAmount,jdbcType=DECIMAL},
+      <if test="provinceName != null">
+        #{provinceName,jdbcType=VARCHAR},
+      </if>
+      <if test="legalAffairs != null">
+        #{legalAffairs,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderMidExample" 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 23 11:31:19 CST 2020.
-    -->
-    select count(*) from t_order_mid
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
-    update t_order_mid
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.orderNo != null">
-        order_no = #{record.orderNo,jdbcType=VARCHAR},
-      </if>
-      <if test="record.salesmanId != null">
-        salesman_id = #{record.salesmanId,jdbcType=VARCHAR},
-      </if>
-      <if test="record.financeId != null">
-        finance_id = #{record.financeId,jdbcType=VARCHAR},
-      </if>
-      <if test="record.salesmanName != null">
-        salesman_name = #{record.salesmanName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.financeName != null">
-        finance_name = #{record.financeName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.finalReceivables != null">
-        final_receivables = #{record.finalReceivables,jdbcType=DECIMAL},
-      </if>
-      <if test="record.finalReceivablesTime != null">
-        final_Receivables_time = #{record.finalReceivablesTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.invoiceAmount != null">
-        invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="record.buyerName != null">
-        buyer_name = #{record.buyerName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.orderReceivables != null">
-        order_receivables = #{record.orderReceivables,jdbcType=DECIMAL},
-      </if>
-      <if test="record.orderArrears != null">
-        order_arrears = #{record.orderArrears,jdbcType=DECIMAL},
-      </if>
-      <if test="record.costAmount != null">
-        cost_amount = #{record.costAmount,jdbcType=DECIMAL},
-      </if>
-      <if test="record.depName != null">
-        dep_name = #{record.depName,jdbcType=VARCHAR},
-      </if>
-      <if test="record.paymentAmount != null">
-        payment_amount = #{record.paymentAmount,jdbcType=DECIMAL},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
-    update t_order_mid
-    set id = #{record.id,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=VARCHAR},
-      salesman_id = #{record.salesmanId,jdbcType=VARCHAR},
-      finance_id = #{record.financeId,jdbcType=VARCHAR},
-      salesman_name = #{record.salesmanName,jdbcType=VARCHAR},
-      finance_name = #{record.financeName,jdbcType=VARCHAR},
-      final_receivables = #{record.finalReceivables,jdbcType=DECIMAL},
-      final_Receivables_time = #{record.finalReceivablesTime,jdbcType=TIMESTAMP},
-      invoice_amount = #{record.invoiceAmount,jdbcType=DECIMAL},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      buyer_name = #{record.buyerName,jdbcType=VARCHAR},
-      order_receivables = #{record.orderReceivables,jdbcType=DECIMAL},
-      order_arrears = #{record.orderArrears,jdbcType=DECIMAL},
-      cost_amount = #{record.costAmount,jdbcType=DECIMAL},
-      dep_name = #{record.depName,jdbcType=VARCHAR},
-      payment_amount = #{record.paymentAmount,jdbcType=DECIMAL}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
     update t_order_mid
     <set>
       <if test="orderNo != null">
@@ -422,24 +200,25 @@
       <if test="orderArrears != null">
         order_arrears = #{orderArrears,jdbcType=DECIMAL},
       </if>
+      <if test="paymentAmount != null">
+        payment_amount = #{paymentAmount,jdbcType=DECIMAL},
+      </if>
       <if test="costAmount != null">
         cost_amount = #{costAmount,jdbcType=DECIMAL},
       </if>
       <if test="depName != null">
         dep_name = #{depName,jdbcType=VARCHAR},
       </if>
-      <if test="paymentAmount != null">
-        payment_amount = #{paymentAmount,jdbcType=DECIMAL},
+      <if test="provinceName != null">
+        province_name = #{provinceName,jdbcType=VARCHAR},
+      </if>
+      <if test="legalAffairs != null">
+        legal_affairs = #{legalAffairs,jdbcType=INTEGER},
       </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Sep 23 11:31:19 CST 2020.
-    -->
     update t_order_mid
     set order_no = #{orderNo,jdbcType=VARCHAR},
       salesman_id = #{salesmanId,jdbcType=VARCHAR},
@@ -453,13 +232,15 @@
       buyer_name = #{buyerName,jdbcType=VARCHAR},
       order_receivables = #{orderReceivables,jdbcType=DECIMAL},
       order_arrears = #{orderArrears,jdbcType=DECIMAL},
+      payment_amount = #{paymentAmount,jdbcType=DECIMAL},
       cost_amount = #{costAmount,jdbcType=DECIMAL},
       dep_name = #{depName,jdbcType=VARCHAR},
-      payment_amount = #{paymentAmount,jdbcType=DECIMAL}
+      province_name = #{provinceName,jdbcType=VARCHAR},
+      legal_affairs = #{legalAffairs,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectByOrderNo" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from t_order_mid
     where order_no = #{id,jdbcType=INTEGER}
@@ -478,10 +259,10 @@
 	where order_no= #{orderNo}
   </update>
   <update id="updateInvoice">
-  update t_order_mid m,(select order_no,sum(amount)amount from t_order_invoice where status=2 group by order_no)b 
-	set m.invoice_amount=b.amount where m.order_no= #{orderNo} and  m.order_no=b.order_no 
+  update t_order_mid m,(select order_no,sum(amount)amount from t_order_invoice where status=2 group by order_no)b
+	set m.invoice_amount=b.amount where m.order_no= #{orderNo} and  m.order_no=b.order_no
   </update>
-  <update id="addOrderReceivables"> 
+  <update id="addOrderReceivables">
   update t_order_mid  set order_receivables=order_receivables+#{money},
   order_arrears=order_arrears+#{money}
 	where order_no=#{orderNo}
@@ -489,8 +270,8 @@
   <select id="selectDepNameByDepid" resultType="java.lang.String">
   select name from department where id= #{orderDep}
   </select>
-  
-  
+
+
   <update id="updateCostAmount">
      update t_order_task a ,t_order_mid b
     <set>
@@ -503,7 +284,7 @@
     </set>
     where  a.order_no=b.order_no and a.id= #{tid}
   </update>
-  
+
   <update id="updateAddCostAmount">
      update t_order_task a ,t_order_mid b
     <set>
@@ -513,5 +294,60 @@
     </set>
     where  a.order_no=b.order_no and a.id= #{tid}
   </update>
-  
+  <update id="updateByOrderNo">
+    update t_order_mid
+    <set>
+
+      <if test="salesmanId != null">
+        salesman_id = #{salesmanId,jdbcType=VARCHAR},
+      </if>
+      <if test="financeId != null">
+        finance_id = #{financeId,jdbcType=VARCHAR},
+      </if>
+      <if test="salesmanName != null">
+        salesman_name = #{salesmanName,jdbcType=VARCHAR},
+      </if>
+      <if test="financeName != null">
+        finance_name = #{financeName,jdbcType=VARCHAR},
+      </if>
+      <if test="finalReceivables != null">
+        final_receivables = #{finalReceivables,jdbcType=DECIMAL},
+      </if>
+      <if test="finalReceivablesTime != null">
+        final_Receivables_time = #{finalReceivablesTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="invoiceAmount != null">
+        invoice_amount = #{invoiceAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="buyerName != null">
+        buyer_name = #{buyerName,jdbcType=VARCHAR},
+      </if>
+      <if test="orderReceivables != null">
+        order_receivables = #{orderReceivables,jdbcType=DECIMAL},
+      </if>
+      <if test="orderArrears != null">
+        order_arrears = #{orderArrears,jdbcType=DECIMAL},
+      </if>
+      <if test="paymentAmount != null">
+        payment_amount = #{paymentAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="costAmount != null">
+        cost_amount = #{costAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="depName != null">
+        dep_name = #{depName,jdbcType=VARCHAR},
+      </if>
+      <if test="provinceName != null">
+        province_name = #{provinceName,jdbcType=VARCHAR},
+      </if>
+      <if test="legalAffairs != null">
+        legal_affairs = #{legalAffairs,jdbcType=INTEGER},
+      </if>
+    </set>
+    where order_no = #{orderNo,jdbcType=VARCHAR}
+  </update>
+
 </mapper>

+ 327 - 370
src/main/java/com/goafanti/common/model/TOrderMid.java

@@ -1,376 +1,333 @@
 package com.goafanti.common.model;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
 
-public class TOrderMid {
-
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.order_no
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String orderNo;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.salesman_id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String salesmanId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.finance_id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String financeId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.salesman_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String salesmanName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.finance_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String financeName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.final_receivables
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private BigDecimal finalReceivables;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.final_Receivables_time
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private Date finalReceivablesTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.invoice_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private BigDecimal invoiceAmount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.create_time
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.buyer_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String buyerName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.order_receivables
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private BigDecimal orderReceivables;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.order_arrears
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private BigDecimal orderArrears;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.cost_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private BigDecimal costAmount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.dep_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private String depName;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_mid.payment_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	private BigDecimal paymentAmount;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.id
-	 * @return  the value of t_order_mid.id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.id
-	 * @param id  the value for t_order_mid.id
-	 * @mbg.generated  Wed Sep 23 11:31:19 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_order_mid.order_no
-	 * @return  the value of t_order_mid.order_no
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getOrderNo() {
-		return orderNo;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.order_no
-	 * @param orderNo  the value for t_order_mid.order_no
-	 * @mbg.generated  Wed Sep 23 11:31:19 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_order_mid.salesman_id
-	 * @return  the value of t_order_mid.salesman_id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getSalesmanId() {
-		return salesmanId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.salesman_id
-	 * @param salesmanId  the value for t_order_mid.salesman_id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setSalesmanId(String salesmanId) {
-		this.salesmanId = salesmanId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.finance_id
-	 * @return  the value of t_order_mid.finance_id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getFinanceId() {
-		return financeId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.finance_id
-	 * @param financeId  the value for t_order_mid.finance_id
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setFinanceId(String financeId) {
-		this.financeId = financeId;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.salesman_name
-	 * @return  the value of t_order_mid.salesman_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getSalesmanName() {
-		return salesmanName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.salesman_name
-	 * @param salesmanName  the value for t_order_mid.salesman_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setSalesmanName(String salesmanName) {
-		this.salesmanName = salesmanName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.finance_name
-	 * @return  the value of t_order_mid.finance_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getFinanceName() {
-		return financeName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.finance_name
-	 * @param financeName  the value for t_order_mid.finance_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setFinanceName(String financeName) {
-		this.financeName = financeName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.final_receivables
-	 * @return  the value of t_order_mid.final_receivables
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public BigDecimal getFinalReceivables() {
-		return finalReceivables;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.final_receivables
-	 * @param finalReceivables  the value for t_order_mid.final_receivables
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setFinalReceivables(BigDecimal finalReceivables) {
-		this.finalReceivables = finalReceivables;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.final_Receivables_time
-	 * @return  the value of t_order_mid.final_Receivables_time
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public Date getFinalReceivablesTime() {
-		return finalReceivablesTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.final_Receivables_time
-	 * @param finalReceivablesTime  the value for t_order_mid.final_Receivables_time
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setFinalReceivablesTime(Date finalReceivablesTime) {
-		this.finalReceivablesTime = finalReceivablesTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.invoice_amount
-	 * @return  the value of t_order_mid.invoice_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public BigDecimal getInvoiceAmount() {
-		return invoiceAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.invoice_amount
-	 * @param invoiceAmount  the value for t_order_mid.invoice_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setInvoiceAmount(BigDecimal invoiceAmount) {
-		this.invoiceAmount = invoiceAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.create_time
-	 * @return  the value of t_order_mid.create_time
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.create_time
-	 * @param createTime  the value for t_order_mid.create_time
-	 * @mbg.generated  Wed Sep 23 11:31:19 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_order_mid.buyer_name
-	 * @return  the value of t_order_mid.buyer_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getBuyerName() {
-		return buyerName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.buyer_name
-	 * @param buyerName  the value for t_order_mid.buyer_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setBuyerName(String buyerName) {
-		this.buyerName = buyerName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.order_receivables
-	 * @return  the value of t_order_mid.order_receivables
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public BigDecimal getOrderReceivables() {
-		return orderReceivables;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.order_receivables
-	 * @param orderReceivables  the value for t_order_mid.order_receivables
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setOrderReceivables(BigDecimal orderReceivables) {
-		this.orderReceivables = orderReceivables;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.order_arrears
-	 * @return  the value of t_order_mid.order_arrears
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public BigDecimal getOrderArrears() {
-		return orderArrears;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.order_arrears
-	 * @param orderArrears  the value for t_order_mid.order_arrears
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setOrderArrears(BigDecimal orderArrears) {
-		this.orderArrears = orderArrears;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.cost_amount
-	 * @return  the value of t_order_mid.cost_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public BigDecimal getCostAmount() {
-		return costAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.cost_amount
-	 * @param costAmount  the value for t_order_mid.cost_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setCostAmount(BigDecimal costAmount) {
-		this.costAmount = costAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.dep_name
-	 * @return  the value of t_order_mid.dep_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public String getDepName() {
-		return depName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.dep_name
-	 * @param depName  the value for t_order_mid.dep_name
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setDepName(String depName) {
-		this.depName = depName;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_mid.payment_amount
-	 * @return  the value of t_order_mid.payment_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public BigDecimal getPaymentAmount() {
-		return paymentAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_mid.payment_amount
-	 * @param paymentAmount  the value for t_order_mid.payment_amount
-	 * @mbg.generated  Wed Sep 23 11:31:19 CST 2020
-	 */
-	public void setPaymentAmount(BigDecimal paymentAmount) {
-		this.paymentAmount = paymentAmount;
-	}
+/**
+ * t_order_mid
+ * @author 
+ */
+public class TOrderMid implements Serializable {
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+    /**
+     * 营销员id
+     */
+    private String salesmanId;
+
+    /**
+     * 财务id
+     */
+    private String financeId;
+
+    /**
+     * 营销员名称
+     */
+    private String salesmanName;
+
+    /**
+     * 财务名称
+     */
+    private String financeName;
+
+    /**
+     * 最后一次收款
+     */
+    private BigDecimal finalReceivables;
+
+    /**
+     * 最后一次收款时间
+     */
+    private Date finalReceivablesTime;
+
+    /**
+     * 开票金额
+     */
+    private BigDecimal invoiceAmount;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 公司名称(冗余)
+     */
+    private String buyerName;
+
+    /**
+     * 应收款
+     */
+    private BigDecimal orderReceivables;
+
+    /**
+     * 欠款
+     */
+    private BigDecimal orderArrears;
+
+    /**
+     * 支付金额
+     */
+    private BigDecimal paymentAmount;
+
+    /**
+     * 成本金额
+     */
+    private BigDecimal costAmount;
+
+    /**
+     * 部门名称
+     */
+    private String depName;
+
+    /**
+     * 省份名称
+     */
+    private String provinceName;
+
+    /**
+     * 法务 0否 1是
+     */
+    private Integer legalAffairs;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getSalesmanId() {
+        return salesmanId;
+    }
+
+    public void setSalesmanId(String salesmanId) {
+        this.salesmanId = salesmanId;
+    }
+
+    public String getFinanceId() {
+        return financeId;
+    }
+
+    public void setFinanceId(String financeId) {
+        this.financeId = financeId;
+    }
+
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+
+    public String getFinanceName() {
+        return financeName;
+    }
+
+    public void setFinanceName(String financeName) {
+        this.financeName = financeName;
+    }
+
+    public BigDecimal getFinalReceivables() {
+        return finalReceivables;
+    }
+
+    public void setFinalReceivables(BigDecimal finalReceivables) {
+        this.finalReceivables = finalReceivables;
+    }
+
+    public Date getFinalReceivablesTime() {
+        return finalReceivablesTime;
+    }
+
+    public void setFinalReceivablesTime(Date finalReceivablesTime) {
+        this.finalReceivablesTime = finalReceivablesTime;
+    }
+
+    public BigDecimal getInvoiceAmount() {
+        return invoiceAmount;
+    }
+
+    public void setInvoiceAmount(BigDecimal invoiceAmount) {
+        this.invoiceAmount = invoiceAmount;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    public BigDecimal getOrderReceivables() {
+        return orderReceivables;
+    }
+
+    public void setOrderReceivables(BigDecimal orderReceivables) {
+        this.orderReceivables = orderReceivables;
+    }
+
+    public BigDecimal getOrderArrears() {
+        return orderArrears;
+    }
+
+    public void setOrderArrears(BigDecimal orderArrears) {
+        this.orderArrears = orderArrears;
+    }
+
+    public BigDecimal getPaymentAmount() {
+        return paymentAmount;
+    }
+
+    public void setPaymentAmount(BigDecimal paymentAmount) {
+        this.paymentAmount = paymentAmount;
+    }
+
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
+    public String getProvinceName() {
+        return provinceName;
+    }
+
+    public void setProvinceName(String provinceName) {
+        this.provinceName = provinceName;
+    }
+
+    public Integer getLegalAffairs() {
+        return legalAffairs;
+    }
+
+    public void setLegalAffairs(Integer legalAffairs) {
+        this.legalAffairs = legalAffairs;
+    }
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        TOrderMid other = (TOrderMid) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
+            && (this.getSalesmanId() == null ? other.getSalesmanId() == null : this.getSalesmanId().equals(other.getSalesmanId()))
+            && (this.getFinanceId() == null ? other.getFinanceId() == null : this.getFinanceId().equals(other.getFinanceId()))
+            && (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName()))
+            && (this.getFinanceName() == null ? other.getFinanceName() == null : this.getFinanceName().equals(other.getFinanceName()))
+            && (this.getFinalReceivables() == null ? other.getFinalReceivables() == null : this.getFinalReceivables().equals(other.getFinalReceivables()))
+            && (this.getFinalReceivablesTime() == null ? other.getFinalReceivablesTime() == null : this.getFinalReceivablesTime().equals(other.getFinalReceivablesTime()))
+            && (this.getInvoiceAmount() == null ? other.getInvoiceAmount() == null : this.getInvoiceAmount().equals(other.getInvoiceAmount()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getBuyerName() == null ? other.getBuyerName() == null : this.getBuyerName().equals(other.getBuyerName()))
+            && (this.getOrderReceivables() == null ? other.getOrderReceivables() == null : this.getOrderReceivables().equals(other.getOrderReceivables()))
+            && (this.getOrderArrears() == null ? other.getOrderArrears() == null : this.getOrderArrears().equals(other.getOrderArrears()))
+            && (this.getPaymentAmount() == null ? other.getPaymentAmount() == null : this.getPaymentAmount().equals(other.getPaymentAmount()))
+            && (this.getCostAmount() == null ? other.getCostAmount() == null : this.getCostAmount().equals(other.getCostAmount()))
+            && (this.getDepName() == null ? other.getDepName() == null : this.getDepName().equals(other.getDepName()))
+            && (this.getProvinceName() == null ? other.getProvinceName() == null : this.getProvinceName().equals(other.getProvinceName()))
+            && (this.getLegalAffairs() == null ? other.getLegalAffairs() == null : this.getLegalAffairs().equals(other.getLegalAffairs()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
+        result = prime * result + ((getSalesmanId() == null) ? 0 : getSalesmanId().hashCode());
+        result = prime * result + ((getFinanceId() == null) ? 0 : getFinanceId().hashCode());
+        result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode());
+        result = prime * result + ((getFinanceName() == null) ? 0 : getFinanceName().hashCode());
+        result = prime * result + ((getFinalReceivables() == null) ? 0 : getFinalReceivables().hashCode());
+        result = prime * result + ((getFinalReceivablesTime() == null) ? 0 : getFinalReceivablesTime().hashCode());
+        result = prime * result + ((getInvoiceAmount() == null) ? 0 : getInvoiceAmount().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getBuyerName() == null) ? 0 : getBuyerName().hashCode());
+        result = prime * result + ((getOrderReceivables() == null) ? 0 : getOrderReceivables().hashCode());
+        result = prime * result + ((getOrderArrears() == null) ? 0 : getOrderArrears().hashCode());
+        result = prime * result + ((getPaymentAmount() == null) ? 0 : getPaymentAmount().hashCode());
+        result = prime * result + ((getCostAmount() == null) ? 0 : getCostAmount().hashCode());
+        result = prime * result + ((getDepName() == null) ? 0 : getDepName().hashCode());
+        result = prime * result + ((getProvinceName() == null) ? 0 : getProvinceName().hashCode());
+        result = prime * result + ((getLegalAffairs() == null) ? 0 : getLegalAffairs().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", orderNo=").append(orderNo);
+        sb.append(", salesmanId=").append(salesmanId);
+        sb.append(", financeId=").append(financeId);
+        sb.append(", salesmanName=").append(salesmanName);
+        sb.append(", financeName=").append(financeName);
+        sb.append(", finalReceivables=").append(finalReceivables);
+        sb.append(", finalReceivablesTime=").append(finalReceivablesTime);
+        sb.append(", invoiceAmount=").append(invoiceAmount);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", buyerName=").append(buyerName);
+        sb.append(", orderReceivables=").append(orderReceivables);
+        sb.append(", orderArrears=").append(orderArrears);
+        sb.append(", paymentAmount=").append(paymentAmount);
+        sb.append(", costAmount=").append(costAmount);
+        sb.append(", depName=").append(depName);
+        sb.append(", provinceName=").append(provinceName);
+        sb.append(", legalAffairs=").append(legalAffairs);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
 }

File diff suppressed because it is too large
+ 0 - 1293
src/main/java/com/goafanti/common/model/TOrderMidExample.java


+ 1 - 1
src/main/java/com/goafanti/order/controller/InputProjectCheck.java

@@ -1,4 +1,4 @@
-package com.goafanti.order.controller;
+package com.goafanti.order.bo;
 
 public class InputProjectCheck {
 	private String name;

+ 29 - 0
src/main/java/com/goafanti/order/controller/LegalAffairsApiController.java

@@ -0,0 +1,29 @@
+package com.goafanti.order.controller;
+
+import com.goafanti.common.bo.Result;
+import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.controller.CertifyApiController;
+import com.goafanti.order.service.LegalAffairsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/api/admin/lagalAffairs")
+public class LegalAffairsApiController extends CertifyApiController {
+    @Autowired
+    private LegalAffairsService legalAffairsService;
+
+    @RequestMapping(value = "/transfer")
+    public Result transferLagalAffairs(String orderNo){
+        Result res =new Result();
+        if (orderNo==null){
+            res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,ErrorConstants.PARAM_EMPTY_ERROR,"订单编号"));
+            return res;
+
+        }
+        res.data(legalAffairsService.pushTransferLagalAffairs(orderNo));
+        return res;
+
+    }
+}

+ 7 - 0
src/main/java/com/goafanti/order/service/LegalAffairsService.java

@@ -0,0 +1,7 @@
+package com.goafanti.order.service;
+
+public interface LegalAffairsService {
+
+
+    int pushTransferLagalAffairs(String orderNo);
+}

+ 1 - 1
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -6,7 +6,7 @@ import com.goafanti.common.bo.UserOrderTask;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.*;
-import com.goafanti.order.controller.InputProjectCheck;
+import com.goafanti.order.bo.InputProjectCheck;
 import com.goafanti.organization.bo.OutPaymentNode;
 
 public interface OrderProjectService {

+ 23 - 0
src/main/java/com/goafanti/order/service/impl/LegalAffairsServiceImpl.java

@@ -0,0 +1,23 @@
+package com.goafanti.order.service.impl;
+
+import com.goafanti.common.dao.TOrderMidMapper;
+import com.goafanti.common.model.TOrderMid;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.order.service.LegalAffairsService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> implements LegalAffairsService {
+    @Autowired
+    private TOrderMidMapper tOrderMidMapper;
+
+
+    @Override
+    public    int pushTransferLagalAffairs(String orderNo){
+        TOrderMid tm = new TOrderMid();
+        tm.setOrderNo(orderNo);
+        tm.setLegalAffairs(1);
+        return tOrderMidMapper.updateByOrderNo(tm);
+    }
+}

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

@@ -65,7 +65,7 @@ import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.controller.InputProjectCheck;
+import com.goafanti.order.bo.InputProjectCheck;
 import com.goafanti.order.enums.BonusSubject;
 import com.goafanti.order.enums.NewOrderDunType;
 import com.goafanti.order.enums.NewProjectStatus;

+ 5 - 5
src/main/resources/props/config_local.properties

@@ -1,11 +1,11 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
-#jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=123456
-jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 jdbc.username=root
-jdbc.password=aftdev
+jdbc.password=123456
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.username=root
+#jdbc.password=aftdev
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20