Browse Source

订单催款欠款开发

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
eb50910d39

+ 1 - 1
GeneratorConfig.xml

@@ -9,7 +9,7 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
     <javaClientGenerator  targetPackage="com.goafanti.common.dao"  type="XMLMAPPER" targetProject="kede-server"  />
-    <table schema="aft" tableName="t_order_mid"/>
+    <table schema="aft" tableName="t_arrears_dun"/>
     <!-- 如果改动 t_order_task表,记得修改修改接口,不然会导致服务器无法启动 -->
   </context>
 </generatorConfiguration>

+ 79 - 0
src/main/java/com/goafanti/common/dao/TArrearsDunMapper.java

@@ -0,0 +1,79 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TArrearsDun;
+import com.goafanti.common.model.TArrearsDunExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TArrearsDunMapper {
+    /**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	long countByExample(TArrearsDunExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int deleteByExample(TArrearsDunExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int insert(TArrearsDun record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int insertSelective(TArrearsDun record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	List<TArrearsDun> selectByExample(TArrearsDunExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	TArrearsDun selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int updateByExampleSelective(@Param("record") TArrearsDun record, @Param("example") TArrearsDunExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int updateByExample(@Param("record") TArrearsDun record, @Param("example") TArrearsDunExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int updateByPrimaryKeySelective(TArrearsDun record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	int updateByPrimaryKey(TArrearsDun record);
+
+	int checkOrderNo(@Param("orderNo")String orderNo, @Param("status")Integer status);
+
+	int selectByStatus(@Param("orderNo")String orderNo, @Param("status")Integer status);
+
+}

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

@@ -728,7 +728,7 @@ select
 	a.change_amount changeAmount, a.applicant, a.dep_name depName, a.project_state projectState, a.zxs_cost zxsCost,
 	a.zxs_remarks zxsRemarks, date_format(a.payment_time, '%Y-%m-%d')paymentTimes, a.payment_amount paymentAmount,
 	date_format(a. invoice_time, '%Y-%m-%d') invoiceTimes, a.invoice_amount invoiceAmount,a.invoice_type invoiceType,
-	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status!=4
+	a.cw_remarks cwRemarks,a.back_status backStatus from new_order_change a where 1 = 1 and status in (0,1,2,3)
 	and a.order_no= #{orderNo} 
 	order by a.create_time desc
   </select>
@@ -746,7 +746,7 @@ select
   </select>
   <select id="checkOderNo" resultType="java.lang.Integer">
   select count(*) from new_order_change
-	where status != 4 and order_no= #{orderNo}
+	where status in (0,1,2,3) and order_no= #{orderNo}
   </select>
   <select id="selectOrderChangeList" resultType="com.goafanti.order.bo.NewOderCahngeListBo">
 	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType, 

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

@@ -435,7 +435,7 @@
   </select>
   <select id="selectByTid" resultType="com.goafanti.order.bo.OutNewOrderDunBo">
     select a.id, a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 
-  	a.effective_count effectiveCount, a.aid, a.create_time createTime from new_order_dun a
+  	a.effective_count effectiveCount, a.aid, a.money,a.create_time createTime from new_order_dun a
     where tid = #{tid} and status=0
   </select>
 </mapper>

+ 350 - 0
src/main/java/com/goafanti/common/mapper/TArrearsDunMapper.xml

@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.TArrearsDunMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TArrearsDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="start_time" jdbcType="DATE" property="startTime" />
+    <result column="end_time" jdbcType="DATE" property="endTime" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="order_receivables" jdbcType="DECIMAL" property="orderReceivables" />
+    <result column="order_arrears" jdbcType="DECIMAL" property="orderArrears" />
+    <result column="dun_status" jdbcType="INTEGER" property="dunStatus" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 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 Mon Apr 13 14:01:01 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 Mon Apr 13 14:01:01 CST 2020.
+    -->
+    id, create_time, start_time, end_time, order_no, order_receivables, order_arrears, 
+    dun_status
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TArrearsDunExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_arrears_dun
+    <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 Mon Apr 13 14:01:01 CST 2020.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_arrears_dun
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    delete from t_arrears_dun
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TArrearsDunExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    delete from t_arrears_dun
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TArrearsDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    insert into t_arrears_dun (id, create_time, start_time, 
+      end_time, order_no, order_receivables, 
+      order_arrears, dun_status)
+    values (#{id,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=DATE}, 
+      #{endTime,jdbcType=DATE}, #{orderNo,jdbcType=VARCHAR}, #{orderReceivables,jdbcType=DECIMAL}, 
+      #{orderArrears,jdbcType=DECIMAL}, #{dunStatus,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TArrearsDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    insert into t_arrears_dun
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="startTime != null">
+        start_time,
+      </if>
+      <if test="endTime != null">
+        end_time,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="orderReceivables != null">
+        order_receivables,
+      </if>
+      <if test="orderArrears != null">
+        order_arrears,
+      </if>
+      <if test="dunStatus != null">
+        dun_status,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=DATE},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=DATE},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="orderReceivables != null">
+        #{orderReceivables,jdbcType=DECIMAL},
+      </if>
+      <if test="orderArrears != null">
+        #{orderArrears,jdbcType=DECIMAL},
+      </if>
+      <if test="dunStatus != null">
+        #{dunStatus,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TArrearsDunExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    select count(*) from t_arrears_dun
+    <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 Mon Apr 13 14:01:01 CST 2020.
+    -->
+    update t_arrears_dun
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.startTime != null">
+        start_time = #{record.startTime,jdbcType=DATE},
+      </if>
+      <if test="record.endTime != null">
+        end_time = #{record.endTime,jdbcType=DATE},
+      </if>
+      <if test="record.orderNo != null">
+        order_no = #{record.orderNo,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.dunStatus != null">
+        dun_status = #{record.dunStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    update t_arrears_dun
+    set id = #{record.id,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      start_time = #{record.startTime,jdbcType=DATE},
+      end_time = #{record.endTime,jdbcType=DATE},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
+      order_receivables = #{record.orderReceivables,jdbcType=DECIMAL},
+      order_arrears = #{record.orderArrears,jdbcType=DECIMAL},
+      dun_status = #{record.dunStatus,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TArrearsDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    update t_arrears_dun
+    <set>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        start_time = #{startTime,jdbcType=DATE},
+      </if>
+      <if test="endTime != null">
+        end_time = #{endTime,jdbcType=DATE},
+      </if>
+      <if test="orderNo != null">
+        order_no = #{orderNo,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="dunStatus != null">
+        dun_status = #{dunStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TArrearsDun">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Mon Apr 13 14:01:01 CST 2020.
+    -->
+    update t_arrears_dun
+    set create_time = #{createTime,jdbcType=TIMESTAMP},
+      start_time = #{startTime,jdbcType=DATE},
+      end_time = #{endTime,jdbcType=DATE},
+      order_no = #{orderNo,jdbcType=VARCHAR},
+      order_receivables = #{orderReceivables,jdbcType=DECIMAL},
+      order_arrears = #{orderArrears,jdbcType=DECIMAL},
+      dun_status = #{dunStatus,jdbcType=INTEGER}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="checkOrderNo" resultType="java.lang.Integer">
+  select count(*) from t_arrears_dun where 1=1
+  <if test="status !=null ">
+  and dun_status= #{status} 
+  </if>
+  and order_no= #{orderNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByStatus" resultType="java.lang.Integer">
+  select id from t_arrears_dun where 1=1
+  <if test="status !=null ">
+  and dun_status= #{status} 
+  </if>
+  and order_no= #{orderNo,jdbcType=VARCHAR}
+  limit 1
+  </select>
+</mapper>

+ 192 - 0
src/main/java/com/goafanti/common/model/TArrearsDun.java

@@ -0,0 +1,192 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+import java.math.BigDecimal;
+
+public class TArrearsDun {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.id
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.create_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.start_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private Date startTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.end_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private Date endTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.order_no
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private String orderNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.order_receivables
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private BigDecimal orderReceivables;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.order_arrears
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private BigDecimal orderArrears;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_arrears_dun.dun_status
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	private Integer dunStatus;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_arrears_dun.id
+	 * @return  the value of t_arrears_dun.id
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.id
+	 * @param id  the value for t_arrears_dun.id
+	 * @mbg.generated  Mon Apr 13 14:01:01 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_arrears_dun.create_time
+	 * @return  the value of t_arrears_dun.create_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.create_time
+	 * @param createTime  the value for t_arrears_dun.create_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 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_arrears_dun.start_time
+	 * @return  the value of t_arrears_dun.start_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Date getStartTime() {
+		return startTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.start_time
+	 * @param startTime  the value for t_arrears_dun.start_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void setStartTime(Date startTime) {
+		this.startTime = startTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_arrears_dun.end_time
+	 * @return  the value of t_arrears_dun.end_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Date getEndTime() {
+		return endTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.end_time
+	 * @param endTime  the value for t_arrears_dun.end_time
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void setEndTime(Date endTime) {
+		this.endTime = endTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_arrears_dun.order_no
+	 * @return  the value of t_arrears_dun.order_no
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public String getOrderNo() {
+		return orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.order_no
+	 * @param orderNo  the value for t_arrears_dun.order_no
+	 * @mbg.generated  Mon Apr 13 14:01:01 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_arrears_dun.order_receivables
+	 * @return  the value of t_arrears_dun.order_receivables
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public BigDecimal getOrderReceivables() {
+		return orderReceivables;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.order_receivables
+	 * @param orderReceivables  the value for t_arrears_dun.order_receivables
+	 * @mbg.generated  Mon Apr 13 14:01:01 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_arrears_dun.order_arrears
+	 * @return  the value of t_arrears_dun.order_arrears
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public BigDecimal getOrderArrears() {
+		return orderArrears;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.order_arrears
+	 * @param orderArrears  the value for t_arrears_dun.order_arrears
+	 * @mbg.generated  Mon Apr 13 14:01:01 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_arrears_dun.dun_status
+	 * @return  the value of t_arrears_dun.dun_status
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Integer getDunStatus() {
+		return dunStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_arrears_dun.dun_status
+	 * @param dunStatus  the value for t_arrears_dun.dun_status
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void setDunStatus(Integer dunStatus) {
+		this.dunStatus = dunStatus;
+	}
+}

+ 780 - 0
src/main/java/com/goafanti/common/model/TArrearsDunExample.java

@@ -0,0 +1,780 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.math.BigDecimal;
+
+public class TArrearsDunExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public TArrearsDunExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Criteria or() {
+		Criteria criteria = createCriteriaInternal();
+		oredCriteria.add(criteria);
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public Criteria createCriteria() {
+		Criteria criteria = createCriteriaInternal();
+		if (oredCriteria.size() == 0) {
+			oredCriteria.add(criteria);
+		}
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	protected abstract static class GeneratedCriteria {
+		protected List<Criterion> criteria;
+
+		protected GeneratedCriteria() {
+			super();
+			criteria = new ArrayList<Criterion>();
+		}
+
+		public boolean isValid() {
+			return criteria.size() > 0;
+		}
+
+		public List<Criterion> getAllCriteria() {
+			return criteria;
+		}
+
+		public List<Criterion> getCriteria() {
+			return criteria;
+		}
+
+		protected void addCriterion(String condition) {
+			if (condition == null) {
+				throw new RuntimeException("Value for condition cannot be null");
+			}
+			criteria.add(new Criterion(condition));
+		}
+
+		protected void addCriterion(String condition, Object value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value));
+		}
+
+		protected void addCriterion(String condition, Object value1, Object value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			criteria.add(new Criterion(condition, value1, value2));
+		}
+
+		protected void addCriterionForJDBCDate(String condition, Date value, String property) {
+			if (value == null) {
+				throw new RuntimeException("Value for " + property + " cannot be null");
+			}
+			addCriterion(condition, new java.sql.Date(value.getTime()), property);
+		}
+
+		protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
+			if (values == null || values.size() == 0) {
+				throw new RuntimeException("Value list for " + property + " cannot be null or empty");
+			}
+			List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
+			Iterator<Date> iter = values.iterator();
+			while (iter.hasNext()) {
+				dateList.add(new java.sql.Date(iter.next().getTime()));
+			}
+			addCriterion(condition, dateList, property);
+		}
+
+		protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
+			if (value1 == null || value2 == null) {
+				throw new RuntimeException("Between values for " + property + " cannot be null");
+			}
+			addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
+		}
+
+		public Criteria andIdIsNull() {
+			addCriterion("id is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIsNotNull() {
+			addCriterion("id is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdEqualTo(Integer value) {
+			addCriterion("id =", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotEqualTo(Integer value) {
+			addCriterion("id <>", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThan(Integer value) {
+			addCriterion("id >", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+			addCriterion("id >=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThan(Integer value) {
+			addCriterion("id <", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdLessThanOrEqualTo(Integer value) {
+			addCriterion("id <=", value, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdIn(List<Integer> values) {
+			addCriterion("id in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotIn(List<Integer> values) {
+			addCriterion("id not in", values, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdBetween(Integer value1, Integer value2) {
+			addCriterion("id between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andIdNotBetween(Integer value1, Integer value2) {
+			addCriterion("id not between", value1, value2, "id");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNull() {
+			addCriterion("create_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIsNotNull() {
+			addCriterion("create_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeEqualTo(Date value) {
+			addCriterion("create_time =", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotEqualTo(Date value) {
+			addCriterion("create_time <>", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThan(Date value) {
+			addCriterion("create_time >", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("create_time >=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThan(Date value) {
+			addCriterion("create_time <", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+			addCriterion("create_time <=", value, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeIn(List<Date> values) {
+			addCriterion("create_time in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotIn(List<Date> values) {
+			addCriterion("create_time not in", values, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeBetween(Date value1, Date value2) {
+			addCriterion("create_time between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+			addCriterion("create_time not between", value1, value2, "createTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeIsNull() {
+			addCriterion("start_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeIsNotNull() {
+			addCriterion("start_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeEqualTo(Date value) {
+			addCriterionForJDBCDate("start_time =", value, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeNotEqualTo(Date value) {
+			addCriterionForJDBCDate("start_time <>", value, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeGreaterThan(Date value) {
+			addCriterionForJDBCDate("start_time >", value, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
+			addCriterionForJDBCDate("start_time >=", value, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeLessThan(Date value) {
+			addCriterionForJDBCDate("start_time <", value, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeLessThanOrEqualTo(Date value) {
+			addCriterionForJDBCDate("start_time <=", value, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeIn(List<Date> values) {
+			addCriterionForJDBCDate("start_time in", values, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeNotIn(List<Date> values) {
+			addCriterionForJDBCDate("start_time not in", values, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeBetween(Date value1, Date value2) {
+			addCriterionForJDBCDate("start_time between", value1, value2, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andStartTimeNotBetween(Date value1, Date value2) {
+			addCriterionForJDBCDate("start_time not between", value1, value2, "startTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeIsNull() {
+			addCriterion("end_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeIsNotNull() {
+			addCriterion("end_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeEqualTo(Date value) {
+			addCriterionForJDBCDate("end_time =", value, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeNotEqualTo(Date value) {
+			addCriterionForJDBCDate("end_time <>", value, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeGreaterThan(Date value) {
+			addCriterionForJDBCDate("end_time >", value, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
+			addCriterionForJDBCDate("end_time >=", value, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeLessThan(Date value) {
+			addCriterionForJDBCDate("end_time <", value, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeLessThanOrEqualTo(Date value) {
+			addCriterionForJDBCDate("end_time <=", value, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeIn(List<Date> values) {
+			addCriterionForJDBCDate("end_time in", values, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeNotIn(List<Date> values) {
+			addCriterionForJDBCDate("end_time not in", values, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeBetween(Date value1, Date value2) {
+			addCriterionForJDBCDate("end_time between", value1, value2, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andEndTimeNotBetween(Date value1, Date value2) {
+			addCriterionForJDBCDate("end_time not between", value1, value2, "endTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIsNull() {
+			addCriterion("order_no is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIsNotNull() {
+			addCriterion("order_no is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoEqualTo(String value) {
+			addCriterion("order_no =", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotEqualTo(String value) {
+			addCriterion("order_no <>", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoGreaterThan(String value) {
+			addCriterion("order_no >", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoGreaterThanOrEqualTo(String value) {
+			addCriterion("order_no >=", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLessThan(String value) {
+			addCriterion("order_no <", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLessThanOrEqualTo(String value) {
+			addCriterion("order_no <=", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoLike(String value) {
+			addCriterion("order_no like", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotLike(String value) {
+			addCriterion("order_no not like", value, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoIn(List<String> values) {
+			addCriterion("order_no in", values, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotIn(List<String> values) {
+			addCriterion("order_no not in", values, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoBetween(String value1, String value2) {
+			addCriterion("order_no between", value1, value2, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderNoNotBetween(String value1, String value2) {
+			addCriterion("order_no not between", value1, value2, "orderNo");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesIsNull() {
+			addCriterion("order_receivables is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesIsNotNull() {
+			addCriterion("order_receivables is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesEqualTo(BigDecimal value) {
+			addCriterion("order_receivables =", value, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesNotEqualTo(BigDecimal value) {
+			addCriterion("order_receivables <>", value, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesGreaterThan(BigDecimal value) {
+			addCriterion("order_receivables >", value, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("order_receivables >=", value, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesLessThan(BigDecimal value) {
+			addCriterion("order_receivables <", value, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("order_receivables <=", value, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesIn(List<BigDecimal> values) {
+			addCriterion("order_receivables in", values, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesNotIn(List<BigDecimal> values) {
+			addCriterion("order_receivables not in", values, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("order_receivables between", value1, value2, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderReceivablesNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("order_receivables not between", value1, value2, "orderReceivables");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsIsNull() {
+			addCriterion("order_arrears is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsIsNotNull() {
+			addCriterion("order_arrears is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsEqualTo(BigDecimal value) {
+			addCriterion("order_arrears =", value, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsNotEqualTo(BigDecimal value) {
+			addCriterion("order_arrears <>", value, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsGreaterThan(BigDecimal value) {
+			addCriterion("order_arrears >", value, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("order_arrears >=", value, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsLessThan(BigDecimal value) {
+			addCriterion("order_arrears <", value, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("order_arrears <=", value, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsIn(List<BigDecimal> values) {
+			addCriterion("order_arrears in", values, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsNotIn(List<BigDecimal> values) {
+			addCriterion("order_arrears not in", values, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("order_arrears between", value1, value2, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andOrderArrearsNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("order_arrears not between", value1, value2, "orderArrears");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusIsNull() {
+			addCriterion("dun_status is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusIsNotNull() {
+			addCriterion("dun_status is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusEqualTo(Integer value) {
+			addCriterion("dun_status =", value, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusNotEqualTo(Integer value) {
+			addCriterion("dun_status <>", value, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusGreaterThan(Integer value) {
+			addCriterion("dun_status >", value, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusGreaterThanOrEqualTo(Integer value) {
+			addCriterion("dun_status >=", value, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusLessThan(Integer value) {
+			addCriterion("dun_status <", value, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusLessThanOrEqualTo(Integer value) {
+			addCriterion("dun_status <=", value, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusIn(List<Integer> values) {
+			addCriterion("dun_status in", values, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusNotIn(List<Integer> values) {
+			addCriterion("dun_status not in", values, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusBetween(Integer value1, Integer value2) {
+			addCriterion("dun_status between", value1, value2, "dunStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andDunStatusNotBetween(Integer value1, Integer value2) {
+			addCriterion("dun_status not between", value1, value2, "dunStatus");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_arrears_dun
+	 * @mbg.generated  Mon Apr 13 14:01:01 CST 2020
+	 */
+	public static class Criterion {
+		private String condition;
+		private Object value;
+		private Object secondValue;
+		private boolean noValue;
+		private boolean singleValue;
+		private boolean betweenValue;
+		private boolean listValue;
+		private String typeHandler;
+
+		public String getCondition() {
+			return condition;
+		}
+
+		public Object getValue() {
+			return value;
+		}
+
+		public Object getSecondValue() {
+			return secondValue;
+		}
+
+		public boolean isNoValue() {
+			return noValue;
+		}
+
+		public boolean isSingleValue() {
+			return singleValue;
+		}
+
+		public boolean isBetweenValue() {
+			return betweenValue;
+		}
+
+		public boolean isListValue() {
+			return listValue;
+		}
+
+		public String getTypeHandler() {
+			return typeHandler;
+		}
+
+		protected Criterion(String condition) {
+			super();
+			this.condition = condition;
+			this.typeHandler = null;
+			this.noValue = true;
+		}
+
+		protected Criterion(String condition, Object value, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.typeHandler = typeHandler;
+			if (value instanceof List<?>) {
+				this.listValue = true;
+			} else {
+				this.singleValue = true;
+			}
+		}
+
+		protected Criterion(String condition, Object value) {
+			this(condition, value, null);
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+			super();
+			this.condition = condition;
+			this.value = value;
+			this.secondValue = secondValue;
+			this.typeHandler = typeHandler;
+			this.betweenValue = true;
+		}
+
+		protected Criterion(String condition, Object value, Object secondValue) {
+			this(condition, value, secondValue, null);
+		}
+	}
+
+	/**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table t_arrears_dun
+     *
+     * @mbg.generated do_not_delete_during_merge Mon Apr 13 08:58:46 CST 2020
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 18 - 5
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -43,6 +43,7 @@ import com.goafanti.common.dao.NewOrderDunMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.OrganizationManagementMapper;
+import com.goafanti.common.dao.TArrearsDunMapper;
 import com.goafanti.common.dao.TDunLogMapper;
 import com.goafanti.common.dao.TOrderBackMapper;
 import com.goafanti.common.dao.TOrderDunMapper;
@@ -63,6 +64,7 @@ import com.goafanti.common.model.NewOrderDun;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationManagement;
+import com.goafanti.common.model.TArrearsDun;
 import com.goafanti.common.model.TDunLog;
 import com.goafanti.common.model.TOrderBack;
 import com.goafanti.common.model.TOrderDun;
@@ -144,6 +146,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Autowired
 	private UserLockReleaseMapper	userLockReleaseMapper;
 	@Autowired
+	private TArrearsDunMapper	tArrearsDunMapper;
+	@Autowired
 	private UserMapper	userMapper;
 	@Value(value = "${mobileRemindCodeTemplate}")
 	private String					mobileRemindCodeTemplate	= null;
@@ -565,7 +569,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				//修改项目为外包项目
 				tOrderTaskMapper.updateByOutsourceToOrderNo(orderNo,1);
 			}
-			if(t2.getApproval()==0)pushOrderDun(t2);
+			pushOrderDun(t2);
 		}else if (orderStatus==OrderNewState.QDSHJJ.getCode()) {//如果不通过新增驳回
 				if (outsource==0) {//非外包
 				t.setProcessStatus(ProcessStatus.YPYXY.getCode());
@@ -588,8 +592,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 
 
-	private void pushOrderDun(TOrderNew t2) {
-		if(t2.getApproval()==0) {
+	public void pushOrderDun(TOrderNew t2) {
 			List<OutNewOrderDunBo> list=newOrderDunMapper.selectListNewOrderDun(t2.getOrderNo(),null,0);
 			for (OutNewOrderDunBo o : list) {
 				if (o.getDunType()==1) {
@@ -597,11 +600,21 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 					o.setStartTime(new Date());
 					newOrderDunMapper.updateByPrimaryKeySelective(o);
 					tOrderMidMapper.addOrderReceivables(o.getOrderNo(),o.getMoney());
+					TOrderMid tm=tOrderMidMapper.selectByOrderNo(t2.getOrderNo());
+						TArrearsDun t=new TArrearsDun();
+						t.setOrderArrears(tm.getOrderArrears());
+						t.setOrderReceivables(tm.getOrderReceivables());
+						if (tArrearsDunMapper.checkOrderNo(t2.getOrderNo(),null)<1) {
+							t.setOrderNo(t2.getOrderNo());
+							tArrearsDunMapper.insertSelective(t);
+						}else if(tArrearsDunMapper.checkOrderNo(t2.getOrderNo(),0)>0){
+							Integer i=tArrearsDunMapper.selectByStatus(t2.getOrderNo(), 0);
+							t.setId(i);
+							tArrearsDunMapper.updateByPrimaryKeySelective(t);
+						}
 					addNewDunNoticAndSendEmail(t2,o);
 				}
 			}
-		}
-		
 	}
 
 

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

@@ -32,8 +32,10 @@ import com.goafanti.common.dao.BusinessProjectMapper;
 import com.goafanti.common.dao.NewOrderDunMapper;
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.OrganizationIdentityMapper;
+import com.goafanti.common.dao.TArrearsDunMapper;
 import com.goafanti.common.dao.TOrderBonusMapper;
 import com.goafanti.common.dao.TOrderLogMapper;
+import com.goafanti.common.dao.TOrderMidMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.dao.TTaskHoursMapper;
@@ -48,8 +50,10 @@ import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.BusinessProject;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationIdentity;
+import com.goafanti.common.model.TArrearsDun;
 import com.goafanti.common.model.TOrderBonus;
 import com.goafanti.common.model.TOrderLog;
+import com.goafanti.common.model.TOrderMid;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.TTaskHours;
@@ -109,6 +113,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	private BusinessProjectMapper	businessProjectMapper;
 	@Autowired
 	private NewOrderDunMapper	newOrderDunMapper;
+	@Autowired
+	private TOrderMidMapper	tOrderMidMapper;
+	@Autowired
+	private TArrearsDunMapper	tArrearsDunMapper;
 	@Value(value = "${upload.path}")
 	private String 					uploadPath 			= null;
 	
@@ -411,10 +419,25 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				} 
 					if(flag) {
 					TOrderNew tn=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
+					//如果启动催款,则新增欠款与应收款
+					tOrderMidMapper.addOrderReceivables(t.getOrderNo(), ob.getMoney());
+					TOrderMid tm=tOrderMidMapper.selectByOrderNo(t.getOrderNo());
+						TArrearsDun td=new TArrearsDun();
+						td.setOrderArrears(tm.getOrderArrears());
+						td.setOrderReceivables(tm.getOrderReceivables());
+						if (tArrearsDunMapper.checkOrderNo(t.getOrderNo(),null)<1) {
+							td.setOrderNo(t.getOrderNo());
+							tArrearsDunMapper.insertSelective(td);
+						}else if(tArrearsDunMapper.checkOrderNo(t.getOrderNo(),0)>0){
+							Integer i=tArrearsDunMapper.selectByStatus(t.getOrderNo(), 0);
+							td.setId(i);
+							tArrearsDunMapper.updateByPrimaryKeySelective(td);
+						}
 					orderNewService.addNewDunNoticAndSendEmail(tn,ob);
 					ob.setStatus(1);
 					ob.setStartTime(new Date());
 					newOrderDunMapper.updateByPrimaryKeySelective(ob);
+					
 				}
 			}
 		}