Browse Source

开票功能开发

anderx 6 years ago
parent
commit
d68cd44064

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

@@ -2,6 +2,8 @@ package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TOrderInvoice;
 import com.goafanti.common.model.TOrderInvoiceExample;
+import com.goafanti.order.bo.TOrderInvoiceDetails;
+
 import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
@@ -9,69 +11,71 @@ public interface TOrderInvoiceMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	long countByExample(TOrderInvoiceExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int deleteByExample(TOrderInvoiceExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int insert(TOrderInvoice record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int insertSelective(TOrderInvoice record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	List<TOrderInvoice> selectByExample(TOrderInvoiceExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	TOrderInvoice selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int updateByExampleSelective(@Param("record") TOrderInvoice record, @Param("example") TOrderInvoiceExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int updateByExample(@Param("record") TOrderInvoice record, @Param("example") TOrderInvoiceExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int updateByPrimaryKeySelective(TOrderInvoice record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:09 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	int updateByPrimaryKey(TOrderInvoice record);
 
 	int checkApplyAmount(@Param("orderNo")String orderNo,@Param("id")Integer id);
+
+	TOrderInvoiceDetails selectByInvoiceDitails(Integer id);
 }

+ 53 - 25
src/main/java/com/goafanti/common/mapper/TOrderInvoiceMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
@@ -33,12 +33,13 @@
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="approval" jdbcType="INTEGER" property="approval" />
+    <result column="already_amount" jdbcType="DECIMAL" property="alreadyAmount" />
   </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 Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -72,7 +73,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -106,18 +107,18 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     id, order_no, type, status, reject_reason, remarks, invoice_type, unit_name, tax_number, 
     amount, banks, content, unit_address, invoice_remarks, unit_mobile, voucher_url, 
     post, addressee, addressee_mobile, addressee_province, addressee_city, addressee_area, 
-    recipient_address, create_time, update_time, approval
+    recipient_address, create_time, update_time, approval, already_amount
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderInvoiceExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     select
     <if test="distinct">
@@ -136,7 +137,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -147,7 +148,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     delete from t_order_invoice
     where id = #{id,jdbcType=INTEGER}
@@ -156,7 +157,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     delete from t_order_invoice
     <if test="_parameter != null">
@@ -167,7 +168,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     insert into t_order_invoice (id, order_no, type, 
       status, reject_reason, remarks, 
@@ -177,7 +178,8 @@
       voucher_url, post, addressee, 
       addressee_mobile, addressee_province, addressee_city, 
       addressee_area, recipient_address, create_time, 
-      update_time, approval)
+      update_time, approval, already_amount
+      )
     values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
       #{status,jdbcType=INTEGER}, #{rejectReason,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, 
       #{invoiceType,jdbcType=INTEGER}, #{unitName,jdbcType=VARCHAR}, #{taxNumber,jdbcType=VARCHAR}, 
@@ -186,13 +188,14 @@
       #{voucherUrl,jdbcType=VARCHAR}, #{post,jdbcType=INTEGER}, #{addressee,jdbcType=VARCHAR}, 
       #{addresseeMobile,jdbcType=VARCHAR}, #{addresseeProvince,jdbcType=INTEGER}, #{addresseeCity,jdbcType=INTEGER}, 
       #{addresseeArea,jdbcType=INTEGER}, #{recipientAddress,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{approval,jdbcType=INTEGER})
+      #{updateTime,jdbcType=TIMESTAMP}, #{approval,jdbcType=INTEGER}, #{alreadyAmount,jdbcType=DECIMAL}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderInvoice">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     insert into t_order_invoice
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -274,6 +277,9 @@
       <if test="approval != null">
         approval,
       </if>
+      <if test="alreadyAmount != null">
+        already_amount,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -354,13 +360,16 @@
       <if test="approval != null">
         #{approval,jdbcType=INTEGER},
       </if>
+      <if test="alreadyAmount != null">
+        #{alreadyAmount,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.TOrderInvoiceExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     select count(*) from t_order_invoice
     <if test="_parameter != null">
@@ -371,7 +380,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     update t_order_invoice
     <set>
@@ -453,6 +462,9 @@
       <if test="record.approval != null">
         approval = #{record.approval,jdbcType=INTEGER},
       </if>
+      <if test="record.alreadyAmount != null">
+        already_amount = #{record.alreadyAmount,jdbcType=DECIMAL},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -462,7 +474,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     update t_order_invoice
     set id = #{record.id,jdbcType=INTEGER},
@@ -490,7 +502,8 @@
       recipient_address = #{record.recipientAddress,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP},
-      approval = #{record.approval,jdbcType=INTEGER}
+      approval = #{record.approval,jdbcType=INTEGER},
+      already_amount = #{record.alreadyAmount,jdbcType=DECIMAL}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -499,7 +512,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     update t_order_invoice
     <set>
@@ -578,6 +591,9 @@
       <if test="approval != null">
         approval = #{approval,jdbcType=INTEGER},
       </if>
+      <if test="alreadyAmount != null">
+        already_amount = #{alreadyAmount,jdbcType=DECIMAL},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -585,7 +601,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Thu May 16 11:47:09 CST 2019.
+      This element was generated on Fri May 17 09:46:50 CST 2019.
     -->
     update t_order_invoice
     set order_no = #{orderNo,jdbcType=VARCHAR},
@@ -612,7 +628,8 @@
       recipient_address = #{recipientAddress,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP},
-      approval = #{approval,jdbcType=INTEGER}
+      approval = #{approval,jdbcType=INTEGER},
+      already_amount = #{alreadyAmount,jdbcType=DECIMAL}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="checkApplyAmount" resultType="Integer">
@@ -623,8 +640,9 @@
 	</if>
   </select>
   <select id="financeOrderInvoiceList" resultType="com.goafanti.order.bo.TOrderInvoiceBo">
-     select a.id,a.unit_name as unitName,a.order_no as orderNo,c.name,b.project_status as projectStatus,a.amount,
-     ifnull(d.sumAmount,0) as sumAmount, date_format(a.create_time,'%Y-%m-%d %H:%I:%S')as createTime from t_order_invoice a 
+      select a.id,a.unit_name as unitName,a.order_no as orderNo,c.name,b.project_status as projectStatus,a.amount,
+     ifnull(d.sumAmount,0) as sumAmount, date_format(a.create_time,'%Y-%m-%d %H:%I:%S')as createTime ,a.status,
+     b.settlement_amount as settlementAmount, (b.total_amount-b.settlement_amount) as notAmount from t_order_invoice a 
 	left join t_order_new b on a.order_no=b.order_no left join admin c on b.salesman_id=c.id
 	left join (select order_no,sum(amount)as  sumAmount from t_order_invoice where status =2 group by order_no) d
 	on a.order_no=d.order_no where a.status in (1,2) and a.approval in (0,2) 
@@ -667,7 +685,7 @@
   
   <select id="salesmanOrderInvoiceList" resultType="com.goafanti.order.bo.TOrderInvoiceBo">
     select id ,order_no as orderNo,amount,date_format(create_time,'%Y-%m-%d %H:%I:%S') as createTime,
-	status from t_order_invoice
+	reject_reason as  rejectReason,status from t_order_invoice
 	where status !=4
 	<if test="orderNo !=null">
 	and order_no = #{orderNo,jdbcType=VARCHAR}
@@ -679,7 +697,7 @@
   </select>
   
   <select id="salesmanOrderInvoiceCount" resultType="java.lang.Integer">
-   select count(*) where status !=4
+   select count(*) from t_order_invoice where status !=4
 	<if test="orderNo !=null">
 	and order_no = #{orderNo,jdbcType=VARCHAR}
 	</if>
@@ -687,7 +705,8 @@
   
   <select id="approvalOrderInvoiceList" resultType="com.goafanti.order.bo.TOrderInvoiceBo">
      select a.id,a.unit_name as unitName,a.order_no as orderNo,c.name,b.project_status as projectStatus,a.amount,
-     ifnull(d.sumAmount,0) as sumAmount, date_format(a.create_time,'%Y-%m-%d %H:%I:%S')as createTime from t_order_invoice a 
+     ifnull(d.sumAmount,0) as sumAmount, date_format(a.create_time,'%Y-%m-%d %H:%I:%S')as createTime ,
+     b.settlement_amount as settlementAmount, (b.total_amount-b.settlement_amount) as notAmount from t_order_invoice a 
 	left join t_order_new b on a.order_no=b.order_no left join admin c on b.salesman_id=c.id
 	left join (select order_no,sum(amount)as  sumAmount from t_order_invoice where status =2 group by order_no) d
 	on a.order_no=d.order_no where a.status =1 and a.approval =1
@@ -726,4 +745,13 @@
 	and b.order_dep= #{orderDep,jdbcType=VARCHAR}
 	</if>
   </select>
+  
+  <select id="selectByInvoiceDitails" parameterType="java.lang.Integer"  resultType="com.goafanti.order.bo.TOrderInvoiceDetails">
+    	select 
+    a.id ,a.order_no as orderNo,a.`type`,a.status,a.reject_reason as rejectReason,a.remarks,a.invoice_type as invoiceType,a.unit_name as unitName,a.tax_number as taxNumber,a.amount,a.banks,a.content,
+    a.unit_address as unitAddress,a.invoice_remarks as invoiceRemarks,a.unit_mobile as unitMobile,a.voucher_url as voucherUrl ,a.post,a.addressee,a.addressee_area as addresseeArea,a.addressee_city as addresseeCity,
+    a.addressee_province as addresseeProvince,a.addressee_mobile,a.reject_reason,a.create_time,a.update_time,a.approval,a.already_amount,b.contract_no as contractNo 
+    from t_order_invoice a left join t_order_new b on a.order_no=b.order_no
+    where id = #{id,jdbcType=INTEGER}
+  </select>
 </mapper>

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

@@ -1157,7 +1157,7 @@
   </select>
   <select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
   	select 
-  		a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,
+  		a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.contract_no as contractNo,
   		b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,a.order_status as orderStatus,
   		a.liquidation_status as liquidationStatus,a.approval,c.name as salesmanName,dep.name as depName,d.name as financeName
   	<if test="specially == 2">

+ 101 - 78
src/main/java/com/goafanti/common/model/TOrderInvoice.java

@@ -11,139 +11,144 @@ public class TOrderInvoice {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.id
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.order_no
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.type
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.status
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.reject_reason
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String rejectReason;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.remarks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String remarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.invoice_type
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer invoiceType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.unit_name
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String unitName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.tax_number
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String taxNumber;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.amount
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private BigDecimal amount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.banks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String banks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.content
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String content;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.unit_address
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String unitAddress;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.invoice_remarks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String invoiceRemarks;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.unit_mobile
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String unitMobile;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.voucher_url
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String voucherUrl;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.post
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer post;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.addressee
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String addressee;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.addressee_mobile
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String addresseeMobile;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.addressee_province
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer addresseeProvince;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.addressee_city
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer addresseeCity;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.addressee_area
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer addresseeArea;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.recipient_address
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private String recipientAddress;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.create_time
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.update_time
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.approval
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	private Integer approval;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_invoice.already_amount
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
+	 */
+	private BigDecimal alreadyAmount;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.id
 	 * @return  the value of t_order_invoice.id
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getId() {
 		return id;
@@ -152,7 +157,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.id
 	 * @param id  the value for t_order_invoice.id
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -161,7 +166,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.order_no
 	 * @return  the value of t_order_invoice.order_no
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getOrderNo() {
 		return orderNo;
@@ -170,7 +175,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.order_no
 	 * @param orderNo  the value for t_order_invoice.order_no
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
@@ -179,7 +184,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.type
 	 * @return  the value of t_order_invoice.type
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getType() {
 		return type;
@@ -188,7 +193,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.type
 	 * @param type  the value for t_order_invoice.type
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -197,7 +202,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.status
 	 * @return  the value of t_order_invoice.status
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getStatus() {
 		return status;
@@ -206,7 +211,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.status
 	 * @param status  the value for t_order_invoice.status
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -215,7 +220,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.reject_reason
 	 * @return  the value of t_order_invoice.reject_reason
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getRejectReason() {
 		return rejectReason;
@@ -224,7 +229,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.reject_reason
 	 * @param rejectReason  the value for t_order_invoice.reject_reason
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setRejectReason(String rejectReason) {
 		this.rejectReason = rejectReason;
@@ -233,7 +238,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.remarks
 	 * @return  the value of t_order_invoice.remarks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -242,7 +247,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.remarks
 	 * @param remarks  the value for t_order_invoice.remarks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks;
@@ -251,7 +256,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.invoice_type
 	 * @return  the value of t_order_invoice.invoice_type
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getInvoiceType() {
 		return invoiceType;
@@ -260,7 +265,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.invoice_type
 	 * @param invoiceType  the value for t_order_invoice.invoice_type
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setInvoiceType(Integer invoiceType) {
 		this.invoiceType = invoiceType;
@@ -269,7 +274,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.unit_name
 	 * @return  the value of t_order_invoice.unit_name
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getUnitName() {
 		return unitName;
@@ -278,7 +283,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.unit_name
 	 * @param unitName  the value for t_order_invoice.unit_name
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setUnitName(String unitName) {
 		this.unitName = unitName;
@@ -287,7 +292,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.tax_number
 	 * @return  the value of t_order_invoice.tax_number
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getTaxNumber() {
 		return taxNumber;
@@ -296,7 +301,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.tax_number
 	 * @param taxNumber  the value for t_order_invoice.tax_number
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setTaxNumber(String taxNumber) {
 		this.taxNumber = taxNumber;
@@ -305,7 +310,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.amount
 	 * @return  the value of t_order_invoice.amount
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public BigDecimal getAmount() {
 		return amount;
@@ -314,7 +319,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.amount
 	 * @param amount  the value for t_order_invoice.amount
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setAmount(BigDecimal amount) {
 		this.amount = amount;
@@ -323,7 +328,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.banks
 	 * @return  the value of t_order_invoice.banks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getBanks() {
 		return banks;
@@ -332,7 +337,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.banks
 	 * @param banks  the value for t_order_invoice.banks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setBanks(String banks) {
 		this.banks = banks;
@@ -341,7 +346,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.content
 	 * @return  the value of t_order_invoice.content
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getContent() {
 		return content;
@@ -350,7 +355,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.content
 	 * @param content  the value for t_order_invoice.content
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setContent(String content) {
 		this.content = content;
@@ -359,7 +364,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.unit_address
 	 * @return  the value of t_order_invoice.unit_address
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getUnitAddress() {
 		return unitAddress;
@@ -368,7 +373,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.unit_address
 	 * @param unitAddress  the value for t_order_invoice.unit_address
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setUnitAddress(String unitAddress) {
 		this.unitAddress = unitAddress;
@@ -377,7 +382,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.invoice_remarks
 	 * @return  the value of t_order_invoice.invoice_remarks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getInvoiceRemarks() {
 		return invoiceRemarks;
@@ -386,7 +391,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.invoice_remarks
 	 * @param invoiceRemarks  the value for t_order_invoice.invoice_remarks
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setInvoiceRemarks(String invoiceRemarks) {
 		this.invoiceRemarks = invoiceRemarks;
@@ -395,7 +400,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.unit_mobile
 	 * @return  the value of t_order_invoice.unit_mobile
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getUnitMobile() {
 		return unitMobile;
@@ -404,7 +409,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.unit_mobile
 	 * @param unitMobile  the value for t_order_invoice.unit_mobile
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setUnitMobile(String unitMobile) {
 		this.unitMobile = unitMobile;
@@ -413,7 +418,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.voucher_url
 	 * @return  the value of t_order_invoice.voucher_url
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getVoucherUrl() {
 		return voucherUrl;
@@ -422,7 +427,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.voucher_url
 	 * @param voucherUrl  the value for t_order_invoice.voucher_url
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setVoucherUrl(String voucherUrl) {
 		this.voucherUrl = voucherUrl;
@@ -431,7 +436,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.post
 	 * @return  the value of t_order_invoice.post
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getPost() {
 		return post;
@@ -440,7 +445,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.post
 	 * @param post  the value for t_order_invoice.post
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setPost(Integer post) {
 		this.post = post;
@@ -449,7 +454,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.addressee
 	 * @return  the value of t_order_invoice.addressee
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getAddressee() {
 		return addressee;
@@ -458,7 +463,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.addressee
 	 * @param addressee  the value for t_order_invoice.addressee
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setAddressee(String addressee) {
 		this.addressee = addressee;
@@ -467,7 +472,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.addressee_mobile
 	 * @return  the value of t_order_invoice.addressee_mobile
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getAddresseeMobile() {
 		return addresseeMobile;
@@ -476,7 +481,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.addressee_mobile
 	 * @param addresseeMobile  the value for t_order_invoice.addressee_mobile
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setAddresseeMobile(String addresseeMobile) {
 		this.addresseeMobile = addresseeMobile;
@@ -485,7 +490,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.addressee_province
 	 * @return  the value of t_order_invoice.addressee_province
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getAddresseeProvince() {
 		return addresseeProvince;
@@ -494,7 +499,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.addressee_province
 	 * @param addresseeProvince  the value for t_order_invoice.addressee_province
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setAddresseeProvince(Integer addresseeProvince) {
 		this.addresseeProvince = addresseeProvince;
@@ -503,7 +508,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.addressee_city
 	 * @return  the value of t_order_invoice.addressee_city
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getAddresseeCity() {
 		return addresseeCity;
@@ -512,7 +517,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.addressee_city
 	 * @param addresseeCity  the value for t_order_invoice.addressee_city
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setAddresseeCity(Integer addresseeCity) {
 		this.addresseeCity = addresseeCity;
@@ -521,7 +526,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.addressee_area
 	 * @return  the value of t_order_invoice.addressee_area
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getAddresseeArea() {
 		return addresseeArea;
@@ -530,7 +535,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.addressee_area
 	 * @param addresseeArea  the value for t_order_invoice.addressee_area
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setAddresseeArea(Integer addresseeArea) {
 		this.addresseeArea = addresseeArea;
@@ -539,7 +544,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.recipient_address
 	 * @return  the value of t_order_invoice.recipient_address
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getRecipientAddress() {
 		return recipientAddress;
@@ -548,7 +553,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.recipient_address
 	 * @param recipientAddress  the value for t_order_invoice.recipient_address
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setRecipientAddress(String recipientAddress) {
 		this.recipientAddress = recipientAddress;
@@ -557,7 +562,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.create_time
 	 * @return  the value of t_order_invoice.create_time
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -566,7 +571,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.create_time
 	 * @param createTime  the value for t_order_invoice.create_time
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -575,7 +580,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.update_time
 	 * @return  the value of t_order_invoice.update_time
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -584,7 +589,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.update_time
 	 * @param updateTime  the value for t_order_invoice.update_time
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -593,7 +598,7 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.approval
 	 * @return  the value of t_order_invoice.approval
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Integer getApproval() {
 		return approval;
@@ -602,12 +607,30 @@ public class TOrderInvoice {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.approval
 	 * @param approval  the value for t_order_invoice.approval
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setApproval(Integer approval) {
 		this.approval = approval;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_invoice.already_amount
+	 * @return  the value of t_order_invoice.already_amount
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
+	 */
+	public BigDecimal getAlreadyAmount() {
+		return alreadyAmount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_invoice.already_amount
+	 * @param alreadyAmount  the value for t_order_invoice.already_amount
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
+	 */
+	public void setAlreadyAmount(BigDecimal alreadyAmount) {
+		this.alreadyAmount = alreadyAmount;
+	}
+
 	public String getCreateTimes() {
 		if(this.createTime==null) {
 			return null;

+ 76 - 16
src/main/java/com/goafanti/common/model/TOrderInvoiceExample.java

@@ -8,23 +8,23 @@ import java.util.List;
 public class TOrderInvoiceExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public TOrderInvoiceExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class TOrderInvoiceExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -1863,11 +1863,71 @@ public class TOrderInvoiceExample {
 			addCriterion("approval not between", value1, value2, "approval");
 			return (Criteria) this;
 		}
+
+		public Criteria andAlreadyAmountIsNull() {
+			addCriterion("already_amount is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountIsNotNull() {
+			addCriterion("already_amount is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountEqualTo(BigDecimal value) {
+			addCriterion("already_amount =", value, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountNotEqualTo(BigDecimal value) {
+			addCriterion("already_amount <>", value, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountGreaterThan(BigDecimal value) {
+			addCriterion("already_amount >", value, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("already_amount >=", value, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountLessThan(BigDecimal value) {
+			addCriterion("already_amount <", value, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("already_amount <=", value, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountIn(List<BigDecimal> values) {
+			addCriterion("already_amount in", values, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountNotIn(List<BigDecimal> values) {
+			addCriterion("already_amount not in", values, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("already_amount between", value1, value2, "alreadyAmount");
+			return (Criteria) this;
+		}
+
+		public Criteria andAlreadyAmountNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("already_amount not between", value1, value2, "alreadyAmount");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_invoice
-	 * @mbg.generated  Thu May 16 11:47:08 CST 2019
+	 * @mbg.generated  Fri May 17 09:46:50 CST 2019
 	 */
 	public static class Criterion {
 		private String condition;

+ 21 - 0
src/main/java/com/goafanti/order/bo/TOrderInvoiceBo.java

@@ -10,6 +10,9 @@ public class TOrderInvoiceBo {
 	private String amount;
 	private String createTime;
 	private Integer status;
+	private String notAmount;
+	private String settlementAmount;
+	private String rejectReason;
 	public Integer getId() {
 		return id;
 	}
@@ -65,6 +68,24 @@ public class TOrderInvoiceBo {
 	public void setStatus(Integer status) {
 		this.status = status;
 	}
+	public String getNotAmount() {
+		return notAmount;
+	}
+	public void setNotAmount(String notAmount) {
+		this.notAmount = notAmount;
+	}
+	public String getSettlementAmount() {
+		return settlementAmount;
+	}
+	public void setSettlementAmount(String settlementAmount) {
+		this.settlementAmount = settlementAmount;
+	}
+	public String getRejectReason() {
+		return rejectReason;
+	}
+	public void setRejectReason(String rejectReason) {
+		this.rejectReason = rejectReason;
+	}
 	
 	
 }

+ 15 - 0
src/main/java/com/goafanti/order/bo/TOrderInvoiceDetails.java

@@ -0,0 +1,15 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TOrderInvoice;
+
+public class TOrderInvoiceDetails extends TOrderInvoice{
+	private String contractNo;
+
+	public String getContractNo() {
+		return contractNo;
+	}
+
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+}

+ 3 - 2
src/main/java/com/goafanti/order/controller/OrderInvoiceApiController.java

@@ -37,7 +37,7 @@ public class OrderInvoiceApiController extends CertifyApiController {
 				null==t.getAmount()||null==t.getBanks()||StringUtils.isBlank(t.getContent())
 				||StringUtils.isBlank(t.getUnitAddress())||StringUtils.isBlank(t.getUnitMobile())
 				||StringUtils.isBlank(t.getUnitName())||StringUtils.isBlank(t.getVoucherUrl())
-				||StringUtils.isAnyBlank(t.getOrderNo())){
+				||StringUtils.isBlank(t.getOrderNo())){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","基本资料"));
 			return res;
 		}
@@ -81,7 +81,7 @@ public class OrderInvoiceApiController extends CertifyApiController {
 				null==t.getAmount()||null==t.getBanks()||StringUtils.isBlank(t.getContent())
 				||StringUtils.isBlank(t.getUnitAddress())||StringUtils.isBlank(t.getUnitMobile())
 				||StringUtils.isBlank(t.getUnitName())||StringUtils.isBlank(t.getVoucherUrl())
-				||StringUtils.isAnyBlank(t.getOrderNo())){
+				||StringUtils.isBlank(t.getOrderNo())){
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","基本资料"));
 			return res;
 		}
@@ -181,6 +181,7 @@ public class OrderInvoiceApiController extends CertifyApiController {
 		res.data(orderInvoiceService.salesmanOrderInvoiceList(  orderNo, pageNo,pageSize));
 		return res;
 	}
+	
 	/** 开票文件上传 **/
 	@RequestMapping(value = "/uploadOrderInvoiceFile", method = RequestMethod.POST)
 	public Result uploadOrderInvoiceFile(HttpServletRequest req,String sign){

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

@@ -5,6 +5,7 @@ package com.goafanti.order.service;
 import com.goafanti.common.model.TOrderInvoice;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.TOrderInvoiceBo;
+import com.goafanti.order.bo.TOrderInvoiceDetails;
 
 public interface OrderInvoiceService {
 	/**
@@ -29,7 +30,7 @@ public interface OrderInvoiceService {
 
 	Pagination<TOrderInvoiceBo> financeOrderInvoiceList(String depId, String orderNo, String name, Integer pageNo, Integer pageSize);
 
-	TOrderInvoice selectByIdOrderInvoice(Integer id);
+	TOrderInvoiceDetails selectByIdOrderInvoice(Integer id);
 
 	Pagination<TOrderInvoiceBo> salesmanOrderInvoiceList( String orderNo,  Integer pageNo, Integer pageSize);
 

+ 5 - 3
src/main/java/com/goafanti/order/service/impl/OrderInvoiceServiceImpl.java

@@ -2,6 +2,7 @@ package com.goafanti.order.service.impl;
 
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -18,6 +19,7 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.TOrderInvoiceBo;
+import com.goafanti.order.bo.TOrderInvoiceDetails;
 import com.goafanti.order.service.OrderInvoiceService;
 
 @Service
@@ -28,7 +30,7 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
 	TOrderNewMapper		tOrderNewMapper;
 	@Override
 	public int createServiceOrder(TOrderInvoice o) {
-		
+		o.setCreateTime(new Date());
 		return tOrderInvoiceMapper.insertSelective(o);
 	}
 
@@ -67,8 +69,8 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
 	}
 
 	@Override
-	public TOrderInvoice selectByIdOrderInvoice(Integer id) {
-		return tOrderInvoiceMapper.selectByPrimaryKey(id);
+	public TOrderInvoiceDetails selectByIdOrderInvoice(Integer id) {
+		return tOrderInvoiceMapper.selectByInvoiceDitails(id);
 	}
 
 	@SuppressWarnings("unchecked")