Browse Source

客户管理

wanghui 8 years ago
parent
commit
1c5327ffcf

+ 1 - 1
GeneratorConfig.xml

@@ -10,6 +10,6 @@
     <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_order_bill"/>
+    <table schema="aft" tableName="contract"/>
   </context>
 </generatorConfiguration>

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

@@ -9,68 +9,87 @@ public interface ContractDetailMapper {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	long countByExample(ContractDetailExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int deleteByExample(ContractDetailExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int insert(ContractDetail record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int insertSelective(ContractDetail record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	List<ContractDetail> selectByExampleWithBLOBs(ContractDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	List<ContractDetail> selectByExample(ContractDetailExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	ContractDetail selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int updateByExampleSelective(@Param("record") ContractDetail record,
 			@Param("example") ContractDetailExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	int updateByExampleWithBLOBs(@Param("record") ContractDetail record,
+			@Param("example") ContractDetailExample example);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int updateByExample(@Param("record") ContractDetail record, @Param("example") ContractDetailExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int updateByPrimaryKeySelective(ContractDetail record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	int updateByPrimaryKeyWithBLOBs(ContractDetail record);
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	int updateByPrimaryKey(ContractDetail record);
 }

+ 19 - 13
src/main/java/com/goafanti/common/dao/ContractMapper.java

@@ -5,74 +5,74 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 import com.goafanti.common.model.Contract;
-import com.goafanti.contract.bo.ContractDetail;
+import com.goafanti.common.model.ContractDetail;
 import com.goafanti.contract.bo.ContractSerialNumber;
 import com.goafanti.common.model.ContractExample;
 
 public interface ContractMapper {
     /**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	long countByExample(ContractExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int deleteByExample(ContractExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int deleteByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int insert(Contract record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int insertSelective(Contract record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	List<Contract> selectByExample(ContractExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	Contract selectByPrimaryKey(String id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int updateByExampleSelective(@Param("record") Contract record, @Param("example") ContractExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int updateByExample(@Param("record") Contract record, @Param("example") ContractExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int updateByPrimaryKeySelective(Contract record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	int updateByPrimaryKey(Contract record);
 
@@ -84,5 +84,11 @@ public interface ContractMapper {
 
 	Contract findLatelyRecordByUid(String uid);
 	
-	ContractDetail selectContractDetail(String id);
+	com.goafanti.contract.bo.ContractDetail selectContractDetail(String id);
+	
+	/**
+	 * 批量插入和同明细
+	 * @param contractDetailList
+	 */
+	void batchInsertContractDetail(List<ContractDetail> list);
 }

+ 199 - 21
src/main/java/com/goafanti/common/mapper/ContractDetailMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="contract_id" jdbcType="VARCHAR" property="contractId" />
@@ -15,12 +15,25 @@
     <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
     <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="task_comment" jdbcType="VARCHAR" property="taskComment" />
+    <result column="task_status" jdbcType="INTEGER" property="taskStatus" />
+    <result column="task_distribution_time" jdbcType="TIMESTAMP" property="taskDistributionTime" />
+    <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
+    <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.ContractDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
+    -->
+    <result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
   </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 Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -54,7 +67,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -88,16 +101,46 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     id, contract_id, commodity_id, commodity_name, commodity_quantity, commodity_type, 
-    commodity_mode, create_time
+    commodity_mode, create_time, task_comment, task_status, task_distribution_time, task_allocator, 
+    task_receiver
+  </sql>
+  <sql id="Blob_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
+    -->
+    attachment_url
   </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.ContractDetailExample" resultMap="ResultMapWithBLOBs">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from contract_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
   <select id="selectByExample" parameterType="com.goafanti.common.model.ContractDetailExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     select
     <if test="distinct">
@@ -112,14 +155,16 @@
       order by ${orderByClause}
     </if>
   </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     select 
     <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
     from contract_detail
     where id = #{id,jdbcType=VARCHAR}
   </select>
@@ -127,7 +172,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     delete from contract_detail
     where id = #{id,jdbcType=VARCHAR}
@@ -136,7 +181,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     delete from contract_detail
     <if test="_parameter != null">
@@ -147,20 +192,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     insert into contract_detail (id, contract_id, commodity_id, 
       commodity_name, commodity_quantity, commodity_type, 
-      commodity_mode, create_time)
+      commodity_mode, create_time, task_comment, 
+      task_status, task_distribution_time, task_allocator, 
+      task_receiver, attachment_url)
     values (#{id,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR}, 
       #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityType,jdbcType=INTEGER}, 
-      #{commodityMode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+      #{commodityMode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{taskComment,jdbcType=VARCHAR}, 
+      #{taskStatus,jdbcType=INTEGER}, #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR}, 
+      #{taskReceiver,jdbcType=VARCHAR}, #{attachmentUrl,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.ContractDetail">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     insert into contract_detail
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -188,6 +237,24 @@
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="taskComment != null">
+        task_comment,
+      </if>
+      <if test="taskStatus != null">
+        task_status,
+      </if>
+      <if test="taskDistributionTime != null">
+        task_distribution_time,
+      </if>
+      <if test="taskAllocator != null">
+        task_allocator,
+      </if>
+      <if test="taskReceiver != null">
+        task_receiver,
+      </if>
+      <if test="attachmentUrl != null">
+        attachment_url,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -214,13 +281,31 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="taskComment != null">
+        #{taskComment,jdbcType=VARCHAR},
+      </if>
+      <if test="taskStatus != null">
+        #{taskStatus,jdbcType=INTEGER},
+      </if>
+      <if test="taskDistributionTime != null">
+        #{taskDistributionTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="taskAllocator != null">
+        #{taskAllocator,jdbcType=VARCHAR},
+      </if>
+      <if test="taskReceiver != null">
+        #{taskReceiver,jdbcType=VARCHAR},
+      </if>
+      <if test="attachmentUrl != null">
+        #{attachmentUrl,jdbcType=LONGVARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.ContractDetailExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     select count(*) from contract_detail
     <if test="_parameter != null">
@@ -231,7 +316,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     update contract_detail
     <set>
@@ -259,16 +344,59 @@
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="record.taskComment != null">
+        task_comment = #{record.taskComment,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskStatus != null">
+        task_status = #{record.taskStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.taskDistributionTime != null">
+        task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.taskAllocator != null">
+        task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskReceiver != null">
+        task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
+      </if>
+      <if test="record.attachmentUrl != null">
+        attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
+    -->
+    update contract_detail
+    set id = #{record.id,jdbcType=VARCHAR},
+      contract_id = #{record.contractId,jdbcType=VARCHAR},
+      commodity_id = #{record.commodityId,jdbcType=VARCHAR},
+      commodity_name = #{record.commodityName,jdbcType=VARCHAR},
+      commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
+      commodity_type = #{record.commodityType,jdbcType=INTEGER},
+      commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      task_comment = #{record.taskComment,jdbcType=VARCHAR},
+      task_status = #{record.taskStatus,jdbcType=INTEGER},
+      task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
+      task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
+      task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
+      attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR}
+    <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 Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     update contract_detail
     set id = #{record.id,jdbcType=VARCHAR},
@@ -278,7 +406,12 @@
       commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
       commodity_type = #{record.commodityType,jdbcType=INTEGER},
       commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      task_comment = #{record.taskComment,jdbcType=VARCHAR},
+      task_status = #{record.taskStatus,jdbcType=INTEGER},
+      task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
+      task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
+      task_receiver = #{record.taskReceiver,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -287,7 +420,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     update contract_detail
     <set>
@@ -312,14 +445,54 @@
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="taskComment != null">
+        task_comment = #{taskComment,jdbcType=VARCHAR},
+      </if>
+      <if test="taskStatus != null">
+        task_status = #{taskStatus,jdbcType=INTEGER},
+      </if>
+      <if test="taskDistributionTime != null">
+        task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="taskAllocator != null">
+        task_allocator = #{taskAllocator,jdbcType=VARCHAR},
+      </if>
+      <if test="taskReceiver != null">
+        task_receiver = #{taskReceiver,jdbcType=VARCHAR},
+      </if>
+      <if test="attachmentUrl != null">
+        attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.ContractDetail">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
+    -->
+    update contract_detail
+    set contract_id = #{contractId,jdbcType=VARCHAR},
+      commodity_id = #{commodityId,jdbcType=VARCHAR},
+      commodity_name = #{commodityName,jdbcType=VARCHAR},
+      commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
+      commodity_type = #{commodityType,jdbcType=INTEGER},
+      commodity_mode = #{commodityMode,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      task_comment = #{taskComment,jdbcType=VARCHAR},
+      task_status = #{taskStatus,jdbcType=INTEGER},
+      task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
+      task_allocator = #{taskAllocator,jdbcType=VARCHAR},
+      task_receiver = #{taskReceiver,jdbcType=VARCHAR},
+      attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ContractDetail">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 20:50:20 CST 2018.
+      This element was generated on Thu Jan 25 20:08:49 CST 2018.
     -->
     update contract_detail
     set contract_id = #{contractId,jdbcType=VARCHAR},
@@ -328,7 +501,12 @@
       commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
       commodity_type = #{commodityType,jdbcType=INTEGER},
       commodity_mode = #{commodityMode,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      task_comment = #{taskComment,jdbcType=VARCHAR},
+      task_status = #{taskStatus,jdbcType=INTEGER},
+      task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
+      task_allocator = #{taskAllocator,jdbcType=VARCHAR},
+      task_receiver = #{taskReceiver,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 96 - 50
src/main/java/com/goafanti/common/mapper/ContractMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     <id column="id" jdbcType="VARCHAR" property="id" />
     <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
@@ -17,10 +17,11 @@
     <result column="principal" jdbcType="VARCHAR" property="principal" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
     <result column="sign_date" jdbcType="TIMESTAMP" property="signDate" />
-    <result column="comment" jdbcType="VARCHAR" property="comment" />
-    <result column="complete_time" jdbcType="TIMESTAMP" property="completeTime" />
+    <result column="sign_comment" jdbcType="VARCHAR" property="signComment" />
+    <result column="complete_date" jdbcType="TIMESTAMP" property="completeDate" />
+    <result column="complete_comment" jdbcType="VARCHAR" property="completeComment" />
     <result column="deleted_sign" jdbcType="INTEGER" property="deletedSign" />
-    <result column="order_no" jdbcType="BIGINT" property="orderNo" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="contacts" jdbcType="VARCHAR" property="contacts" />
     <result column="contact_mobile" jdbcType="VARCHAR" property="contactMobile" />
@@ -29,7 +30,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -63,7 +64,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -97,16 +98,17 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     id, serial_number, create_time, update_time, creater, name, type, principal, uid, 
-    sign_date, comment, complete_time, deleted_sign, order_no, status, contacts, contact_mobile
+    sign_date, sign_comment, complete_date, complete_comment, deleted_sign, order_no, 
+    status, contacts, contact_mobile
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.ContractExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     select
     <if test="distinct">
@@ -125,7 +127,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -136,7 +138,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     delete from contract
     where id = #{id,jdbcType=VARCHAR}
@@ -145,7 +147,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     delete from contract
     <if test="_parameter != null">
@@ -156,26 +158,28 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     insert into contract (id, serial_number, create_time, 
       update_time, creater, name, 
       type, principal, uid, 
-      sign_date, comment, complete_time, 
-      deleted_sign, order_no, status, 
-      contacts, contact_mobile)
+      sign_date, sign_comment, complete_date, 
+      complete_comment, deleted_sign, order_no, 
+      status, contacts, contact_mobile
+      )
     values (#{id,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{updateTime,jdbcType=TIMESTAMP}, #{creater,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
       #{type,jdbcType=INTEGER}, #{principal,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, 
-      #{signDate,jdbcType=TIMESTAMP}, #{comment,jdbcType=VARCHAR}, #{completeTime,jdbcType=TIMESTAMP}, 
-      #{deletedSign,jdbcType=INTEGER}, #{orderNo,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, 
-      #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR})
+      #{signDate,jdbcType=TIMESTAMP}, #{signComment,jdbcType=VARCHAR}, #{completeDate,jdbcType=TIMESTAMP}, 
+      #{completeComment,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{contacts,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.Contract">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     insert into contract
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -209,11 +213,14 @@
       <if test="signDate != null">
         sign_date,
       </if>
-      <if test="comment != null">
-        comment,
+      <if test="signComment != null">
+        sign_comment,
       </if>
-      <if test="completeTime != null">
-        complete_time,
+      <if test="completeDate != null">
+        complete_date,
+      </if>
+      <if test="completeComment != null">
+        complete_comment,
       </if>
       <if test="deletedSign != null">
         deleted_sign,
@@ -262,17 +269,20 @@
       <if test="signDate != null">
         #{signDate,jdbcType=TIMESTAMP},
       </if>
-      <if test="comment != null">
-        #{comment,jdbcType=VARCHAR},
+      <if test="signComment != null">
+        #{signComment,jdbcType=VARCHAR},
+      </if>
+      <if test="completeDate != null">
+        #{completeDate,jdbcType=TIMESTAMP},
       </if>
-      <if test="completeTime != null">
-        #{completeTime,jdbcType=TIMESTAMP},
+      <if test="completeComment != null">
+        #{completeComment,jdbcType=VARCHAR},
       </if>
       <if test="deletedSign != null">
         #{deletedSign,jdbcType=INTEGER},
       </if>
       <if test="orderNo != null">
-        #{orderNo,jdbcType=BIGINT},
+        #{orderNo,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
@@ -289,7 +299,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     select count(*) from contract
     <if test="_parameter != null">
@@ -300,7 +310,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     update contract
     <set>
@@ -334,17 +344,20 @@
       <if test="record.signDate != null">
         sign_date = #{record.signDate,jdbcType=TIMESTAMP},
       </if>
-      <if test="record.comment != null">
-        comment = #{record.comment,jdbcType=VARCHAR},
+      <if test="record.signComment != null">
+        sign_comment = #{record.signComment,jdbcType=VARCHAR},
       </if>
-      <if test="record.completeTime != null">
-        complete_time = #{record.completeTime,jdbcType=TIMESTAMP},
+      <if test="record.completeDate != null">
+        complete_date = #{record.completeDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.completeComment != null">
+        complete_comment = #{record.completeComment,jdbcType=VARCHAR},
       </if>
       <if test="record.deletedSign != null">
         deleted_sign = #{record.deletedSign,jdbcType=INTEGER},
       </if>
       <if test="record.orderNo != null">
-        order_no = #{record.orderNo,jdbcType=BIGINT},
+        order_no = #{record.orderNo,jdbcType=VARCHAR},
       </if>
       <if test="record.status != null">
         status = #{record.status,jdbcType=INTEGER},
@@ -364,7 +377,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     update contract
     set id = #{record.id,jdbcType=VARCHAR},
@@ -377,10 +390,11 @@
       principal = #{record.principal,jdbcType=VARCHAR},
       uid = #{record.uid,jdbcType=VARCHAR},
       sign_date = #{record.signDate,jdbcType=TIMESTAMP},
-      comment = #{record.comment,jdbcType=VARCHAR},
-      complete_time = #{record.completeTime,jdbcType=TIMESTAMP},
+      sign_comment = #{record.signComment,jdbcType=VARCHAR},
+      complete_date = #{record.completeDate,jdbcType=TIMESTAMP},
+      complete_comment = #{record.completeComment,jdbcType=VARCHAR},
       deleted_sign = #{record.deletedSign,jdbcType=INTEGER},
-      order_no = #{record.orderNo,jdbcType=BIGINT},
+      order_no = #{record.orderNo,jdbcType=VARCHAR},
       status = #{record.status,jdbcType=INTEGER},
       contacts = #{record.contacts,jdbcType=VARCHAR},
       contact_mobile = #{record.contactMobile,jdbcType=VARCHAR}
@@ -392,7 +406,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     update contract
     <set>
@@ -423,17 +437,20 @@
       <if test="signDate != null">
         sign_date = #{signDate,jdbcType=TIMESTAMP},
       </if>
-      <if test="comment != null">
-        comment = #{comment,jdbcType=VARCHAR},
+      <if test="signComment != null">
+        sign_comment = #{signComment,jdbcType=VARCHAR},
+      </if>
+      <if test="completeDate != null">
+        complete_date = #{completeDate,jdbcType=TIMESTAMP},
       </if>
-      <if test="completeTime != null">
-        complete_time = #{completeTime,jdbcType=TIMESTAMP},
+      <if test="completeComment != null">
+        complete_comment = #{completeComment,jdbcType=VARCHAR},
       </if>
       <if test="deletedSign != null">
         deleted_sign = #{deletedSign,jdbcType=INTEGER},
       </if>
       <if test="orderNo != null">
-        order_no = #{orderNo,jdbcType=BIGINT},
+        order_no = #{orderNo,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         status = #{status,jdbcType=INTEGER},
@@ -451,7 +468,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Jan 16 21:32:00 CST 2018.
+      This element was generated on Thu Jan 25 20:45:00 CST 2018.
     -->
     update contract
     set serial_number = #{serialNumber,jdbcType=INTEGER},
@@ -463,10 +480,11 @@
       principal = #{principal,jdbcType=VARCHAR},
       uid = #{uid,jdbcType=VARCHAR},
       sign_date = #{signDate,jdbcType=TIMESTAMP},
-      comment = #{comment,jdbcType=VARCHAR},
-      complete_time = #{completeTime,jdbcType=TIMESTAMP},
+      sign_comment = #{signComment,jdbcType=VARCHAR},
+      complete_date = #{completeDate,jdbcType=TIMESTAMP},
+      complete_comment = #{completeComment,jdbcType=VARCHAR},
       deleted_sign = #{deletedSign,jdbcType=INTEGER},
-      order_no = #{orderNo,jdbcType=BIGINT},
+      order_no = #{orderNo,jdbcType=VARCHAR},
       status = #{status,jdbcType=INTEGER},
       contacts = #{contacts,jdbcType=VARCHAR},
       contact_mobile = #{contactMobile,jdbcType=VARCHAR}
@@ -702,4 +720,32 @@
 	   	)
 	and uid = #{uid,jdbcType=VARCHAR} and deleted_sign = 0
   </select>
+  <insert id="batchInsert" parameterMap="BaseResultMap">
+  insert
+	into
+		contract_detail(
+			id,
+			contract_id,
+			commodity_id,
+			commodity_name,
+			commodity_mode,
+			commodity_type,
+			commodity_quantity,
+			create_time
+		)
+	values
+    <foreach item="item" index="index" collection="list" separator=",">
+      (
+      	#{item.id,jdbcType=VARCHAR}, 
+      	#{item.contractId,jdbcType=VARCHAR},
+		#{item.commodityId,jdbcType=VARCHAR},
+		#{item.commodityName,jdbcType=VARCHAR}, 
+		#{item.commodityMode,jdbcType=VARCHAR}, 
+		#{item.commodityType,jdbcType=INTEGER},
+		#{item.printingFee,jdbcType=INTEGER}, 
+		#{item.commodityQuantity,jdbcType=INTEGER},
+		#{item.create_time,jdbcType=TIMESTAMP},
+	  )
+    </foreach>
+    </insert>
 </mapper>

+ 91 - 0
src/main/java/com/goafanti/common/mapper/TechProjectMapper.xml

@@ -563,4 +563,95 @@
 		</foreach>
   </update>
 	
+  <select id="listProjectByPage" resultType="com.goafanti.techproject.bo.ProjectListBo">
+	select
+		a.id,
+		a.serial_number as serialNumber,
+		a.sign_date as signDate,
+		a.uid,
+		a.status as projectStatus,
+		a.deleted_sign as deleteSign,
+		a.order_no as orderNo,
+		a.type as projectType,
+		a.create_time as projectTime,
+		b.nickname as buyerName,
+		c.create_time as orderTime,
+		c.order_status as orderStatus,
+		c.liquidation_status as liquidationStatus,
+		c.approval,
+		d.name as salesmanName
+	from
+		contract a left join user b on
+		a.uid = b.id left join t_order c on
+		a.order_no = c.order_no left join admin d on
+		c.salesman_id = d.id
+	where 1=1
+	<if test="deleteSign != null">
+		a.delete_sign = #{deleteSign,jdbcType=INTEGER}
+	</if>
+	<if test="orderNo != null and orderNo != ''">
+		a.order_no = #{orderNo,jdbcType=VARCHAR}
+	</if>
+	<if test="setUpStartDate != null and setUpStartDate != ''">
+		a.create_time &gt; #{setUpStartDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="setUpEndDate != null and setUpEndDate != ''">
+		a.create_time &lt; #{setUpEndDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="buyerName != null and buyerName != ''">
+		b.nickname = #{buyerName,jdbcType=VARCHAR}
+	</if>
+	<if test="salesmanName != null and salesmanName !=''">
+		and d.name = #{salesmanName,jdbcType=VARCHAR}
+	</if>
+	<if test="depId != null adn depId != ''">
+		and d.department_id = #{depId,jdbcType=VARCHAR}
+	</if>
+	<if test="orderStartDate != null and orderStartDate != ''">
+		and c.create_time &gt; #{orderStartDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="orderEndDate != null and orderEndDate != ''">
+		and c.create_time &lt; #{orderEndDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="page_sql != null">
+		${page_sql}
+	</if>
+  </select>
+  <select id="listProjectCount" parameterType="java.lang.Integer">
+  	select
+		count(0)
+	from
+		contract a left join user b on
+		a.uid = b.id left join t_order c on
+		a.order_no = c.order_no left join admin d on
+		c.salesman_id = d.id
+	where 1=1
+	<if test="deleteSign != null">
+		a.delete_sign = #{deleteSign,jdbcType=INTEGER}
+	</if>
+	<if test="orderNo != null and orderNo != ''">
+		a.order_no = #{orderNo,jdbcType=VARCHAR}
+	</if>
+	<if test="setUpStartDate != null and setUpStartDate != ''">
+		a.create_time &gt; #{setUpStartDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="setUpEndDate != null and setUpEndDate != ''">
+		a.create_time &lt; #{setUpEndDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="buyerName != null and buyerName != ''">
+		b.nickname = #{buyerName,jdbcType=VARCHAR}
+	</if>
+	<if test="salesmanName != null and salesmanName !=''">
+		and d.name = #{salesmanName,jdbcType=VARCHAR}
+	</if>
+	<if test="depId != null adn depId != ''">
+		and d.department_id = #{depId,jdbcType=VARCHAR}
+	</if>
+	<if test="orderStartDate != null and orderStartDate != ''">
+		and c.create_time &gt; #{orderStartDate,jdbcType=TIMESTAMP}
+	</if>
+	<if test="orderEndDate != null and orderEndDate != ''">
+		and c.create_time &lt; #{orderEndDate,jdbcType=TIMESTAMP}
+	</if>
+  </select>
 </mapper>

+ 97 - 74
src/main/java/com/goafanti/common/model/Contract.java

@@ -6,94 +6,99 @@ public class Contract {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.id
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.serial_number
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Integer serialNumber;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.create_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.update_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Date updateTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.creater
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String creater;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.name
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String name;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.type
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Integer type;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.principal
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String principal;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.uid
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String uid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.sign_date
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Date signDate;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.comment
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.sign_comment
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	private String comment;
+	private String signComment;
 	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.complete_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.complete_date
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	private Date completeTime;
+	private Date completeDate;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.complete_comment
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
+	 */
+	private String completeComment;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.deleted_sign
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Integer deletedSign;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.order_no
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	private Long orderNo;
+	private String orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.status
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.contacts
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String contacts;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract.contact_mobile
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	private String contactMobile;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.id
 	 * @return  the value of contract.id
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getId() {
 		return id;
@@ -102,7 +107,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.id
 	 * @param id  the value for contract.id
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -111,7 +116,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.serial_number
 	 * @return  the value of contract.serial_number
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Integer getSerialNumber() {
 		return serialNumber;
@@ -120,7 +125,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.serial_number
 	 * @param serialNumber  the value for contract.serial_number
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setSerialNumber(Integer serialNumber) {
 		this.serialNumber = serialNumber;
@@ -129,7 +134,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.create_time
 	 * @return  the value of contract.create_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -138,7 +143,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.create_time
 	 * @param createTime  the value for contract.create_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -147,7 +152,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.update_time
 	 * @return  the value of contract.update_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Date getUpdateTime() {
 		return updateTime;
@@ -156,7 +161,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.update_time
 	 * @param updateTime  the value for contract.update_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setUpdateTime(Date updateTime) {
 		this.updateTime = updateTime;
@@ -165,7 +170,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.creater
 	 * @return  the value of contract.creater
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getCreater() {
 		return creater;
@@ -174,7 +179,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.creater
 	 * @param creater  the value for contract.creater
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setCreater(String creater) {
 		this.creater = creater;
@@ -183,7 +188,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.name
 	 * @return  the value of contract.name
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getName() {
 		return name;
@@ -192,7 +197,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.name
 	 * @param name  the value for contract.name
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setName(String name) {
 		this.name = name;
@@ -201,7 +206,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.type
 	 * @return  the value of contract.type
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Integer getType() {
 		return type;
@@ -210,7 +215,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.type
 	 * @param type  the value for contract.type
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setType(Integer type) {
 		this.type = type;
@@ -219,7 +224,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.principal
 	 * @return  the value of contract.principal
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getPrincipal() {
 		return principal;
@@ -228,7 +233,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.principal
 	 * @param principal  the value for contract.principal
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setPrincipal(String principal) {
 		this.principal = principal;
@@ -237,7 +242,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.uid
 	 * @return  the value of contract.uid
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getUid() {
 		return uid;
@@ -246,7 +251,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.uid
 	 * @param uid  the value for contract.uid
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setUid(String uid) {
 		this.uid = uid;
@@ -255,7 +260,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.sign_date
 	 * @return  the value of contract.sign_date
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Date getSignDate() {
 		return signDate;
@@ -264,52 +269,70 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.sign_date
 	 * @param signDate  the value for contract.sign_date
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setSignDate(Date signDate) {
 		this.signDate = signDate;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.comment
-	 * @return  the value of contract.comment
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.sign_comment
+	 * @return  the value of contract.sign_comment
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
+	 */
+	public String getSignComment() {
+		return signComment;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.sign_comment
+	 * @param signComment  the value for contract.sign_comment
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
+	 */
+	public void setSignComment(String signComment) {
+		this.signComment = signComment;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.complete_date
+	 * @return  the value of contract.complete_date
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	public String getComment() {
-		return comment;
+	public Date getCompleteDate() {
+		return completeDate;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.comment
-	 * @param comment  the value for contract.comment
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.complete_date
+	 * @param completeDate  the value for contract.complete_date
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	public void setComment(String comment) {
-		this.comment = comment;
+	public void setCompleteDate(Date completeDate) {
+		this.completeDate = completeDate;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.complete_time
-	 * @return  the value of contract.complete_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.complete_comment
+	 * @return  the value of contract.complete_comment
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	public Date getCompleteTime() {
-		return completeTime;
+	public String getCompleteComment() {
+		return completeComment;
 	}
 
 	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.complete_time
-	 * @param completeTime  the value for contract.complete_time
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.complete_comment
+	 * @param completeComment  the value for contract.complete_comment
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	public void setCompleteTime(Date completeTime) {
-		this.completeTime = completeTime;
+	public void setCompleteComment(String completeComment) {
+		this.completeComment = completeComment;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.deleted_sign
 	 * @return  the value of contract.deleted_sign
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Integer getDeletedSign() {
 		return deletedSign;
@@ -318,7 +341,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.deleted_sign
 	 * @param deletedSign  the value for contract.deleted_sign
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setDeletedSign(Integer deletedSign) {
 		this.deletedSign = deletedSign;
@@ -327,25 +350,25 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.order_no
 	 * @return  the value of contract.order_no
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	public Long getOrderNo() {
+	public String getOrderNo() {
 		return orderNo;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.order_no
 	 * @param orderNo  the value for contract.order_no
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
-	public void setOrderNo(Long orderNo) {
+	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
 	}
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.status
 	 * @return  the value of contract.status
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Integer getStatus() {
 		return status;
@@ -354,7 +377,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.status
 	 * @param status  the value for contract.status
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -363,7 +386,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.contacts
 	 * @return  the value of contract.contacts
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getContacts() {
 		return contacts;
@@ -372,7 +395,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.contacts
 	 * @param contacts  the value for contract.contacts
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setContacts(String contacts) {
 		this.contacts = contacts;
@@ -381,7 +404,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract.contact_mobile
 	 * @return  the value of contract.contact_mobile
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getContactMobile() {
 		return contactMobile;
@@ -390,7 +413,7 @@ public class Contract {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract.contact_mobile
 	 * @param contactMobile  the value for contract.contact_mobile
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setContactMobile(String contactMobile) {
 		this.contactMobile = contactMobile;

+ 162 - 24
src/main/java/com/goafanti/common/model/ContractDetail.java

@@ -6,49 +6,79 @@ public class ContractDetail {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private String id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.contract_id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private String contractId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.commodity_id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private String commodityId;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.commodity_name
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private String commodityName;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.commodity_quantity
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private Integer commodityQuantity;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.commodity_type
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private Integer commodityType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.commodity_mode
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private String commodityMode;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.create_time
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.task_comment
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	private String taskComment;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.task_status
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	private Integer taskStatus;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.task_distribution_time
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	private Date taskDistributionTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.task_allocator
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	private String taskAllocator;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.task_receiver
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	private String taskReceiver;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column contract_detail.attachment_url
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	private String attachmentUrl;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.id
 	 * @return  the value of contract_detail.id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public String getId() {
 		return id;
@@ -57,7 +87,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.id
 	 * @param id  the value for contract_detail.id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setId(String id) {
 		this.id = id;
@@ -66,7 +96,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.contract_id
 	 * @return  the value of contract_detail.contract_id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public String getContractId() {
 		return contractId;
@@ -75,7 +105,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.contract_id
 	 * @param contractId  the value for contract_detail.contract_id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setContractId(String contractId) {
 		this.contractId = contractId;
@@ -84,7 +114,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.commodity_id
 	 * @return  the value of contract_detail.commodity_id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public String getCommodityId() {
 		return commodityId;
@@ -93,7 +123,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.commodity_id
 	 * @param commodityId  the value for contract_detail.commodity_id
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setCommodityId(String commodityId) {
 		this.commodityId = commodityId;
@@ -102,7 +132,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.commodity_name
 	 * @return  the value of contract_detail.commodity_name
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public String getCommodityName() {
 		return commodityName;
@@ -111,7 +141,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.commodity_name
 	 * @param commodityName  the value for contract_detail.commodity_name
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setCommodityName(String commodityName) {
 		this.commodityName = commodityName;
@@ -120,7 +150,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.commodity_quantity
 	 * @return  the value of contract_detail.commodity_quantity
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public Integer getCommodityQuantity() {
 		return commodityQuantity;
@@ -129,7 +159,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.commodity_quantity
 	 * @param commodityQuantity  the value for contract_detail.commodity_quantity
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setCommodityQuantity(Integer commodityQuantity) {
 		this.commodityQuantity = commodityQuantity;
@@ -138,7 +168,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.commodity_type
 	 * @return  the value of contract_detail.commodity_type
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public Integer getCommodityType() {
 		return commodityType;
@@ -147,7 +177,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.commodity_type
 	 * @param commodityType  the value for contract_detail.commodity_type
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setCommodityType(Integer commodityType) {
 		this.commodityType = commodityType;
@@ -156,7 +186,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.commodity_mode
 	 * @return  the value of contract_detail.commodity_mode
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public String getCommodityMode() {
 		return commodityMode;
@@ -165,7 +195,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.commodity_mode
 	 * @param commodityMode  the value for contract_detail.commodity_mode
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setCommodityMode(String commodityMode) {
 		this.commodityMode = commodityMode;
@@ -174,7 +204,7 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.create_time
 	 * @return  the value of contract_detail.create_time
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -183,9 +213,117 @@ public class ContractDetail {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.create_time
 	 * @param createTime  the value for contract_detail.create_time
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.task_comment
+	 * @return  the value of contract_detail.task_comment
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public String getTaskComment() {
+		return taskComment;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.task_comment
+	 * @param taskComment  the value for contract_detail.task_comment
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public void setTaskComment(String taskComment) {
+		this.taskComment = taskComment;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.task_status
+	 * @return  the value of contract_detail.task_status
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public Integer getTaskStatus() {
+		return taskStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.task_status
+	 * @param taskStatus  the value for contract_detail.task_status
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public void setTaskStatus(Integer taskStatus) {
+		this.taskStatus = taskStatus;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.task_distribution_time
+	 * @return  the value of contract_detail.task_distribution_time
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public Date getTaskDistributionTime() {
+		return taskDistributionTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.task_distribution_time
+	 * @param taskDistributionTime  the value for contract_detail.task_distribution_time
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public void setTaskDistributionTime(Date taskDistributionTime) {
+		this.taskDistributionTime = taskDistributionTime;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.task_allocator
+	 * @return  the value of contract_detail.task_allocator
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public String getTaskAllocator() {
+		return taskAllocator;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.task_allocator
+	 * @param taskAllocator  the value for contract_detail.task_allocator
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public void setTaskAllocator(String taskAllocator) {
+		this.taskAllocator = taskAllocator;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.task_receiver
+	 * @return  the value of contract_detail.task_receiver
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public String getTaskReceiver() {
+		return taskReceiver;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.task_receiver
+	 * @param taskReceiver  the value for contract_detail.task_receiver
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public void setTaskReceiver(String taskReceiver) {
+		this.taskReceiver = taskReceiver;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column contract_detail.attachment_url
+	 * @return  the value of contract_detail.attachment_url
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public String getAttachmentUrl() {
+		return attachmentUrl;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column contract_detail.attachment_url
+	 * @param attachmentUrl  the value for contract_detail.attachment_url
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
+	 */
+	public void setAttachmentUrl(String attachmentUrl) {
+		this.attachmentUrl = attachmentUrl;
+	}
 }

+ 346 - 16
src/main/java/com/goafanti/common/model/ContractDetailExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class ContractDetailExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public ContractDetailExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class ContractDetailExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -692,11 +692,341 @@ public class ContractDetailExample {
 			addCriterion("create_time not between", value1, value2, "createTime");
 			return (Criteria) this;
 		}
+
+		public Criteria andTaskCommentIsNull() {
+			addCriterion("task_comment is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentIsNotNull() {
+			addCriterion("task_comment is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentEqualTo(String value) {
+			addCriterion("task_comment =", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentNotEqualTo(String value) {
+			addCriterion("task_comment <>", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentGreaterThan(String value) {
+			addCriterion("task_comment >", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentGreaterThanOrEqualTo(String value) {
+			addCriterion("task_comment >=", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentLessThan(String value) {
+			addCriterion("task_comment <", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentLessThanOrEqualTo(String value) {
+			addCriterion("task_comment <=", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentLike(String value) {
+			addCriterion("task_comment like", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentNotLike(String value) {
+			addCriterion("task_comment not like", value, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentIn(List<String> values) {
+			addCriterion("task_comment in", values, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentNotIn(List<String> values) {
+			addCriterion("task_comment not in", values, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentBetween(String value1, String value2) {
+			addCriterion("task_comment between", value1, value2, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskCommentNotBetween(String value1, String value2) {
+			addCriterion("task_comment not between", value1, value2, "taskComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusIsNull() {
+			addCriterion("task_status is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusIsNotNull() {
+			addCriterion("task_status is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusEqualTo(Integer value) {
+			addCriterion("task_status =", value, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusNotEqualTo(Integer value) {
+			addCriterion("task_status <>", value, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusGreaterThan(Integer value) {
+			addCriterion("task_status >", value, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusGreaterThanOrEqualTo(Integer value) {
+			addCriterion("task_status >=", value, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusLessThan(Integer value) {
+			addCriterion("task_status <", value, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusLessThanOrEqualTo(Integer value) {
+			addCriterion("task_status <=", value, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusIn(List<Integer> values) {
+			addCriterion("task_status in", values, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusNotIn(List<Integer> values) {
+			addCriterion("task_status not in", values, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusBetween(Integer value1, Integer value2) {
+			addCriterion("task_status between", value1, value2, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskStatusNotBetween(Integer value1, Integer value2) {
+			addCriterion("task_status not between", value1, value2, "taskStatus");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeIsNull() {
+			addCriterion("task_distribution_time is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeIsNotNull() {
+			addCriterion("task_distribution_time is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeEqualTo(Date value) {
+			addCriterion("task_distribution_time =", value, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeNotEqualTo(Date value) {
+			addCriterion("task_distribution_time <>", value, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeGreaterThan(Date value) {
+			addCriterion("task_distribution_time >", value, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeGreaterThanOrEqualTo(Date value) {
+			addCriterion("task_distribution_time >=", value, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeLessThan(Date value) {
+			addCriterion("task_distribution_time <", value, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeLessThanOrEqualTo(Date value) {
+			addCriterion("task_distribution_time <=", value, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeIn(List<Date> values) {
+			addCriterion("task_distribution_time in", values, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeNotIn(List<Date> values) {
+			addCriterion("task_distribution_time not in", values, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeBetween(Date value1, Date value2) {
+			addCriterion("task_distribution_time between", value1, value2, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskDistributionTimeNotBetween(Date value1, Date value2) {
+			addCriterion("task_distribution_time not between", value1, value2, "taskDistributionTime");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorIsNull() {
+			addCriterion("task_allocator is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorIsNotNull() {
+			addCriterion("task_allocator is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorEqualTo(String value) {
+			addCriterion("task_allocator =", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorNotEqualTo(String value) {
+			addCriterion("task_allocator <>", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorGreaterThan(String value) {
+			addCriterion("task_allocator >", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorGreaterThanOrEqualTo(String value) {
+			addCriterion("task_allocator >=", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorLessThan(String value) {
+			addCriterion("task_allocator <", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorLessThanOrEqualTo(String value) {
+			addCriterion("task_allocator <=", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorLike(String value) {
+			addCriterion("task_allocator like", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorNotLike(String value) {
+			addCriterion("task_allocator not like", value, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorIn(List<String> values) {
+			addCriterion("task_allocator in", values, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorNotIn(List<String> values) {
+			addCriterion("task_allocator not in", values, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorBetween(String value1, String value2) {
+			addCriterion("task_allocator between", value1, value2, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskAllocatorNotBetween(String value1, String value2) {
+			addCriterion("task_allocator not between", value1, value2, "taskAllocator");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverIsNull() {
+			addCriterion("task_receiver is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverIsNotNull() {
+			addCriterion("task_receiver is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverEqualTo(String value) {
+			addCriterion("task_receiver =", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverNotEqualTo(String value) {
+			addCriterion("task_receiver <>", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverGreaterThan(String value) {
+			addCriterion("task_receiver >", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverGreaterThanOrEqualTo(String value) {
+			addCriterion("task_receiver >=", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverLessThan(String value) {
+			addCriterion("task_receiver <", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverLessThanOrEqualTo(String value) {
+			addCriterion("task_receiver <=", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverLike(String value) {
+			addCriterion("task_receiver like", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverNotLike(String value) {
+			addCriterion("task_receiver not like", value, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverIn(List<String> values) {
+			addCriterion("task_receiver in", values, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverNotIn(List<String> values) {
+			addCriterion("task_receiver not in", values, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverBetween(String value1, String value2) {
+			addCriterion("task_receiver between", value1, value2, "taskReceiver");
+			return (Criteria) this;
+		}
+
+		public Criteria andTaskReceiverNotBetween(String value1, String value2) {
+			addCriterion("task_receiver not between", value1, value2, "taskReceiver");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table contract_detail
-	 * @mbg.generated  Tue Jan 16 20:50:20 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:08:49 CST 2018
 	 */
 	public static class Criterion {
 		private String condition;

+ 158 - 78
src/main/java/com/goafanti/common/model/ContractExample.java

@@ -7,23 +7,23 @@ import java.util.List;
 public class ContractExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public ContractExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -31,7 +31,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -39,7 +39,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -47,7 +47,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -55,7 +55,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -63,7 +63,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -71,7 +71,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -79,7 +79,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -89,7 +89,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -101,7 +101,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -110,7 +110,7 @@ public class ContractExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -120,7 +120,7 @@ public class ContractExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -813,133 +813,203 @@ public class ContractExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentIsNull() {
-			addCriterion("comment is null");
+		public Criteria andSignCommentIsNull() {
+			addCriterion("sign_comment is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentIsNotNull() {
-			addCriterion("comment is not null");
+		public Criteria andSignCommentIsNotNull() {
+			addCriterion("sign_comment is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentEqualTo(String value) {
-			addCriterion("comment =", value, "comment");
+		public Criteria andSignCommentEqualTo(String value) {
+			addCriterion("sign_comment =", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentNotEqualTo(String value) {
-			addCriterion("comment <>", value, "comment");
+		public Criteria andSignCommentNotEqualTo(String value) {
+			addCriterion("sign_comment <>", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentGreaterThan(String value) {
-			addCriterion("comment >", value, "comment");
+		public Criteria andSignCommentGreaterThan(String value) {
+			addCriterion("sign_comment >", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentGreaterThanOrEqualTo(String value) {
-			addCriterion("comment >=", value, "comment");
+		public Criteria andSignCommentGreaterThanOrEqualTo(String value) {
+			addCriterion("sign_comment >=", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentLessThan(String value) {
-			addCriterion("comment <", value, "comment");
+		public Criteria andSignCommentLessThan(String value) {
+			addCriterion("sign_comment <", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentLessThanOrEqualTo(String value) {
-			addCriterion("comment <=", value, "comment");
+		public Criteria andSignCommentLessThanOrEqualTo(String value) {
+			addCriterion("sign_comment <=", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentLike(String value) {
-			addCriterion("comment like", value, "comment");
+		public Criteria andSignCommentLike(String value) {
+			addCriterion("sign_comment like", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentNotLike(String value) {
-			addCriterion("comment not like", value, "comment");
+		public Criteria andSignCommentNotLike(String value) {
+			addCriterion("sign_comment not like", value, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentIn(List<String> values) {
-			addCriterion("comment in", values, "comment");
+		public Criteria andSignCommentIn(List<String> values) {
+			addCriterion("sign_comment in", values, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentNotIn(List<String> values) {
-			addCriterion("comment not in", values, "comment");
+		public Criteria andSignCommentNotIn(List<String> values) {
+			addCriterion("sign_comment not in", values, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentBetween(String value1, String value2) {
-			addCriterion("comment between", value1, value2, "comment");
+		public Criteria andSignCommentBetween(String value1, String value2) {
+			addCriterion("sign_comment between", value1, value2, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCommentNotBetween(String value1, String value2) {
-			addCriterion("comment not between", value1, value2, "comment");
+		public Criteria andSignCommentNotBetween(String value1, String value2) {
+			addCriterion("sign_comment not between", value1, value2, "signComment");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeIsNull() {
-			addCriterion("complete_time is null");
+		public Criteria andCompleteDateIsNull() {
+			addCriterion("complete_date is null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeIsNotNull() {
-			addCriterion("complete_time is not null");
+		public Criteria andCompleteDateIsNotNull() {
+			addCriterion("complete_date is not null");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeEqualTo(Date value) {
-			addCriterion("complete_time =", value, "completeTime");
+		public Criteria andCompleteDateEqualTo(Date value) {
+			addCriterion("complete_date =", value, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeNotEqualTo(Date value) {
-			addCriterion("complete_time <>", value, "completeTime");
+		public Criteria andCompleteDateNotEqualTo(Date value) {
+			addCriterion("complete_date <>", value, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeGreaterThan(Date value) {
-			addCriterion("complete_time >", value, "completeTime");
+		public Criteria andCompleteDateGreaterThan(Date value) {
+			addCriterion("complete_date >", value, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeGreaterThanOrEqualTo(Date value) {
-			addCriterion("complete_time >=", value, "completeTime");
+		public Criteria andCompleteDateGreaterThanOrEqualTo(Date value) {
+			addCriterion("complete_date >=", value, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeLessThan(Date value) {
-			addCriterion("complete_time <", value, "completeTime");
+		public Criteria andCompleteDateLessThan(Date value) {
+			addCriterion("complete_date <", value, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeLessThanOrEqualTo(Date value) {
-			addCriterion("complete_time <=", value, "completeTime");
+		public Criteria andCompleteDateLessThanOrEqualTo(Date value) {
+			addCriterion("complete_date <=", value, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeIn(List<Date> values) {
-			addCriterion("complete_time in", values, "completeTime");
+		public Criteria andCompleteDateIn(List<Date> values) {
+			addCriterion("complete_date in", values, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeNotIn(List<Date> values) {
-			addCriterion("complete_time not in", values, "completeTime");
+		public Criteria andCompleteDateNotIn(List<Date> values) {
+			addCriterion("complete_date not in", values, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeBetween(Date value1, Date value2) {
-			addCriterion("complete_time between", value1, value2, "completeTime");
+		public Criteria andCompleteDateBetween(Date value1, Date value2) {
+			addCriterion("complete_date between", value1, value2, "completeDate");
 			return (Criteria) this;
 		}
 
-		public Criteria andCompleteTimeNotBetween(Date value1, Date value2) {
-			addCriterion("complete_time not between", value1, value2, "completeTime");
+		public Criteria andCompleteDateNotBetween(Date value1, Date value2) {
+			addCriterion("complete_date not between", value1, value2, "completeDate");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentIsNull() {
+			addCriterion("complete_comment is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentIsNotNull() {
+			addCriterion("complete_comment is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentEqualTo(String value) {
+			addCriterion("complete_comment =", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentNotEqualTo(String value) {
+			addCriterion("complete_comment <>", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentGreaterThan(String value) {
+			addCriterion("complete_comment >", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentGreaterThanOrEqualTo(String value) {
+			addCriterion("complete_comment >=", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentLessThan(String value) {
+			addCriterion("complete_comment <", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentLessThanOrEqualTo(String value) {
+			addCriterion("complete_comment <=", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentLike(String value) {
+			addCriterion("complete_comment like", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentNotLike(String value) {
+			addCriterion("complete_comment not like", value, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentIn(List<String> values) {
+			addCriterion("complete_comment in", values, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentNotIn(List<String> values) {
+			addCriterion("complete_comment not in", values, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentBetween(String value1, String value2) {
+			addCriterion("complete_comment between", value1, value2, "completeComment");
+			return (Criteria) this;
+		}
+
+		public Criteria andCompleteCommentNotBetween(String value1, String value2) {
+			addCriterion("complete_comment not between", value1, value2, "completeComment");
 			return (Criteria) this;
 		}
 
@@ -1013,52 +1083,62 @@ public class ContractExample {
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoEqualTo(Long value) {
+		public Criteria andOrderNoEqualTo(String value) {
 			addCriterion("order_no =", value, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoNotEqualTo(Long value) {
+		public Criteria andOrderNoNotEqualTo(String value) {
 			addCriterion("order_no <>", value, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoGreaterThan(Long value) {
+		public Criteria andOrderNoGreaterThan(String value) {
 			addCriterion("order_no >", value, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoGreaterThanOrEqualTo(Long value) {
+		public Criteria andOrderNoGreaterThanOrEqualTo(String value) {
 			addCriterion("order_no >=", value, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoLessThan(Long value) {
+		public Criteria andOrderNoLessThan(String value) {
 			addCriterion("order_no <", value, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoLessThanOrEqualTo(Long value) {
+		public Criteria andOrderNoLessThanOrEqualTo(String value) {
 			addCriterion("order_no <=", value, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoIn(List<Long> values) {
+		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<Long> values) {
+		public Criteria andOrderNoNotIn(List<String> values) {
 			addCriterion("order_no not in", values, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoBetween(Long value1, Long value2) {
+		public Criteria andOrderNoBetween(String value1, String value2) {
 			addCriterion("order_no between", value1, value2, "orderNo");
 			return (Criteria) this;
 		}
 
-		public Criteria andOrderNoNotBetween(Long value1, Long value2) {
+		public Criteria andOrderNoNotBetween(String value1, String value2) {
 			addCriterion("order_no not between", value1, value2, "orderNo");
 			return (Criteria) this;
 		}
@@ -1266,7 +1346,7 @@ public class ContractExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table contract
-	 * @mbg.generated  Tue Jan 16 21:32:00 CST 2018
+	 * @mbg.generated  Thu Jan 25 20:45:00 CST 2018
 	 */
 	public static class Criterion {
 		private String condition;

+ 4 - 5
src/main/java/com/goafanti/contract/service/impl/ContractServiceImpl.java

@@ -21,12 +21,10 @@ import com.goafanti.common.dao.OrgCognizanceMapper;
 import com.goafanti.common.dao.PatentInfoMapper;
 import com.goafanti.common.dao.TechProjectMapper;
 import com.goafanti.common.dao.UserMapper;
-import com.goafanti.common.enums.ContractBusinessStatus;
 import com.goafanti.common.enums.ContractStatus;
 import com.goafanti.common.enums.DeleteStatus;
 import com.goafanti.common.enums.NoticeReadStatus;
 import com.goafanti.common.enums.NoticeStatus;
-import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.Contract;
 import com.goafanti.common.model.ContractLog;
 import com.goafanti.common.model.Notice;
@@ -197,6 +195,7 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 		return contractMapper.updateByPrimaryKeySelective(contract);
 	}
 
+	// update to 18
 	@Override
 	public void updateSubmit(Contract c, String[] principals, String signDateFormattedDate) {
 		Date signDate = null;
@@ -215,7 +214,7 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 		ContractLog l = new ContractLog();
 		l.setId(UUID.randomUUID().toString());
 		l.setCid(c.getId());
-		l.setComment(c.getComment());
+		//l.setComment(c.getComment());
 		l.setOperator(TokenManager.getAdminId());
 		l.setPrincipal(TokenManager.getAdminId());
 		l.setRecordTime(signDate);
@@ -271,8 +270,8 @@ public class ContractServiceImpl extends BaseMybatisDao<ContractMapper> implemen
 	private ContractLog disposeContractLog(Contract c) {
 		ContractLog cl = new ContractLog();
 		cl.setId(UUID.randomUUID().toString());
-		cl.setComment(c.getComment());
-		/*if (TokenManager.getToken() instanceof Admin) {
+		/*cl.setComment(c.getComment());
+		if (TokenManager.getToken() instanceof Admin) {
 			cl.setOperator(c.getFounder());
 			cl.setPrincipal(c.getFounder());
 		}*/

+ 1 - 1
src/main/java/com/goafanti/order/bo/OrderListBo.java

@@ -30,7 +30,7 @@ public class OrderListBo {
 	private String salesmanName;
 	/** 财务负责人 **/
 	private String financeName;
-	/** 营销员 **/
+	/** 技术员 **/
 	private String technicianName;
 	/** 关联部门名称 **/
 	private String departmentName;

+ 9 - 0
src/main/java/com/goafanti/order/service/OrderService.java

@@ -338,4 +338,13 @@ public interface OrderService {
 	 */
 	Pagination<OrderListBo> listSetUpServiceOrder(String buyerName,String salesmanName, String financeName,
 			String depId,Integer approval, Integer pageNo, Integer pageSize);
+
+	/**
+	 * 项目立项
+	 * @param orderNo
+	 * @param signDate
+	 * @param signComment
+	 * @return
+	 */
+	int setUpProject(String orderNo, String signDate, String signComment);
 }

+ 57 - 0
src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java

@@ -19,12 +19,15 @@ import org.springframework.transaction.annotation.Transactional;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
+import com.goafanti.common.dao.ContractMapper;
 import com.goafanti.common.dao.OrganizationManagementMapper;
 import com.goafanti.common.dao.TOrderBillMapper;
 import com.goafanti.common.dao.TOrderDetailMapper;
 import com.goafanti.common.dao.TOrderMapper;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Admin;
+import com.goafanti.common.model.Contract;
+import com.goafanti.common.model.ContractDetail;
 import com.goafanti.common.model.OrganizationManagement;
 import com.goafanti.common.model.TOrder;
 import com.goafanti.common.model.TOrderBill;
@@ -71,6 +74,8 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 	private TOrderBillMapper tOrderBillMapper;
 	@Autowired
 	private OrganizationManagementMapper organizationManagementMapper;
+	@Autowired
+	private ContractMapper contractMapper;
 	
 	private final BigDecimal DEFAULT_FIRST_PAYMENT = new BigDecimal(0);// 默认首付价格
 	private final BigDecimal DEFAULT_COMMODITY_PRICE = new BigDecimal(0);// 默认单价
@@ -1305,4 +1310,56 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 				params, pageNo, pageSize);
 	}
 
+	@Override
+	@Transactional
+	public int setUpProject(String orderNo, String signDate, String signComment) {
+		TOrder tOrder = tOrderMapper.selectByPrimaryKey(orderNo);
+		checkOrder(tOrder);
+		boolean flag = false;
+		if(tOrder.getOrderStatus() == OrderState.ALREADY_SIGN.getCode()){
+			if(tOrder.getLiquidationStatus() == LiquidationState.WAIT_PAY_LAST_BALANCE.getCode())
+				flag = true;
+			if(tOrder.getLiquidationStatus() == LiquidationState.ALREADY_PAY.getCode()) 
+				flag = true;
+			if(tOrder.getApproval() == ApprovalState.AUDIT_PASS.getCode())
+				flag = true;
+		}	
+		if(!flag) 
+			throw new BusinessException(new Error(ErrorConstants.ORDER_CAN_NOT_MODIFY, orderNo, ""));
+		tOrder.setProjectStage(ProjectStage.ALREADY_SET_UP.getCode());
+		tOrder.setUpdateTime(new Date());
+		tOrderMapper.updateByPrimaryKeySelective(tOrder);
+		//-------------- 查询订单详情 --------------------------
+		List<TOrderDetail> orderDetailList = tOrderMapper.selectOrderCommodity(orderNo);
+		List<ContractDetail> contractDetailList = new ArrayList<>();
+		ContractDetail contractDetail = null;
+		Date createTime = new Date();
+		String contractId = UUID.randomUUID().toString(); //合同ID
+		Contract contract = new Contract();
+		contract.setId(contractId);
+		contract.setCreateTime(createTime);
+		contract.setType(tOrder.getOrderType());
+		contract.setSignDate(createTime);
+		contract.setOrderNo(orderNo);
+		contract.setStatus(ProjectStage.ALREADY_SET_UP.getCode());
+		contract.setUid(tOrder.getBuyerId());
+		contractMapper.insert(contract);
+		for(TOrderDetail orderDetail: orderDetailList){
+			for(int i=0; i<orderDetail.getCommodityQuantity();i++){
+				contractDetail = new ContractDetail();
+				contractDetail.setId(UUID.randomUUID().toString());
+				contractDetail.setCommodityId(orderDetail.getCommodityId());
+				contractDetail.setCommodityMode(orderDetail.getCommodityMode());
+				contractDetail.setCommodityName(orderDetail.getCommodityName());
+				contractDetail.setCommodityType(orderDetail.getCommodityType());
+				contractDetail.setCommodityQuantity(1);
+				contractDetail.setCreateTime(createTime);
+				contractDetail.setContractId(contractId);
+				contractDetailList.add(contractDetail);
+			}
+		}
+		contractMapper.batchInsertContractDetail(contractDetailList);
+		return 1;
+	}
+
 }

+ 14 - 0
src/main/java/com/goafanti/techproject/bo/ProjectDetailBo.java

@@ -0,0 +1,14 @@
+package com.goafanti.techproject.bo;
+
+public class ProjectDetailBo extends ProjectListBo{
+	/** 立项说明 **/
+	private String signComment;
+
+	public String getSignComment() {
+		return signComment;
+	}
+
+	public void setSignComment(String signComment) {
+		this.signComment = signComment;
+	}
+}

+ 117 - 0
src/main/java/com/goafanti/techproject/bo/ProjectListBo.java

@@ -0,0 +1,117 @@
+package com.goafanti.techproject.bo;
+
+public class ProjectListBo {
+	/** 项目编号 **/
+	private String id;
+	/** 订单编号 **/
+	private String orderNo;
+	/** 订单创建时间 **/
+	private String orderTime;
+	/** 订单状态 **/
+	private Integer orderStatus;
+	/** 结算状态 **/
+	private Integer liquidationStatus;
+	/** 项目类型 **/
+	private Integer projectType;
+	/** 项目状态 **/
+	private Integer projectStatus;
+	/** 删除标示**/
+	private Integer deleteSign; 
+	/** 是否特批 **/
+	private Integer approval;
+	/** 客户名 **/
+	private String buyerName;
+	/** 营销员 **/
+	private String salesmanName;
+	/** 财务负责人 **/
+	private String financeName;
+	/** 技术员 **/
+	private String technicianName;
+	/** 立项时间 **/
+	private String signDate;
+
+	public String getId() {
+		return id;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getOrderTime() {
+		return orderTime;
+	}
+	public void setOrderTime(String orderTime) {
+		this.orderTime = orderTime;
+	}
+	public Integer getOrderStatus() {
+		return orderStatus;
+	}
+	public void setOrderStatus(Integer orderStatus) {
+		this.orderStatus = orderStatus;
+	}
+	public Integer getLiquidationStatus() {
+		return liquidationStatus;
+	}
+	public void setLiquidationStatus(Integer liquidationStatus) {
+		this.liquidationStatus = liquidationStatus;
+	}
+	public Integer getProjectType() {
+		return projectType;
+	}
+	public void setProjectType(Integer projectType) {
+		this.projectType = projectType;
+	}
+	public Integer getProjectStatus() {
+		return projectStatus;
+	}
+	public void setProjectStatus(Integer projectStatus) {
+		this.projectStatus = projectStatus;
+	}
+	public Integer getDeleteSign() {
+		return deleteSign;
+	}
+	public void setDeleteSign(Integer deleteSign) {
+		this.deleteSign = deleteSign;
+	}
+	public String getBuyerName() {
+		return buyerName;
+	}
+	public void setBuyerName(String buyerName) {
+		this.buyerName = buyerName;
+	}
+	public Integer getApproval() {
+		return approval;
+	}
+	public void setApproval(Integer approval) {
+		this.approval = approval;
+	}
+	public String getSalesmanName() {
+		return salesmanName;
+	}
+	public void setSalesmanName(String salesmanName) {
+		this.salesmanName = salesmanName;
+	}
+	public String getFinanceName() {
+		return financeName;
+	}
+	public void setFinanceName(String financeName) {
+		this.financeName = financeName;
+	}
+	public String getTechnicianName() {
+		return technicianName;
+	}
+	public void setTechnicianName(String technicianName) {
+		this.technicianName = technicianName;
+	}
+	public String getSignDate() {
+		return signDate;
+	}
+	public void setSignDate(String signDate) {
+		this.signDate = signDate;
+	}
+}

+ 63 - 0
src/main/java/com/goafanti/techproject/controller/AdminTechProjectApiController.java

@@ -6,6 +6,7 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
+import java.util.UUID;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -44,6 +45,7 @@ import com.goafanti.easemob.enums.EasemonSysUsers;
 import com.goafanti.order.service.OrderService;
 import com.goafanti.techproject.bo.InputTechProject;
 import com.goafanti.techproject.bo.InputTechWebsite;
+import com.goafanti.techproject.bo.ProjectListBo;
 import com.goafanti.techproject.bo.TechProjectManageListBo;
 import com.goafanti.techproject.bo.TechWebsiteDetailBo;
 import com.goafanti.techproject.bo.TechWebsiteListBo;
@@ -579,4 +581,65 @@ public class AdminTechProjectApiController extends CertifyApiController {
 		res.setData(orderServiceImpl.listSetUpServiceOrder(buyerName, salesmanName, financeName, depId, approval, pageNo, pageSize));
 		return res;
 	}
+	
+	/** 进入项目立项 **/
+	@RequestMapping(value = "/toSetUpProject", method = RequestMethod.GET)
+	public Result toSetUpProject(String orderNo,String buyerName){
+		Result res = new Result();
+		ProjectListBo bo = new ProjectListBo();
+		bo.setId(UUID.randomUUID().toString().replace("-", ""));
+		bo.setOrderNo(orderNo);
+		bo.setBuyerName(buyerName);
+		res.setData(bo);
+		return res;
+	}
+	
+	/** 项目立项 **/
+	@RequestMapping(value = "/setUpProject", method = RequestMethod.GET)
+	public Result setUpProject(String orderNo,String signDate,String signComment){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "订单编号"));
+			return res;
+		}
+		orderServiceImpl.setUpProject(orderNo,signDate,signComment);
+		return res;
+	}
+	
+	/**
+	 * 项目管理
+	 * @param bo
+	 * @param depId
+	 * @param orderStartTime
+	 * @param orderEndTime
+	 * @param setUpStartDate
+	 * @param setUpEndDate
+	 * @return
+	 */
+	public Result listProject(ProjectListBo bo,String depId,
+			String orderStartTime,String orderEndTime,String setUpStartDate,String setUpEndDate,Integer pageNo,Integer pageSize){
+		Result res = new Result();
+		res.setData(techProjectService.listProject(bo, depId, orderStartTime, orderEndTime, setUpStartDate, setUpEndDate,pageNo,pageSize));
+		return res;
+	}
+	
+	/**
+	 * 
+	 * @param orderNo
+	 * @param uid
+	 * @param aid
+	 * @param projectType
+	 * @param signComment
+	 * @return
+	 */
+	public Result createProject(String orderNo,String uid,String aid,Integer projectType,String signComment){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			if(StringUtils.isBlank(uid) || StringUtils.isBlank(aid) || projectType==null){
+				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "请填写项目信息"));
+			} 
+		}
+		techProjectService.createProject(orderNo, uid, aid, projectType, signComment);
+		return res;
+	}
 }

+ 25 - 1
src/main/java/com/goafanti/techproject/service/TechProjectService.java

@@ -7,7 +7,7 @@ import com.goafanti.common.model.Contract;
 import com.goafanti.common.model.TechProject;
 import com.goafanti.common.model.TechProjectLog;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.OrderListBo;
+import com.goafanti.techproject.bo.ProjectListBo;
 import com.goafanti.techproject.bo.TechProjectClientListBo;
 import com.goafanti.techproject.bo.TechProjectContractListBo;
 import com.goafanti.techproject.bo.TechProjectDetailBo;
@@ -37,4 +37,28 @@ public interface TechProjectService {
 	List<TechProjectContractListBo> listContractTechProjectByContractId(String contractId);
 
 	void batchInsertContractRecord(Contract c);
+
+	/**
+	 * 项目管理列表
+	 * @param bo
+	 * @param depId
+	 * @param orderStartTime
+	 * @param orderEndTime
+	 * @param setUpStartDate
+	 * @param setUpEndDate
+	 * @return
+	 */
+	Pagination<ProjectListBo> listProject(ProjectListBo bo, String depId, String orderStartDate,
+			String orderEndDate, String setUpStartDate, String setUpEndDate,Integer pageNo,Integer pageSize);
+
+	/**
+	 * 创建项目
+	 * @param orderNo
+	 * @param uid
+	 * @param aid
+	 * @param projectType
+	 * @param signComment
+	 * @return
+	 */
+	int createProject(String orderNo,String uid,String aid,Integer projectType,String signComment) ;
 }

+ 29 - 1
src/main/java/com/goafanti/techproject/service/impl/TechProjectServiceImpl.java

@@ -1,5 +1,6 @@
 package com.goafanti.techproject.service.impl;
 
+import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
@@ -7,6 +8,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
+import org.apache.commons.lang3.time.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -29,7 +31,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.bo.OrderListBo;
+import com.goafanti.techproject.bo.ProjectListBo;
 import com.goafanti.techproject.bo.TechProjectClientListBo;
 import com.goafanti.techproject.bo.TechProjectContractListBo;
 import com.goafanti.techproject.bo.TechProjectDetailBo;
@@ -285,4 +287,30 @@ public class TechProjectServiceImpl extends BaseMybatisDao<TechProjectMapper> im
 		noticeMapper.insert(n);
 	}
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<ProjectListBo> listProject(ProjectListBo bo, String depId, String orderStartDate,
+			String orderEndDate, String setUpStartDate, String setUpEndDate,Integer pageNo,Integer pageSize) {
+		Map<String, Object> params = new HashMap<>();
+		if(StringUtils.isNotBlank(bo.getBuyerName())) params.put("buyerName", bo.getBuyerName());
+		if(bo.getDeleteSign() != null) params.put("deleteSign", bo.getDeleteSign());
+		if(bo.getOrderNo() != null) params.put("orderNo", bo.getOrderNo());
+		if(bo.getSalesmanName() != null) params.put("salesmanName", bo.getSalesmanName());
+		if(StringUtils.isNotBlank(setUpStartDate))
+			try {
+				params.put("setUpStartDate", DateUtils.parseDate(setUpStartDate, AFTConstants.YYYYMMDDHHMMSS));
+				params.put("setUpEndDate", DateUtils.parseDate(setUpEndDate, AFTConstants.YYYYMMDDHHMMSS));
+				params.put(" orderStartDate", DateUtils.parseDate(orderStartDate, AFTConstants.YYYYMMDDHHMMSS));
+				params.put("orderEndDate", DateUtils.parseDate(orderEndDate, AFTConstants.YYYYMMDDHHMMSS));
+			} catch (ParseException e) {
+				e.printStackTrace();
+			}
+		return (Pagination<ProjectListBo>)findPage("listProjectByPage", "listProjectCount", params, pageNo, pageSize);
+	}
+
+	@Override
+	public int createProject(String orderNo, String uid, String aid, Integer projectType, String signComment) {
+		return 0;
+	}
+
 }