Browse Source

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

anderx 6 years ago
parent
commit
12ef1d6743
35 changed files with 800 additions and 334 deletions
  1. 1 1
      GeneratorConfig.xml
  2. 12 6
      src/main/java/com/goafanti/common/constant/AFTConstants.java
  3. 11 11
      src/main/java/com/goafanti/common/dao/NewOrderDunMapper.java
  4. 2 0
      src/main/java/com/goafanti/common/dao/TOrderInvoiceMapper.java
  5. 0 1
      src/main/java/com/goafanti/common/dao/TTaskHoursMapper.java
  6. 46 32
      src/main/java/com/goafanti/common/mapper/NewOrderDunMapper.xml
  7. 12 0
      src/main/java/com/goafanti/common/mapper/TOrderInvoiceMapper.xml
  8. 65 51
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  9. 36 12
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  10. 0 26
      src/main/java/com/goafanti/common/mapper/TTaskHoursMapper.xml
  11. 59 36
      src/main/java/com/goafanti/common/model/NewOrderDun.java
  12. 76 16
      src/main/java/com/goafanti/common/model/NewOrderDunExample.java
  13. 5 4
      src/main/java/com/goafanti/common/task/OrderDunTask.java
  14. 0 1
      src/main/java/com/goafanti/common/utils/ExportExcelUtil.java
  15. 10 0
      src/main/java/com/goafanti/common/utils/SendEmailUtil.java
  16. 20 0
      src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java
  17. 28 0
      src/main/java/com/goafanti/order/bo/TOrderNewBo.java
  18. 7 14
      src/main/java/com/goafanti/order/bo/TOrderTaskBo.java
  19. 16 0
      src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java
  20. 62 0
      src/main/java/com/goafanti/order/bo/inuptTaskHoursListBo.java
  21. 161 0
      src/main/java/com/goafanti/order/bo/outOrderDunListBo.java
  22. 6 2
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  23. 17 0
      src/main/java/com/goafanti/order/controller/OrderInvoiceApiController.java
  24. 6 38
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  25. 2 0
      src/main/java/com/goafanti/order/service/OrderInvoiceService.java
  26. 3 7
      src/main/java/com/goafanti/order/service/OrderNewService.java
  27. 4 4
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  28. 12 5
      src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java
  29. 2 0
      src/main/java/com/goafanti/order/service/impl/NewOrderDunServiceImpl.java
  30. 6 0
      src/main/java/com/goafanti/order/service/impl/OrderInvoiceServiceImpl.java
  31. 64 33
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  32. 43 27
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  33. 2 3
      src/main/java/com/goafanti/order/service/impl/OrderReceivablesServiceImpl.java
  34. 3 3
      src/main/resources/props/config_local.properties
  35. 1 1
      src/main/resources/props/config_test.properties

+ 1 - 1
GeneratorConfig.xml

@@ -9,6 +9,6 @@
     <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
     <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
     <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="kede-server" type="XMLMAPPER" />
-    <table schema="aft" tableName="t_order_mid"/>
+    <table schema="aft" tableName="new_order_dun"/>
   </context>
 </generatorConfiguration>

+ 12 - 6
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -21,10 +21,19 @@ public class AFTConstants {
 
 	public static final String	VICE_CEO							= "99997";				// 集团副总
 
-		
 	public static final String  TECH_ADMIN                          = "9998";				// 技术管理员
 	
 	public static final String  FINANCE_ADMIN                       = "9997";				// 财务管理员
+	
+	public static final String  SALESMAN_ADMIN                      = "9996";				// 营销管理员
+	
+	public static final String  SALESMAN_MANAGER                    = "996";				// 营销经理
+	
+	public static final String  SALESMAN                      		= "96";					// 营销员
+	
+	public static final String  TECH_MANAGER                        = "998";				// 技术管理员
+	
+	public static final String  TECH		                        = "98";				// 技术管理员
 
 	public static final String	AREAADMIN							= "";					// 地区管理员
 
@@ -32,13 +41,10 @@ public class AFTConstants {
 
 	public static final String	MANAGERADMIN						= "";					// 客户经理
 	
-	public static final String  FINANCEMANAGERADMIN					= "997";					// 财务经理
+	public static final String  FINANCE_MANAGER						= "997";				// 财务经理
 	
-	public static final String  FINANCEADMIN						= "97";					// 财务专员
-
-	public static final String	SALESMANAGERADMIN					= "";					// 营销经理
+	public static final String  FINANCE								= "97";					// 财务专员
 
-	public static final String	SALESMANADMIN						= "";					// 营销员
 
 	public static final String	TECHBROKER							= "";					// 技术经纪人
 

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

@@ -10,67 +10,67 @@ import org.apache.ibatis.annotations.Param;
 public interface NewOrderDunMapper {
     /**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	long countByExample(NewOrderDunExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int deleteByExample(NewOrderDunExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int insert(NewOrderDun record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int insertSelective(NewOrderDun record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	List<NewOrderDun> selectByExample(NewOrderDunExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	NewOrderDun selectByPrimaryKey(Integer id);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int updateByExampleSelective(@Param("record") NewOrderDun record, @Param("example") NewOrderDunExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int updateByExample(@Param("record") NewOrderDun record, @Param("example") NewOrderDunExample example);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int updateByPrimaryKeySelective(NewOrderDun record);
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	int updateByPrimaryKey(NewOrderDun record);
 

+ 2 - 0
src/main/java/com/goafanti/common/dao/TOrderInvoiceMapper.java

@@ -84,4 +84,6 @@ public interface TOrderInvoiceMapper {
 	 BigDecimal conutAmountByOrderNo(String orderNo);
 
 	List<InvoiceBo> selectByOrderNo(String orderNo);
+
+	TOrderInvoiceDetails getInvoiceDetails(String orderNo);
 }

+ 0 - 1
src/main/java/com/goafanti/common/dao/TTaskHoursMapper.java

@@ -80,7 +80,6 @@ public interface TTaskHoursMapper {
 
 	List<TOrderTaskListBo> getOrderDunData(String name, String taskId, String starTime, String endTime);
 
-	List<TOrderTaskListBo> getTaskHoursData( @Param("name")String name,  @Param("taskId")String taskId,@Param("orderNo")String orderNo,  @Param("startTime")String startTime,  @Param("endTime")String endTime,@Param("fid")String fid );
 
 	List<TTaskHours> taskHoursDetailsList( @Param("taskId")String taskId,  @Param("aid")String aid);
 }

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

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
@@ -19,12 +19,13 @@
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
     <result column="money" jdbcType="DECIMAL" property="money" />
+    <result column="appropriation_ratio" jdbcType="DECIMAL" property="appropriationRatio" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     <where>
       <foreach collection="oredCriteria" item="criteria" separator="or">
@@ -58,7 +59,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     <where>
       <foreach collection="example.oredCriteria" item="criteria" separator="or">
@@ -92,16 +93,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     id, order_no, tid, project_type, dun_type, wait_day, effective_count, aid, status, 
-    create_time, start_time, money
+    create_time, start_time, money, appropriation_ratio
   </sql>
   <select id="selectByExample" parameterType="com.goafanti.common.model.NewOrderDunExample" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     select
     <if test="distinct">
@@ -120,7 +121,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -131,22 +132,16 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     delete from new_order_dun
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByTid" parameterType="java.lang.Integer">
-    
-    delete from new_order_dun
-    where tid = #{tid,jdbcType=INTEGER}
-  </delete>
-  
   <delete id="deleteByExample" parameterType="com.goafanti.common.model.NewOrderDunExample">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     delete from new_order_dun
     <if test="_parameter != null">
@@ -157,24 +152,24 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     insert into new_order_dun (id, order_no, tid, 
       project_type, dun_type, wait_day, 
       effective_count, aid, status, 
-      create_time, start_time, money
-      )
+      create_time, start_time, money, 
+      appropriation_ratio)
     values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{tid,jdbcType=INTEGER}, 
       #{projectType,jdbcType=INTEGER}, #{dunType,jdbcType=INTEGER}, #{waitDay,jdbcType=INTEGER}, 
       #{effectiveCount,jdbcType=INTEGER}, #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{money,jdbcType=DECIMAL}
-      )
+      #{createTime,jdbcType=TIMESTAMP}, #{startTime,jdbcType=TIMESTAMP}, #{money,jdbcType=DECIMAL}, 
+      #{appropriationRatio,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.NewOrderDun">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     insert into new_order_dun
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -214,6 +209,9 @@
       <if test="money != null">
         money,
       </if>
+      <if test="appropriationRatio != null">
+        appropriation_ratio,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -252,13 +250,16 @@
       <if test="money != null">
         #{money,jdbcType=DECIMAL},
       </if>
+      <if test="appropriationRatio != null">
+        #{appropriationRatio,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.goafanti.common.model.NewOrderDunExample" resultType="java.lang.Long">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     select count(*) from new_order_dun
     <if test="_parameter != null">
@@ -269,7 +270,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     update new_order_dun
     <set>
@@ -309,6 +310,9 @@
       <if test="record.money != null">
         money = #{record.money,jdbcType=DECIMAL},
       </if>
+      <if test="record.appropriationRatio != null">
+        appropriation_ratio = #{record.appropriationRatio,jdbcType=DECIMAL},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -318,7 +322,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     update new_order_dun
     set id = #{record.id,jdbcType=INTEGER},
@@ -332,7 +336,8 @@
       status = #{record.status,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       start_time = #{record.startTime,jdbcType=TIMESTAMP},
-      money = #{record.money,jdbcType=DECIMAL}
+      money = #{record.money,jdbcType=DECIMAL},
+      appropriation_ratio = #{record.appropriationRatio,jdbcType=DECIMAL}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -341,7 +346,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     update new_order_dun
     <set>
@@ -378,6 +383,9 @@
       <if test="money != null">
         money = #{money,jdbcType=DECIMAL},
       </if>
+      <if test="appropriationRatio != null">
+        appropriation_ratio = #{appropriationRatio,jdbcType=DECIMAL},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -385,7 +393,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 06 08:46:15 CST 2019.
+      This element was generated on Thu Dec 19 11:46:22 CST 2019.
     -->
     update new_order_dun
     set order_no = #{orderNo,jdbcType=VARCHAR},
@@ -398,13 +406,19 @@
       status = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       start_time = #{startTime,jdbcType=TIMESTAMP},
-      money = #{money,jdbcType=DECIMAL}
+      money = #{money,jdbcType=DECIMAL},
+      appropriation_ratio = #{appropriationRatio,jdbcType=DECIMAL}
     where id = #{id,jdbcType=INTEGER}
   </update>
+  <delete id="deleteByTid" parameterType="java.lang.Integer">
+    
+    delete from new_order_dun
+    where tid = #{tid,jdbcType=INTEGER}
+  </delete>
   <select id="selectListNewOrderDun" resultType="com.goafanti.order.bo.OutNewOrderDunBo">
-  	 select a.id,a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 
-  a.effective_count effectiveCount, a.aid, a.create_time createTime ,b.commodity_name commodityName,a.money,a.status
-  from new_order_dun a left join t_order_task b on a.tid=b.id where 1=1
+  select a.id,a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, b.set_up_amount setUpAmount,
+  a.effective_count effectiveCount, a.aid, a.create_time createTime ,b.commodity_name commodityName,a.money,a.status,
+  a.appropriation_ratio appropriationRatio from new_order_dun a left join t_order_task b on a.tid=b.id where 1=1
   <if test="orderNo != null">
   and  a.order_no= #{orderNo}
   </if>
@@ -417,7 +431,7 @@
   select a.id, a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 
   a.effective_count effectiveCount, a.aid, a.create_time createTime,b.approval
   from new_order_dun a left join  t_order_new b on a.order_no=b.order_no
-  where 1=1 and a.status=0
+  where 1=1 and a.status=0 and b.process_status &gt; 1
   </select>
   <select id="selectByTid" resultType="com.goafanti.order.bo.OutNewOrderDunBo">
     select a.id, a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 

+ 12 - 0
src/main/java/com/goafanti/common/mapper/TOrderInvoiceMapper.xml

@@ -806,6 +806,18 @@
 	left join t_order_new b on a.order_no=b.order_no
     where id = #{id,jdbcType=INTEGER}
   </select>
+  
+  <select id="getInvoiceDetails" parameterType="java.lang.String"  resultType="com.goafanti.order.bo.TOrderInvoiceDetails">
+    	select a.id ,a.order_no as orderNo,a.`type`,a.status,a.reject_reason as rejectReason,a.remarks,a.invoice_type as invoiceType,
+	a.unit_name as unitName,a.tax_number as taxNumber,a.amount,a.banks,a.content,a.unit_address as unitAddress,
+	a.invoice_remarks as invoiceRemarks,a.unit_mobile as unitMobile,a.voucher_url as voucherUrl ,a.post,a.addressee,
+	a.addressee_area as addresseeArea,a.addressee_city as addresseeCity,a.addressee_province as addresseeProvince,
+	a.addressee_mobile as addresseeMobile,a.recipient_address as recipientAddress,a.create_time,a.update_time,a.approval,
+	a.already_amount as alreadyAmount,b.contract_no as contractNo from t_order_invoice a 
+	left join t_order_new b on a.order_no=b.order_no
+    where a.order_no= #{orderNo,jdbcType=VARCHAR}
+    and a.create_time=(select max(create_time) from t_order_invoice where order_no= #{orderNo,jdbcType=VARCHAR}) 
+  </select>
   <select id="conutAmountByOrderNo"  resultType="java.math.BigDecimal">
   select ifnull(sum(a.amount),0) amount from t_order_invoice a
 	where a.status=2 and a.order_no= #{orderNo,jdbcType=VARCHAR}

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

@@ -1094,10 +1094,7 @@ left join t_order_outsource too on o.order_no=too.order_no where delete_sign !=
 	  	<if test="o.processStatus == 4">
 	  	and o.process_status &gt;= #{o.processStatus,jdbcType=INTEGER}
 	  	</if>
-  		<if test="o.financeId != null and o.financeId != &quot;&quot;">
-	  	and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
-	  	</if>
-	  	<if test="fids != null and o.financeId != &quot;&quot;">
+	  	<if test="fids != null and fids.size() > 0">
 	  	and d.finance_id in 
 	   <foreach item="item" collection="fids" separator="," open="(" close=")" index="">
        		#{item}
@@ -1147,10 +1144,7 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
 	  	<if test="o.processStatus == 4">
 	  	and o.process_status &gt;= #{o.processStatus,jdbcType=INTEGER}
 	  	</if>
-  		<if test="o.financeId != null and o.financeId != &quot;&quot;">
-	  	and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
-	  	</if>
-	  	<if test="fids != null and o.financeId != &quot;&quot;">
+	  	<if test="fids != null and fids.size() > 0">
 	  	and d.finance_id in 
 	   <foreach item="item" collection="fids" separator="," open="(" close=")" index="">
        		#{item}
@@ -1195,21 +1189,21 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   		where order_no = #{_parameter,jdbcType=VARCHAR}
   </select>
   <select id="selectOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
-  	select 
-  		a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.contract_no as contractNo,
+  	select a.order_no as orderNo,a.create_time as createTime, date_format(a.sign_time,'%Y-%m-%d' ) as signDate,a.contract_no as contractNo,
   		b.nickname as userName ,a.process_status as processStatus,a.total_amount as totalAmount,a.order_status as orderStatus,
-  		a.liquidation_status as liquidationStatus,a.approval,c.name as salesmanName,dep.name as depName,g.name as financeName
+  		a.liquidation_status as liquidationStatus,a.approval,c.salesman_name as salesmanName,dep.name as depName,c.finance_name as financeName,
+  		c.invoice_amount invoiceAmount,a.settlement_amount settlementAmount
   	<if test="specially == 2">
   	,f.name as initiateName ,e.reason ,date_format(e.create_time,'%Y-%m-%d' ) as backDate,e.id as backId
   	</if>
   	<if test="specially == 4">
   	,f.name as consultantName,a.settlement_amount as settlementAmount
   	</if>
-  	from t_order_new a  left join `user` b on a.buyer_id=b.id 
-  	left join admin c on a.salesman_id=c.id
+  	from t_order_new a  left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
   	left join department dep on a.order_dep=dep.id
-  	left join admin g on dep.finance_id=g.id
-  	left join admin d on a.finance_id=d.id
+  	<if test="specially == 1">
+  	left join admin ad on a.salesman_id=ad.id
+  	</if>
   	<if test="specially == 2">
 	left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
   	left join admin f on e.initiate=f.id
@@ -1230,7 +1224,7 @@ where super_id is null )  e on e.order_no=a.order_no
   	<if test="specially == 1">
   	and a.process_status = 1  and a.order_status = 1
   	<!-- and c.department_id in (#{deps,jdbcType=VARCHAR}) -->
-  	and c.department_id in
+  	and ad.department_id in
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
   	</foreach>
@@ -1248,7 +1242,7 @@ where super_id is null )  e on e.order_no=a.order_no
   	and a.order_status not in(5,7)
   	</if>
   	<if test="specially == 5">
-  	and c.department_id in
+  	and a.order_dep in
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
   	</foreach>
@@ -1265,8 +1259,14 @@ where super_id is null )  e on e.order_no=a.order_no
   	<if test="name != null">
   	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
-  	<if test="orderNo != null">
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	<if test="orderNo != null"> 
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
+  	</if>
+  	<if test="contractNo != null">
+  	and a.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="liquidationStatus != null">
+  	and a.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
   	</if>
   	<if test="depId != null">
   	and dep.id = #{depId,jdbcType=VARCHAR}
@@ -1286,17 +1286,18 @@ where super_id is null )  e on e.order_no=a.order_no
   	desc
   	</if>
   	<if test="page_sql!=null">
-			${page_sql}
+	${page_sql}
 	</if>
   </select>
   
    <select id="selectOrderNewListCount" resultType="java.lang.Integer">
   	select 
   		count(*)
-  	from t_order_new a  left join `user` b on a.buyer_id=b.id
-  	left join admin c on a.salesman_id=c.id
+  	from t_order_new a  left join `user` b on a.buyer_id=b.id left join t_order_mid c on a.order_no=c.order_no
   	left join department dep on a.order_dep=dep.id
-  	left join admin d on a.finance_id=d.id
+  	<if test="specially == 1">
+  	left join admin ad on a.salesman_id=ad.id
+  	</if>
   	<if test="specially == 2">
 	left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
   	left join admin f on e.initiate=f.id
@@ -1316,7 +1317,7 @@ where super_id is null ) e on e.order_no=a.order_no
   	</if>
   	<if test="specially == 1">
   	and a.process_status =1  and a.order_status=1
-  	and c.department_id in
+  	and ad.department_id in
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
   	</foreach>
@@ -1334,7 +1335,7 @@ where super_id is null ) e on e.order_no=a.order_no
   	and a.order_status not in(5,7)
   	</if>
   	<if test="specially == 5">
-  	and c.department_id in
+  	and a.order_dep in
   	<foreach close=")" collection="deps" item="deps" open="(" separator=",">
 	 #{deps.id}
   	</foreach>
@@ -1352,7 +1353,13 @@ where super_id is null ) e on e.order_no=a.order_no
   	and b.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="orderNo != null">
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
+  	</if>
+  	<if test="contractNo != null">
+  	and a.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
+  	</if>
+  	<if test="liquidationStatus != null">
+  	and a.liquidation_status = #{liquidationStatus,jdbcType=INTEGER}
   	</if>
   	<if test="depId != null">
   	and dep.id = #{depId,jdbcType=VARCHAR}
@@ -1362,35 +1369,39 @@ where super_id is null ) e on e.order_no=a.order_no
   	</if>
   </select>
   
-  <select id="selectDunOrderNewListByPage" resultType="com.goafanti.order.bo.TOrderNewBo">
-    	select a.id, b.contract_no contractNo,a.order_no as orderNo,c.nickname as userName,d.name as salesmanName,b.project_status projectStatus,
+  <select id="selectDunOrderNewListByPage" resultType="com.goafanti.order.bo.outOrderDunListBo">
+    	select a.id, b.contract_no contractNo,a.order_no as orderNo,c.nickname as userName,tm.salesman_name as salesmanName,b.project_status projectStatus,
 	b.total_amount as totalAmount,b.liquidation_status as liquidationStatus,b.settlement_amount as settlementAmount,a.money as accountsReceivable,
-	if((a.money-b.settlement_amount) &lt; 1,0,(a.money-b.settlement_amount)) as uncollectedAmount,b.order_status as orderStatus,b.project_status as projectStatus,
+	if((b.total_amount-b.settlement_amount) &lt; 1,0,(b.total_amount-b.settlement_amount)) as uncollectedAmount,b.order_status as orderStatus,
 	date_format(a.start_time, '%Y-%m-%d') as startDate,dep.name as depName,date_format(b.sign_time,'%Y-%m-%d') as signDate,
 	<if test="newStatus == 0 ">
 	a.dun_subject as dunSubject,a.dun_status dunStatus
 	from t_order_dun a  
 	</if>
 	<if test="newStatus == 1 ">
-	a.project_type projectType,a.status dunStatus,
-	a.dun_type dunType 
-	from new_order_dun a 
+	a.project_type projectType,a.status dunStatus, a.dun_type dunType,a.appropriation_ratio appropriationRatio,e.set_up_amount setUpAmount
+	from new_order_dun a left join t_order_task e on a.tid=e.id 
 	</if>
 	left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id 
-	left join admin d on b.salesman_id=d.id left join department dep on d.department_id=dep.id 
+	left join t_order_mid tm on b.order_no=tm.order_no left join department dep on b.order_dep=dep.id
 	where  b.delete_sign != 1
+	<if test="shiroType == 1 and fid !=null">
+  	 and tm.finance_id= #{fid,jdbcType=VARCHAR}
+  	</if>
+  	<if test="shiroType == 2 and fid !=null">
+  	 and tm.finance_id in (select id from admin where superior_id= #{fid,jdbcType=VARCHAR})
+  	</if>
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="adminName != null">
-  	and d.name  like CONCAT('%',#{adminName,jdbcType=VARCHAR},'%')
+  	and tm.salesman_name  like CONCAT('%',#{adminName,jdbcType=VARCHAR},'%')
   	</if>
-  	
   	<if test="orderNo != null">
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
   	</if>
   	<if test="depId != null">
-  	and dep.id= #{depId,jdbcType=VARCHAR}
+  	and b.order_dep= #{depId,jdbcType=VARCHAR}
   	</if>
   	<if test="aid != null">
   	and b.salesman_id= #{aid,jdbcType=VARCHAR}
@@ -1398,7 +1409,7 @@ where super_id is null ) e on e.order_no=a.order_no
   	<if test="starTime !=null and endTime !=null">
   	and b.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>
-  	order by b.sign_time desc
+  	order by b.sign_time desc,b.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1411,22 +1422,28 @@ where super_id is null ) e on e.order_no=a.order_no
 	from t_order_dun a  
 	</if>
 	<if test="newStatus == 1 ">
-	from new_order_dun a 
+	from new_order_dun a left join t_order_task e on a.tid=e.id 
 	</if>
-	 left join t_order_new b on a.order_no=b.order_no
-    left join `user` c on b.buyer_id=c.id 
-    where a.start_time is not null and b.delete_sign != 1
+	left join t_order_new b on a.order_no=b.order_no left join `user` c on b.buyer_id=c.id 
+	left join t_order_mid tm on b.order_no=tm.order_no
+	where  b.delete_sign != 1
+	<if test="shiroType == 1 and fid !=null">
+  	 and tm.finance_id= #{fid,jdbcType=VARCHAR}
+  	</if>
+  	<if test="shiroType == 2 and fid !=null">
+  	 and tm.finance_id in (select id from admin where superior_id= #{fid,jdbcType=VARCHAR})
+  	</if>
     <if test="name != null">
   	and c.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="adminName != null">
-  	and d.name  like CONCAT('%',#{adminName,jdbcType=VARCHAR},'%')
-  	</if>
-  	<if test="depId != null">
-  	and dep.id= #{depId,jdbcType=VARCHAR}
+  	and salesman_name  like CONCAT('%',#{adminName,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="orderNo != null">
-  	and a.order_no = #{orderNo,jdbcType=VARCHAR}
+  	and a.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%') 
+  	</if>
+  	<if test="depId != null">
+  	and b.order_dep= #{depId,jdbcType=VARCHAR}
   	</if>
   	<if test="aid != null">
   	and b.salesman_id= #{aid,jdbcType=VARCHAR}
@@ -1543,10 +1560,7 @@ where super_id is null ) e on e.order_no=a.order_no
 	  	<if test="o.processStatus == 4">
 	  	and o.process_status &gt;= #{o.processStatus,jdbcType=INTEGER}
 	  	</if>
-  		<if test="o.financeId != null and o.financeId != &quot;&quot;">
-	  	and d.finance_id = #{o.financeId,jdbcType=VARCHAR}
-	  	</if>
-	  	<if test="fids != null and o.financeId != &quot;&quot;">
+	  	<if test="fids != null and fids.size() > 0">
 	  	and d.finance_id in 
 	   <foreach item="item" collection="fids" separator="," open="(" close=")" index="">
         #{item}

+ 36 - 12
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -906,7 +906,7 @@
     select a.id,e.contract_no contractNo,a.order_no as orderNo,h.nickname userName,f.name salesmanName,a.outsource_name outsourceName,
   a.outsource_price outsourcePrice,g.name depName,e.order_status orderStatus,d.name as contacts,d.contact_mobile as contactsMobile,a.main, c.cname,
   c.sort cSort,a.commodity_name as commodityName,a.commodity_quantity as commodityQuantity,i.price,a.certificate_number as certificateNumber,
-  a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,
+  a.commodity_id as commodityId,a.manager_id managerId,a.consultant_id consultantId,a.project_status as projectStatus,a.set_up_amount setUpAmount,
   a.task_comment as taskComment ,a.commodity_price as commodityPrice, a.task_status as taskStatus,  a.task_receiver as taskReceiver 
   	 from t_order_task a left join business_project b on a.commodity_id=b.id left join t_order_new e on a.order_no=e.order_no
   	 left join admin f on e.salesman_id=f.id left join department g on e.order_dep=g.id left join user h on e.buyer_id=h.id
@@ -984,7 +984,7 @@
   	and e.project_status = #{projectStatus,jdbcType=INTEGER}
   	</if>
   	<if test="depId != null">
-  	and e.order_dep= #{depId,jdbcType=VARCHAR}
+  	and e.order_dep = #{depId,jdbcType=VARCHAR}
   	</if>
     <if test="name != null">
   	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
@@ -1029,20 +1029,32 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   </select>
   
    <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
-  	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,dep.name as depName,a.project_status projectStatus,
-    a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,
+  select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,dep.name as depName,a.project_status projectStatus,
+    a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
     e.contract_no as contractNo,date_format(e.create_time,'%Y-%m-%d %H:%i:%S')as creteTime,date_format(e.sign_time,'%Y-%m-%d')as signTime,
-    date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S')taskDistributionTime, date_format(a.task_end_time,'%Y-%m-%d')taskEndTime
+    date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S')taskDistributionTime, date_format(a.task_end_time,'%Y-%m-%d')taskEndTime,tm.salesman_name salesmanName
   	from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
     left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id  
     left join user f on e.buyer_id=f.id left join (select task_id,sum(hours) as hours from t_task_hours group by task_id) g on a.id=g.task_id
-    where e.delete_sign !=1 and a.super_id is null
-    <if test="fid != null">
-  	and dep.finance_id= #{fid,jdbcType=VARCHAR}
+    left join t_order_mid tm on a.order_no=tm.order_no where e.delete_sign !=1 and a.super_id is null
+  	<if test="shiroType == 1 and aid !=null">
+  	  	and tm.finance_id= #{aid,jdbcType=VARCHAR}
+  	</if>
+  	<if test="shiroType == 2 and aid !=null">
+  	  	and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
   	</if>
     <if test="name != null">
   	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
+  	<if test="cid != null">
+  	and b.cid = #{cid,jdbcType=VARCHAR}
+  	</if>
+  	<if test="depId != null">
+  	and e.order_dep = #{depId,jdbcType=VARCHAR}
+  	</if>
+  	<if test="contractNo != null">
+  	and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
+  	</if>
   	<if test="orderNo != null">
   	and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
   	</if>
@@ -1052,7 +1064,7 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   	<if test="starTime !=null and endTime !=null">
   	and  e.sign_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>
-  	order by  a.task_start_time desc
+  	order by  a.task_start_time desc,e.create_time desc
   	<if test="page_sql!=null">
 			${page_sql}
 	</if>
@@ -1062,13 +1074,25 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   	select  count(*) from t_order_task a left join business_project b on a.commodity_id=b.id
   	left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
     left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
-    where e.delete_sign !=1 and a.super_id is null
-    <if test="fid != null">
-  	and e.finance_id= #{fid,jdbcType=VARCHAR}
+    left join t_order_mid tm on a.order_no=tm.order_no where e.delete_sign !=1 and a.super_id is null
+  <if test="shiroType == 1 and aid !=null">
+  	  	and tm.finance_id= #{aid,jdbcType=VARCHAR}
+  	</if>
+  	<if test="shiroType == 2 and aid !=null">
+  	  	and tm.finance_id in (select id from admin where superior_id= #{aid,jdbcType=VARCHAR})
   	</if>
     <if test="name != null">
   	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
+  	<if test="cid != null">
+  	and b.cid = #{cid,jdbcType=VARCHAR}
+  	</if>
+  	<if test="depId != null">
+  	and e.order_dep = #{depId,jdbcType=VARCHAR}
+  	</if>
+  	<if test="contractNo != null">
+  	and e.contract_no like CONCAT('%',#{contractNo,jdbcType=VARCHAR},'%')
+  	</if>
   	<if test="orderNo != null">
   	and e.order_no like CONCAT('%',#{orderNo,jdbcType=VARCHAR},'%')
   	</if>

+ 0 - 26
src/main/java/com/goafanti/common/mapper/TTaskHoursMapper.xml

@@ -320,32 +320,6 @@
     left join t_order_task b on a.task_id=b.id
     where b.super_id=#{id,jdbcType=VARCHAR}
   </select>
-  <select id="getTaskHoursData" resultType="com.goafanti.order.bo.TOrderTaskListBo">
-  select  a.id,e.contract_no contractNo,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,dep.name as depName,
-    a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.project_status projectStatus,
-    e.contract_no as contractNo,date_format(e.create_time,'%Y-%m-%d %H:%I:%S')as creteTime,date_format(e.sign_time,'%Y-%m-%d')as signTime,
-    date_format(a.task_distribution_time,'%Y-%m-%d %H:%I:%S')taskDistributionTime, date_format(a.task_end_time,'%Y-%m-%d %H:%I:%S')taskEndTime
-  	from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
-    left join admin d on a.task_receiver=d.id left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id  
-    left join user f on e.buyer_id=f.id left join (select tid,aid,sum(hours) as hours from task_hours_count group by tid,aid) g on a.id=g.tid
-    where e.delete_sign !=1 and a.super_id is null
-    <if test="orderNo != null and orderNo !=''">
-  	and e.order_no= #{orderNo,jdbcType=VARCHAR}
-  	</if>
-    <if test="fid != null">
-  	and e.finance_id= #{fid,jdbcType=VARCHAR}
-  	</if>
-    <if test="name != null and name != ''">
-  	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
-  	</if>
-  	<if test="taskId != null and taskId != ''">
-  	and a.id= #{taskId,jdbcType=VARCHAR}
-  	</if>
-  	<if test="startTime !=null and endTime !=null and startTime !='' and endTime !=''">
-  	and e.sign_time between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
-  	</if>
-  	order by  a.task_start_time desc
-  </select>
   <select id="taskHoursDetailsList" resultType="com.goafanti.common.model.TTaskHours">
   select id,task_id taskId,hours,aid, date_format(create_time,'%Y-%m-%d %H:%i:%S') createTimes,remarks,
   date_format(task_day,'%Y-%m-%d %H:%i:%S') taskDays from t_task_hours where aid= #{aid} and task_id =#{taskId}

+ 59 - 36
src/main/java/com/goafanti/common/model/NewOrderDun.java

@@ -7,69 +7,74 @@ public class NewOrderDun {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.id
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.order_no
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private String orderNo;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.tid
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer tid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.project_type
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer projectType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.dun_type
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer dunType;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.wait_day
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer waitDay;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.effective_count
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer effectiveCount;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.aid
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.status
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.create_time
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.start_time
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private Date startTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.money
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	private BigDecimal money;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column new_order_dun.appropriation_ratio
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
+	 */
+	private BigDecimal appropriationRatio;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.id
 	 * @return  the value of new_order_dun.id
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getId() {
 		return id;
@@ -78,7 +83,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.id
 	 * @param id  the value for new_order_dun.id
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -87,7 +92,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.order_no
 	 * @return  the value of new_order_dun.order_no
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public String getOrderNo() {
 		return orderNo;
@@ -96,7 +101,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.order_no
 	 * @param orderNo  the value for new_order_dun.order_no
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setOrderNo(String orderNo) {
 		this.orderNo = orderNo;
@@ -105,7 +110,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.tid
 	 * @return  the value of new_order_dun.tid
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getTid() {
 		return tid;
@@ -114,7 +119,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.tid
 	 * @param tid  the value for new_order_dun.tid
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
@@ -123,7 +128,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.project_type
 	 * @return  the value of new_order_dun.project_type
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getProjectType() {
 		return projectType;
@@ -132,7 +137,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.project_type
 	 * @param projectType  the value for new_order_dun.project_type
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setProjectType(Integer projectType) {
 		this.projectType = projectType;
@@ -141,7 +146,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.dun_type
 	 * @return  the value of new_order_dun.dun_type
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getDunType() {
 		return dunType;
@@ -150,7 +155,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.dun_type
 	 * @param dunType  the value for new_order_dun.dun_type
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setDunType(Integer dunType) {
 		this.dunType = dunType;
@@ -159,7 +164,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.wait_day
 	 * @return  the value of new_order_dun.wait_day
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getWaitDay() {
 		return waitDay;
@@ -168,7 +173,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.wait_day
 	 * @param waitDay  the value for new_order_dun.wait_day
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setWaitDay(Integer waitDay) {
 		this.waitDay = waitDay;
@@ -177,7 +182,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.effective_count
 	 * @return  the value of new_order_dun.effective_count
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getEffectiveCount() {
 		return effectiveCount;
@@ -186,7 +191,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.effective_count
 	 * @param effectiveCount  the value for new_order_dun.effective_count
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setEffectiveCount(Integer effectiveCount) {
 		this.effectiveCount = effectiveCount;
@@ -195,7 +200,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.aid
 	 * @return  the value of new_order_dun.aid
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public String getAid() {
 		return aid;
@@ -204,7 +209,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.aid
 	 * @param aid  the value for new_order_dun.aid
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setAid(String aid) {
 		this.aid = aid;
@@ -213,7 +218,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.status
 	 * @return  the value of new_order_dun.status
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Integer getStatus() {
 		return status;
@@ -222,7 +227,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.status
 	 * @param status  the value for new_order_dun.status
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -231,7 +236,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.create_time
 	 * @return  the value of new_order_dun.create_time
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -240,7 +245,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.create_time
 	 * @param createTime  the value for new_order_dun.create_time
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -249,7 +254,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.start_time
 	 * @return  the value of new_order_dun.start_time
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Date getStartTime() {
 		return startTime;
@@ -258,7 +263,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.start_time
 	 * @param startTime  the value for new_order_dun.start_time
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setStartTime(Date startTime) {
 		this.startTime = startTime;
@@ -267,7 +272,7 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.money
 	 * @return  the value of new_order_dun.money
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public BigDecimal getMoney() {
 		return money;
@@ -276,9 +281,27 @@ public class NewOrderDun {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.money
 	 * @param money  the value for new_order_dun.money
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setMoney(BigDecimal money) {
 		this.money = money;
 	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column new_order_dun.appropriation_ratio
+	 * @return  the value of new_order_dun.appropriation_ratio
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
+	 */
+	public BigDecimal getAppropriationRatio() {
+		return appropriationRatio;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column new_order_dun.appropriation_ratio
+	 * @param appropriationRatio  the value for new_order_dun.appropriation_ratio
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
+	 */
+	public void setAppropriationRatio(BigDecimal appropriationRatio) {
+		this.appropriationRatio = appropriationRatio;
+	}
 }

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

@@ -8,23 +8,23 @@ import java.math.BigDecimal;
 public class NewOrderDunExample {
     /**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	protected String orderByClause;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	protected boolean distinct;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	protected List<Criteria> oredCriteria;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public NewOrderDunExample() {
 		oredCriteria = new ArrayList<Criteria>();
@@ -32,7 +32,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setOrderByClause(String orderByClause) {
 		this.orderByClause = orderByClause;
@@ -40,7 +40,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public String getOrderByClause() {
 		return orderByClause;
@@ -48,7 +48,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void setDistinct(boolean distinct) {
 		this.distinct = distinct;
@@ -56,7 +56,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public boolean isDistinct() {
 		return distinct;
@@ -64,7 +64,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public List<Criteria> getOredCriteria() {
 		return oredCriteria;
@@ -72,7 +72,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void or(Criteria criteria) {
 		oredCriteria.add(criteria);
@@ -80,7 +80,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Criteria or() {
 		Criteria criteria = createCriteriaInternal();
@@ -90,7 +90,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public Criteria createCriteria() {
 		Criteria criteria = createCriteriaInternal();
@@ -102,7 +102,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	protected Criteria createCriteriaInternal() {
 		Criteria criteria = new Criteria();
@@ -111,7 +111,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public void clear() {
 		oredCriteria.clear();
@@ -121,7 +121,7 @@ public class NewOrderDunExample {
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	protected abstract static class GeneratedCriteria {
 		protected List<Criterion> criteria;
@@ -903,11 +903,71 @@ public class NewOrderDunExample {
 			addCriterion("money not between", value1, value2, "money");
 			return (Criteria) this;
 		}
+
+		public Criteria andAppropriationRatioIsNull() {
+			addCriterion("appropriation_ratio is null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioIsNotNull() {
+			addCriterion("appropriation_ratio is not null");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioEqualTo(BigDecimal value) {
+			addCriterion("appropriation_ratio =", value, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioNotEqualTo(BigDecimal value) {
+			addCriterion("appropriation_ratio <>", value, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioGreaterThan(BigDecimal value) {
+			addCriterion("appropriation_ratio >", value, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioGreaterThanOrEqualTo(BigDecimal value) {
+			addCriterion("appropriation_ratio >=", value, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioLessThan(BigDecimal value) {
+			addCriterion("appropriation_ratio <", value, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioLessThanOrEqualTo(BigDecimal value) {
+			addCriterion("appropriation_ratio <=", value, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioIn(List<BigDecimal> values) {
+			addCriterion("appropriation_ratio in", values, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioNotIn(List<BigDecimal> values) {
+			addCriterion("appropriation_ratio not in", values, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("appropriation_ratio between", value1, value2, "appropriationRatio");
+			return (Criteria) this;
+		}
+
+		public Criteria andAppropriationRatioNotBetween(BigDecimal value1, BigDecimal value2) {
+			addCriterion("appropriation_ratio not between", value1, value2, "appropriationRatio");
+			return (Criteria) this;
+		}
 	}
 
 	/**
 	 * This class was generated by MyBatis Generator. This class corresponds to the database table new_order_dun
-	 * @mbg.generated  Fri Dec 06 08:46:15 CST 2019
+	 * @mbg.generated  Thu Dec 19 11:46:22 CST 2019
 	 */
 	public static class Criterion {
 		private String condition;

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

@@ -50,9 +50,10 @@ public class OrderDunTask {
 	/**
 	 * 每天凌晨3点轮询处理需要新催款的信息
 	 */
-//	@RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
+//	@RequestMapping(value = "/open/updateNewOrderDun", method = RequestMethod.GET)
 //	@ResponseBody
-	@Scheduled(cron = "0 0 3  * * ?") 
+	@Scheduled(cron = "0 0 3  * * ?")
+//	@Scheduled(cron = "0 50 16  * * ?")
 	@Transactional(rollbackFor=Exception.class)
 	public void updateNewOrderDun(){
   		try {
@@ -121,14 +122,14 @@ public class OrderDunTask {
 		o.setStartTime(new Date());
 		newOrderDunService.updateDun(o);
 		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
-		orderNewService.addTimingTaskNewDunNoticAndSendEmail(t2, t);;
+		orderNewService.addTimingTaskNewDunNoticAndSendEmail(t2, t);
 	}
 	
 	/**
 	 * 每天凌晨2点轮询处理需要催款的信息
 	*
 	*/
-	//@RequestMapping(value = "/open/updateorderDun", method = RequestMethod.GET)
+//	@RequestMapping(value = "/open/updateOrderDun", method = RequestMethod.GET)
 	@Scheduled(cron = "0 0 2  * * ?") 
   	@Transactional(rollbackFor=Exception.class)
 	public void updateorderDun(){

+ 0 - 1
src/main/java/com/goafanti/common/utils/ExportExcelUtil.java

@@ -490,7 +490,6 @@ public class ExportExcelUtil {
 					//当前列的只
 					String o ;
 					switch (comment[i]) {
-					//"任务编号","任务名称","订单编号","业务别类","客户名称","任务负责人","任务状态","工时"
 					case "任务编号": o = ob.getId(); break;
 					case "任务名称": o = ob.getTaskName(); break;
 					case "订单编号": o = ob.getOrderNo(); break;

+ 10 - 0
src/main/java/com/goafanti/common/utils/SendEmailUtil.java

@@ -4,6 +4,8 @@ import java.io.UnsupportedEncodingException;
 import java.security.GeneralSecurityException;
 import java.util.Date;
 import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import javax.mail.Authenticator;
 import javax.mail.Message;
@@ -132,6 +134,14 @@ public class SendEmailUtil {
 			Transport.send(msg);
 		}
 	}
+	
+	public static boolean isEmail(String email){
+    	//邮箱正则表达式
+        String pattern = "^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$";
+        Pattern p = Pattern.compile(pattern);
+        Matcher m = p.matcher(email);
+        return m.matches();
+    }
 
 	
 }

+ 20 - 0
src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java

@@ -1,5 +1,6 @@
 package com.goafanti.order.bo;
 
+import java.math.BigDecimal;
 import java.util.Calendar;
 
 import com.goafanti.common.constant.AFTConstants;
@@ -12,6 +13,7 @@ public class OutNewOrderDunBo extends NewOrderDun {
 	private Integer approval;
 	private String commodityName;
 	private String startDate;
+	private BigDecimal setUpAmount;
 	
 	
 	public String getDunTypeName() {
@@ -68,4 +70,22 @@ public class OutNewOrderDunBo extends NewOrderDun {
 		this.startDate = startDate;
 	}
 
+	public BigDecimal getSetUpAmount() {
+		return setUpAmount;
+	}
+
+	public void setSetUpAmount(BigDecimal setUpAmount) {
+		this.setUpAmount = setUpAmount;
+	}
+	public BigDecimal getMoney() {
+		if(getDunType()!=null&&getProjectType()!=null){
+			if(Integer.valueOf(""+getProjectType()+getDunType())==33&&
+					super.getMoney()==null&&
+					super.getAppropriationRatio()!=null&&getSetUpAmount()!=null) {
+				return super.getAppropriationRatio().multiply(getSetUpAmount());
+			}
+		}
+		return super.getMoney();
+	}
+
 }

+ 28 - 0
src/main/java/com/goafanti/order/bo/TOrderNewBo.java

@@ -29,12 +29,14 @@ public class TOrderNewBo extends TOrderNew{
 	private String uid;
 	private String email;
 	private String depName;
+	//应收款
 	private BigDecimal accountsReceivable;
 	private BigDecimal uncollectedAmount;
 	private Integer locationProvince;
 	private Integer locationCity;
 	private Integer locationArea;
 	private String postalAddress;
+	private BigDecimal invoiceAmount;
 	private String NowFinance;
 	private String  NowFinanceMobile;
 	private String oldSalesmanName;
@@ -42,6 +44,8 @@ public class TOrderNewBo extends TOrderNew{
 	private Integer projectType;
 	private Integer dunType;
 	private Integer dunStatus;
+	private BigDecimal appropriationRatio;
+	private BigDecimal setUpAmount;
 	
 	public String getDunSubject() {
 		if(dunSubject!=null)return OrderDunSubject.getValueByCode(Integer.valueOf(dunSubject));
@@ -243,6 +247,9 @@ public class TOrderNewBo extends TOrderNew{
 	}
 
 	public BigDecimal getAccountsReceivable() {
+		if(getDunSubject()!=null&&getDunSubject().equals("33")&&accountsReceivable==null&&appropriationRatio !=null &&setUpAmount!=null) {
+			return setUpAmount.multiply(accountsReceivable);
+		}
 		return accountsReceivable;
 	}
 
@@ -307,5 +314,26 @@ public class TOrderNewBo extends TOrderNew{
 	public void setDunStatus(Integer dunStatus) {
 		this.dunStatus = dunStatus;
 	}
+	public BigDecimal getInvoiceAmount() {
+		if (invoiceAmount==null) {
+			return new BigDecimal(0);
+		}
+		return invoiceAmount;
+	}
+	public void setInvoiceAmount(BigDecimal invoiceAmount) {
+		this.invoiceAmount = invoiceAmount;
+	}
+	public BigDecimal getAppropriationRatio() {
+		return appropriationRatio;
+	}
+	public void setAppropriationRatio(BigDecimal appropriationRatio) {
+		this.appropriationRatio = appropriationRatio;
+	}
+	public BigDecimal getSetUpAmount() {
+		return setUpAmount;
+	}
+	public void setSetUpAmount(BigDecimal setUpAmount) {
+		this.setUpAmount = setUpAmount;
+	}
 	
 }

+ 7 - 14
src/main/java/com/goafanti/order/bo/TOrderTaskBo.java

@@ -19,24 +19,11 @@ public class TOrderTaskBo extends TOrderTask{
 	
 	private Integer orderStatus;
 	private BigDecimal price;
-	private String outsourceName;
 	
-	private BigDecimal outsourcePrice;
+	private BigDecimal appropriationRatio;
 	
 	
 	
-	public String getOutsourceName() {
-		return outsourceName;
-	}
-	public void setOutsourceName(String outsourceName) {
-		this.outsourceName = outsourceName;
-	}
-	public BigDecimal getOutsourcePrice() {
-		return outsourcePrice;
-	}
-	public void setOutsourcePrice(BigDecimal outsourcePrice) {
-		this.outsourcePrice = outsourcePrice;
-	}
 	public String getContractNo() {
 		return contractNo;
 	}
@@ -97,5 +84,11 @@ public class TOrderTaskBo extends TOrderTask{
 	public void setcSort(Integer cSort) {
 		this.cSort = cSort;
 	}
+	public BigDecimal getAppropriationRatio() {
+		return appropriationRatio;
+	}
+	public void setAppropriationRatio(BigDecimal appropriationRatio) {
+		this.appropriationRatio = appropriationRatio;
+	}
 	
 }

+ 16 - 0
src/main/java/com/goafanti/order/bo/TOrderTaskListBo.java

@@ -1,5 +1,7 @@
 package com.goafanti.order.bo;
 
+import java.math.BigDecimal;
+
 public class TOrderTaskListBo {
 	private String id;
 	private String taskName;
@@ -11,12 +13,14 @@ public class TOrderTaskListBo {
 	private Integer taskStatus;
 	private String taskDate;
 	private Integer commodityQuantity;
+	private BigDecimal commodityPrice;
 	private Double hours;
 	private String depName;
 	private String contractNo;
 	private String creteTime;
 	private String signTime;
 	private Integer alreadyNumber;
+	private String salesmanName;
 	private String taskDistributionTime;
 	private String taskEndTime;
 	/** 外包部门 */
@@ -135,5 +139,17 @@ public class TOrderTaskListBo {
 	public void setTaskEndTime(String taskEndTime) {
 		this.taskEndTime = taskEndTime;
 	}
+	public BigDecimal getCommodityPrice() {
+		return commodityPrice;
+	}
+	public void setCommodityPrice(BigDecimal commodityPrice) {
+		this.commodityPrice = commodityPrice;
+	}
+	public String getSalesmanName() {
+		return salesmanName;
+	}
+	public void setSalesmanName(String salesmanName) {
+		this.salesmanName = salesmanName;
+	}
 	
 }

+ 62 - 0
src/main/java/com/goafanti/order/bo/inuptTaskHoursListBo.java

@@ -0,0 +1,62 @@
+package com.goafanti.order.bo;
+
+
+public class inuptTaskHoursListBo {
+	private String name;
+	private String orderNo;
+	private String taskId;
+	private String starTime;
+	private String endTime; 
+	private String cid;
+	private String depId;
+	private String contractNo;
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getTaskId() {
+		return taskId;
+	}
+	public void setTaskId(String taskId) {
+		this.taskId = taskId;
+	}
+	public String getStarTime() {
+		return starTime;
+	}
+	public void setStarTime(String starTime) {
+		this.starTime = starTime;
+	}
+	public String getEndTime() {
+		return endTime;
+	}
+	public void setEndTime(String endTime) {
+		this.endTime = endTime;
+	}
+	public String getCid() {
+		return cid;
+	}
+	public void setCid(String cid) {
+		this.cid = cid;
+	}
+	public String getDepId() {
+		return depId;
+	}
+	public void setDepId(String depId) {
+		this.depId = depId;
+	}
+	public String getContractNo() {
+		return contractNo;
+	}
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+	
+}

+ 161 - 0
src/main/java/com/goafanti/order/bo/outOrderDunListBo.java

@@ -0,0 +1,161 @@
+package com.goafanti.order.bo;
+
+import java.math.BigDecimal;
+
+import com.goafanti.order.enums.NewOrderDunType;
+import com.goafanti.order.enums.OrderDunSubject;
+
+public class outOrderDunListBo {
+	private String id;
+	private String contractNo;
+	private String orderNo;
+	private String userName;
+	private String salesmanName;
+	private Integer projectStatus;
+	private BigDecimal totalAmount;
+	private Integer liquidationStatus;
+	private BigDecimal settlementAmount;
+	private BigDecimal accountsReceivable;
+	private BigDecimal uncollectedAmount;
+	private String startDate;
+	private String depName;
+	private String signDate;
+	private Integer orderStatus;
+	private Integer projectType;
+	private Integer dunStatus;
+	private Integer dunType;
+	private String dunSubject;
+	private BigDecimal appropriationRatio;
+	private BigDecimal setUpAmount;
+	public String getId() {
+		return id;
+	}
+	public String getDunSubject() {
+		if(dunSubject!=null)return OrderDunSubject.getValueByCode(Integer.valueOf(dunSubject));
+		if(getDunType()!=null&&getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+getProjectType()+getDunType()));
+		return dunSubject;
+	}
+	public void setId(String id) {
+		this.id = id;
+	}
+	public String getContractNo() {
+		return contractNo;
+	}
+	public void setContractNo(String contractNo) {
+		this.contractNo = contractNo;
+	}
+	public String getOrderNo() {
+		return orderNo;
+	}
+	public void setOrderNo(String orderNo) {
+		this.orderNo = orderNo;
+	}
+	public String getUserName() {
+		return userName;
+	}
+	public void setUserName(String userName) {
+		this.userName = userName;
+	}
+	public String getSalesmanName() {
+		return salesmanName;
+	}
+	public void setSalesmanName(String salesmanName) {
+		this.salesmanName = salesmanName;
+	}
+	public Integer getProjectStatus() {
+		return projectStatus;
+	}
+	public void setProjectStatus(Integer projectStatus) {
+		this.projectStatus = projectStatus;
+	}
+	public BigDecimal getTotalAmount() {
+		return totalAmount;
+	}
+	public void setTotalAmount(BigDecimal totalAmount) {
+		this.totalAmount = totalAmount;
+	}
+	public Integer getLiquidationStatus() {
+		return liquidationStatus;
+	}
+	public void setLiquidationStatus(Integer liquidationStatus) {
+		this.liquidationStatus = liquidationStatus;
+	}
+	public BigDecimal getSettlementAmount() {
+		return settlementAmount;
+	}
+	public void setSettlementAmount(BigDecimal settlementAmount) {
+		this.settlementAmount = settlementAmount;
+	}
+	public BigDecimal getAccountsReceivable() {
+		if(getProjectType()!=null&&getDunType()!=null&&
+				Integer.valueOf(""+getProjectType()+getDunType())==33&&accountsReceivable==null&&appropriationRatio !=null &&setUpAmount!=null) {
+			return setUpAmount.multiply(appropriationRatio);
+		}
+		return accountsReceivable;
+	}
+	public void setAccountsReceivable(BigDecimal accountsReceivable) {
+		this.accountsReceivable = accountsReceivable;
+	}
+	public String getStartDate() {
+		return startDate;
+	}
+	public void setStartDate(String startDate) {
+		this.startDate = startDate;
+	}
+	public String getDepName() {
+		return depName;
+	}
+	public void setDepName(String depName) {
+		this.depName = depName;
+	}
+	public String getSignDate() {
+		return signDate;
+	}
+	public void setSignDate(String signDate) {
+		this.signDate = signDate;
+	}
+	public Integer getProjectType() {
+		return projectType;
+	}
+	public void setProjectType(Integer projectType) {
+		this.projectType = projectType;
+	}
+	public Integer getDunStatus() {
+		return dunStatus;
+	}
+	public void setDunStatus(Integer dunStatus) {
+		this.dunStatus = dunStatus;
+	}
+	public Integer getDunType() {
+		return dunType;
+	}
+	public void setDunType(Integer dunType) {
+		this.dunType = dunType;
+	}
+	public BigDecimal getAppropriationRatio() {
+		return appropriationRatio;
+	}
+	public void setAppropriationRatio(BigDecimal appropriationRatio) {
+		this.appropriationRatio = appropriationRatio;
+	}
+	public BigDecimal getSetUpAmount() {
+		return setUpAmount;
+	}
+	public void setSetUpAmount(BigDecimal setUpAmount) {
+		this.setUpAmount = setUpAmount;
+	}
+	public BigDecimal getUncollectedAmount() {
+		return uncollectedAmount;
+	}
+	public void setUncollectedAmount(BigDecimal uncollectedAmount) {
+		this.uncollectedAmount = uncollectedAmount;
+	}
+	public Integer getOrderStatus() {
+		return orderStatus;
+	}
+	public void setOrderStatus(Integer orderStatus) {
+		this.orderStatus = orderStatus;
+	}
+	
+
+}

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

@@ -239,11 +239,15 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	}
 	/**
 	 * 订单列表
+	 * 
+	 *specially  0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询
+	 *distribution	(咨询师管理列表 0 未分配 1部分 2全部
 	 */
 	@RequestMapping(value="/orderNewList", method = RequestMethod.GET)
-	public Result orderNewList(String name,String orderNo,String starTime,String endTime ,Integer specially ,Integer distribution,String depId,Integer pageNo,Integer pageSize,Integer outsource){
+	public Result orderNewList(String name,String orderNo,String starTime,String endTime ,Integer specially ,
+			Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus,Integer pageNo,Integer pageSize){
 		Result res=new Result();
-		res.data(orderNewService.orderNewList(name, orderNo, starTime, endTime, specially , distribution,depId, pageNo, pageSize,outsource));
+		res.data(orderNewService.orderNewList(name, orderNo, starTime, endTime, specially , distribution,depId, contractNo,outsource, liquidationStatus,pageNo, pageSize));
 		return res;
 	}
 	

+ 17 - 0
src/main/java/com/goafanti/order/controller/OrderInvoiceApiController.java

@@ -69,6 +69,23 @@ public class OrderInvoiceApiController extends CertifyApiController {
 		return res;
 	}
 	/**
+	 * 获取最新开票详情
+	 * @param uid
+	 * @param orderType
+	 * @return
+	 */
+	@RequestMapping(value = "/getInvoiceDetails",method = RequestMethod.GET)
+	public Result getInvoiceDetails(String orderNo){
+		Result res = new Result();
+		if(StringUtils.isBlank(orderNo)){
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"","订单编号"));
+			return res;
+		}
+		
+		res.data(orderInvoiceService.getInvoiceDetails(orderNo));
+		return res;
+	}
+	/**
 	 * 修改发票申请
 	 * @param uid
 	 * @param orderType

+ 6 - 38
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -2,15 +2,12 @@ package com.goafanti.order.controller;
 
 
 import java.io.IOException;
-import java.io.OutputStream;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Date;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -21,9 +18,9 @@ import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.common.utils.StringUtils;
-import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TaskProgressBo;
+import com.goafanti.order.bo.inuptTaskHoursListBo;
 import com.goafanti.order.service.OrderProjectService;
 
 @RestController
@@ -123,11 +120,10 @@ public class OrderProjectApiController extends CertifyApiController {
 	 * 任务工时列表
 	 */
 	@RequestMapping(value="/taskHoursList" ,method = RequestMethod.GET)
-	public Result taskHoursList(String name,String orderNo, String taskId ,String starTime,String endTime ,Integer type,
+	public Result taskHoursList(inuptTaskHoursListBo ib,
 			Integer pageNo, Integer pageSize){
 		Result res=new Result();
-		//type 0所有 1个人
-		res.setData(orderProjectService.taskHoursList(name,orderNo,taskId,  starTime, endTime ,type,pageNo, pageSize));
+		res.setData(orderProjectService.taskHoursList(ib,pageNo, pageSize));
 		return res;
 	}
 	/**
@@ -198,45 +194,17 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.setData(orderProjectService.selectTaskProgress(tid));
 		return res;
 	}
-	/**
-	 * 任务工时表
-	 * @throws IOException 
-	 */
-	@RequestMapping(value = "/exportTaskHoursListData", method = RequestMethod.GET)
-	public Result exportTaskHoursListData(String name, String taskId ,String orderNo,String starTime,String endTime ,Integer type,HttpServletResponse response) throws IOException{
-		 Result res = new Result();
-		 XSSFWorkbook wb = orderProjectService.exportTaskHoursListData( name, taskId,orderNo, starTime, endTime,type);
-		 if(null == wb){
-			 res.getError().add(buildError("", "没有找到数据"));
-			 return res;
-		 }
-		 String fileName = "任务工时表  " + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + ".xls";
-		 OutputStream out = response.getOutputStream();
-		 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));  
-         response.setContentType("application/octet-stream;charset=utf-8");  
-		try {
-			// 返回数据流
-			wb.write(out);
-			out.flush();
-			out.close();
-		} finally {
-			out.flush();
-			out.close();
-		}
-		
-		return res;
-	}
+	
 	
 	/**
 	 * 我的任务列表导出xls
 	 * @throws IOException 
 	 */
 	@RequestMapping(value = "/exportMyTaskList", method = RequestMethod.GET)
-	public Result exportMyTaskList(HttpServletResponse response,String name,String orderNo, String taskId, String starTime,String endTime ,Integer type, Integer pageNo,
-			Integer pageSize) throws IOException{
+	public Result exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize) throws IOException{
 		Result res=new Result();
 		try {
-			orderProjectService.exportMyTaskList( response, name, orderNo,  taskId,  starTime, endTime , type,  pageNo, pageSize);
+			orderProjectService.exportMyTaskList( response, ib,  pageNo, pageSize);
 		} catch (Exception e) {
 			res.getError().add(buildError("格式不正确"));
 			e.printStackTrace();

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

@@ -41,6 +41,8 @@ public interface OrderInvoiceService {
 
 	int updateapprovalExamine(Integer id, Integer examine, String reason);
 
+	TOrderInvoiceDetails getInvoiceDetails(String orderNo);
+
 	
 	
 	

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

@@ -7,17 +7,14 @@ import java.util.List;
 import javax.mail.MessagingException;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.NewOrderDun;
 import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderOutsource;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.InputNewOrderDunBo;
 import com.goafanti.order.bo.OrderDunTaskBo;
 import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.OutNewOrderDunBo;
@@ -26,8 +23,7 @@ import com.goafanti.order.bo.TOrderLogBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
-import com.goafanti.order.bo.OrderOutsourceBo;
-import com.goafanti.order.bo.OrderOutsourceDtails;
+import com.goafanti.order.bo.outOrderDunListBo;
 
 public interface OrderNewService {
 	
@@ -91,7 +87,7 @@ public interface OrderNewService {
 	 * @param pageSize
 	 * @return
 	 */
-	Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer specially ,Integer distribution,String depId,Integer pageNo, Integer pageSize,Integer outsource);
+	Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer specially ,Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus,Integer pageNo, Integer pageSize);
 	/**
 	 * 订单审核
 	 * @param orderNo
@@ -112,7 +108,7 @@ public interface OrderNewService {
 	 * @param pageSize
 	 * @return
 	 */
-	Pagination<TOrderNewBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer specially,String adminName,String depId,
+	Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer specially,String adminName,String depId,
 			Integer newStatus,Integer pageNo, Integer pageSize);
 	/**
 	 * 新增催款记录

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

@@ -13,6 +13,7 @@ import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
 import com.goafanti.order.bo.TaskLogBo;
 import com.goafanti.order.bo.TaskProgressBo;
+import com.goafanti.order.bo.inuptTaskHoursListBo;
 
 public interface OrderProjectService {
 
@@ -27,7 +28,7 @@ public interface OrderProjectService {
 
 	int addTaskHours(TTaskHours t);
 	
-	Pagination<TOrderTaskListBo> taskHoursList(String name,String orderNo, String taskId,String starTime,String endTime ,Integer type,
+	Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib,
 			Integer pageNo, Integer pageSize);
 
 
@@ -43,10 +44,9 @@ public interface OrderProjectService {
 	List<TaskProgressBo> selectTaskProgress(Integer tid);
 
 
-	XSSFWorkbook exportTaskHoursListData(String name, String taskId,String orderNo, String startTime, String endTime,  Integer type);
-
 	List<TTaskHours> taskHoursDetailsList(String taskId);
 
-	void exportMyTaskList(HttpServletResponse response, String name, String orderNo, String taskId, String starTime, String endTime, Integer type, Integer pageNo, Integer pageSize)throws IOException ;
+	void exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize)throws IOException ;
+
 	
 }

+ 12 - 5
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -157,14 +157,21 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			Integer pageNo, Integer pageSize) {
 		Map<String, Object> result = new HashMap<String, Object>();
 		Map<String, Object> params = new HashMap<String, Object>();
-		if(TokenManager.hasRole(AFTConstants.FINANCEADMIN)) {
-			order.setFinanceId(TokenManager.getAdminId());
-		}
-		List<String> fids=null;
-		if(TokenManager.hasRole(AFTConstants.FINANCEMANAGERADMIN)) {
+		List<String> fids=new ArrayList<>();
+		
+		if(TokenManager.hasRole(AFTConstants.CED)||TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)||
+				TokenManager.hasRole(AFTConstants.VICE_CEO)||TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)||
+				TokenManager.hasRole(AFTConstants.SUPERADMIN)) {
+			//如果是这些角色则看全部
+		}else if(TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)) {
 			fids =adminMapper.selectBySuperId(TokenManager.getAdminId());
 			params.put("fids", fids);
+		} else {
+			 fids.add(TokenManager.getAdminId());
+			params.put("fids",fids);
 		}
+		
+		
 		if (order.getOutsource()==null)order.setOutsource(0);//默认非外包 
 		params.put("o", order);
 		Pagination<OrderListBo> data = (Pagination<OrderListBo>)findPage("financeList", "financeCount", params, pageNo, pageSize);

+ 2 - 0
src/main/java/com/goafanti/order/service/impl/NewOrderDunServiceImpl.java

@@ -26,6 +26,7 @@ public class NewOrderDunServiceImpl extends BaseMybatisDao<NewOrderDunMapper> im
 	@Override
 	public int createDun(InputNewOrderDunBo ib) {
 		ib.setAid(TokenManager.getAdminId());
+		if (ib.getAppropriationRatio()!=null)ib.setMoney(null);
 		if (ib.getProjectType()==OrderDunProjectType.HY.getCode()&&ib.getDunType()==2&&ib.getEffectiveCount()>1) {
 			for (int i = 1; i <= ib.getEffectiveCount(); i++) {
 				int x=ib.getEffectiveCount();
@@ -40,6 +41,7 @@ public class NewOrderDunServiceImpl extends BaseMybatisDao<NewOrderDunMapper> im
 	
 	@Override
 	public int updateDun(InputNewOrderDunBo ib) {
+		if (ib.getAppropriationRatio()!=null)ib.setMoney(null);
 		return newOrderDunMapper.updateByPrimaryKeySelective(ib);
 	}
 	@Override

+ 6 - 0
src/main/java/com/goafanti/order/service/impl/OrderInvoiceServiceImpl.java

@@ -129,6 +129,12 @@ public class OrderInvoiceServiceImpl extends BaseMybatisDao<TOrderInvoiceMapper>
 	public TOrderInvoiceDetails selectByIdOrderInvoice(Integer id) {
 		return tOrderInvoiceMapper.selectByInvoiceDitails(id);
 	}
+	
+	@Override
+	public TOrderInvoiceDetails getInvoiceDetails(String orderNo) {
+		return tOrderInvoiceMapper.getInvoiceDetails(orderNo);
+	}
+	
 
 	@SuppressWarnings("unchecked")
 	@Override

+ 64 - 33
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -19,8 +19,7 @@ import java.util.UUID;
 
 import javax.mail.MessagingException;
 import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.beanutils.BeanUtils;
+import org.springframework.beans.BeanUtils;
 import org.apache.commons.beanutils.ConvertUtils;
 import org.apache.commons.beanutils.converters.DateConverter;
 import org.apache.commons.lang3.StringUtils;
@@ -42,6 +41,7 @@ import com.alibaba.fastjson.JSON;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.Error;
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.dao.AdminMapper;
 import com.goafanti.common.dao.IdleContractNoMapper;
@@ -94,9 +94,11 @@ import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
+import com.goafanti.order.bo.outOrderDunListBo;
 import com.goafanti.order.enums.ActiveState;
 import com.goafanti.order.enums.ApprovalNewState;
 import com.goafanti.order.enums.LiquidationNewState;
+import com.goafanti.order.enums.NewOrderDunType;
 import com.goafanti.order.enums.OrderDunSubject;
 import com.goafanti.order.enums.OrderNewState;
 import com.goafanti.order.enums.ProcessStatus;
@@ -234,11 +236,24 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public List<TOrderTaskBo> selectOrderTask(String orderNo) {
-		return tOrderTaskMapper.selectOrderTask(orderNo);
+		List<TOrderTaskBo> list=new ArrayList<>();
+		list=tOrderTaskMapper.selectOrderTask(orderNo);
+		if (TokenManager.hasRole(AFTConstants.SALESMAN)) {
+			for (TOrderTaskBo t : list) {
+				t.setOutsourceName("****");
+				t.setOutsourcePrice(new BigDecimal(0));
+				t.setDeclareUser("****");
+				t.setDeclarePwd("****");
+				t.setCertificateNumber("****");
+			}
+		}
+		return list;
 	}
 
 
 
+
+
 	@Override
 	public int updateServiceOrder(TOrderNew t, Integer isSubmit) {
 		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
@@ -471,8 +486,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer specially,Integer distribution,String depId, Integer pageNo,
-			Integer pageSize,Integer outsource) {
+	public Pagination<TOrderNewBo> orderNewList(String name, String orderNo, String starTime, String endTime,Integer specially,
+			Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus, Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(pageSize==null||pageSize<0)pageSize=10;
 		if(pageNo==null||pageNo<0)pageNo=1;
@@ -489,6 +504,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			params.put("specially",specially);
 		if (StringUtils.isNotBlank(name)) params.put("name", name);
 		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
+		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
+		if (null!=liquidationStatus) params.put("liquidationStatus", liquidationStatus);
 		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
 		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
 		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
@@ -524,14 +541,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 					tl.setOrderNo(orderNo);
 					tl.setProcess(OrderLogProcess.FQWB.getCode());
 					addOrderLog(tl);
-					//外包
-					o.setRefundStatus(0);
-					if(o.getId()==null) {
-						o.setCreateTime(new Date());
-						tOrderOutsourceMapper.insertSelective(o);
-					}else {
-						tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
-					}
+					
 					
 				}
 			}else {
@@ -546,6 +556,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			//增加日志
 			addOrderLog(tl);
 			//非特批增加催款信息
+			//外包
+			o.setRefundStatus(0);
+			if(o.getId()==null) {
+				o.setCreateTime(new Date());
+				tOrderOutsourceMapper.insertSelective(o);
+			}else {
+				tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
+			}
 			if(t2.getApproval()==0)pushOrderDun(t2);
 		}else if (orderStatus==OrderNewState.QDSHJJ.getCode()) {//如果不通过新增驳回
 				if (outsource==0) {//非外包
@@ -607,24 +625,22 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	
 	public void  NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
 		LoggerUtils.debug(logger, "======================邮件信息发送===================");
-		OutNewOrderDunBo ob=new OutNewOrderDunBo();
-		if(dunId!=null)
-			try {
-				ConvertUtils.register(new DateConverter(null), java.util.Date.class);
-				BeanUtils.copyProperties(ob, newOrderDunMapper.selectByPrimaryKey(dunId));
-			} catch (IllegalAccessException | InvocationTargetException e) {
-				e.printStackTrace();
-			}
+		NewOrderDun ob=newOrderDunMapper.selectByPrimaryKey(dunId);
 		AdminListBo a2 = adminMapper.getDeptNameByAid(b.getSalesmanId());
+		String dunTypeName="";
+		if(ob.getDunType()!=null&&ob.getProjectType()!=null) {
+			dunTypeName= NewOrderDunType.getValueByCode(Integer.valueOf(""+ob.getProjectType()+ob.getDunType()));
+		}
 			//发送驳回邮件
-							//String subject, String address, String deptname, String sender,
-			//String content , String orderNo,String date ,String dunStatusName,Integer type
-			EmailBo bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
-					"", orderNo,new SimpleDateFormat("yyyy-MM-dd").format(ob.getCreateTime()),ob.getDunTypeName(),a2.getName(),b.getUserName(),1);
-			if(StringUtils.isNotBlank(b.getEmail())) {
-				SendEmailUtil.getInstance().patentSend(bo);
-			}
-			LoggerUtils.debug(logger, "=========================================发送邮件成功");
+		if(SendEmailUtil.isEmail(b.getEmail())) {
+	    	 EmailBo bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
+						"", orderNo,new SimpleDateFormat("yyyy-MM-dd").format(ob.getCreateTime()),dunTypeName,a2.getName(),b.getUserName(),1);
+				if(StringUtils.isNotBlank(b.getEmail())) {
+					SendEmailUtil.getInstance().patentSend(bo);
+				}
+				LoggerUtils.debug(logger, "=========================================发送邮件成功"); 
+	     }
+			
 
 	}
 
@@ -648,7 +664,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<TOrderNewBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime,
+	public Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime,
 			Integer specially, String adminName,String depId,Integer newStatus,Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(pageSize==null||pageSize<0)pageSize=10;
@@ -657,12 +673,25 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		else params.put("newStatus", tOrderDunMapper.selectByOrderNo(orderNo).isEmpty()?1:0);
 		if (StringUtils.isNotBlank(name)) params.put("name", name);
 		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
-		if(specially!=null&&specially==1) params.put("aid", TokenManager.getAdminId());
 		if (StringUtils.isNotBlank(adminName)) params.put("adminName", adminName);
 		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
 		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
 		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
+		Integer i=null;
+		if(TokenManager.hasRole(AFTConstants.SALESMAN)) {
+			params.put("aid", TokenManager.getAdminId());
+		} else if (TokenManager.hasRole(AFTConstants.FINANCE)) {
+			i=1;
+			params.put("fid", TokenManager.getAdminId());
+		}else if (TokenManager.hasRole(AFTConstants.FINANCE_MANAGER)) {
+			i=2;
+			params.put("fid", TokenManager.getAdminId());
+		}
+		if (TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)||TokenManager.hasRole(AFTConstants.VICE_CEO)||
+				TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.CED)||
+				TokenManager.hasRole(AFTConstants.APPROVAL_DECISION))i=3;
+		if(i!=null)params.put("shiroType", i);
+		Pagination<outOrderDunListBo> p = (Pagination<outOrderDunListBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
 		return p;
 	}
 
@@ -1120,7 +1149,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			n.setAid(string);
 			nlist.add(n);
 			Admin admin = adminMapper.selectAllByid(string);
-			if(admin!=null&&StringUtils.isNotBlank(admin.getEmail()))adminIds+=admin.getEmail()+",";
+			if(admin!=null&&SendEmailUtil.isEmail(admin.getEmail()))adminIds+=admin.getEmail()+",";
 		}
 		if(!nlist.isEmpty())noticeMapper.insertBatch(nlist);
 		if(StringUtils.isNotBlank(adminIds)) {
@@ -1135,7 +1164,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				}
 		}
 		
+		
 	}
+    
 
 
 

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

@@ -67,6 +67,7 @@ import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
 import com.goafanti.order.bo.TaskLogBo;
 import com.goafanti.order.bo.TaskProgressBo;
+import com.goafanti.order.bo.inuptTaskHoursListBo;
 import com.goafanti.order.enums.BonusSubject;
 import com.goafanti.order.enums.OrderDunProjectType;
 import com.goafanti.order.enums.OrderProjectStatus;
@@ -206,7 +207,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public TOrderTaskDetailBo orderTaskDetail(String id) {
-		return tOrderTaskMapper.getOrderTaskDetail(id);
+		TOrderTaskDetailBo t=tOrderTaskMapper.getOrderTaskDetail(id);
+		if(TokenManager.hasRole(AFTConstants.SALESMAN)) {
+			t.setOutsourceName("****");
+			t.setOutsourcePrice("****");
+			t.setDeclareUser("****");
+			t.setDeclarePwd("****");
+			t.setCertificateNumber("****");
+		}
+		return t;
 	}
 
 	@Override
@@ -447,35 +456,34 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<TOrderTaskListBo> taskHoursList(String name,String orderNo, String taskId, String starTime,String endTime ,Integer type, Integer pageNo,
+	public Pagination<TOrderTaskListBo> taskHoursList(inuptTaskHoursListBo ib, Integer pageNo,
 			Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(pageSize==null||pageSize<0)pageSize=10;
 		if(pageNo==null||pageNo<0)pageNo=1;
-		if (StringUtils.isNotBlank(name)) params.put("name", name);
-		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
-		if (StringUtils.isNotBlank(taskId)) params.put("taskId", taskId);
-		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
-		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		if(type!=null&&type==1)params.put("fid", TokenManager.getAdminId());
+		if (StringUtils.isNotBlank(ib.getName())) params.put("name", ib.getName());
+		if (StringUtils.isNotBlank(ib.getOrderNo())) params.put("orderNo", ib.getOrderNo());
+		if (StringUtils.isNotBlank(ib.getTaskId())) params.put("taskId", ib.getTaskId());
+		if (StringUtils.isNotBlank(ib.getStarTime())) params.put("starTime", ib.getStarTime());
+		if (StringUtils.isNotBlank(ib.getEndTime())) params.put("endTime", ib.getEndTime()+" 23:59:59");
+		if(StringUtils.isNotBlank(ib.getContractNo()))params.put("contractNo", ib.getContractNo());
+		if(StringUtils.isNotBlank(ib.getDepId()))params.put("depId", ib.getDepId());
+		if(StringUtils.isNotBlank(ib.getCid()))params.put("cid", ib.getCid());
+		Integer i=null;
+		if (TokenManager.hasRole(AFTConstants.FINANCE))i=1;
+		if (TokenManager.hasRole(AFTConstants.FINANCE_MANAGER))i=2;
+		if (TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)||TokenManager.hasRole(AFTConstants.VICE_CEO)||
+				TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.CED)||
+				TokenManager.hasRole(AFTConstants.APPROVAL_DECISION))i=3;
+		if(TokenManager.getAdminId()!=null)params.put("aid", TokenManager.getAdminId());
+		if(i!=null)params.put("shiroType", i);
 		Pagination<TOrderTaskListBo> p = (Pagination<TOrderTaskListBo>)findPage("selectTaskHoursListByPage", "selectTaskHoursListCount", params, pageNo, pageSize);
 		
 		return p;
 	}
 
 	
-	@Override
-	public XSSFWorkbook exportTaskHoursListData(String name, String taskId, String orderNo,String startTime, String endTime,Integer type) {
-		if(StringUtils.isNoneBlank(endTime)) endTime=endTime+" 23:59:59";
-		String fid=null;
-		if(type!=null&&type==1)fid=TokenManager.getAdminId();
-		List<TOrderTaskListBo> list=tTaskHoursMapper.getTaskHoursData(name,taskId,orderNo,startTime,endTime,fid);
-		if (list==null || list.size()==0) return null;
-		String[] comment = {"任务编号","任务名称","订单编号","业务别类","订单部门","客户名称","任务负责人","任务状态","项目状态","工时","合同编号","签单日期","派单日期"};
-		String filePath = uploadPath + "/TaskHours";
-		XSSFWorkbook wb = ExportExcelUtil.exportTaskHoursListData(list, comment, filePath);
-		return wb;
-	}
+	
 	
 
 
@@ -538,13 +546,13 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return tTaskHoursMapper.taskHoursDetailsList(taskId,aid);
 	}
 	@Override
-	public void exportMyTaskList(HttpServletResponse response,String name,String orderNo, String taskId, String starTime,String endTime ,Integer type, Integer pageNo,
-			Integer pageSize) throws IOException {
+	public void exportMyTaskList(HttpServletResponse response,inuptTaskHoursListBo ib, Integer pageNo, Integer pageSize) throws IOException {
 		OutputStream out = response.getOutputStream();
 		try {
 			@SuppressWarnings("unchecked")
-			List<TOrderTaskListBo> list=(List<TOrderTaskListBo>) taskHoursList( name, orderNo,  taskId,  starTime, endTime , type,  pageNo, pageSize).getList();
-    		String[] comment = {"合同编号","订单编号","客户名称","项目负责人","项目别类","项目名称","项目状态","工时","分配时间","完成时间"};
+			List<TOrderTaskListBo> list=(List<TOrderTaskListBo>) taskHoursList(ib,  pageNo, pageSize).getList();
+			//合同编号  订单编号  客户名称    订单部门  订单负责人      项目类别   项目编号   项目名称     项目负责人  项目价格(万元)    数量(个)       任务状态   项目状态    工时   签单时间    派单时间   分配时间   完成时间
+    		String[] comment = {"合同编号","订单编号","客户名称","订单部门","订单负责人","项目类别","项目编号","项目名称","项目负责人","项目价格(万元)","数量(个)","任务状态","项目状态","工时","签单日期","派单日期","分配时间","完成时间"};
     		String fileName ="工时信息记录表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
     		//type 0 变更
     		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"工时信息");
@@ -557,18 +565,26 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
     				//当前列的只
     				String o = "";
     				switch (comment[i]) {
-//    String[] comment = {"合同编号 ","订单编号","客户名称","项目负责人 ","项目别类","项目名称","项目状态","工时","分配时间","完成时间"};
+//    "合同编号","订单编号","客户名称","订单部门","订单负责人 ","项目类别","项目编号","项目名称","项目负责人","项目价格(万元)",
+//    				" 数量(个)","任务状态","项目状态","工时","签单日期","派单日期","分配时间","完成时间"
     				case "合同编号": o = ob.getContractNo(); break;
     				case "订单编号": o = ob.getOrderNo().toString(); break;
     				case "客户名称": o = ob.getUserName(); break;
     				case "订单部门": o = ob.getDepName(); break;
-    				case "项目负责人": o = ob.getReceiverName(); break;
-    				case "项目别类": o = ob.getCname(); break;
+    				case "订单负责人": o = ob.getSalesmanName(); break;
+    				case "项目类别": o =ob.getCname(); break;
+    				case "项目编号": o = ob.getId(); break;
     				case "项目名称": o = ob.getTaskName(); break;
+    				case "项目负责人": o = ob.getReceiverName(); break;
+    				case "项目价格(万元)": o = ob.getCommodityPrice().toString(); break;
+    				case "数量(个)": o = ob.getCommodityQuantity().toString(); break;
+    				case "任务状态": o = TaskState.getValueByCode(ob.getTaskStatus()); break;
     				case "项目状态": o = ProjectNewStage.getValueByCode(ob.getProjectStatus()); break;
     				case "工时": o = ob.getHours().toString(); break;
     				case "分配时间": o = ob.getTaskDistributionTime(); break;
     				case "完成时间": o = ob.getTaskEndTime(); break;
+    				case "签单日期": o = ob.getSignTime(); break;
+    				case "派单日期": o = ob.getCreteTime();break;
     				default: o = ""; break;
     				}
     				XSSFCell c = r.createCell(i);

+ 2 - 3
src/main/java/com/goafanti/order/service/impl/OrderReceivablesServiceImpl.java

@@ -448,8 +448,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
         	temporaryReceivablesMapper.updateRepeatOrderNo(TokenManager.getAdminId());
         
     }
-      
-        public static Workbook getWorkBook(MultipartFile file) {
+      	public static Workbook getWorkBook(MultipartFile file) {
         //创建Workbook工作薄对象,表示整个excel
         Workbook workbook = null;
         try {
@@ -487,7 +486,7 @@ public class OrderReceivablesServiceImpl extends BaseMybatisDao<TemporaryReceiva
         	        cellValue = String.valueOf(cell.getCellFormula());
         	        break;
         	        case Cell.CELL_TYPE_BLANK: //空值
-        	        cellValue = "未知";
+        	        cellValue = "";
         	        break;
         	        case Cell.CELL_TYPE_ERROR: //故障
         	        cellValue = "非法字符";

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

@@ -5,7 +5,7 @@ jdbc.url=jdbc\:mysql\://localhost\:3306/aft?useUnicode\=true&characterEncoding\=
 jdbc.username=dev
 jdbc.password=123456
 #测试
-#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft_fz?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+#jdbc.url=jdbc:mysql://101.37.32.31:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.username=root
 #jdbc.password=aftdev
 #\u68c0\u6d4b\u6570\u636e\u5e93\u94fe\u63a5\u662f\u5426\u6709\u6548\uff0c\u5fc5\u987b\u914d\u7f6e
@@ -60,12 +60,12 @@ template.cacheable=false
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-#static.host=//sb.jishutao.com/1.1.27
+#static.host=//sb.jishutao.com/1.1.28
 #avatar.host=//sb.jishutao.com
 
 #连测试
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.27
+static.host=//static.jishutao.com/1.1.28
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -54,7 +54,7 @@ session.validate.timespan=18000000
 app.name=AFT
 template.cacheable=false
 
-static.host=//static.jishutao.com/1.1.26
+static.host=//static.jishutao.com/1.1.28
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
 avatar.upload.host=//static.jishutao.com/upload