Bläddra i källkod

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

anderx 2 år sedan
förälder
incheckning
c40feb2c60
28 ändrade filer med 632 tillägg och 195 borttagningar
  1. 14 2
      src/main/java/com/goafanti/common/bo/EmailBo.java
  2. 6 1
      src/main/java/com/goafanti/common/dao/TOrderExamineMapper.java
  3. 3 0
      src/main/java/com/goafanti/common/dao/TOrderNewMapper.java
  4. 3 2
      src/main/java/com/goafanti/common/enums/OrderLogProcess.java
  5. 76 33
      src/main/java/com/goafanti/common/mapper/DepartmentMapper.xml
  6. 56 13
      src/main/java/com/goafanti/common/mapper/TOrderExamineMapper.xml
  7. 33 14
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  8. 21 12
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  9. 53 2
      src/main/java/com/goafanti/common/model/Department.java
  10. 36 1
      src/main/java/com/goafanti/common/model/TOrderExamine.java
  11. 13 0
      src/main/java/com/goafanti/common/model/TOrderTask.java
  12. 25 10
      src/main/java/com/goafanti/common/task/ReleaseUserTask.java
  13. 25 2
      src/main/java/com/goafanti/common/utils/AsyncUtils.java
  14. 8 3
      src/main/java/com/goafanti/customer/bo/LockingReleaseBo.java
  15. 3 4
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  16. 0 1
      src/main/java/com/goafanti/order/bo/OrderProcessName.java
  17. 22 3
      src/main/java/com/goafanti/order/bo/OutMemberList.java
  18. 1 1
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  19. 9 4
      src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java
  20. 28 32
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  21. 156 28
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  22. 19 1
      src/main/java/com/goafanti/organization/bo/OrganizationListOut.java
  23. 14 13
      src/main/java/com/goafanti/organization/controller/AdminOrganizationController.java
  24. 3 3
      src/main/java/com/goafanti/organization/service/OrganizationService.java
  25. 2 1
      src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java
  26. 1 7
      src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java
  27. 1 1
      src/main/resources/props/config_local.properties
  28. 1 1
      src/main/resources/props/config_test.properties

+ 14 - 2
src/main/java/com/goafanti/common/bo/EmailBo.java

@@ -1,10 +1,10 @@
 package com.goafanti.common.bo;
 
-import java.util.Date;
-
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.utils.DateUtils;
 
+import java.util.Date;
+
 public class EmailBo {
 
 	//收件地址
@@ -497,4 +497,16 @@ public class EmailBo {
 		this.end = end;
 	}
 
+	@Override
+	public String toString() {
+		return "EmailBo{" +
+				"subject='" + subject + '\'' +
+				", address='" + address + '\'' +
+				", addressee='" + addressee + '\'' +
+				", deptname='" + deptname + '\'' +
+				", sender='" + sender + '\'' +
+				", content='" + content + '\'' +
+				", end='" + end + '\'' +
+				'}';
+	}
 }

+ 6 - 1
src/main/java/com/goafanti/common/dao/TOrderExamineMapper.java

@@ -18,7 +18,8 @@ public interface TOrderExamineMapper {
 
     int updateByPrimaryKey(TOrderExamine record);
 
-    List<TOrderExamine> selectByOrderNo(String orderNo);
+    List<TOrderExamine> selectByOrderNo(@Param("orderNo")String orderNo,@Param("type")Integer type);
+    List<TOrderExamine> selectByTid(Integer tid);
 
     void updateStatusByOrderNo(@Param("orderNo")String orderNo,@Param("aid") String aid, @Param("status")Integer status);
 
@@ -28,4 +29,8 @@ public interface TOrderExamineMapper {
 
 
     void deleteByOrderNo(String orderNo);
+
+    List<TOrderExamine> selectExamineBytidAndAid(@Param("list")List<Integer> ids,@Param("aid") String aid);
+
+    void deleteByTid(Integer tid);
 }

+ 3 - 0
src/main/java/com/goafanti/common/dao/TOrderNewMapper.java

@@ -5,6 +5,7 @@ import com.goafanti.common.model.TOrderBillNew;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.order.bo.*;
 import com.goafanti.order.bo.outStatistics.OutOrderSalesSourceAmount;
+import com.goafanti.organization.bo.OrganizationListOut;
 import org.apache.ibatis.annotations.Param;
 
 import java.math.BigDecimal;
@@ -91,4 +92,6 @@ public interface TOrderNewMapper {
 
 
     List<FinanceCount> selectCountByFinance(String id);
+
+    OrganizationListOut selectOrderFinance(String orderNo);
 }

+ 3 - 2
src/main/java/com/goafanti/common/enums/OrderLogProcess.java

@@ -1,10 +1,10 @@
 package com.goafanti.common.enums;
 
+import org.apache.commons.lang3.StringUtils;
+
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
-
 
 public enum OrderLogProcess {
 //	流程1=提交,2=审核,3=驳回,4=特批,5=财务审核 ,25=项目总监审核,6=财务首付,7=项目订单派单,8=项目派单,9=项目完成,0=发起退单,10=退单完成,11=财务全款,
@@ -15,6 +15,7 @@ public enum OrderLogProcess {
 	BH(3, "驳回"),
 	TP(4, "特批通过"),
 	CWSH(5, "财务审核"),
+	CWFS(26,"财务复审"),
 	XMZJSH(25, "项目总监审核"),
 	CWSF(6, "财务首付"),
 	XMZJPD(7, "项目总监派单"),

+ 76 - 33
src/main/java/com/goafanti/common/mapper/DepartmentMapper.xml

@@ -20,11 +20,15 @@
     <result column="working_hours_type" jdbcType="INTEGER" property="workingHoursType" />
     <result column="hide_sign" jdbcType="INTEGER" property="hideSign" />
     <result column="lvl" jdbcType="INTEGER" property="lvl" />
+    <result column="current_amount" jdbcType="DECIMAL" property="currentAmount" />
+    <result column="subordinate_amount" jdbcType="DECIMAL" property="subordinateAmount" />
+    <result column="total_amount" jdbcType="DECIMAL" property="totalAmount" />
+    <result column="retrial_finance_id" jdbcType="VARCHAR" property="retrialFinanceId" />
   </resultMap>
   <sql id="Base_Column_List">
     id, create_id, create_time, update_time, deleted_sign, `name`, `type`, manager_id,
     dep_no, super_id, remarks, `status`, abbreviation, finance_id, province, working_hours_type,
-    hide_sign, lvl
+    hide_sign, lvl, current_amount, subordinate_amount, total_amount, retrial_finance_id
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select
@@ -36,28 +40,27 @@
     delete from department
     where id = #{id,jdbcType=VARCHAR}
   </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.Department">
-    insert into department (id, create_id, create_time,
-      update_time, deleted_sign, `name`,
-      `type`, manager_id, dep_no,
-      super_id, remarks, `status`,
-      abbreviation, finance_id, province,
-      working_hours_type, hide_sign, lvl
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Department" useGeneratedKeys="true">
+    insert into department (create_id, create_time, update_time,
+      deleted_sign, `name`, `type`,
+      manager_id, dep_no, super_id,
+      remarks, `status`, abbreviation,
+      finance_id, province, working_hours_type,
+      hide_sign, lvl, current_amount,
+      subordinate_amount, total_amount, retrial_finance_id
       )
-    values (#{id,jdbcType=VARCHAR}, #{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
-      #{updateTime,jdbcType=TIMESTAMP}, #{deletedSign,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
-      #{type,jdbcType=VARCHAR}, #{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR},
-      #{superId,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
-      #{abbreviation,jdbcType=VARCHAR}, #{financeId,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER},
-      #{workingHoursType,jdbcType=INTEGER}, #{hideSign,jdbcType=INTEGER}, #{lvl,jdbcType=INTEGER}
+    values (#{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
+      #{deletedSign,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
+      #{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR},
+      #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{abbreviation,jdbcType=VARCHAR},
+      #{financeId,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER}, #{workingHoursType,jdbcType=INTEGER},
+      #{hideSign,jdbcType=INTEGER}, #{lvl,jdbcType=INTEGER}, #{currentAmount,jdbcType=DECIMAL},
+      #{subordinateAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{retrialFinanceId,jdbcType=VARCHAR}
       )
   </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.Department">
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Department" useGeneratedKeys="true">
     insert into department
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
       <if test="createId != null">
         create_id,
       </if>
@@ -109,11 +112,20 @@
       <if test="lvl != null">
         lvl,
       </if>
+      <if test="currentAmount != null">
+        current_amount,
+      </if>
+      <if test="subordinateAmount != null">
+        subordinate_amount,
+      </if>
+      <if test="totalAmount != null">
+        total_amount,
+      </if>
+      <if test="retrialFinanceId != null">
+        retrial_finance_id,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=VARCHAR},
-      </if>
       <if test="createId != null">
         #{createId,jdbcType=VARCHAR},
       </if>
@@ -165,6 +177,18 @@
       <if test="lvl != null">
         #{lvl,jdbcType=INTEGER},
       </if>
+      <if test="currentAmount != null">
+        #{currentAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="subordinateAmount != null">
+        #{subordinateAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="totalAmount != null">
+        #{totalAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="retrialFinanceId != null">
+        #{retrialFinanceId,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Department">
@@ -221,6 +245,16 @@
       <if test="lvl != null">
         lvl = #{lvl,jdbcType=INTEGER},
       </if>
+      <if test="currentAmount != null">
+        current_amount = #{currentAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="subordinateAmount != null">
+        subordinate_amount = #{subordinateAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="totalAmount != null">
+        total_amount = #{totalAmount,jdbcType=DECIMAL},
+      </if>
+        retrial_finance_id = #{retrialFinanceId,jdbcType=VARCHAR},
     </set>
     where id = #{id,jdbcType=VARCHAR}
   </update>
@@ -242,11 +276,19 @@
       province = #{province,jdbcType=INTEGER},
       working_hours_type = #{workingHoursType,jdbcType=INTEGER},
       hide_sign = #{hideSign,jdbcType=INTEGER},
-      lvl = #{lvl,jdbcType=INTEGER}
+      lvl = #{lvl,jdbcType=INTEGER},
+      current_amount = #{currentAmount,jdbcType=DECIMAL},
+      subordinate_amount = #{subordinateAmount,jdbcType=DECIMAL},
+      total_amount = #{totalAmount,jdbcType=DECIMAL},
+      retrial_finance_id = #{retrialFinanceId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 
 
+
+
+
+
   <select id="selectOrganizationList" parameterType="String" resultType="com.goafanti.organization.bo.OrganizationListOut">
     select
     om.id,om.create_id as createId,om.create_time as createTime,
@@ -306,11 +348,11 @@
     from department
     where status ='0'
     <if test="lvl != null ">
-        and lvl= #{lvl}
+      and lvl= #{lvl}
+    </if>
+    <if test="hideSign != null ">
+      and hide_sign= #{hideSign}
     </if>
-      <if test="hideSign != null ">
-    and hide_sign= #{hideSign}
-      </if>
     <if test="id != null ">
       and super_id= #{id}
     </if>
@@ -359,12 +401,13 @@
       and name  like concat('%',#{name,jdbcType=VARCHAR},'%')
   </select>
   <select id="selectAllById" resultType="com.goafanti.organization.bo.OrganizationListOut">
-    select a.id, a.create_id as createId, a.create_time as createTime, a.update_time as updateTime,
-           a.deleted_sign as deletedSign, a.name, a.type, a.manager_id as managerId, a.dep_no as depNo,
+    select a.id, a.create_id as createId, a.create_time as createTime, a.update_time as updateTime,a.retrial_finance_id retrialFinanceId,
+           d.name retrialFinanceName, a.deleted_sign as deletedSign, a.name, a.type, a.manager_id as managerId, a.dep_no as depNo,
            a.super_id as superId, a.remarks, a.status, a.abbreviation, a.finance_id financeId,a.hide_sign hideSign,
-           a.province, c.name financeName, a.working_hours_type workingHoursType, b.name as managerName
-    from department a
-           left join admin b on a.manager_id = b.id left join admin c on a.finance_id = c.id
+           a.province, c.name financeName, a.working_hours_type workingHoursType, b.name as managerName,
+           a.retrial_finance_id retrialFinanceId, d.name retrialFinanceName
+    from department a left join admin b on a.manager_id = b.id left join admin c on a.finance_id = c.id
+    left join admin d on a.retrial_finance_id=d.id
     where a.id=#{id,jdbcType=VARCHAR}
   </select>
   <delete id="deleteById" parameterType="java.lang.String">
@@ -402,13 +445,13 @@
     update department
     <set>
       dep_no = #{depNo,jdbcType=VARCHAR},
-        lvl= #{lvl}
+      lvl= #{lvl}
     </set>
     where
     id=#{id,jdbcType=VARCHAR}
   </update>
 
-    <select id="selectCountBySuperId" parameterType="String" resultType="java.lang.Integer">
+  <select id="selectCountBySuperId" parameterType="String" resultType="java.lang.Integer">
     select
       count(0)
     from department

+ 56 - 13
src/main/java/com/goafanti/common/mapper/TOrderExamineMapper.xml

@@ -8,9 +8,11 @@
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="aname" jdbcType="VARCHAR" property="aname" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="tid" jdbcType="INTEGER" property="tid" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, order_no, aid, `status`, create_time, aname
+    id, order_no, aid, `status`, create_time, aname, `type`, tid
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -18,17 +20,17 @@
     from t_order_examine
     where id = #{id,jdbcType=INTEGER}
   </select>
-
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
     delete from t_order_examine
     where id = #{id,jdbcType=INTEGER}
   </delete>
-
-    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderExamine" useGeneratedKeys="true">
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderExamine" useGeneratedKeys="true">
     insert into t_order_examine (order_no, aid, `status`,
-      create_time, aname)
+      create_time, aname, `type`,
+      tid)
     values (#{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
-      #{createTime,jdbcType=TIMESTAMP}, #{aname,jdbcType=VARCHAR})
+      #{createTime,jdbcType=TIMESTAMP}, #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
+      #{tid,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderExamine" useGeneratedKeys="true">
     insert into t_order_examine
@@ -48,6 +50,12 @@
       <if test="aname != null">
         aname,
       </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="tid != null">
+        tid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -65,9 +73,14 @@
       <if test="aname != null">
         #{aname,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="tid != null">
+        #{tid,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
-
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderExamine">
     update t_order_examine
     <set>
@@ -86,6 +99,12 @@
       <if test="aname != null">
         aname = #{aname,jdbcType=VARCHAR},
       </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -95,7 +114,9 @@
       aid = #{aid,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      aname = #{aname,jdbcType=VARCHAR}
+      aname = #{aname,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      tid = #{tid,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -104,7 +125,7 @@
     select
     <include refid="Base_Column_List" />
     from t_order_examine
-    where order_no = #{orderNo,jdbcType=VARCHAR}
+    where order_no = #{orderNo,jdbcType=VARCHAR} and type = #{type,jdbcType=INTEGER}
   </select>
 
 
@@ -117,12 +138,13 @@
     </if>
   </update>
 
+
   <insert id="insertBatch">
-    insert into t_order_examine (order_no, aid, `status`, aname)
+    insert into t_order_examine (order_no, aid, `status`, aname,type,tid)
     values
     <foreach item="item" index="index" collection="list" separator=",">
       (#{item.orderNo,jdbcType=VARCHAR}, #{item.aid,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER},
-       #{item.aname,jdbcType=VARCHAR})
+      #{item.aname,jdbcType=VARCHAR},#{item.type,jdbcType=INTEGER},#{item.tid,jdbcType=INTEGER})
     </foreach>
   </insert>
   <select id="selectByOrderNoAndAid" resultType="java.lang.Integer">
@@ -130,9 +152,30 @@
     from t_order_examine where status=0
     and order_no = #{orderNo} and aid= #{aid}
   </select>
-  <delete id="deleteByOrderNo">
+  <select id="selectByTid" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from t_order_examine
+    where tid = #{tid}
+  </select>
+
+    <delete id="deleteByOrderNo">
     delete from t_order_examine
     where order_no = #{orderNo}
   </delete>
+  <delete id="deleteByTid">
+    delete from t_order_examine
+    where tid = #{tid}
+  </delete>
+  <select id="selectExamineBytidAndAid" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from t_order_examine a
+    where tid in
+    <foreach item="item" index="index" collection="list" separator="," open="(" close=")">
+    #{item}
+    </foreach>
+    and a.aid= #{aid}
+  </select>
 
 </mapper>

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

@@ -784,10 +784,14 @@
 	  	and o.back_status = 3
 	  	</if>
 	  	<if test="fids != null and fids.size() &gt; 0">
-	  	and d.finance_id in
-	   <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
-       		#{item}
-     	</foreach>
+	  	and (d.finance_id in
+          <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
+            #{item}
+          </foreach>
+	  	    or d.retrial_finance_id in
+          <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
+            #{item}
+          </foreach>)
 		</if>
   		<if test="o.orderStatus != null and o.orderStatus != &quot;&quot;">
 	  	and (o.order_status >=  #{o.orderStatus,jdbcType=INTEGER} or o.back_status=3)
@@ -866,12 +870,16 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
 	  	<if test="o.processStatus == 9">
 	  	and o.back_status = 3
 	  	</if>
-	  	<if test="fids != null and fids.size() &gt; 0">
-	  	and d.finance_id in
-	   <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
-       		#{item}
-     	</foreach>
-		</if>
+    <if test="fids != null and fids.size() &gt; 0">
+      and (d.finance_id in
+      <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
+        #{item}
+      </foreach>
+      or d.retrial_finance_id in
+      <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
+        #{item}
+      </foreach>)
+    </if>
   		<if test="o.orderStatus != null and o.orderStatus != &quot;&quot;">
 	  	and (o.order_status >=  #{o.orderStatus,jdbcType=INTEGER} or o.back_status=3)
 	  	</if>
@@ -1558,10 +1566,14 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       and o.back_status = 3
     </if>
     <if test="fids != null and fids.size() &gt; 0">
-      and d.finance_id in
+      and (d.finance_id in
       <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
         #{item}
       </foreach>
+      or d.retrial_finance_id in
+      <foreach close=")" collection="fids" index="" item="item" open="(" separator=",">
+        #{item}
+      </foreach>)
     </if>
     <if test="o.orderStatus != null and o.orderStatus != &quot;&quot;">
       and (o.order_status >=  #{o.orderStatus,jdbcType=INTEGER} or o.back_status=3)
@@ -2064,12 +2076,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     select a.order_no orderNo,a.approval,a.process_status processStatus  ,b.name yxy,mg.name yxjl,
         yxgly.name yxgly,d.name cwzy,zc.name zc, zxsgly.name zxsgly,dsz.name dsz
     from t_order_new a left join admin b on a.salesman_id =b.id
-    left join admin mg on b.manager_id =mg.id
-     left join department c on a.order_dep =c.id
+    left join admin mg on b.manager_id =mg.id left join department c on a.order_dep =c.id
      left join (select a.department_id depId,group_concat(a.name) name
         from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
         where c.role_type ='9996' and a.status ='0' group by a.department_id )yxgly on c.id =yxgly.depId
-     left join (select order_no ,group_concat(aname)name from t_order_examine group by order_no ) d on a.order_no=d.order_no
+     left join (select order_no ,group_concat(aname)name from t_order_examine WHERE type=0 group by order_no ) d on a.order_no=d.order_no
      left join (select group_concat(a.name) name
         from admin a left join user_role b on a.id=b.uid left join `role` c on b.rid =c.id
         where c.role_type in ('99998','99988') and a.status ='0' ) zc on 1=1
@@ -2143,5 +2154,13 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
               and b.finance_id = #{aid})x
       group by x.aid, x.dates;
     </select>
+  <select id="selectOrderFinance" resultType="com.goafanti.organization.bo.OrganizationListOut">
+    select b.id,b.finance_id financeId,c.name financeName,b.retrial_finance_id retrialFinanceId,
+           d.name retrialFinanceName
+    from t_order_new a left join department b on a.order_dep = b.id
+    left join admin c on b.finance_id=c.id
+    left join admin d on b.retrial_finance_id=d.id
+    where a.order_no =#{orderNo}
+  </select>
 
 </mapper>

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

@@ -67,6 +67,7 @@
     <result column="picture_url" jdbcType="VARCHAR" property="pictureUrl" />
     <result column="satisfaction_degree" jdbcType="INTEGER" property="satisfactionDegree" />
     <result column="satisfaction_degree_url" jdbcType="VARCHAR" property="satisfactionDegreeUrl" />
+    <result column="examine_type" jdbcType="INTEGER" property="examineType" />
   </resultMap>
   <sql id="Base_Column_List">
     id, order_no, main, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
@@ -79,7 +80,7 @@
     declaration_batch, cost_reduction, official_cost, set_up_status, set_up_time, spot_check_status,
     high_tech_status, special_comment, if_certification_fee, certification_fee, certification_corporate,
     time_record, if_publicity, check_status, patent_type, pubicity_url, process_status,
-    member_type, picture_url, satisfaction_degree, satisfaction_degree_url
+    member_type, picture_url, satisfaction_degree, satisfaction_degree_url, examine_type
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -113,8 +114,8 @@
       certification_corporate, time_record, if_publicity,
       check_status, patent_type, pubicity_url,
       process_status, member_type, picture_url,
-      satisfaction_degree, satisfaction_degree_url
-      )
+      satisfaction_degree, satisfaction_degree_url,
+      examine_type)
     values (#{orderNo,jdbcType=VARCHAR}, #{main,jdbcType=INTEGER}, #{superId,jdbcType=VARCHAR},
       #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER},
       #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER},
@@ -136,8 +137,8 @@
       #{certificationCorporate,jdbcType=VARCHAR}, #{timeRecord,jdbcType=VARCHAR}, #{ifPublicity,jdbcType=INTEGER},
       #{checkStatus,jdbcType=INTEGER}, #{patentType,jdbcType=INTEGER}, #{pubicityUrl,jdbcType=VARCHAR},
       #{processStatus,jdbcType=INTEGER}, #{memberType,jdbcType=INTEGER}, #{pictureUrl,jdbcType=VARCHAR},
-      #{satisfactionDegree,jdbcType=INTEGER}, #{satisfactionDegreeUrl,jdbcType=VARCHAR}
-      )
+      #{satisfactionDegree,jdbcType=INTEGER}, #{satisfactionDegreeUrl,jdbcType=VARCHAR},
+      #{examineType,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TOrderTask" useGeneratedKeys="true">
     insert into t_order_task
@@ -334,6 +335,9 @@
       <if test="satisfactionDegreeUrl != null">
         satisfaction_degree_url,
       </if>
+      <if test="examineType != null">
+        examine_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="orderNo != null">
@@ -528,6 +532,9 @@
       <if test="satisfactionDegreeUrl != null">
         #{satisfactionDegreeUrl,jdbcType=VARCHAR},
       </if>
+      <if test="examineType != null">
+        #{examineType,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
@@ -725,6 +732,9 @@
       <if test="satisfactionDegreeUrl != null">
         satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR},
       </if>
+      <if test="examineType != null">
+        examine_type = #{examineType,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -793,14 +803,13 @@
       member_type = #{memberType,jdbcType=INTEGER},
       picture_url = #{pictureUrl,jdbcType=VARCHAR},
       satisfaction_degree = #{satisfactionDegree,jdbcType=INTEGER},
-      satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR}
+      satisfaction_degree_url = #{satisfactionDegreeUrl,jdbcType=VARCHAR},
+      examine_type = #{examineType,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
 
 
-
-
   <update id="updateBySuperId">
     update t_order_task
     <set>
@@ -2111,7 +2120,7 @@
   <select id="findMemberList" resultType="com.goafanti.order.bo.OutMemberList">
     select a.id,b.contract_no contractNo,c.buyer_name userName,a.order_no orderNo,b.approval ,c.dep_name depName,
     c.salesman_name salesmanName,c.finance_name financeName,a.commodity_name projectName,a.member_type memberType,
-    b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,
+    b.delete_sign deleteSign ,b.total_amount totalAmount ,b.sales_type salesType ,b.other,a.examine_type examineType,
     a.process_status status,a.commodity_id commodityId,a.commodity_name commodityName,
     a.commodity_quantity commodityQuantity,a.task_comment taskComment,a.picture_url pictureUrl,
     e.service_life serviceLife ,e.service_year serviceYear,e.year_sum yearSum,e.contract_term contractTerm
@@ -2127,7 +2136,7 @@
       and b.salesman_id = #{aid}
     </if>
     <if test="shiroType ==2">
-      and d.finance_id  = #{aid}
+      and (d.finance_id  = #{aid} or  d.retrial_finance_id =#{aid})
     </if>
 
     <if test="orderNo != null">
@@ -2195,7 +2204,7 @@
       and b.salesman_id = #{aid}
     </if>
     <if test="shiroType ==2">
-      and d.finance_id  = #{aid}
+      and (d.finance_id  = #{aid} or  d.retrial_finance_id =#{aid})
     </if>
     <if test="orderNo != null">
       and a.order_no = #{orderNo}
@@ -2382,7 +2391,7 @@
 
 
 
-    <delete id="deleteBySplitId" parameterType="java.lang.Integer">
+  <delete id="deleteBySplitId" parameterType="java.lang.Integer">
     delete from t_order_task
     where split_super = #{id,jdbcType=INTEGER}
   </delete>

+ 53 - 2
src/main/java/com/goafanti/common/model/Department.java

@@ -1,6 +1,7 @@
 package com.goafanti.common.model;
 
 import java.io.Serializable;
+import java.math.BigDecimal;
 import java.util.Date;
 
 /**
@@ -98,6 +99,26 @@ public class Department implements Serializable {
      */
     private Integer lvl;
 
+    /**
+     * 当前金额
+     */
+    private BigDecimal currentAmount;
+
+    /**
+     * 下级累计金额
+     */
+    private BigDecimal subordinateAmount;
+
+    /**
+     * 总计金额
+     */
+    private BigDecimal totalAmount;
+
+    /**
+     * 复审财务id
+     */
+    private String retrialFinanceId;
+
     private static final long serialVersionUID = 1L;
 
     public String getId() {
@@ -244,10 +265,40 @@ public class Department implements Serializable {
         this.lvl = lvl;
     }
 
+    public BigDecimal getCurrentAmount() {
+        return currentAmount;
+    }
+
+    public void setCurrentAmount(BigDecimal currentAmount) {
+        this.currentAmount = currentAmount;
+    }
+
+    public BigDecimal getSubordinateAmount() {
+        return subordinateAmount;
+    }
+
+    public void setSubordinateAmount(BigDecimal subordinateAmount) {
+        this.subordinateAmount = subordinateAmount;
+    }
+
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    public String getRetrialFinanceId() {
+        return retrialFinanceId;
+    }
+
+    public void setRetrialFinanceId(String retrialFinanceId) {
+        this.retrialFinanceId = retrialFinanceId;
+    }
+
     public Department() {}
     public Department(String id) {
         this.id = id;
     }
-
-
 }

+ 36 - 1
src/main/java/com/goafanti/common/model/TOrderExamine.java

@@ -35,6 +35,16 @@ public class TOrderExamine implements Serializable {
      */
     private String aname;
 
+    /**
+     * 0=订单审核,1=会员发起审核
+     */
+    private Integer type;
+
+    /**
+     * 会员编号
+     */
+    private Integer tid;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -85,11 +95,36 @@ public class TOrderExamine implements Serializable {
         this.aname = aname;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
     public TOrderExamine() {
     }
 
-    public TOrderExamine(String orderNo, String aid,String aname) {
+    public TOrderExamine(String orderNo,Integer type, String aid,String aname) {
+        this.orderNo = orderNo;
+        this.type=type;
+        this.aid = aid;
+        this.aname=aname;
+        this.status=0;
+    }
+    public TOrderExamine(String orderNo,Integer type,Integer tid, String aid,String aname) {
         this.orderNo = orderNo;
+        this.type=type;
+        this.tid=tid;
         this.aid = aid;
         this.aname=aname;
         this.status=0;

+ 13 - 0
src/main/java/com/goafanti/common/model/TOrderTask.java

@@ -334,6 +334,11 @@ public class TOrderTask implements Serializable {
      */
     private String satisfactionDegreeUrl;
 
+    /**
+     * 0=全部 ,1=财务审核,2=财务复审,3=已审核
+     */
+    private Integer examineType;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -855,4 +860,12 @@ public class TOrderTask implements Serializable {
     public void setSatisfactionDegreeUrl(String satisfactionDegreeUrl) {
         this.satisfactionDegreeUrl = satisfactionDegreeUrl;
     }
+
+    public Integer getExamineType() {
+        return examineType;
+    }
+
+    public void setExamineType(Integer examineType) {
+        this.examineType = examineType;
+    }
 }

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

@@ -3,12 +3,15 @@ package com.goafanti.common.task;
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.userDaysBo;
 import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.dao.AdminUserCountMapper;
 import com.goafanti.common.dao.NoticeMapper;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.NoticeTypes;
+import com.goafanti.common.model.AdminUserCount;
 import com.goafanti.common.model.Notice;
 import com.goafanti.common.model.User;
 import com.goafanti.common.utils.AsyncUtils;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.customer.bo.LockingReleaseBo;
@@ -43,12 +46,16 @@ public class ReleaseUserTask {
 
 	int pointsDataLimit = 50;
 
+	@Autowired
+	private AdminUserCountMapper adminUserCountMapper;
+
 	/**
 	 * 每天凌晨一点
 	 *
 	 * @throws InterruptedException
 	 */
-//	@Scheduled(cron = "0 31 15  * * ?")
+//	@Scheduled(cron = "0 52 10  * * ?")
+//	@RequestMapping("/open/test")
 	@Scheduled(cron = "0 0 1  * * ?")
 	public void startTask() {
 		try {
@@ -124,7 +131,6 @@ public class ReleaseUserTask {
 				}
 			}
 			List<LockingReleaseBo> newList = new ArrayList<LockingReleaseBo>();
-			List<String> aidList=new ArrayList<>();
 			if (lockUserList != null && lockUserList.size() > 0) {
 				for (int i = 0; i < lockUserList.size(); i++) {
 					newList.add(lockUserList.get(i));
@@ -135,16 +141,11 @@ public class ReleaseUserTask {
 						newList.clear();
 						Thread.sleep(2000);
 					}
-					//设置释放客户修改客户数
-					String aid=lockUserList.get(i).getAid();
-					if (!aidList.contains(aid)){
-						aidList.add(aid);
-					}
+
 				}
 			}
-			for (String aid : aidList) {
-				customerService.updateAdminUserCountByAid(aid);
-			}
+			//处理每个人重复的天数
+			pushSalesmanCount(lockUserList);
 			pushChannel(releaseTime, userList);
 		} catch (Exception e) {
 			Notice n = new Notice(UUID.randomUUID().toString(), new Date(), 0, "1",
@@ -158,6 +159,20 @@ public class ReleaseUserTask {
 		LoggerUtils.debug(getClass(), "==============客户释放完成============");
 	}
 
+	private void pushSalesmanCount(List<LockingReleaseBo> aidList) {
+		for (LockingReleaseBo e : aidList) {
+			String dates= DateUtils.formatDate(e.getLockTime(),AFTConstants.YYYYMMDD);
+			AdminUserCount adminUserCount = customerService.getAdminUserCount(e.getAid(), dates);
+			if (adminUserCount!=null&&adminUserCount.getPrivateCount()>0){
+				AdminUserCount newAdminUserCount = new AdminUserCount();
+				newAdminUserCount.setId(adminUserCount.getId());
+				newAdminUserCount.setPrivateCount(adminUserCount.getPrivateCount()-1);
+				adminUserCountMapper.updateByPrimaryKeySelective(newAdminUserCount);
+			}
+
+		}
+	}
+
 	/**
 	 * 处理外联
 	 * @param releaseTime

+ 25 - 2
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -119,9 +119,28 @@ public class AsyncUtils {
 		SendEmailUtil.getInstance().patentSend(bo);
 	}
 
-	public void sendList(List<EmailBo> list) throws MessagingException, UnsupportedEncodingException {
-		for (EmailBo emailBo : list) {
+	public void patentSend(List<EmailBo> list) {
+		try {
+			for (EmailBo emailBo : list) {
 					SendEmailUtil.getInstance().patentSend(emailBo);
+			}
+		} catch (MessagingException e) {
+			e.printStackTrace();
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+	}
+
+	public void sendList(List<EmailBo> list) {
+		try {
+			for (EmailBo emailBo : list) {
+				SendEmailUtil.getInstance().send(emailBo);
+				LoggerUtils.debug(getClass(),String.format("=============发送邮件==>%s===>%s",emailBo.getSubject(),emailBo.getAddress()));
+			}
+		} catch (MessagingException e) {
+			e.printStackTrace();
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
 		}
 	}
 
@@ -129,6 +148,7 @@ public class AsyncUtils {
 	public void send(EmailBo bo){
 		try {
 			SendEmailUtil.getInstance().send(bo);
+			LoggerUtils.debug(getClass(),String.format("=============发送邮件==>%s===>%s",bo.getSubject(),bo.getAddress()));
 		} catch (UnsupportedEncodingException | MessagingException e) {
 			LoggerUtils.error(getClass(),"邮件发送错误");
 		}
@@ -201,6 +221,9 @@ public class AsyncUtils {
 				newList.add(ln.get(i));
 				if (50 == newList.size() || i == ln.size() - 1) {
 					if (newList.size() > 0) noticeMapper.insertBatch(newList);
+					for (Notice e : newList) {
+						LoggerUtils.debug(getClass(),String.format("=============发送站内信==>%s===>%s",NoticeStatus.getValueByCode(e.getNoticeType()),e.getContent()));
+					}
 					newList.clear();
 					try {
 						Thread.sleep(2000);

+ 8 - 3
src/main/java/com/goafanti/customer/bo/LockingReleaseBo.java

@@ -1,10 +1,12 @@
 package com.goafanti.customer.bo;
 
+import java.util.Date;
+
 public class LockingReleaseBo {
 	private String id;
 	private String uid;
 	private String aid;
-	private String lockTime;
+	private Date lockTime;
 	private String type;
 	private String businessProjectId;
 	private String businessProjectName;
@@ -50,12 +52,15 @@ public class LockingReleaseBo {
 	public void setAid(String aid) {
 		this.aid = aid;
 	}
-	public String getLockTime() {
+
+	public Date getLockTime() {
 		return lockTime;
 	}
-	public void setLockTime(String lockTime) {
+
+	public void setLockTime(Date lockTime) {
 		this.lockTime = lockTime;
 	}
+
 	public String getBusinessProjectId() {
 		return businessProjectId;
 	}

+ 3 - 4
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -465,7 +465,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public void updateAdminUserCount(String aid ,Date transferTime) {
 		String startTime=DateUtils.formatDate(transferTime,AFTConstants.YYYYMMDD);
 		String endTime=startTime+" 23:59:59";
-		AdminUserCount adminUserCount=getAdminUserCount(aid,endTime);
+		AdminUserCount adminUserCount=getAdminUserCount(aid,startTime);
 		if (adminUserCount==null){
 			AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
 			if(selectAUC!=null) adminUserCountMapper.insertSelective(selectAUC);
@@ -522,9 +522,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 	public AdminUserCount getAdminUserCount(String aid, String startTime) {
 		List<AdminUserCount> selectList = adminUserCountMapper.selectByaidAndDate(aid, startTime);
 		AdminUserCount selectAUC=null;
-		if (selectList.size()==1){
-			selectAUC=selectList.get(0);
-		}else if (selectList.size()>1){
+		if(!selectList.isEmpty())selectAUC=selectList.get(0);
+		if (selectList.size()>1){
 			for (int i=1;i<selectList.size();i++){
 				adminUserCountMapper.deleteByPrimaryKey(selectList.get(i).getId());
 			}

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

@@ -12,7 +12,6 @@ public class OrderProcessName {
     private String zc;
     private String zxsgly;
     private String dsz;
-
     public String getYxjl() {
         return yxjl;
     }

+ 22 - 3
src/main/java/com/goafanti/order/bo/OutMemberList.java

@@ -26,7 +26,7 @@ public class OutMemberList {
     @Excel(name = "项目说明",width = 24)
     private String taskComment;
     @Excel(name = "状态",readConverterExp = "0=非审核,1=财务审核,2=特批审核,3=通过,4=驳回",width = MINWIDTH)
-    private String status;
+    private Integer status;
 
     private Integer  deleteSign;
 
@@ -54,6 +54,25 @@ public class OutMemberList {
     private Integer yearSum;
     private String contractTerm;
 
+    private Integer myExamine;
+    private Integer examineType;
+
+    public Integer getExamineType() {
+        return examineType;
+    }
+
+    public void setExamineType(Integer examineType) {
+        this.examineType = examineType;
+    }
+
+    public Integer getMyExamine() {
+        return myExamine;
+    }
+
+    public void setMyExamine(Integer myExamine) {
+        this.myExamine = myExamine;
+    }
+
     public String getContractTerm() {
         return contractTerm;
     }
@@ -263,11 +282,11 @@ public class OutMemberList {
     }
 
 
-    public String getStatus() {
+    public Integer getStatus() {
         return status;
     }
 
-    public void setStatus(String status) {
+    public void setStatus(Integer status) {
         this.status = status;
     }
 }

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

@@ -353,7 +353,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 
 
 	/**
-	 * 订单审核
+	 * 订单审核.营销管理员审核
 	 */
 	@RequestMapping(value="/auditOrderNew", method = RequestMethod.POST)
 	public Result auditOrderNew(String orderNo,Integer orderStatus,String reason){

+ 9 - 4
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -508,9 +508,14 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		tl.setAid(TokenManager.getAdminId());
 		tl.setOrderNo(t.getOrderNo());
 		if (TokenManager.hasRole(AFTConstants.FINANCE)){
-			tl.setProcess(OrderLogProcess.CWSH.getCode());
+
 			//财务审核当天未审核数量减一
-			orderNewService.financeCountOrderUnauditedSubtraction(use,0);
+			if (use.getFinanceId().equals(TokenManager.getAdminId())){
+				tl.setProcess(OrderLogProcess.CWSH.getCode());
+				orderNewService.financeCountOrderUnauditedSubtraction(use,0);
+			}else {
+				tl.setProcess(OrderLogProcess.CWFS.getCode());
+			}
 		}else if (TokenManager.hasRole(AFTConstants.TECH_ADMIN)){
 			tl.setProcess(OrderLogProcess.XMZJSH.getCode());
 		}
@@ -521,7 +526,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		if (flag){
 			pushNoticeAndEmail(t, use);
 		}else {
-			List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
+			List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo,0);
 			StringBuffer str=new StringBuffer();
 			for (TOrderExamine e : tOrderExamines) {
 				if (e.getStatus()==0){
@@ -581,7 +586,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 
 	private boolean judgeOrderExamine(String orderNo) {
 		tOrderExamineMapper.updateStatusByOrderNo(orderNo,TokenManager.getAdminId(),1);
-		List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
+		List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo,0);
 		int max = tOrderExamines.size();
 		int yes=0;
 		for (TOrderExamine e : tOrderExamines) {

+ 28 - 32
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -187,17 +187,30 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	}
 
 	private void addOrderExamine(TOrderNew o) {
-		List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(o.getOrderNo());
+		List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(o.getOrderNo(),0);
 		if (tOrderExamines.isEmpty()){
-			OrganizationListOut dep = departmentMapper.selectAllById(o.getOrderDep());
-			List<TOrderExamine> list =new ArrayList<>();
-			if (dep!=null&&dep.getFinanceId()!=null)list.add(new TOrderExamine(o.getOrderNo(),dep.getFinanceId(),dep.getFinanceName()));
-			List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.TECH_ADMIN);
-			for (Admin admin : admins) {
-				list.add(new TOrderExamine(o.getOrderNo(),admin.getId(),admin.getName()));
+			addTOrderExamines(o);
+		}
+	}
+
+	private List<TOrderExamine> addTOrderExamines(TOrderNew o) {
+		tOrderExamineMapper.deleteByOrderNo(o.getOrderNo());
+		OrganizationListOut dep = departmentMapper.selectAllById(o.getOrderDep());
+		List<TOrderExamine> list =new ArrayList<>();
+		if(!Objects.isNull(dep)){
+			if (!Objects.isNull(dep.getFinanceId())){
+				list.add(new TOrderExamine(o.getOrderNo(),0,dep.getFinanceId(),dep.getFinanceName()));
+			}
+			if (StringUtils.isNotBlank(dep.getRetrialFinanceId())){
+				list.add(new TOrderExamine(o.getOrderNo(),0,dep.getRetrialFinanceId(),dep.getRetrialFinanceName()));
 			}
-			tOrderExamineMapper.insertBatch(list);
 		}
+		List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.TECH_ADMIN);
+		for (Admin admin : admins) {
+			list.add(new TOrderExamine(o.getOrderNo(),0,admin.getId(),admin.getName()));
+		}
+		tOrderExamineMapper.insertBatch(list);
+		return list;
 	}
 
 	@Override
@@ -1092,25 +1105,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}else if (t2.getProcessStatus()==ProcessStatus.YPYXGLY.getCode()){
 				tl.setProcess(OrderLogProcess.SH.getCode());
 				t.setProcessStatus(ProcessStatus.YPCW_JSZJ.getCode());
-				//设置财务与技术总监通知
-				//为了处理旧数据,后期可以去掉新增
-				List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
-				if (tOrderExamines.isEmpty()){
-					OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
-					List<TOrderExamine> list =new ArrayList<>();
-					list.add(new TOrderExamine(orderNo,dep.getFinanceId(),dep.getFinanceName()));
-					aids.add(dep.getFinanceId());
-					List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.TECH_ADMIN);
-					for (Admin admin : admins) {
-						aids.add(admin.getId());
-						list.add(new TOrderExamine(orderNo,admin.getId(),admin.getName()));
-					}
-					tOrderExamineMapper.insertBatch(list);
-				}else {
-					tOrderExamineMapper.updateStatusByOrderNo(orderNo,null,0);
-					for (TOrderExamine e : tOrderExamines) {
-						aids.add(e.getAid());
-					}
+				//为了防止中间加或者删除复审,在营销管理员审核的时候重新刷新
+				List<TOrderExamine> tOrderExamines1 = addTOrderExamines(t2);
+				for (TOrderExamine e : tOrderExamines1) {
+					aids.add(e.getAid());
 				}
 				Admin admin=adminMapper.selectFinanceAdminByOrderDep(t2.getOrderDep());
 				updateFinanceCount(admin.getId(),t2.getCreateTime());
@@ -1161,11 +1159,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 		}else if (t.getProcessStatus()==ProcessStatus.YPCW_JSZJ.getCode()){
 			if (t.getOrderDep()!=null){
-				OrganizationListOut dep = departmentMapper.selectAllById(t.getOrderDep());
-				str=str.append(dep.getFinanceName()).append(",");
-				List<Admin> admins = adminMapper.getAdminRoleTypeList(AFTConstants.TECH_ADMIN);
-				for (Admin admin : admins) {
-					str=str.append(admin.getName()).append(",");
+				List<TOrderExamine> list = tOrderExamineMapper.selectByOrderNo(t.getOrderNo(),0);
+				for (TOrderExamine e : list) {
+					str=str.append(e.getAname()).append(",");
 				}
 			}
 		}else if (t.getProcessStatus()==ProcessStatus.YPYXY.getCode()){

+ 156 - 28
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -27,6 +27,7 @@ import com.goafanti.order.controller.InputTaskStopLog;
 import com.goafanti.order.enums.*;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderProjectService;
+import com.goafanti.organization.bo.OrganizationListOut;
 import com.goafanti.organization.bo.OutPaymentNode;
 import com.goafanti.techproject.enums.TaskState;
 import org.apache.commons.collections4.map.HashedMap;
@@ -45,6 +46,7 @@ import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Service
 public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> implements OrderProjectService {
@@ -128,6 +130,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	private TaskTimeMapper taskTimeMapper;
 	@Autowired
 	private FinanceCountMapper financeCountMapper;
+	@Autowired
+	private TOrderExamineMapper tOrderExamineMapper;
 
 
 
@@ -1218,7 +1222,28 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	public Pagination<OutMemberList> memberList(InputMemberList in) {
 		HashMap<String, Object> map = new HashMap<>();
 		addParam(in, map);
-		return (Pagination<OutMemberList>) findPage("findMemberList","findMemberCount",map,in.getPageNo(), in.getPageSize());
+		Pagination<OutMemberList> page = (Pagination<OutMemberList>) findPage("findMemberList", "findMemberCount", map, in.getPageNo(), in.getPageSize());
+		List<OutMemberList> list = (List<OutMemberList>) page.getList();
+		if (!list.isEmpty())pushMyExamine(list);
+		return page;
+	}
+
+	private void pushMyExamine(List<OutMemberList> list) {
+		List<Integer> ids =list.stream().map(e -> e.getId()).collect(Collectors.toList());
+		List<TOrderExamine> examineList = tOrderExamineMapper.selectExamineBytidAndAid(ids, TokenManager.getAdminId());
+		list=list.stream().map(e -> {
+					examineList.forEach(ex -> {
+						if(e.getId().equals(ex.getTid())) {
+							if (ex.getStatus() == 1) {
+								e.setMyExamine(1);
+							}
+						}
+					});
+			if (e.getMyExamine()==null){
+				e.setMyExamine(0);
+			}
+			return e;
+		}).collect(Collectors.toList());
 	}
 
 	private void addParam(InputMemberList in, HashMap<String, Object> map) {
@@ -1269,11 +1294,18 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	}
 
 
-
+	/**
+	 * 财务通过走3个逻辑   还有复审 停留不发送邮件   复审也审核了 ,看是否特批,特批走
+	 * @param in
+	 * @return
+	 */
 	@Override
 	public int pushExamineMemberProject(InputMenber in) {
 		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(in.getId());
+		String aid=TokenManager.getAdminId();
 		Integer status=1;
+		//是否财务审核加复审
+		boolean flag=false;
 		TOrderTask nt=new TOrderTask();
 		nt.setId(task.getId());
 		Integer result=0;
@@ -1285,22 +1317,60 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			//0=财务 1=特批
 			if (in.getType()==0){
 				if(task.getProcessStatus()!=1)throw  new BusinessException("审核状态错误");
+				List<TOrderExamine> list = tOrderExamineMapper.selectByTid(task.getId());
+				list.stream().forEach(e ->{
+					if (e.getAid().equals(aid)){
+						TOrderExamine te=new TOrderExamine();
+						te.setId(e.getId());
+						te.setStatus(1);
+						tOrderExamineMapper.updateByPrimaryKeySelective(te);
+					}
+						});
+				OrganizationListOut dep = tOrderNewMapper.selectOrderFinance(task.getOrderNo());
+				int examineType =task.getExamineType();
+
+				if (aid.equals(dep.getFinanceId())){
+					if (examineType==3){
+						examineType=2;
+					} else if (examineType==1) {
+						examineType=4;
+					}
+				}else if (aid.equals(dep.getRetrialFinanceId())){
+					if (examineType==3){
+						examineType=1;
+					}else if (examineType==2){
+						examineType=4;
+					}
+				}
+				nt.setExamineType(examineType);
+				if(examineType==4){
+					flag=true;
+				}
 				if (task.getMemberType()==1||task.getMemberType()==2){
-					nt.setProcessStatus(2);
+					if (flag){
+						nt.setProcessStatus(2);
+					}
 					status=1;
 				}else if (task.getMemberType()==0){
-					nt.setProcessStatus(3);
-					status=3;
-					result=1;
+					if(flag){
+						nt.setProcessStatus(3);
+						status=3;
+						result=1;
+					}else {
+						status=1;
+					}
+
+				}
+				if(flag){
+					subtractionFinanceCountMember(task.getOrderNo(),tTaskMember.getCreateTime(),1);
 				}
-				subtractionFinanceCountMember(task.getOrderNo(),tTaskMember.getCreateTime(),1);
 			}else if(in.getType()==1){
 				if(task.getProcessStatus()!=2)throw  new BusinessException("审核状态错误");
 				nt.setProcessStatus(3);
 				status=3;
 				result=1;
+				flag=true;
 			}
-
 		}else if (in.getResult()==0){
 			status=2;
 			nt.setProcessStatus(4);
@@ -1310,15 +1380,16 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			}else {
 				subtractionFinanceCountMember(task.getOrderNo(),tTaskMember.getCreateTime(),2);
 			}
-
 		}
-		addNoticMember(notice, ono, in.getType(),result);
 		addMemberLog(in.getId(),status,in.getRemarks());
-		if (nt.getProcessStatus()==3){
+		if (nt.getProcessStatus()!=null&&nt.getProcessStatus()==3){
 			tTaskMemberMapper.updateServiceYearBySplitSuper(task.getSplitSuper());
 		}
-
-		return tOrderTaskMapper.updateByPrimaryKeySelective(nt);
+		tOrderTaskMapper.updateByPrimaryKeySelective(nt);
+		if (flag){
+			addNoticMember(notice, ono, in.getType(),result);
+		}
+		return 1;
 	}
 
 	/**
@@ -1356,11 +1427,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		addMemberLog(t.getId(),0,"修改重新发起");
 		t.setProcessStatus(1);
 		TOrderNewBo ono = tOrderNewMapper.getSaleIdByOno(task.getOrderNo());
-		addNoticMember(NoticeStatus.MENBER_START.getCode(), ono, null,0);
+		addNoticMember(NoticeStatus.MENBER_START.getCode(), ono, null,0,task);
 		TTaskMember tTaskMember = tTaskMemberMapper.selectByTid(t.getId());
 		addFinanceCountMember(task.getOrderNo(), tTaskMember.getCreateTime());
+		addMemberExamine(task);
 		return orderNewService.updateOrderTask(t);
 	}
+
+
+
 	@Override
 	public void addMemberLog(Integer id,Integer status ,String remarks){
 		MemberLog log = new MemberLog();
@@ -1400,6 +1475,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		tOrderTask.setMain(0);
 		tOrderTask.setCommodityPrice(new BigDecimal(0));
 		tOrderTaskMapper.insertSelective(tOrderTask);
+
 		TTaskMember t = tTaskMemberMapper.selectByTid(tid);
 		TOrderTaskBo tb=new TOrderTaskBo();
 		BeanUtils.copyProperties(tOrderTask,tb);
@@ -1419,13 +1495,42 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		tTaskMemberMapper.updateServiceYearBySplitSuper(tid);
 		addMemberLog(tOrderTask.getId(),0,"新增会员项目");
 		if(memberType!=null){
-			addNoticMember(NoticeStatus.MENBER_START.getCode(),tOrderTask.getOrderNo(),null,0);
-
+			addMemberExamine(tOrderTask);
+			addNoticMember(NoticeStatus.MENBER_START.getCode(),tOrderTask,null,0);
 			addFinanceCountMember(tOrderTask.getOrderNo(),date);
 		}
 		return tb;
 	}
 
+
+
+	private void addMemberExamine(TOrderTask t) {
+		OrganizationListOut dep = tOrderNewMapper.selectOrderFinance(t.getOrderNo());
+		tOrderExamineMapper.deleteByTid(t.getId());
+		List<TOrderExamine> list=new ArrayList<>();
+		TOrderTask tOrderTask= new TOrderTask();
+		if(!Objects.isNull(dep)){
+			int examineType=0;
+			if (!Objects.isNull(dep.getFinanceId())){
+				list.add(new TOrderExamine(t.getOrderNo(),1,t.getId(),dep.getFinanceId(),dep.getFinanceName()));
+				examineType=1;
+			}
+			if (StringUtils.isNotBlank(dep.getRetrialFinanceId())){
+				list.add(new TOrderExamine(t.getOrderNo(),1,t.getId(),dep.getRetrialFinanceId(),dep.getRetrialFinanceName()));
+				if(examineType==1){
+					examineType=3;
+				}else {
+					examineType=2;
+				}
+			}
+			tOrderTask.setExamineType(examineType);
+		}
+		tOrderTask.setId(t.getId());
+
+		tOrderTaskMapper.updateByPrimaryKeySelective(tOrderTask);
+		tOrderExamineMapper.insertBatch(list);
+	}
+
 	private void addFinanceCountMember(String orderNo, Date date) {
 		Admin admin = adminMapper.selectOrderByFinanace(orderNo);
 		String startTime = DateUtils.formatDate(date, AFTConstants.YYYYMMDD);
@@ -1444,20 +1549,26 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 	}
 
-	public void addNoticMember(Integer type,  String orderNo,Integer shiroType,Integer result) {
-		TOrderNewBo tn = tOrderNewMapper.getSaleIdByOno(orderNo);
-		addNoticMember(NoticeStatus.MENBER_START.getCode(),tn,null,0);
+
+	public void addNoticMember(Integer type,  TOrderTask tOrderTask,Integer shiroType,Integer result) {
+		TOrderNewBo tn = tOrderNewMapper.getSaleIdByOno(tOrderTask.getOrderNo());
+		addNoticMember(type,tn,shiroType,result,tOrderTask);
 	}
 
 	@Override
-	public void addNoticMember(Integer type,  TOrderNewBo b,Integer shiroType,Integer result) {
+	public void addNoticMember(Integer type, TOrderNewBo b, Integer shiroType, Integer result) {
+		addNoticMember(type,b,shiroType,result,null);
+	}
+
+	public void addNoticMember(Integer type,  TOrderNewBo b,Integer shiroType,Integer result,TOrderTask tOrderTask) {
 		StringBuffer sb=new StringBuffer();
+		Date date = new Date();
 		String aid=null;
 		List<Admin>admins=new ArrayList<>();
 		sb.append("客户名称【").append(b.getUserName()).append("】,订单编号【").append(b.getOrderNo()).append("】,");
 		if (type.equals(NoticeStatus.MENBER_START.getCode())){
 			sb=sb.append("发起会员项目,请及时审核");
-			aid=b.getFinanceId();
+			pushTOrderExamineAid(tOrderTask.getId(),admins);
 		}else if (type.equals(NoticeStatus.MENBER_YES.getCode())){
 			sb=sb.append("会员项目审核");
 			if(shiroType==0){
@@ -1480,16 +1591,35 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			aid=b.getSalesmanId();
 		}
 		if (admins!=null&&admins.size()>0){
+			List<EmailBo> list =new ArrayList<>();
+			List<Notice> notices=new ArrayList<>();
 			for (Admin admin : admins) {
-				asyncUtils.addNotic(type,admin.getId(),sb.toString());
-				sendMemberEmail(type,admin.getId(),sb.toString());
+				list.add(sendMemberEmail(type,admin.getId(),sb.toString()));
+				Notice n = new Notice();
+				n.setId(UUID.randomUUID().toString());
+				n.setAid(admin.getAid());
+				n.setNoticeType(type);
+				n.setContent(sb.toString());
+				n.setCreateTime(date);
+				n.setReaded(0);//未读
+				notices.add(n);
 			}
+			asyncUtils.sendList(list);
+			asyncUtils.addNoticeBatch(notices);
 		}else {
 			asyncUtils.addNotic(type,aid,sb.toString());
 			sendMemberEmail(type,aid,sb.toString());
 		}
 	}
 
+	private void pushTOrderExamineAid(Integer tid, List<Admin> admins) {
+		List<TOrderExamine> list = tOrderExamineMapper.selectByTid(tid);
+		for (TOrderExamine e : list) {
+			Admin admin = new Admin();
+			admin.setId(e.getAid());
+			admins.add(admin);
+		}
+	}
 
 
 	/**
@@ -1511,7 +1641,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	 * @param b
 	 */
 	private void pushTOrderNew(TOrderNewBo b) {
-		List<TOrderTaskBo> l = tOrderTaskMapper.selectOrderTask(b.getOrderNo(), 0);
+		List<TOrderTaskBo> l = tOrderTaskMapper.selectOrderTaskAll(b.getOrderNo(), 4);
 		int counts =l.size();
 		int x=0;
 		for (TOrderTaskBo t : l) {
@@ -1537,12 +1667,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	 * @param aid
 	 * @param content
 	 */
-	private void sendMemberEmail(Integer type,String aid,String content) {
+	private EmailBo sendMemberEmail(Integer type,String aid,String content) {
 		Admin admin = adminMapper.selectByPrimaryKey(aid);
 		EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), admin.getEmail(),content);
-		if(com.goafanti.common.utils.StringUtils.isNotBlank(admin.getEmail())) {
-			asyncUtils.send(bo);
-		}
+		return bo;
 	}
 
 	@Override

+ 19 - 1
src/main/java/com/goafanti/organization/bo/OrganizationListOut.java

@@ -38,8 +38,10 @@ public class OrganizationListOut {
 	 */
 	private String abbreviation;
 	private String financeName;
-
 	private String financeId;
+
+	private String retrialFinanceId;
+	private String retrialFinanceName;
 	private Integer province;
 	private Integer hideSign;
 	private Integer workingHoursType;
@@ -47,6 +49,22 @@ public class OrganizationListOut {
 	private Integer lvl;
 	private List<OrganizationListOut> list;
 
+	public String getRetrialFinanceId() {
+		return retrialFinanceId;
+	}
+
+	public void setRetrialFinanceId(String retrialFinanceId) {
+		this.retrialFinanceId = retrialFinanceId;
+	}
+
+	public String getRetrialFinanceName() {
+		return retrialFinanceName;
+	}
+
+	public void setRetrialFinanceName(String retrialFinanceName) {
+		this.retrialFinanceName = retrialFinanceName;
+	}
+
 	public List<OrganizationListOut> getList() {
 		return list;
 	}

+ 14 - 13
src/main/java/com/goafanti/organization/controller/AdminOrganizationController.java

@@ -1,19 +1,18 @@
 package com.goafanti.organization.controller;
 
-import javax.annotation.Resource;
-
-import com.goafanti.common.dao.DepartmentMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.BaseApiController;
+import com.goafanti.common.dao.DepartmentMapper;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.organization.bo.OrganizationListOut;
 import com.goafanti.organization.service.OrganizationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
 
 @RestController
 @RequestMapping("/api/admin/organization")
@@ -90,10 +89,12 @@ public class AdminOrganizationController extends BaseApiController{
 		res.data(organizationService.selectAllById(id));
 		return res;
 	}
-	/**修改信息**/
+	/**
+	 * 修改部门信息
+	 **/
 	@RequestMapping(value = "/updateOrganization" , method = RequestMethod.POST)
-	public Result updateOrganization(String name, String type, String managerId, String superId, String status,Integer province,
-			String remarks,String id,String abbreviation,String financeId,Integer workingHoursType,Integer hideSign,String depNo){
+	public Result updateOrganization(String name, String type, String managerId, String superId, String status,Integer province,String retrialFinanceId,
+									 String remarks,String id,String abbreviation,String financeId,Integer workingHoursType,Integer hideSign,String depNo){
 		Result res = new Result();
 		if(StringUtils.isBlank(name) || StringUtils.isBlank(type)
 				|| StringUtils.isBlank(managerId)|| StringUtils.isBlank(superId)
@@ -109,8 +110,8 @@ public class AdminOrganizationController extends BaseApiController{
 			res.getError().add(buildError("","部门编号已存在"));
 			return res;
 		}
-		int i=organizationService.updateOrganization(name, type, managerId, superId, status, province,remarks,id,
-				abbreviation,financeId,workingHoursType,hideSign,depNo);
+		int i=organizationService.updateOrganization(name, type, managerId, superId, status, province,
+				retrialFinanceId,remarks,id, abbreviation,financeId,workingHoursType,hideSign,depNo);
 		return res.data(i);
 	}
 

+ 3 - 3
src/main/java/com/goafanti/organization/service/OrganizationService.java

@@ -1,12 +1,12 @@
 package com.goafanti.organization.service;
 
-import java.util.List;
-
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.organization.bo.DepOut;
 import com.goafanti.organization.bo.OrganizationListOut;
 
+import java.util.List;
+
 public interface OrganizationService {
 	/**
 	 * 部门组织管理查询
@@ -43,7 +43,7 @@ public interface OrganizationService {
 
 	int deleteById(String id);
 
-	int updateOrganization(String name,String type,String managerId,String superId,String status,Integer province,
+	int updateOrganization(String name,String type,String managerId,String superId,String status,Integer province,String retrialFinanceId,
 			String remarks,String id,String abbreviation,String financeId,Integer workingHoursType,Integer hideSign,String depNo);
 
 	boolean checkDepNo(String depNo,Integer type);

+ 2 - 1
src/main/java/com/goafanti/organization/service/impl/OrganizationServiceImpl.java

@@ -171,7 +171,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		return 1;
 	}
 	@Override
-	public int updateOrganization(String name, String type, String managerId, String superId, String status,Integer province,
+	public int updateOrganization(String name, String type, String managerId, String superId, String status,Integer province,String retrialFinanceId,
 			String remarks,String id,String abbreviation,String financeId,Integer workingHoursType,Integer hideSign,String depNo) {
 		//获取上级编号
 		Department superDep=departmentMapper.selectByPrimaryKey(superId);
@@ -188,6 +188,7 @@ public class OrganizationServiceImpl extends BaseMybatisDao<DepartmentMapper> im
 		dep.setSuperId(superId);
 		dep.setDepNo(depNo);
 		dep.setAbbreviation(abbreviation);
+		dep.setRetrialFinanceId(retrialFinanceId);
 		dep.setFinanceId(financeId);
 		dep.setProvince(province);
 		dep.setHideSign(hideSign);

+ 1 - 7
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -622,13 +622,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 						patentNew.getEndDate());
 				list.add(emailBo);
 			}
-			try {
-				asyncUtils.sendList(list);
-			} catch (MessagingException e) {
-				e.printStackTrace();
-			} catch (UnsupportedEncodingException e) {
-				e.printStackTrace();
-			}
+				asyncUtils.patentSend(list);
 		}
 		if (type == 0 || type == 1) {
 			patentNewMapper.updateBatch(ls);

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

@@ -52,7 +52,7 @@ yxjl_max=100
 amb.maxLvl=6
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.92
+static.host=//static.jishutao.com/1.2.93
 rd.static.host=//static.jishutao.com/RD/1.0.00
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.62

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

@@ -52,7 +52,7 @@ amb.maxLvl=6
 
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.92
+static.host=//static.jishutao.com/1.2.93
 rd.static.host=//static.jishutao.com/RD/1.0.01
 avatar.upload.host=//static.jishutao.com/upload