Browse Source

订单发起新增审核状态-财务与咨询总监

anderx 2 years ago
parent
commit
63d2ea4e07

+ 22 - 0
src/main/java/com/goafanti/common/dao/FinanceCountMapper.java

@@ -0,0 +1,22 @@
+package com.goafanti.common.dao;
+
+import com.goafanti.common.model.FinanceCount;
+import org.apache.ibatis.annotations.Param;
+
+public interface FinanceCountMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(FinanceCount record);
+
+    int insertSelective(FinanceCount record);
+
+    FinanceCount selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(FinanceCount record);
+
+    int updateByPrimaryKey(FinanceCount record);
+
+    int selectByAidAndDates(@Param("aid") String aid, @Param("startTime") String startTime);
+
+    void updateByAidAndDates(FinanceCount selectFinanceCount);
+}

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

@@ -1,5 +1,6 @@
 package com.goafanti.common.dao;
 
+import com.goafanti.common.model.FinanceCount;
 import com.goafanti.common.model.TOrderBillNew;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.order.bo.*;
@@ -86,4 +87,7 @@ public interface TOrderNewMapper {
 
     int selectAidAndDate(@Param("aid") String aid, @Param("startTime") String startTime,
                          @Param("endTime")String endTime);
+
+    FinanceCount selectFinanceCount(@Param("aid") String aid, @Param("startTime") String startTime,
+                                    @Param("endTime")String endTime);
 }

+ 255 - 0
src/main/java/com/goafanti/common/mapper/FinanceCountMapper.xml

@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.FinanceCountMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.FinanceCount">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="aid" jdbcType="VARCHAR" property="aid" />
+    <result column="order_count" jdbcType="INTEGER" property="orderCount" />
+    <result column="order_unaudited_count" jdbcType="INTEGER" property="orderUnauditedCount" />
+    <result column="expense_count" jdbcType="INTEGER" property="expenseCount" />
+    <result column="expense_unaudited_count" jdbcType="INTEGER" property="expenseUnauditedCount" />
+    <result column="invoice_count" jdbcType="INTEGER" property="invoiceCount" />
+    <result column="invoice_unaudited_count" jdbcType="INTEGER" property="invoiceUnauditedCount" />
+    <result column="member_count" jdbcType="INTEGER" property="memberCount" />
+    <result column="member_unaudited_count" jdbcType="INTEGER" property="memberUnauditedCount" />
+    <result column="payment_count" jdbcType="INTEGER" property="paymentCount" />
+    <result column="payment_unaudited_count" jdbcType="INTEGER" property="paymentUnauditedCount" />
+    <result column="public_release_count" jdbcType="INTEGER" property="publicReleaseCount" />
+    <result column="date_time" jdbcType="DATE" property="dateTime" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, aid, order_count, order_unaudited_count, expense_count, expense_unaudited_count,
+    invoice_count, invoice_unaudited_count, member_count, member_unaudited_count, payment_count,
+    payment_unaudited_count, public_release_count, date_time, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from finance_count
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from finance_count
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.FinanceCount" useGeneratedKeys="true">
+    insert into finance_count (aid, order_count, order_unaudited_count,
+      expense_count, expense_unaudited_count, invoice_count,
+      invoice_unaudited_count, member_count, member_unaudited_count,
+      payment_count, payment_unaudited_count, public_release_count,
+      date_time, create_time)
+    values (#{aid,jdbcType=VARCHAR}, #{orderCount,jdbcType=INTEGER}, #{orderUnauditedCount,jdbcType=INTEGER},
+      #{expenseCount,jdbcType=INTEGER}, #{expenseUnauditedCount,jdbcType=INTEGER}, #{invoiceCount,jdbcType=INTEGER},
+      #{invoiceUnauditedCount,jdbcType=INTEGER}, #{memberCount,jdbcType=INTEGER}, #{memberUnauditedCount,jdbcType=INTEGER},
+      #{paymentCount,jdbcType=INTEGER}, #{paymentUnauditedCount,jdbcType=INTEGER}, #{publicReleaseCount,jdbcType=INTEGER},
+      #{dateTime,jdbcType=DATE}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.FinanceCount" useGeneratedKeys="true">
+    insert into finance_count
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="aid != null">
+        aid,
+      </if>
+      <if test="orderCount != null">
+        order_count,
+      </if>
+      <if test="orderUnauditedCount != null">
+        order_unaudited_count,
+      </if>
+      <if test="expenseCount != null">
+        expense_count,
+      </if>
+      <if test="expenseUnauditedCount != null">
+        expense_unaudited_count,
+      </if>
+      <if test="invoiceCount != null">
+        invoice_count,
+      </if>
+      <if test="invoiceUnauditedCount != null">
+        invoice_unaudited_count,
+      </if>
+      <if test="memberCount != null">
+        member_count,
+      </if>
+      <if test="memberUnauditedCount != null">
+        member_unaudited_count,
+      </if>
+      <if test="paymentCount != null">
+        payment_count,
+      </if>
+      <if test="paymentUnauditedCount != null">
+        payment_unaudited_count,
+      </if>
+      <if test="publicReleaseCount != null">
+        public_release_count,
+      </if>
+      <if test="dateTime != null">
+        date_time,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="aid != null">
+        #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="orderCount != null">
+        #{orderCount,jdbcType=INTEGER},
+      </if>
+      <if test="orderUnauditedCount != null">
+        #{orderUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="expenseCount != null">
+        #{expenseCount,jdbcType=INTEGER},
+      </if>
+      <if test="expenseUnauditedCount != null">
+        #{expenseUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="invoiceCount != null">
+        #{invoiceCount,jdbcType=INTEGER},
+      </if>
+      <if test="invoiceUnauditedCount != null">
+        #{invoiceUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="memberCount != null">
+        #{memberCount,jdbcType=INTEGER},
+      </if>
+      <if test="memberUnauditedCount != null">
+        #{memberUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentCount != null">
+        #{paymentCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentUnauditedCount != null">
+        #{paymentUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="publicReleaseCount != null">
+        #{publicReleaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="dateTime != null">
+        #{dateTime,jdbcType=DATE},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.FinanceCount">
+    update finance_count
+    <set>
+      <if test="aid != null">
+        aid = #{aid,jdbcType=VARCHAR},
+      </if>
+      <if test="orderCount != null">
+        order_count = #{orderCount,jdbcType=INTEGER},
+      </if>
+      <if test="orderUnauditedCount != null">
+        order_unaudited_count = #{orderUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="expenseCount != null">
+        expense_count = #{expenseCount,jdbcType=INTEGER},
+      </if>
+      <if test="expenseUnauditedCount != null">
+        expense_unaudited_count = #{expenseUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="invoiceCount != null">
+        invoice_count = #{invoiceCount,jdbcType=INTEGER},
+      </if>
+      <if test="invoiceUnauditedCount != null">
+        invoice_unaudited_count = #{invoiceUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="memberCount != null">
+        member_count = #{memberCount,jdbcType=INTEGER},
+      </if>
+      <if test="memberUnauditedCount != null">
+        member_unaudited_count = #{memberUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentCount != null">
+        payment_count = #{paymentCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentUnauditedCount != null">
+        payment_unaudited_count = #{paymentUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="publicReleaseCount != null">
+        public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="dateTime != null">
+        date_time = #{dateTime,jdbcType=DATE},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.FinanceCount">
+    update finance_count
+    set aid = #{aid,jdbcType=VARCHAR},
+      order_count = #{orderCount,jdbcType=INTEGER},
+      order_unaudited_count = #{orderUnauditedCount,jdbcType=INTEGER},
+      expense_count = #{expenseCount,jdbcType=INTEGER},
+      expense_unaudited_count = #{expenseUnauditedCount,jdbcType=INTEGER},
+      invoice_count = #{invoiceCount,jdbcType=INTEGER},
+      invoice_unaudited_count = #{invoiceUnauditedCount,jdbcType=INTEGER},
+      member_count = #{memberCount,jdbcType=INTEGER},
+      member_unaudited_count = #{memberUnauditedCount,jdbcType=INTEGER},
+      payment_count = #{paymentCount,jdbcType=INTEGER},
+      payment_unaudited_count = #{paymentUnauditedCount,jdbcType=INTEGER},
+      public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
+      date_time = #{dateTime,jdbcType=DATE},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByAidAndDates">
+    update finance_count
+    <set>
+
+      <if test="orderCount != null">
+        order_count = #{orderCount,jdbcType=INTEGER},
+      </if>
+      <if test="orderUnauditedCount != null">
+        order_unaudited_count = #{orderUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="expenseCount != null">
+        expense_count = #{expenseCount,jdbcType=INTEGER},
+      </if>
+      <if test="expenseUnauditedCount != null">
+        expense_unaudited_count = #{expenseUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="invoiceCount != null">
+        invoice_count = #{invoiceCount,jdbcType=INTEGER},
+      </if>
+      <if test="invoiceUnauditedCount != null">
+        invoice_unaudited_count = #{invoiceUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="memberCount != null">
+        member_count = #{memberCount,jdbcType=INTEGER},
+      </if>
+      <if test="memberUnauditedCount != null">
+        member_unaudited_count = #{memberUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentCount != null">
+        payment_count = #{paymentCount,jdbcType=INTEGER},
+      </if>
+      <if test="paymentUnauditedCount != null">
+        payment_unaudited_count = #{paymentUnauditedCount,jdbcType=INTEGER},
+      </if>
+      <if test="publicReleaseCount != null">
+        public_release_count = #{publicReleaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where aid = #{aid,jdbcType=VARCHAR} and date_time = #{dateTime}
+
+  </update>
+
+  <select id="selectByAidAndDates" resultType="java.lang.Integer">
+    select count(*)
+    from finance_count
+    where aid = #{aid} and date_time = #{startTime}
+  </select>
+</mapper>

+ 9 - 0
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -2135,4 +2135,13 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     and salesman_id = #{aid}
     and create_time  BETWEEN #{startTime} and  #{endTime}
   </select>
+    <select id="selectFinanceCount" resultType="com.goafanti.common.model.FinanceCount">
+      select x.aid,x.dates dateTime,count(*)orderCount,sum(if(x.process_status=3,1,0))orderUnauditedCount
+      from (SELECT b.finance_id aid, a.process_status,DATE_FORMAT(a.create_time , '%Y-%m-%d') dates
+            from t_order_new a left join department b on a.order_dep =b.id
+            where a.delete_sign in (0,2,3) and process_status >2
+              and b.finance_id =#{aid}
+              and a.create_time between #{startTime} and #{endTime})x
+      group by x.aid,x.dates
+    </select>
 </mapper>

+ 229 - 0
src/main/java/com/goafanti/common/model/FinanceCount.java

@@ -0,0 +1,229 @@
+package com.goafanti.common.model;
+
+import com.goafanti.common.constant.AFTConstants;
+import com.goafanti.common.utils.DateUtils;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * finance_count
+ * @author
+ */
+public class FinanceCount implements Serializable {
+    private Integer id;
+
+    /**
+     * 管理员编号
+     */
+    private String aid;
+
+    /**
+     * 订单数
+     */
+    private Integer orderCount;
+
+    /**
+     * 订单未审核数
+     */
+    private Integer orderUnauditedCount;
+
+    /**
+     * 报销数
+     */
+    private Integer expenseCount;
+
+    /**
+     * 报销未审核数
+     */
+    private Integer expenseUnauditedCount;
+
+    /**
+     * 开票数
+     */
+    private Integer invoiceCount;
+
+    /**
+     * 开票未审核数
+     */
+    private Integer invoiceUnauditedCount;
+
+    /**
+     * 会员审核数
+     */
+    private Integer memberCount;
+
+    /**
+     * 会员未审核数
+     */
+    private Integer memberUnauditedCount;
+
+    /**
+     * 成本审核数
+     */
+    private Integer paymentCount;
+
+    /**
+     * 成本未审核数
+     */
+    private Integer paymentUnauditedCount;
+
+    /**
+     * 公出数
+     */
+    private Integer publicReleaseCount;
+
+    /**
+     * 日期
+     */
+    private Date dateTime;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public FinanceCount(){
+
+    }
+
+    public static FinanceCount initialization(String aid, String date) {
+        FinanceCount financeCount=new FinanceCount();
+        financeCount.aid=aid;
+        financeCount.orderCount=0;
+        financeCount.orderUnauditedCount=0;
+        financeCount.expenseCount=0;
+        financeCount.expenseUnauditedCount=0;
+        financeCount.invoiceCount=0;
+        financeCount.invoiceUnauditedCount=0;
+        financeCount.memberCount=0;
+        financeCount.memberUnauditedCount=0;
+        financeCount.paymentCount=0;
+        financeCount.paymentUnauditedCount=0;
+        financeCount.publicReleaseCount=0;
+        financeCount.dateTime= DateUtils.StringToDate(date, AFTConstants.YYYYMMDD);
+        return financeCount;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getOrderCount() {
+        return orderCount;
+    }
+
+    public void setOrderCount(Integer orderCount) {
+        this.orderCount = orderCount;
+    }
+
+    public Integer getOrderUnauditedCount() {
+        return orderUnauditedCount;
+    }
+
+    public void setOrderUnauditedCount(Integer orderUnauditedCount) {
+        this.orderUnauditedCount = orderUnauditedCount;
+    }
+
+    public Integer getExpenseCount() {
+        return expenseCount;
+    }
+
+    public void setExpenseCount(Integer expenseCount) {
+        this.expenseCount = expenseCount;
+    }
+
+    public Integer getExpenseUnauditedCount() {
+        return expenseUnauditedCount;
+    }
+
+    public void setExpenseUnauditedCount(Integer expenseUnauditedCount) {
+        this.expenseUnauditedCount = expenseUnauditedCount;
+    }
+
+    public Integer getInvoiceCount() {
+        return invoiceCount;
+    }
+
+    public void setInvoiceCount(Integer invoiceCount) {
+        this.invoiceCount = invoiceCount;
+    }
+
+    public Integer getInvoiceUnauditedCount() {
+        return invoiceUnauditedCount;
+    }
+
+    public void setInvoiceUnauditedCount(Integer invoiceUnauditedCount) {
+        this.invoiceUnauditedCount = invoiceUnauditedCount;
+    }
+
+    public Integer getMemberCount() {
+        return memberCount;
+    }
+
+    public void setMemberCount(Integer memberCount) {
+        this.memberCount = memberCount;
+    }
+
+    public Integer getMemberUnauditedCount() {
+        return memberUnauditedCount;
+    }
+
+    public void setMemberUnauditedCount(Integer memberUnauditedCount) {
+        this.memberUnauditedCount = memberUnauditedCount;
+    }
+
+    public Integer getPaymentCount() {
+        return paymentCount;
+    }
+
+    public void setPaymentCount(Integer paymentCount) {
+        this.paymentCount = paymentCount;
+    }
+
+    public Integer getPaymentUnauditedCount() {
+        return paymentUnauditedCount;
+    }
+
+    public void setPaymentUnauditedCount(Integer paymentUnauditedCount) {
+        this.paymentUnauditedCount = paymentUnauditedCount;
+    }
+
+    public Integer getPublicReleaseCount() {
+        return publicReleaseCount;
+    }
+
+    public void setPublicReleaseCount(Integer publicReleaseCount) {
+        this.publicReleaseCount = publicReleaseCount;
+    }
+
+    public Date getDateTime() {
+        return dateTime;
+    }
+
+    public void setDateTime(Date dateTime) {
+        this.dateTime = dateTime;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

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

@@ -223,4 +223,7 @@ public interface OrderNewService {
 	int updateTag(String orderNo, Integer tag);
 
 	void updateAdminUserCountOrder(String aid,Date transferTime);
+
+
+	void updateFinanceCount(String orderNo, Date createTime);
 }

+ 11 - 6
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -222,6 +222,8 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			pushGeneralSendNoticeAndEmail(aids, NoticeStatus.ORDER_NO.getCode(),order, TokenManager.getAdminId(),t.getApproval());
 		}
 		orderNewService.updateAdminUserCountOrder(t.getSalesmanId(),t.getCreateTime());
+		Admin admin=adminMapper.selectFinanceAdminByOrderDep(t.getOrderDep());
+		orderNewService.updateFinanceCount(admin.getId(),t.getCreateTime());
 		return c;
 	}
 	public void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,TOrderNewBo o,String adminId,Integer approval){
@@ -488,13 +490,13 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 	@Override
 	public int updateFinanceApproval(String orderNo,String remarks) {
 		TOrderNew t=new TOrderNew();
-		TOrderNew new1 =checkDeleteSign(orderNo);
-		if (new1.getProcessStatus()!=3) {
+		TOrderNew use =checkDeleteSign(orderNo);
+		if (use.getProcessStatus()!=3) {
 			throw new BusinessException("订单流程不正确。");
 		}
 		t.setOrderNo(orderNo);
-		t.setApproval(new1.getApproval());
-		if (new1.getBackStatus()==3) {
+		t.setApproval(use.getApproval());
+		if (use.getBackStatus()==3) {
 			t.setBackStatus(0);
 		}
 		//判断是否走入下一个流程
@@ -512,7 +514,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		orderNewService.pushExamineName(t);
 		//如果全部派单完成才需要通知和走下个流程
 		if (flag){
-			pushNoticeAndEmail(t, new1);
+			pushNoticeAndEmail(t, use);
 		}else {
 			List<TOrderExamine> tOrderExamines = tOrderExamineMapper.selectByOrderNo(orderNo);
 			StringBuffer str=new StringBuffer();
@@ -524,7 +526,10 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 			t.setExamineName(str.substring(0,str.length()-1));
 		}
 
-		return tOrderNewMapper.updateByPrimaryKeySelective(t);
+		tOrderNewMapper.updateByPrimaryKeySelective(t);
+		Admin admin = adminMapper.selectFinanceAdminByOrderDep(use.getOrderDep());
+		orderNewService.updateFinanceCount(admin.getId(),use.getCreateTime());
+		return 1;
 	}
 
 	private void pushNoticeAndEmail(TOrderNew t, TOrderNew new1) {

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

@@ -131,6 +131,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	private TOrderHighTechMapper tOrderHighTechMapper;
 	@Autowired
 	private AdminUserCountMapper adminUserCountMapper;
+	@Autowired
+	private FinanceCountMapper financeCountMapper;
 
 
 	@Value(value = "${upload.path}")
@@ -649,12 +651,29 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				newAUC.setSignCount(selectAUC.getSignCount());
 				newAUC.setOrderCount(orderCount);
 			}
-
 			adminUserCountMapper.updateByPrimaryKeySelective(newAUC);
 		}
 
 	}
 
+	@Override
+	public void updateFinanceCount(String aid, Date createTime){
+		String startTime= DateUtils.formatDate(createTime,AFTConstants.YYYYMMDD);
+		String endTime=startTime+" 23:59:59";
+		FinanceCount financeCount= FinanceCount.initialization(aid,startTime);
+		FinanceCount selectFinanceCount=tOrderNewMapper.selectFinanceCount(aid,startTime,endTime);
+		if(selectFinanceCount!=null){
+			financeCount.setOrderCount(selectFinanceCount.getOrderCount());
+			financeCount.setOrderUnauditedCount(selectFinanceCount.getOrderUnauditedCount());
+			int i = financeCountMapper.selectByAidAndDates(aid, startTime);
+			if (i==0){
+				financeCountMapper.insertSelective(financeCount);
+			}else {
+				financeCountMapper.updateByAidAndDates(selectFinanceCount);
+			}
+		}
+	}
+
 	private void updateOrderMid(TOrderNew t) {
 		TOrderMid tm=tOrderMidMapper.selectByOrderNo(t.getOrderNo());
 		Admin admin=adminMapper.selectFinanceAdminByOrderDep(t.getOrderDep());
@@ -1120,6 +1139,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(t2.getOrderNo());
 		pushGeneralSendNoticeAndEmail(aids, type,order, TokenManager.getAdminId(),t2.getApproval());
 		updateAdminUserCountOrder(t2.getSalesmanId(),t2.getCreateTime());
+		Admin admin=adminMapper.selectFinanceAdminByOrderDep(t2.getOrderDep());
+		updateFinanceCount(admin.getId(),t2.getCreateTime());
 		return 1;
 	}
 

+ 0 - 3
src/main/java/com/goafanti/user/service/impl/UserFollowServiceImpl.java

@@ -13,11 +13,8 @@ import com.goafanti.user.bo.outFollowStatisticsList;
 import com.goafanti.user.bo.outProvinceFollowStatistic;
 import com.goafanti.user.bo.outUserFollowList;
 import com.goafanti.user.service.UserFollowService;
-import jdk.nashorn.internal.parser.Token;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import org.terracotta.offheapstore.HashingMap;
 
 import java.util.ArrayList;
 import java.util.HashMap;