Browse Source

Merge branch 'test' of jishutao/kede-server into prod

gitadmin 7 years ago
parent
commit
786f4ee329

+ 6 - 6
GeneratorConfig.xml

@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
-  <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.44.jar" />
+  <classPathEntry location="C:/Users/Administrator/.dbeaver-drivers/maven/maven-central/mysql/mysql-connector-java-5.1.39.jar" />
    <!-- <classPathEntry location="E:/mysql-connector-java-5.1.40.jar" /> -->
   <context id="context1">	
-    <jdbcConnection connectionURL="jdbc:mysql://192.168.0.14:3306/aft" 
+    <jdbcConnection connectionURL="jdbc:mysql://localhost:3306/aft" 
     	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
-    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="aft" />
-    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="aft" />
-    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="aft" type="XMLMAPPER" />
-    <table schema="aft" tableName="t_task_log"/> 
+    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
+    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
+    <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="XMLMAPPER" />
+    <table schema="aft" tableName="t_order_log"/> 
   </context>
 </generatorConfiguration>

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

@@ -0,0 +1,79 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.TOrderLog;
+import com.goafanti.common.model.TOrderLogExample;
+import com.goafanti.order.bo.TOrderLogBo;
+
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface TOrderLogMapper {
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	long countByExample(TOrderLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int deleteByExample(TOrderLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int deleteByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int insert(TOrderLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int insertSelective(TOrderLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	List<TOrderLog> selectByExample(TOrderLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	TOrderLog selectByPrimaryKey(Integer id);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int updateByExampleSelective(@Param("record") TOrderLog record, @Param("example") TOrderLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int updateByExample(@Param("record") TOrderLog record, @Param("example") TOrderLogExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int updateByPrimaryKeySelective(TOrderLog record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	int updateByPrimaryKey(TOrderLog record);
+
+	List<TOrderLogBo> selectOrderByNo(String orderNo);
+}

+ 74 - 0
src/main/java/com/goafanti/common/enums/OrderLogProcess.java

@@ -0,0 +1,74 @@
+package com.goafanti.common.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.goafanti.order.enums.OrderNewState;
+
+public enum OrderLogProcess {
+//	流程 0开单 1提交 2审核 3驳回  4特批 5财务派单 6财务首付 7项目订单派单 8项目派单 9项目完成
+	TJ(1, "提交"),
+	SH(2, "审核"),
+	BH(3, "驳回"),
+	TP(4, "特批"),
+	CWPD(5, "财务派单"),
+	CWSF(6, "财务首付"),
+	XMDDPD(7, "项目订单派单"),
+	XMPD(8, "项目派单"),
+	XMWC(9, "项目完成"),
+	FQTD(0,"发起退单"),
+	WCTD(10,"退单完成"),
+	CWQK(11,"财务全款");
+	
+	private OrderLogProcess(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, OrderLogProcess> status = new HashMap<Integer, OrderLogProcess>();
+
+	static {
+		for (OrderLogProcess value : OrderLogProcess.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	public static String getValueByCode(Integer code){
+        for(OrderLogProcess orderLogProcess:OrderLogProcess.values()){
+            if(code.equals(orderLogProcess.getCode())){
+                return orderLogProcess.getDesc();
+            }
+        }
+        return  null;
+    }
+	
+	public static OrderLogProcess getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return null;
+	}
+
+	public static OrderLogProcess getStatus(String code) {
+		if (StringUtils.isNumeric(code)) {
+			return getStatus(Integer.parseInt(code));
+		}
+		return null;
+	}
+
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+
+	private Integer	code;
+	private String	desc;
+
+	public Integer getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+}

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

@@ -477,10 +477,10 @@
   <!-- 查看自己创建的流水数据 -->
   <select id="myBillList" parameterType="Map" resultType="com.goafanti.common.model.TOrderBillNew">
   select 
-  	b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,
+  	b.bill_no as billNo, b.order_no as orderNo, b.transaction_amount as transactionAmount,a.create_time as createTime,
   	b.payer_id as payerId, b.payee_id as payeeId, u.nickname as payerName, a.nickname as payeeName, 
   	b.transaction_subject as transactionSubject, b.transaction_channel as transactionChannel, 
-  	b.financial_pay_time as financialPayTimes,b.financial_pay_no as financialPayNo,
+  	b.financial_pay_time as financialPayTime,b.financial_pay_no as financialPayNo,
   	b.creater, ad.name as createrName, o.salesman_id as saleId, oa.name as saleName
   	from t_order_bill_new b
   	left join `user` u on b.payer_id = u.id

+ 292 - 0
src/main/java/com/goafanti/common/mapper/TOrderLogMapper.xml

@@ -0,0 +1,292 @@
+<?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.TOrderLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="process" jdbcType="INTEGER" property="process" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    id, order_no, process, create_time, aid
+  </sql>
+  <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderLogExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from t_order_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from t_order_log
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    delete from t_order_log
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderLogExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    delete from t_order_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TOrderLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    insert into t_order_log (id, order_no, process, 
+      create_time, aid)
+    values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{process,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{aid,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    insert into t_order_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="process != null">
+        process,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="aid != null">
+        aid,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="process != null">
+        #{process,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.goafanti.common.model.TOrderLogExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    select count(*) from t_order_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    update t_order_log
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.orderNo != null">
+        order_no = #{record.orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="record.process != null">
+        process = #{record.process,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.aid != null">
+        aid = #{record.aid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    update t_order_log
+    set id = #{record.id,jdbcType=INTEGER},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
+      process = #{record.process,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      aid = #{record.aid,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    update t_order_log
+    <set>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="process != null">
+        process = #{process,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderLog">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Apr 12 15:30:47 CST 2019.
+    -->
+    update t_order_log
+    set order_no = #{orderNo,jdbcType=VARCHAR},
+      process = #{process,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      aid = #{aid,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <select id="selectOrderByNo" 	parameterType="string"	resultType="com.goafanti.order.bo.TOrderLogBo">
+  select a.id,a.order_no as orderNo,a.process,a.create_time as createTime, b.name as adminName
+	from t_order_log a left join admin b on a.aid=b.id
+	where a.order_no= #{orderNo,jdbcType=VARCHAR}
+	order by a.create_time
+  </select>
+</mapper>

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

@@ -825,7 +825,7 @@
   	select * from (
   	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus,
   	o.sign_time as signTime, u.nickname as buyerName,o.total_amount signTotalAmount, o.approval , a.name sellerName
-  	,liquidation_status,contract_no as contractNo
+  	,liquidation_status,o.finance_id as financeId,contract_no as contractNo
   	from t_order_new o 
   	left join `user` u on o.buyer_id = u.id
   	left join admin a on o.salesman_id = a.id
@@ -858,7 +858,7 @@
   	union 
 	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus, 
 	o.sign_time as signTime, u.nickname as buyerName,o.total_amount signTotalAmount, o.approval , a.name sellerName
-	,liquidation_status ,contract_no as contractNo
+	,liquidation_status ,o.finance_id as financeId,contract_no as contractNo
 	from t_order_new o 
 	left join `user` u on o.buyer_id = u.id 
 	left join admin a on o.salesman_id = a.id 
@@ -886,9 +886,7 @@
   </select>
   <select id="getAllUnassignedCountOrder" parameterType="Map" resultType="java.lang.Integer">
   select count(*) from (
-  	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus,
-  	o.sign_time as signTime, u.nickname as buyerName,o.total_amount signTotalAmount, o.approval , a.name sellerName
-  	,liquidation_status
+  	select o.*
   	from t_order_new o 
   	left join `user` u on o.buyer_id = u.id
   	left join admin a on o.salesman_id = a.id
@@ -919,9 +917,7 @@
   	and o.create_time between #{a,jdbcType=VARCHAR} and #{b,jdbcType=VARCHAR}
   	</if>
   	union 
-	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus, 
-	o.sign_time as signTime, u.nickname as buyerName,o.total_amount signTotalAmount, o.approval , a.name sellerName
-	,liquidation_status 
+	select o.*
 	from t_order_new o 
 	left join `user` u on o.buyer_id = u.id 
 	left join admin a on o.salesman_id = a.id 
@@ -1289,6 +1285,9 @@
   	<if test="depId != null">
   	and dep.id= #{depId,jdbcType=VARCHAR}
   	</if>
+  	<if test="aid != null">
+  	and c.aid= #{aid,jdbcType=VARCHAR}
+  	</if>
   	<if test="starTime !=null and endTime !=null">
   	and b.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>
@@ -1316,6 +1315,9 @@
   	<if test="orderNo != null">
   	and a.order_no = #{orderNo,jdbcType=VARCHAR}
   	</if>
+  	<if test="aid != null">
+  	and c.aid= #{aid,jdbcType=VARCHAR}
+  	</if>
   	<if test="starTime !=null and endTime !=null">
   	and b.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>

+ 17 - 1
src/main/java/com/goafanti/common/model/TOrderBillNew.java

@@ -3,6 +3,10 @@ package com.goafanti.common.model;
 import java.math.BigDecimal;
 import java.util.Date;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+
 public class TOrderBillNew {
     /**
      *
@@ -149,7 +153,7 @@ public class TOrderBillNew {
     private String saleId;
     private String saleName;
     private String departmentName;
-    
+    private String createTimes;
     
     /**
      * This method was generated by MyBatis Generator.
@@ -590,4 +594,16 @@ public class TOrderBillNew {
 	public void setDepartmentName(String departmentName) {
 		this.departmentName = departmentName;
 	}
+
+	public String getCreateTimes() {
+		if (this.createTime == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(this.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	public void setCreateTimes(String createTimes) {
+		this.createTimes = createTimes;
+	}
 }

+ 122 - 0
src/main/java/com/goafanti/common/model/TOrderLog.java

@@ -0,0 +1,122 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+
+public class TOrderLog {
+
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_log.id
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_log.order_no
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	private String orderNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_log.process
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	private Integer process;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_log.create_time
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_order_log.aid
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	private String aid;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_log.id
+	 * @return  the value of t_order_log.id
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_log.id
+	 * @param id  the value for t_order_log.id
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_log.order_no
+	 * @return  the value of t_order_log.order_no
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public String getOrderNo() {
+		return orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_log.order_no
+	 * @param orderNo  the value for t_order_log.order_no
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_log.process
+	 * @return  the value of t_order_log.process
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public Integer getProcess() {
+		return process;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_log.process
+	 * @param process  the value for t_order_log.process
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setProcess(Integer process) {
+		this.process = process;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_log.create_time
+	 * @return  the value of t_order_log.create_time
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_log.create_time
+	 * @param createTime  the value for t_order_log.create_time
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_order_log.aid
+	 * @return  the value of t_order_log.aid
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public String getAid() {
+		return aid;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_order_log.aid
+	 * @param aid  the value for t_order_log.aid
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setAid(String aid) {
+		this.aid = aid;
+	}
+}

+ 582 - 0
src/main/java/com/goafanti/common/model/TOrderLogExample.java

@@ -0,0 +1,582 @@
+package com.goafanti.common.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class TOrderLogExample {
+    /**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	protected String orderByClause;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	protected boolean distinct;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	protected List<Criteria> oredCriteria;
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public TOrderLogExample() {
+		oredCriteria = new ArrayList<Criteria>();
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setOrderByClause(String orderByClause) {
+		this.orderByClause = orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public String getOrderByClause() {
+		return orderByClause;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void setDistinct(boolean distinct) {
+		this.distinct = distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public boolean isDistinct() {
+		return distinct;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public List<Criteria> getOredCriteria() {
+		return oredCriteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void or(Criteria criteria) {
+		oredCriteria.add(criteria);
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	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_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	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_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	protected Criteria createCriteriaInternal() {
+		Criteria criteria = new Criteria();
+		return criteria;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	public void clear() {
+		oredCriteria.clear();
+		orderByClause = null;
+		distinct = false;
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	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));
+		}
+
+		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 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 andProcessIsNull() {
+			addCriterion("process is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessIsNotNull() {
+			addCriterion("process is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessEqualTo(Integer value) {
+			addCriterion("process =", value, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessNotEqualTo(Integer value) {
+			addCriterion("process <>", value, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessGreaterThan(Integer value) {
+			addCriterion("process >", value, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessGreaterThanOrEqualTo(Integer value) {
+			addCriterion("process >=", value, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessLessThan(Integer value) {
+			addCriterion("process <", value, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessLessThanOrEqualTo(Integer value) {
+			addCriterion("process <=", value, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessIn(List<Integer> values) {
+			addCriterion("process in", values, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessNotIn(List<Integer> values) {
+			addCriterion("process not in", values, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessBetween(Integer value1, Integer value2) {
+			addCriterion("process between", value1, value2, "process");
+			return (Criteria) this;
+		}
+
+		public Criteria andProcessNotBetween(Integer value1, Integer value2) {
+			addCriterion("process not between", value1, value2, "process");
+			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 andAidIsNull() {
+			addCriterion("aid is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidIsNotNull() {
+			addCriterion("aid is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidEqualTo(String value) {
+			addCriterion("aid =", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotEqualTo(String value) {
+			addCriterion("aid <>", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidGreaterThan(String value) {
+			addCriterion("aid >", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidGreaterThanOrEqualTo(String value) {
+			addCriterion("aid >=", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidLessThan(String value) {
+			addCriterion("aid <", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidLessThanOrEqualTo(String value) {
+			addCriterion("aid <=", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidLike(String value) {
+			addCriterion("aid like", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotLike(String value) {
+			addCriterion("aid not like", value, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidIn(List<String> values) {
+			addCriterion("aid in", values, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotIn(List<String> values) {
+			addCriterion("aid not in", values, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidBetween(String value1, String value2) {
+			addCriterion("aid between", value1, value2, "aid");
+			return (Criteria) this;
+		}
+
+		public Criteria andAidNotBetween(String value1, String value2) {
+			addCriterion("aid not between", value1, value2, "aid");
+			return (Criteria) this;
+		}
+	}
+
+	/**
+	 * This class was generated by MyBatis Generator. This class corresponds to the database table t_order_log
+	 * @mbg.generated  Fri Apr 12 15:30:47 CST 2019
+	 */
+	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_order_log
+     *
+     * @mbg.generated do_not_delete_during_merge Fri Apr 12 14:57:14 CST 2019
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+}

+ 2 - 2
src/main/java/com/goafanti/common/task/OrderDunTask.java

@@ -41,14 +41,14 @@ public class OrderDunTask {
 	 * 每天凌晨2点轮询处理需要催款的信息
 	 */
 	@Scheduled(cron = "0 0 2  * * ?") 
-	@RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
+	//@RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
   	@Transactional(rollbackFor=Exception.class)
 	public void updateorderDun(){
   		try {
   			LoggerUtils.debug(logger, "======================催款任务轮询启动===================");
   		List<OrderDunTaskBo> list=orderNewService.selectAllOrderDun();
   		for (OrderDunTaskBo t : list) {
-			if (t.getDunSubject()/10==1) {
+			if (t.getDunSubject()/10==1) {//1则为订单催款信息否则为项目催款信息
 				if (t.getDunSubject()%10==t.getOrderStatus()&&t.getSettlementAmount().compareTo(t.getMoney()) == -1) {
 					 updateOrderDun(t);
 						Thread.sleep(2000);

+ 1 - 1
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -19,7 +19,7 @@ public class ReleaseUserTask {
 	@Resource
 	private UserService userServiceImpl;
 	
-	int pointsDataLimit=100;
+	int pointsDataLimit=50;
 	
 	/**
 	 * 每天凌晨一点将客户和业务转为待释放

+ 75 - 0
src/main/java/com/goafanti/order/bo/TOrderLogBo.java

@@ -0,0 +1,75 @@
+package com.goafanti.order.bo;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.model.TOrderLog;
+
+//@SuppressWarnings("unused")
+public class TOrderLogBo extends TOrderLog{
+	private String processName;
+	private String adminName;
+	private String createDate;
+	
+	
+
+	public String getProcessName() {
+		switch (super.getProcess()) {
+		case 1:
+			return "提交";
+		case 2:
+			return "审核";
+		case 3:
+			return "驳回";
+		case 4:
+			return "特批";
+		case 5:
+			return "财务派单";
+		case 6:
+			return "财务首付";
+		case 7:
+			return "订单派单";
+		case 8:
+			return "项目派单";
+		case 9:
+			return "项目完成";
+		case 0:
+			return "发起退单";
+		case 10:
+		return "退单完成";
+		case 11:
+			return "财务全款";
+		default:
+			return "未知";
+		}
+	}
+
+	public void setProcessName(String processName) {
+		this.processName = processName;
+	}
+
+	public String getAdminName() {
+		return adminName;
+	}
+
+	public void setAdminName(String adminName) {
+		this.adminName = adminName;
+	}
+
+	public String getCreateDate() {
+		if (super.getCreateTime() == null) {
+			return null;
+		} else {
+			return DateFormatUtils.format(super.getCreateTime(), AFTConstants.YYYYMMDDHHMMSS);
+		}
+	}
+
+	public void setCreateDate(String createDate) {
+		this.createDate = createDate;
+	}
+
+	
+	
+	
+		
+}

+ 13 - 0
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -435,6 +435,19 @@ public class AdminNewOrderApiController extends CertifyApiController {
 		orderNewService.updateFinance( orderNo, newFinance);
 		return res;
 	}
+	/**
+	 * 查看订单日志
+	 */
+	@RequestMapping(value ="/selectOrderLog", method=RequestMethod.GET)
+	public Result selectOrderLog (String orderNo) {
+		Result res=new Result();
+		if (StringUtils.isBlank(orderNo)) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "订单编号","订单编号"));
+			return res;
+		}
+		res.data(orderNewService.selectOrderLog(orderNo));
+		return res;
+	}
 	
 	/** 退单文件上传 **/
 	@RequestMapping(value = "/uploadRefundOrderFile", method = RequestMethod.POST)

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

@@ -142,7 +142,7 @@ public class FundManagerOrderApiController extends CertifyApiController {
 		//流水时间处理
 		//if(StringUtils.isNotEmpty(billNew.getFinancialPayTimes())){
 			try {
-				billNew.setFinancialPayTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(billNew.getFinancialPayTimes()));
+				billNew.setFinancialPayTime(new SimpleDateFormat("yyyy-MM-dd").parse(billNew.getFinancialPayTimes()));
 			} catch (ParseException e) {
 				e.printStackTrace();
 				res.getError().add(buildError("", "财务流水时间有误!"));
@@ -215,7 +215,7 @@ public class FundManagerOrderApiController extends CertifyApiController {
 		}
 		//if(StringUtils.isNotEmpty(orderRefund.getFinancialPayTimes())){
 			try {
-			orderRefund.setFinancialPayTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(orderRefund.getFinancialPayTimes()));
+			orderRefund.setFinancialPayTime(new SimpleDateFormat("yyyy-MM-dd").parse(orderRefund.getFinancialPayTimes()));
 			} catch (ParseException e) {
 				e.printStackTrace();
 				res.getError().add(buildError("", "财务流水时间有误!"));

+ 3 - 0
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -8,6 +8,7 @@ import javax.mail.MessagingException;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 import com.goafanti.common.model.TOrderDun;
+import com.goafanti.common.model.TOrderLog;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
@@ -18,6 +19,7 @@ import com.goafanti.order.bo.OrderDunTaskBo;
 import com.goafanti.order.bo.OrderRefundBo;
 import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.TDunLogListBo;
+import com.goafanti.order.bo.TOrderLogBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
@@ -166,6 +168,7 @@ public interface OrderNewService {
 	boolean checkORderDun(String orderNo);
 	
 	int updateFinance(String orderNo, String newFinance);
+	List<TOrderLogBo> selectOrderLog(String orderNo);
 	
 	
 }

+ 21 - 2
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -23,15 +23,18 @@ import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.dao.TOrderBackMapper;
 import com.goafanti.common.dao.TOrderBillNewMapper;
 import com.goafanti.common.dao.TOrderBonusMapper;
+import com.goafanti.common.dao.TOrderLogMapper;
 import com.goafanti.common.dao.TOrderMonthReportMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderRefundMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.TOrderBack;
 import com.goafanti.common.model.TOrderBillNew;
 import com.goafanti.common.model.TOrderBonus;
+import com.goafanti.common.model.TOrderLog;
 import com.goafanti.common.model.TOrderMonthReport;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderRefund;
@@ -52,6 +55,7 @@ import com.goafanti.order.enums.OrderNewState;
 import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.enums.refundState;
 import com.goafanti.order.service.FundManageOrderService;
+import com.goafanti.order.service.OrderNewService;
 
 @Service
 public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper> implements FundManageOrderService {
@@ -73,6 +77,8 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 	@Autowired
 	private TOrderTaskMapper taskMapper;
 	@Autowired
+	private TOrderLogMapper	tOrderLogMapper;
+	@Autowired
 	JDBCIdGenerator	idGenerator;
 	@Autowired
 	NoticeMapper	noticeMapper;
@@ -117,6 +123,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			if(torder.getProcessStatus()<ProcessStatus.YPZXSGLY.getCode()) {
 				record.setProcessStatus(ProcessStatus.YPCWZY.getCode());				
 			}
+			addOrderLog(orderNo, OrderLogProcess.CWPD.getCode());
 			r = tOrderNewMapper.updateByPrimaryKeySelective(record);
 		}else{
 			//返回错误标志 提示订单编号或者财务专员选择错误
@@ -124,7 +131,16 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		}
 		return r;
 	}
-
+	
+	public void addOrderLog(String orderNo, Integer code) {
+		TOrderLog tl=new TOrderLog();
+		tl.setOrderNo(orderNo);
+		tl.setProcess(code);
+		tl.setAid(TokenManager.getAdminId());
+		tOrderLogMapper.insertSelective(tl);
+		
+	}
+	
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<OrderListBo> financeList(OrderListBo order,
@@ -159,6 +175,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			back.setBackStatus(0);
 			back.setInitiate(TokenManager.getAdminId());//发起人
 			back.setAccept(b.getSalesmanId());	//查看该订单的负责人	
+			addOrderLog(back.getOrderNo(), OrderLogProcess.BH.getCode());
 			c = backMapper.insertSelective(back);
 			
 			//发送站内消息
@@ -228,7 +245,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 				}
 				
 			}
-			
+			addOrderLog(billNew.getOrderNo(), OrderLogProcess.CWQK.getCode());	
 		}else if(bd.compareTo(o.getTotalAmount()) == -1){//如果订单流水小于总金额
 			if(bd.compareTo(o.getFirstAmount()) == 0 || bd.compareTo(o.getFirstAmount()) == 1){//首付完成
 				//查看首付奖是否存在
@@ -243,6 +260,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 					bonus.setBonusSubject(BonusSubject.SF.getCode());//11
 				}
 				lstaus = 1;
+				addOrderLog(billNew.getOrderNo(), OrderLogProcess.CWSF.getCode());
 			}
 		}
 		//否则新增流水信息
@@ -405,6 +423,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		
 		orderNew.setLiquidationStatus(lstaus);
 		if(lstaus == 4){//如果款项全部退完就更改订单状态,这里不一定待商榷
+			addOrderLog(billNew.getOrderNo(), OrderLogProcess.WCTD.getCode());
 			//orderNew.setProcessStatus(6);
 		}
 		if(result > 0){

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

@@ -4,11 +4,13 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.lang3.time.DateFormatUtils;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.TOrderBillNewMapper;
 import com.goafanti.common.model.TOrderBillNew;
 import com.goafanti.common.utils.ExportExcelUtil;
@@ -33,6 +35,12 @@ public class OrderBillServiceImpl extends BaseMybatisDao<TOrderBillNewMapper> im
 		Map<String, Object> params = new HashMap<String, Object>();
 		params.put("b", billNew);
 		Pagination<TOrderBillNew> data = (Pagination<TOrderBillNew>)findPage("myBillList", "myBillCount", params, pageNo, pageSize);
+		List<TOrderBillNew> l=(List<TOrderBillNew>) data.getList();
+		for (TOrderBillNew t : l) {
+			if (t.getFinancialPayTime()!=null) {
+				t.setFinancialPayTimes(DateFormatUtils.format(t.getFinancialPayTime(), AFTConstants.YYYYMMDD));
+			}
+		}
 		return data;
 	}
 

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

@@ -34,11 +34,13 @@ import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.TDunLogMapper;
 import com.goafanti.common.dao.TOrderBackMapper;
 import com.goafanti.common.dao.TOrderDunMapper;
+import com.goafanti.common.dao.TOrderLogMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderRefundMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.dao.UserLockReleaseMapper;
 import com.goafanti.common.enums.NoticeStatus;
+import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.OrganizationContactBook;
@@ -46,6 +48,7 @@ import com.goafanti.common.model.OrganizationManagement;
 import com.goafanti.common.model.TDunLog;
 import com.goafanti.common.model.TOrderBack;
 import com.goafanti.common.model.TOrderDun;
+import com.goafanti.common.model.TOrderLog;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderRefund;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
@@ -61,6 +64,7 @@ import com.goafanti.customer.bo.LockingReleaseBo;
 import com.goafanti.order.bo.OrderDunTaskBo;
 import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.TDunLogListBo;
+import com.goafanti.order.bo.TOrderLogBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
@@ -98,6 +102,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Autowired
 	private AdminMapper	adminMapper;
 	@Autowired
+	private TOrderLogMapper tOrderLogMapper;
+	@Autowired
 	NoticeMapper	noticeMapper;
 	@Autowired
 	OrderService	orderService;
@@ -207,12 +213,15 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			contactBook.setMobile(t.getContactMobile());
 			organizationContactBookMapper.insertSelective(contactBook);
 		}
-		if (isSubmit==1) {
+		if (isSubmit==1) {//订单
 			t.setOrderStatus(OrderNewState.QDDS.getCode());
 			t.setProcessStatus(ProcessStatus.YPYXGLY.getCode());
 			if (t2.getApproval()==ApprovalNewState.BH.getCode()){
 				t.setApproval(ApprovalNewState.DSH.getCode());
 			}
+			//生成流转
+			addOrderLog(t.getOrderNo(),OrderLogProcess.TJ.getCode());
+			
 		}
 		if (t2.getApproval()==ApprovalNewState.BH.getCode()||
 				t2.getOrderStatus()==OrderNewState.QDSHJJ.getCode()||
@@ -225,6 +234,17 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 
 
+	public void addOrderLog(String orderNo, Integer code) {
+		TOrderLog tl=new TOrderLog();
+		tl.setOrderNo(orderNo);
+		tl.setProcess(code);
+		tl.setAid(TokenManager.getAdminId());
+		tOrderLogMapper.insertSelective(tl);
+		
+	}
+
+
+
 	@Override
 	public TOrderNewBo getOrderNewDetail(String orderNo) {
 		TOrderNewBo tOrder= tOrderNewMapper.getOrderNewDetail(orderNo);
@@ -311,10 +331,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		t.setOrderNo(orderNo);
 		if (orderStatus==OrderNewState.QDSHTG.getCode()&&t2.getApproval()==ApprovalNewState.FTP.getCode()) {//如果通过分配给财务管理员
 				t.setProcessStatus(ProcessStatus.YPCWGLY.getCode());
+				addOrderLog(orderNo, OrderLogProcess.SH.getCode());
+		}else if (orderStatus==OrderNewState.QDSHTG.getCode()&&t2.getApproval()==ApprovalNewState.DSH.getCode()) {
+				addOrderLog(orderNo, OrderLogProcess.SH.getCode());
 		}
 		if (orderStatus==OrderNewState.QDSHJJ.getCode()) {//如果不通过新增驳回
 			t.setProcessStatus(ProcessStatus.YPYXY.getCode());
 			addBackOrder(orderNo, reason);
+			addOrderLog(orderNo, OrderLogProcess.BH.getCode());
 		}
 		t.setOrderStatus(orderStatus);
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
@@ -354,6 +378,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if(pageNo==null||pageNo<0)pageNo=1;
 		if (StringUtils.isNotBlank(name)) params.put("name", name);
 		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
+		if(specially!=null&&specially==1) params.put("aid", TokenManager.getAdminId());;
 		if (StringUtils.isNotBlank(adminName)) params.put("adminName", adminName);
 		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
 		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
@@ -402,6 +427,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tOrder.setOrderNo(t.getOrderNo());
 		tOrder.setOrderStatus(OrderNewState.TDZ.getCode());
 		tOrderNewMapper.updateByPrimaryKeySelective(tOrder);
+		addOrderLog(t.getOrderNo(), OrderLogProcess.FQTD.getCode());
 		return tOrderRefundMapper.insertSelective(t);
 	}
 
@@ -414,10 +440,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (confirm==2) {
 			t.setApproval(2);
 			t.setProcessStatus(ProcessStatus.YPZXSGLY.getCode());
+			addOrderLog(orderNo, OrderLogProcess.TP.getCode());
 		} else {
 			t.setApproval(3);
 			t.setOrderStatus(OrderNewState.YBH.getCode());
 			addBackOrder(orderNo, reason);
+			addOrderLog(orderNo, OrderLogProcess.BH.getCode());
 		}
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
@@ -673,5 +701,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.updateFinance(aid,orderNo,newFinance);
 		
 	}
+
+
+
+	@Override
+	public List<TOrderLogBo> selectOrderLog(String orderNo) {
+		return tOrderLogMapper.selectOrderByNo(orderNo);
+	}
 	
 }

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

@@ -23,12 +23,15 @@ import org.springframework.transaction.annotation.Transactional;
 
 import com.goafanti.common.dao.OrganizationContactBookMapper;
 import com.goafanti.common.dao.TOrderBonusMapper;
+import com.goafanti.common.dao.TOrderLogMapper;
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.dao.TOrderTaskMapper;
 import com.goafanti.common.dao.TTaskHoursMapper;
 import com.goafanti.common.dao.TTaskLogMapper;
+import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.TOrderBonus;
+import com.goafanti.common.model.TOrderLog;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.common.model.TTaskHours;
@@ -58,6 +61,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Autowired
 	private TTaskLogMapper	tTaskLogMapper;
 	@Autowired
+	private TOrderLogMapper	tOrderLogMapper;
+	@Autowired
 	private OrganizationContactBookMapper	organizationContactBookMapper;
 	@Value(value = "${upload.path}")
 	private String 					uploadPath 			= null;
@@ -73,7 +78,13 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		insetLog(taskId, taskReceiverId);
 		tOrderTaskMapper.updateByPrimaryKeySelective(t);
 		updateOrder(t);
+		
 		//0-经理 (经理分派会创建子项目)1 管理员或经理转交
+		if (specially==1) {
+			addOrderLog(t.getOrderNo(), OrderLogProcess.XMDDPD.getCode());
+		}else if (specially==0) {
+			addOrderLog(t.getOrderNo(), OrderLogProcess.XMPD.getCode());
+		}
 		if (specially==0&&t.getCommodityQuantity()>1) {
 			for (int i = 0; i < t.getCommodityQuantity(); i++) {
 				TOrderTask tOrderTask=new TOrderTask();
@@ -91,7 +102,14 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		return 1;
 	}
-
+	public void addOrderLog(String orderNo, Integer code) {
+		TOrderLog tl=new TOrderLog();
+		tl.setOrderNo(orderNo);
+		tl.setProcess(code);
+		tl.setAid(TokenManager.getAdminId());
+		tOrderLogMapper.insertSelective(tl);
+		
+	}
 	private void updateOrder(TOrderTask t) {
 		List<TOrderTaskBo> taskBos=tOrderTaskMapper.selectOrderTask(t.getOrderNo());
 		TOrderNew tNew=new TOrderNew();
@@ -200,10 +218,6 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	private void checkSettlementAward(TOrderNew tn,TOrderTask task) {
 		if(task.getTaskStatus()==TaskState.COMPLETE.getCode()&&tn.getTotalAmount().compareTo(tn.getSettlementAmount())==0) {
 			List<TOrderTask> l = tOrderTaskMapper.getReceiverByOid(tn.getOrderNo());
-//					取消没有技术员不能支付全款
-//					if(null == l || l.size() == 0){
-//						return -3;//没有给将任务分给咨询师(技术员)
-//					}
 			for (TOrderTask tOrderTask : l) {
 				if(null != tOrderTask &&null != tOrderTask.getTaskReceiver()){
 					TOrderBonus bonus = new TOrderBonus();
@@ -234,15 +248,16 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			tNew.setProjectStatus(task.getProjectStatus());
 			tNew.setOrderNo(task.getOrderNo());
 			tOrderNewMapper.updateByPrimaryKeySelective(tNew);
-			
-			
 			if (task.getProjectStatus()==ProjectNewStage.YTJ.getCode()||task.getProjectStatus()==ProjectNewStage.LS.getCode()||
 					task.getProjectStatus()==ProjectNewStage.GS.getCode()) {
 				TOrderBonus tb=new TOrderBonus();
 				TOrderNew t=tOrderNewMapper.selectByPrimaryKey(task.getOrderNo());
 				tb.setId(UUID.randomUUID().toString());
 				tb.setOrderNo(task.getOrderNo());
-				if (task.getProjectStatus()==ProjectNewStage.YTJ.getCode())tb.setBonusSubject(21);//项目已提交
+				if (task.getProjectStatus()==ProjectNewStage.YTJ.getCode()) {
+					tb.setBonusSubject(21);//项目已提交
+					addOrderLog(task.getOrderNo(),OrderLogProcess.XMWC.getCode());
+				}
 				if (task.getProjectStatus()==ProjectNewStage.LS.getCode())tb.setBonusSubject(23);//项目立项
 				if (task.getProjectStatus()==ProjectNewStage.GS.getCode())tb.setBonusSubject(24);//项目公示
 				tb.setGrantType(1);//技术员

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

@@ -60,12 +60,12 @@ template.cacheable=false
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-static.host=//sb.jishutao.com/1.0.95
+static.host=//sb.jishutao.com/1.0.53
 avatar.host=//sb.jishutao.com
 
 #连生产
 #avatar.host=//static.kedexinxi.com
-#static.host=//s.kedexinxi.com/1.0.92
+#static.host=//s.kedexinxi.com/1.0.97
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload