Преглед изворни кода

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

anderx пре 1 година
родитељ
комит
f821a37f76
27 измењених фајлова са 941 додато и 574 уклоњено
  1. 3 3
      src/main/java/com/goafanti/common/dao/PublicReleaseMapper.java
  2. 6 78
      src/main/java/com/goafanti/common/dao/TTaskLogMapper.java
  3. 4 0
      src/main/java/com/goafanti/common/dao/UserNamesMapper.java
  4. 39 0
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml
  5. 105 289
      src/main/java/com/goafanti/common/mapper/TTaskLogMapper.xml
  6. 7 0
      src/main/java/com/goafanti/common/mapper/UserNamesMapper.xml
  7. 128 169
      src/main/java/com/goafanti/common/model/TTaskLog.java
  8. 1 0
      src/main/java/com/goafanti/core/cache/serializer/FastJsonRedisSerializer.java
  9. 38 0
      src/main/java/com/goafanti/customer/bo/InputExcelUser.java
  10. 26 0
      src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java
  11. 3 0
      src/main/java/com/goafanti/customer/service/CustomerService.java
  12. 47 1
      src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java
  13. 7 7
      src/main/java/com/goafanti/expenseAccount/bo/ExpenseCountsBo.java
  14. 83 5
      src/main/java/com/goafanti/expenseAccount/bo/ExpenseCountsOrder.java
  15. 13 7
      src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java
  16. 10 1
      src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseCountsServiceImpl.java
  17. 28 0
      src/main/java/com/goafanti/order/bo/OutTTaskLog.java
  18. 10 0
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  19. 1 0
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  20. 5 0
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  21. 49 0
      src/main/java/com/goafanti/weChat/bo/InputreleaseAndExpenseCount.java
  22. 252 0
      src/main/java/com/goafanti/weChat/bo/releaseAndExpenseCountOut.java
  23. 25 0
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java
  24. 4 0
      src/main/java/com/goafanti/weChat/service/PublicReleaseService.java
  25. 38 6
      src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java
  26. 7 7
      src/main/resources/props/config_local.properties
  27. 2 1
      src/main/resources/props/config_test.properties

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

@@ -3,9 +3,7 @@ package com.goafanti.common.dao;
 import com.goafanti.admin.bo.OutFinanceCount;
 import com.goafanti.common.model.OutPublicReleaseCount;
 import com.goafanti.common.model.PublicRelease;
-import com.goafanti.weChat.bo.OutPublicRelease;
-import com.goafanti.weChat.bo.OutPublicReleaseAndDetails;
-import com.goafanti.weChat.bo.OutPublicReleaseList;
+import com.goafanti.weChat.bo.*;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Date;
@@ -63,4 +61,6 @@ public interface PublicReleaseMapper {
     OutPublicReleaseList selectOutListBoById(Integer id);
 
     List<PublicRelease>  selectAll();
+
+    List<releaseAndExpenseCountOut > releaseAndExpenseCount(InputreleaseAndExpenseCount in);
 }

+ 6 - 78
src/main/java/com/goafanti/common/dao/TTaskLogMapper.java

@@ -1,98 +1,26 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TTaskLog;
-import com.goafanti.common.model.TTaskLogExample;
-import java.util.List;
+import com.goafanti.order.bo.OutTTaskLog;
 import org.apache.ibatis.annotations.Param;
 
-public interface TTaskLogMapper {
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    long countByExample(TTaskLogExample example);
+import java.util.List;
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    int deleteByExample(TTaskLogExample example);
+public interface TTaskLogMapper {
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
     int deleteByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
     int insert(TTaskLog record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
     int insertSelective(TTaskLog record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    List<TTaskLog> selectByExample(TTaskLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
     TTaskLog selectByPrimaryKey(Integer id);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    int updateByExampleSelective(@Param("record") TTaskLog record, @Param("example") TTaskLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    int updateByExample(@Param("record") TTaskLog record, @Param("example") TTaskLogExample example);
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
     int updateByPrimaryKeySelective(TTaskLog record);
 
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method corresponds to the database table t_task_log
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
     int updateByPrimaryKey(TTaskLog record);
 
 	void updateDimissionTransfer(@Param("aid")String aid, @Param("transferId")String transferId);
-}
+
+    List<OutTTaskLog> selectByTid(Integer id);
+}

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

@@ -1,6 +1,7 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.UserNames;
+import com.goafanti.customer.bo.InputExcelUser;
 import com.goafanti.customer.bo.UserNamesListBo;
 import com.goafanti.user.bo.InputUserChannel;
 import org.apache.ibatis.annotations.Param;
@@ -63,4 +64,7 @@ public interface UserNamesMapper {
     List<UserNamesListBo> checkUserName( @Param("userName")String userName);
 
 	void insertBatch(List<InputUserChannel> list);
+
+
+    List<UserNamesListBo> selectUserNameList(List<InputExcelUser> list2);
 }

+ 39 - 0
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -749,5 +749,44 @@
         from public_release
         where  status in  (1,2)
     </select>
+    <select id="releaseAndExpenseCount" resultType="com.goafanti.weChat.bo.releaseAndExpenseCountOut">
+        select
+            a.order_no orderNo,a.contract_no contractNo,b.buyer_name buyerName,b.salesman_name salesmanName,b.dep_name depName,
+            toc.max_duration maxDuration ,toc.actual_duration actualDuration ,
+            toc.exceed_duration exceedDuration, a.total_amount totalAmount,a.settlement_amount settlementAmount,b.bid_type bidType,
+            c.expenseCount,c.peopleCount,c.notExamine,c.rejectCount,d.paymentAmount,c.days,c.amount expenseAmount
+        from t_order_new a left join t_order_mid b on a.order_no =b.order_no
+        left join t_order_public_release_count toc on a.order_no =toc.order_no
+        left join (select a.order_no,a.expenseCount,b.peopleCount,c.notExamine, c.rejectCount,a.days,a.amount
+                from (select a.order_no,count(a.id)expenseCount,sum(a.amount) amount,sum(ROUND(a.duration/7.5) )days
+                    from expense_account a where a.target_type = 1 and a.status=2 group by order_no )a
+                    left join (select order_no,count(aid)peopleCount from (select a.order_no,aid from expense_account a
+                    where a.target_type = 1 and a.status=2 group by order_no,aid )a group by order_no)b on a.order_no=b.order_no
+                    left join (select a.order_no,sum(notExamine)notExamine,sum(rejectCount)rejectCount
+                    from (select a.order_no,status ,IF(status=1,1,0)notExamine,IF(status=3,1,0)rejectCount
+                          from expense_account a where a.target_type=1 )a group by order_no)c on a.order_no=c.order_no )c on a.order_no =c.order_no
+        left join (    select a.order_no ,sum(c.payment_amount) paymentAmount
+            from t_order_new a left join t_order_task b on a.order_no =b.order_no left join  t_order_payment c on b.id =c.tid
+            where c.status =3       group by order_no )d on a.order_no=d.order_no
+        where a.delete_sign in (0,2) and a.process_status >0
+          <if test="contractNo != null">
+          and a.contract_no = #{contractNo}
+          </if>
+          <if test="buyerName != null">
+              and b.buyer_name like  concat('%',#{buyerName},'%')
+          </if>
+          <if test="depId != null">
+              and a.order_dep = #{depId}
+          </if>
+          <if test="aid != null">
+          and a.salesman_id = #{aid}
+          </if>
+        <if test="allStatus == 1">
+            and toc.exceed_duration =0
+        </if>
+        <if test="allStatus == 2">
+            and toc.exceed_duration >0
+        </if>
+    </select>
 </mapper>
 

+ 105 - 289
src/main/java/com/goafanti/common/mapper/TTaskLogMapper.xml

@@ -1,291 +1,107 @@
 <?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">
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TTaskLogMapper">
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    <id column="id" jdbcType="INTEGER" property="id" />
-    <result column="task_id" jdbcType="INTEGER" property="taskId" />
-    <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
-    <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
-    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-  </resultMap>
-  <sql id="Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    <where>
-      <foreach collection="oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Update_By_Example_Where_Clause">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    <where>
-      <foreach collection="example.oredCriteria" item="criteria" separator="or">
-        <if test="criteria.valid">
-          <trim prefix="(" prefixOverrides="and" suffix=")">
-            <foreach collection="criteria.criteria" item="criterion">
-              <choose>
-                <when test="criterion.noValue">
-                  and ${criterion.condition}
-                </when>
-                <when test="criterion.singleValue">
-                  and ${criterion.condition} #{criterion.value}
-                </when>
-                <when test="criterion.betweenValue">
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                </when>
-                <when test="criterion.listValue">
-                  and ${criterion.condition}
-                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
-                    #{listItem}
-                  </foreach>
-                </when>
-              </choose>
-            </foreach>
-          </trim>
-        </if>
-      </foreach>
-    </where>
-  </sql>
-  <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    id, task_id, task_allocator, task_receiver, create_time
-  </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TTaskLogExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from t_task_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-    <if test="orderByClause != null">
-      order by ${orderByClause}
-    </if>
-  </select>
-  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    select 
-    <include refid="Base_Column_List" />
-    from t_task_log
-    where id = #{id,jdbcType=INTEGER}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    delete from t_task_log
-    where id = #{id,jdbcType=INTEGER}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TTaskLogExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    delete from t_task_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.TTaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    insert into t_task_log (id, task_id, task_allocator, 
-      task_receiver, create_time)
-    values (#{id,jdbcType=INTEGER}, #{taskId,jdbcType=INTEGER}, #{taskAllocator,jdbcType=VARCHAR}, 
-      #{taskReceiver,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    insert into t_task_log
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="taskId != null">
-        task_id,
-      </if>
-      <if test="taskAllocator != null">
-        task_allocator,
-      </if>
-      <if test="taskReceiver != null">
-        task_receiver,
-      </if>
-      <if test="createTime != null">
-        create_time,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=INTEGER},
-      </if>
-      <if test="taskId != null">
-        #{taskId,jdbcType=INTEGER},
-      </if>
-      <if test="taskAllocator != null">
-        #{taskAllocator,jdbcType=VARCHAR},
-      </if>
-      <if test="taskReceiver != null">
-        #{taskReceiver,jdbcType=VARCHAR},
-      </if>
-      <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TTaskLogExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    select count(*) from t_task_log
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    update t_task_log
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
-      </if>
-      <if test="record.taskId != null">
-        task_id = #{record.taskId,jdbcType=INTEGER},
-      </if>
-      <if test="record.taskAllocator != null">
-        task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
-      </if>
-      <if test="record.taskReceiver != null">
-        task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
-      </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      </if>
-    </set>
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByExample" parameterType="map">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    update t_task_log
-    set id = #{record.id,jdbcType=INTEGER},
-      task_id = #{record.taskId,jdbcType=INTEGER},
-      task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
-      task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    update t_task_log
-    <set>
-      <if test="taskId != null">
-        task_id = #{taskId,jdbcType=INTEGER},
-      </if>
-      <if test="taskAllocator != null">
-        task_allocator = #{taskAllocator,jdbcType=VARCHAR},
-      </if>
-      <if test="taskReceiver != null">
-        task_receiver = #{taskReceiver,jdbcType=VARCHAR},
-      </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.TTaskLog">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Tue Dec 04 15:28:04 CST 2018.
-    -->
-    update t_task_log
-    set task_id = #{taskId,jdbcType=INTEGER},
-      task_allocator = #{taskAllocator,jdbcType=VARCHAR},
-      task_receiver = #{taskReceiver,jdbcType=VARCHAR},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
-    where id = #{id,jdbcType=INTEGER}
-  </update>
-  <update id="updateDimissionTransfer" parameterType="java.lang.String">
-    update t_task_log set 
-      task_receiver = #{transferId,jdbcType=VARCHAR}
-    where task_receiver = #{aid,jdbcType=VARCHAR}
-  </update>
-</mapper>
+
+    <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskLog">
+            <id property="id" column="id" jdbcType="INTEGER"/>
+            <result property="taskId" column="task_id" jdbcType="INTEGER"/>
+            <result property="taskAllocator" column="task_allocator" jdbcType="VARCHAR"/>
+            <result property="taskReceiver" column="task_receiver" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="status" column="status" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,task_id,task_allocator,
+        task_receiver,create_time,status
+    </sql>
+
+    <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from t_task_log
+        where  id = #{id,jdbcType=INTEGER} 
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from t_task_log
+        where  id = #{id,jdbcType=INTEGER} 
+    </delete>
+    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskLog" useGeneratedKeys="true">
+        insert into t_task_log
+        ( id,task_id,task_allocator
+        ,task_receiver,create_time,status
+        )
+        values (#{id,jdbcType=INTEGER},#{taskId,jdbcType=INTEGER},#{taskAllocator,jdbcType=VARCHAR}
+        ,#{taskReceiver,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{status,jdbcType=INTEGER}
+        )
+    </insert>
+    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskLog" useGeneratedKeys="true">
+        insert into t_task_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="taskId != null">task_id,</if>
+                <if test="taskAllocator != null">task_allocator,</if>
+                <if test="taskReceiver != null">task_receiver,</if>
+                <if test="createTime != null">create_time,</if>
+                <if test="status != null">status,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id,jdbcType=INTEGER},</if>
+                <if test="taskId != null">#{taskId,jdbcType=INTEGER},</if>
+                <if test="taskAllocator != null">#{taskAllocator,jdbcType=VARCHAR},</if>
+                <if test="taskReceiver != null">#{taskReceiver,jdbcType=VARCHAR},</if>
+                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
+                <if test="status != null">#{status,jdbcType=INTEGER},</if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskLog">
+        update t_task_log
+        <set>
+                <if test="taskId != null">
+                    task_id = #{taskId,jdbcType=INTEGER},
+                </if>
+                <if test="taskAllocator != null">
+                    task_allocator = #{taskAllocator,jdbcType=VARCHAR},
+                </if>
+                <if test="taskReceiver != null">
+                    task_receiver = #{taskReceiver,jdbcType=VARCHAR},
+                </if>
+                <if test="createTime != null">
+                    create_time = #{createTime,jdbcType=TIMESTAMP},
+                </if>
+                <if test="status != null">
+                    status = #{status,jdbcType=INTEGER},
+                </if>
+        </set>
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+    <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskLog">
+        update t_task_log
+        set 
+            task_id =  #{taskId,jdbcType=INTEGER},
+            task_allocator =  #{taskAllocator,jdbcType=VARCHAR},
+            task_receiver =  #{taskReceiver,jdbcType=VARCHAR},
+            create_time =  #{createTime,jdbcType=TIMESTAMP},
+            status =  #{status,jdbcType=INTEGER}
+        where   id = #{id,jdbcType=INTEGER} 
+    </update>
+
+
+    <update id="updateDimissionTransfer" parameterType="java.lang.String">
+        update t_task_log set
+            task_receiver = #{transferId,jdbcType=VARCHAR}
+        where task_receiver = #{aid,jdbcType=VARCHAR}
+    </update>
+
+
+    <select id="selectByTid" resultType="com.goafanti.order.bo.OutTTaskLog">
+        select a.id,b.name taskAllocatorName,c.name taskReceiverName,a.create_time createTime
+        from t_task_log a
+                 left join admin b on a.task_allocator =b.id
+                 left join admin c on a.task_receiver =c.id
+        where task_id = #{id}
+    </select>
+</mapper>

+ 7 - 0
src/main/java/com/goafanti/common/mapper/UserNamesMapper.xml

@@ -152,4 +152,11 @@
 		(#{item.uid,jdbcType=VARCHAR},#{item.userName})
     </foreach>
   </insert>
+  <select id="selectUserNameList" resultType="com.goafanti.customer.bo.UserNamesListBo">
+    select id,uid,aid,name
+    from user_names where name in
+    <foreach item="item" index="index" collection="list" separator="," open="(" close=")">
+        (#{item.name})
+    </foreach>
+  </select>
 </mapper>

+ 128 - 169
src/main/java/com/goafanti/common/model/TTaskLog.java

@@ -1,170 +1,129 @@
-package com.goafanti.common.model;
-
-import java.util.Date;
-
-public class TTaskLog {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column t_task_log.id
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    private Integer id;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column t_task_log.task_id
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    private Integer taskId;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column t_task_log.task_allocator
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    private String taskAllocator;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column t_task_log.task_receiver
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    private String taskReceiver;
-
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column t_task_log.create_time
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    private Date createTime;
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column t_task_log.id
-     *
-     * @return the value of t_task_log.id
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public Integer getId() {
-        return id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column t_task_log.id
-     *
-     * @param id the value for t_task_log.id
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column t_task_log.task_id
-     *
-     * @return the value of t_task_log.task_id
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public Integer getTaskId() {
-        return taskId;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column t_task_log.task_id
-     *
-     * @param taskId the value for t_task_log.task_id
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public void setTaskId(Integer taskId) {
-        this.taskId = taskId;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column t_task_log.task_allocator
-     *
-     * @return the value of t_task_log.task_allocator
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public String getTaskAllocator() {
-        return taskAllocator;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column t_task_log.task_allocator
-     *
-     * @param taskAllocator the value for t_task_log.task_allocator
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public void setTaskAllocator(String taskAllocator) {
-        this.taskAllocator = taskAllocator;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column t_task_log.task_receiver
-     *
-     * @return the value of t_task_log.task_receiver
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public String getTaskReceiver() {
-        return taskReceiver;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column t_task_log.task_receiver
-     *
-     * @param taskReceiver the value for t_task_log.task_receiver
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public void setTaskReceiver(String taskReceiver) {
-        this.taskReceiver = taskReceiver;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method returns the value of the database column t_task_log.create_time
-     *
-     * @return the value of t_task_log.create_time
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public Date getCreateTime() {
-        return createTime;
-    }
-
-    /**
-     * This method was generated by MyBatis Generator.
-     * This method sets the value of the database column t_task_log.create_time
-     *
-     * @param createTime the value for t_task_log.create_time
-     *
-     * @mbg.generated Tue Dec 04 15:28:04 CST 2018
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
+package com.goafanti.common.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 项目任务日志
+ * @TableName t_task_log
+ */
+public class TTaskLog implements Serializable {
+    /**
+     * 流转id
+     */
+    private Integer id;
+
+    /**
+     * 任务id
+     */
+    private Integer taskId;
+
+    /**
+     * 分派人
+     */
+    private String taskAllocator;
+
+    /**
+     * 归属人
+     */
+    private String taskReceiver;
+
+    /**
+     * 分配时间
+     */
+    private Date createTime;
+
+    /**
+     * 状态 0=咨询师管理员派单,1=咨询师经理派单,2=咨询师经理转交,3=咨询师转交,4=咨询师回退
+     */
+    private Integer status;
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 流转id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 流转id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 任务id
+     */
+    public Integer getTaskId() {
+        return taskId;
+    }
+
+    /**
+     * 任务id
+     */
+    public void setTaskId(Integer taskId) {
+        this.taskId = taskId;
+    }
+
+    /**
+     * 分派人
+     */
+    public String getTaskAllocator() {
+        return taskAllocator;
+    }
+
+    /**
+     * 分派人
+     */
+    public void setTaskAllocator(String taskAllocator) {
+        this.taskAllocator = taskAllocator;
+    }
+
+    /**
+     * 归属人
+     */
+    public String getTaskReceiver() {
+        return taskReceiver;
+    }
+
+    /**
+     * 归属人
+     */
+    public void setTaskReceiver(String taskReceiver) {
+        this.taskReceiver = taskReceiver;
+    }
+
+    /**
+     * 分配时间
+     */
+    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 分配时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 状态 0=咨询师管理员派单,1=咨询师经理派单,2=咨询师经理转交,3=咨询师转交,4=咨询师回退
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 0=咨询师管理员派单,1=咨询师经理派单,2=咨询师经理转交,3=咨询师转交,4=咨询师回退
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
 }

+ 1 - 0
src/main/java/com/goafanti/core/cache/serializer/FastJsonRedisSerializer.java

@@ -32,6 +32,7 @@ public class FastJsonRedisSerializer implements RedisSerializer<Object> {
 		pc.addAccept("com.goafanti.common.bo.OutPoverty");
 		pc.addAccept("com.goafanti.common.bo.OutPovertyFlag");
 		pc.addAccept("com.goafanti.expenseAccount.bo.ExpenseCountsBo");
+		pc.addAccept("com.goafanti.weChat.bo.releaseAndExpenseCountOut");
 
 	}
 

+ 38 - 0
src/main/java/com/goafanti/customer/bo/InputExcelUser.java

@@ -0,0 +1,38 @@
+package com.goafanti.customer.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+public class InputExcelUser {
+
+    @Excel(name = "客户名称")
+    private String name;
+    @Excel(name = "联系方式")
+    private String phone;
+
+    @Excel(name = "类型",readConverterExp = "0=无,1=已存在")
+    private Integer type;
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+}

+ 26 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -25,7 +25,9 @@ import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -1586,4 +1588,28 @@ public class AdminCustomerApiController extends BaseApiController{
 	public Result selectUserLastSignExport (InputSelectUserLastSignBo in){
 		return customerService.selectUserLastSignExport(in);
 	}
+
+
+	/**
+	 * 	Excel批量导入
+	 *
+	 * @return
+	 */
+	@RequestMapping(value = "/importExcel" , method = RequestMethod.POST)
+	public Result importExcel(@RequestParam(value = "file", required = false) MultipartFile file) {
+		Result res=new Result();
+		//判断文件是否存在
+		if(null == file){
+			res.getError().add(buildError("文件不存在!","文件不存在!"));
+			return res;
+		}
+		String fileName = file.getOriginalFilename();
+		if (!fileName.matches("^.+\\.(?i)(xls)$") && !fileName.matches("^.+\\.(?i)(xlsx)$")) {
+			res.getError().add(buildError("格式不正确","格式不正确"));
+			return res;
+		}
+//		res.data(rdService.batchList(file));
+		res.data(customerService.importExcel(file));
+		return res;
+	}
 }

+ 3 - 0
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -10,6 +10,7 @@ import com.goafanti.common.model.User;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.customer.bo.*;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.text.ParseException;
 import java.util.Date;
@@ -584,4 +585,6 @@ public interface CustomerService {
 	void updateAdminUserCountByAid(String aid);
 
 	AdminUserCount getAdminUserCount(String aid, String startTime);
+
+    Object importExcel(MultipartFile file);
 }

+ 47 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -28,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.socket.TextMessage;
 
 import javax.annotation.Resource;
@@ -534,7 +535,9 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return selectAUC;
 	}
 
-	private void checkUserName(InputAddCustomer in) {
+
+
+    private void checkUserName(InputAddCustomer in) {
 		if (!userMapper.checkUser("", in.getName(), "", in.getType(), null, null).isEmpty())
 			throw new BusinessException(new Error(ErrorConstants.CUSTOMER_ALREADY_EXIST, in.getName(), ""));
 		String name2=null;
@@ -3046,6 +3049,49 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		}
 		return param;
 	}
+	@Override
+	public Object importExcel(MultipartFile file) {
+		NewExcelUtil<InputExcelUser> newExcelUtil=new NewExcelUtil<>(InputExcelUser.class);
+		List<InputExcelUser> list = null;
+		try {
+			list = newExcelUtil.importExcel(file.getInputStream(),0);
+		} catch (Exception e) {
+			throw new BusinessException(e.getMessage());
+		}
+		return pushUserName(list);
+	}
+
+	private Object pushUserName(List<InputExcelUser> list) {
+		List<InputExcelUser> res=new ArrayList<>();
+		List<InputExcelUser> list2=new ArrayList<>();
+		int i = 0;
+		for (InputExcelUser e : list) {
+			i++;
+			list2.add(e);
+			if (list2.size()==100||i==list.size()){
+				List<UserNamesListBo> userNamesListBos = userNamesMapper.selectUserNameList(list2);
+				if (!userNamesListBos.isEmpty()){
+					for (InputExcelUser excelUser : list2) {
+						for (UserNamesListBo ex2 : userNamesListBos) {
+							if (ex2.getName().equals(excelUser.getName())){
+								excelUser.setType(1);
+								break;
+							}
+						}
+						if(excelUser.getType()==null){
+							excelUser.setType(0);
+						}
+						if (excelUser.getType()==1){
+							res.add(excelUser);
+						}
 
+					}
+				}
+				list2.clear();
+			}
+
+		}
+		return res;
+	}
 
 }

+ 7 - 7
src/main/java/com/goafanti/expenseAccount/bo/ExpenseCountsBo.java

@@ -12,7 +12,7 @@ public class ExpenseCountsBo {
 
     private String depName;
 
-    private Double maxDuration ,actualDuration ,exceedDuration;
+    private String  maxDuration ,actualDuration ,exceedDuration;
     private BigDecimal totalAmount;
     private BigDecimal settlementAmount;
     private BigDecimal expenseAmount;
@@ -33,27 +33,27 @@ public class ExpenseCountsBo {
         this.bidType = bidType;
     }
 
-    public Double getMaxDuration() {
+    public String getMaxDuration() {
         return maxDuration;
     }
 
-    public void setMaxDuration(Double maxDuration) {
+    public void setMaxDuration(String maxDuration) {
         this.maxDuration = maxDuration;
     }
 
-    public Double getActualDuration() {
+    public String getActualDuration() {
         return actualDuration;
     }
 
-    public void setActualDuration(Double actualDuration) {
+    public void setActualDuration(String actualDuration) {
         this.actualDuration = actualDuration;
     }
 
-    public Double getExceedDuration() {
+    public String getExceedDuration() {
         return exceedDuration;
     }
 
-    public void setExceedDuration(Double exceedDuration) {
+    public void setExceedDuration(String exceedDuration) {
         this.exceedDuration = exceedDuration;
     }
 

+ 83 - 5
src/main/java/com/goafanti/expenseAccount/bo/ExpenseCountsOrder.java

@@ -12,14 +12,20 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
     private String contractNo;
     @Excel(name = "客户名称")
     private String buyerName;
-
-    @Excel(name = "合同金额")
+    
+    @Excel(name = "应公出工时")
+    private String  maxDuration;
+    @Excel(name = "实际公出工时")
+    private String actualDuration;
+    @Excel(name = "超出工时")
+    private String exceedDuration;
+    @Excel(name = "合同金额",scale = 6)
     private BigDecimal totalAmount;
-    @Excel(name = "已收款")
+    @Excel(name = "已收款",scale = 6)
     private BigDecimal settlementAmount;
-    @Excel(name = "报销总额")
+    @Excel(name = "报销总额",scale = 6)
     private BigDecimal expenseAmount;
-    @Excel(name = "已付成本")
+    @Excel(name = "已付成本",scale = 6)
     private BigDecimal paymentAmount;
 
     @Excel(name = "报销人数")
@@ -32,6 +38,7 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
     private Integer notExamine;
     @Excel(name = "驳回单数")
     private Integer rejectCount;
+    private Integer exceedType;
 
     @Override
     public String getOrderNo() {
@@ -64,6 +71,45 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
     }
 
     @Override
+    public String getMaxDuration() {
+        if(maxDuration==null){
+            maxDuration="0";
+        }
+        return maxDuration;
+    }
+
+    @Override
+    public void setMaxDuration(String maxDuration) {
+        this.maxDuration = maxDuration;
+    }
+
+    @Override
+    public String getActualDuration() {
+        if(actualDuration==null){
+            actualDuration="0";
+        }
+        return actualDuration;
+    }
+
+    @Override
+    public void setActualDuration(String actualDuration) {
+        this.actualDuration = actualDuration;
+    }
+
+    @Override
+    public String getExceedDuration() {
+        if(exceedDuration==null){
+            exceedDuration="0";
+        }
+        return exceedDuration;
+    }
+
+    @Override
+    public void setExceedDuration(String exceedDuration) {
+        this.exceedDuration = exceedDuration;
+    }
+
+    @Override
     public BigDecimal getTotalAmount() {
         return totalAmount;
     }
@@ -85,6 +131,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public BigDecimal getExpenseAmount() {
+        if(expenseAmount==null){
+            return BigDecimal.ZERO;
+        }
         return expenseAmount;
     }
 
@@ -95,6 +144,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public BigDecimal getPaymentAmount() {
+        if(paymentAmount==null){
+            paymentAmount=BigDecimal.ZERO;
+        }
         return paymentAmount;
     }
 
@@ -105,6 +157,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public Integer getPeopleCount() {
+        if(peopleCount==null){
+            peopleCount=0;
+        }
         return peopleCount;
     }
 
@@ -115,6 +170,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public Integer getDays() {
+        if(days==null){
+            days=0;
+        }
         return days;
     }
 
@@ -125,6 +183,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public Integer getExpenseCount() {
+        if(expenseCount==null){
+            expenseCount=0;
+        }
         return expenseCount;
     }
 
@@ -135,6 +196,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public Integer getNotExamine() {
+        if(notExamine==null){
+            notExamine=0;
+        }
         return notExamine;
     }
 
@@ -145,6 +209,9 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
 
     @Override
     public Integer getRejectCount() {
+        if(rejectCount==null){
+            rejectCount=0;
+        }
         return rejectCount;
     }
 
@@ -152,4 +219,15 @@ public class ExpenseCountsOrder extends ExpenseCountsBo{
     public void setRejectCount(Integer rejectCount) {
         this.rejectCount = rejectCount;
     }
+
+    public Integer getExceedType() {
+        if(exceedType==null){
+            exceedType=0;
+        }
+        return exceedType;
+    }
+
+    public void setExceedType(Integer exceedType) {
+        this.exceedType = exceedType;
+    }
 }

+ 13 - 7
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -1415,13 +1415,7 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
                 TOrderPublicReleaseCount out = tOrderPublicReleaseCountMapper.selectByOrderNo(e.getOrderNo());
                 List<ExpenseAccount> expenseAccounts = expenseAccountMapper.selectByOrderNo(e.getOrderNo());
                 BigDecimal reduce = expenseAccounts.stream().map(ExpenseAccount::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-                String str = e.getBuyerName() + e.getContractNo() +
-                        ":应公出" + out.getMaxDuration() + "小时" +
-                        ",已" + out.getPeopleCount() + "人公出," +
-                        out.getFrequency() + "次" +
-                        "," + out.getActualDuration() + "小时" +
-                        ",超过" + out.getExceedDuration() + "小时" +
-                        ",已报销" + reduce.stripTrailingZeros().toPlainString() + "元";
+                String str = getString(e, out, reduce);
                 e.setCountStr(str);
             }
         }
@@ -1431,6 +1425,18 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
 
     }
 
+    private String getString(SonExpenseAccount e, TOrderPublicReleaseCount out, BigDecimal reduce) {
+        String maxString=":应公出" + out.getMaxDuration() + "小时";
+        if (out.getMaxDuration().equals(-1d))maxString=":不限制公出小时";
+        String str = e.getBuyerName() + e.getContractNo() +
+                maxString +
+                ",已" + out.getPeopleCount() + "人公出," +
+                out.getFrequency() + "次" +
+                "," + out.getActualDuration() + "小时" +
+                ",超过" + out.getExceedDuration() + "小时" +
+                ",已报销" + reduce.stripTrailingZeros().toPlainString() + "元";
+        return str;
+    }
 
 
     @Override

+ 10 - 1
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseCountsServiceImpl.java

@@ -2,6 +2,7 @@ package com.goafanti.expenseAccount.service.impl;
 
 import com.goafanti.common.dao.TOrderNewMapper;
 import com.goafanti.common.utils.LoggerUtils;
+import com.goafanti.expenseAccount.bo.ExpenseCountsBo;
 import com.goafanti.expenseAccount.bo.ExpenseCountsInput;
 import com.goafanti.expenseAccount.service.ExpenseCountsService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -9,6 +10,8 @@ import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 @Service
 public class ExpenseCountsServiceImpl implements ExpenseCountsService {
 
@@ -19,7 +22,13 @@ public class ExpenseCountsServiceImpl implements ExpenseCountsService {
     public Object getCounts(ExpenseCountsInput in) {
         if (in.getTargetType()==null)in.setTargetType(1);
         if (in.getTargetType()==1){
-            return tOrderNewMapper.selectExpenseCount(in);
+            List<ExpenseCountsBo> expenseCountsBos = tOrderNewMapper.selectExpenseCount(in);
+            expenseCountsBos.forEach(e->{
+               if (e.getMaxDuration().equals("-1")){
+                   e.setMaxDuration("不限制");
+               }
+            });
+            return expenseCountsBos;
         }else {
             return tOrderNewMapper.selectExpenseDepCount(in);
         }

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

@@ -0,0 +1,28 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.model.TTaskLog;
+
+public class OutTTaskLog extends TTaskLog {
+
+
+    private String taskAllocatorName;
+
+    private String taskReceiverName;
+
+
+    public String getTaskAllocatorName() {
+        return taskAllocatorName;
+    }
+
+    public void setTaskAllocatorName(String taskAllocatorName) {
+        this.taskAllocatorName = taskAllocatorName;
+    }
+
+    public String getTaskReceiverName() {
+        return taskReceiverName;
+    }
+
+    public void setTaskReceiverName(String taskReceiverName) {
+        this.taskReceiverName = taskReceiverName;
+    }
+}

+ 10 - 0
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -228,6 +228,16 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.setData(orderProjectService.TaskLogList(id));
 		return res;
 	}
+
+	/**
+	 * 任务派单日志
+	 */
+	@RequestMapping(value="/dispatchTaskLog" ,method = RequestMethod.GET)
+	public Result dispatchTaskLog(Integer id){
+		Result res=new Result();
+		res.setData(orderProjectService.dispatchTaskLog(id));
+		return res;
+	}
 	/** 任务文件上传 **/
 	@RequestMapping(value = "/uploadOrderTaskFile", method = RequestMethod.POST)
 	public Result uploadOrderTaskFile(HttpServletRequest req,String sign){

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

@@ -148,4 +148,5 @@ public interface OrderProjectService {
 
     Object updateSatisfactionDegree(Integer id, Integer formRetrieve, Integer satisfactionDegree, String satisfactionDegreeUrl);
 
+	Object dispatchTaskLog(Integer id);
 }

+ 5 - 0
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -1981,4 +1981,9 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		return tOrderTaskMapper.updateByPrimaryKeySelective(in);
 	}
 
+	@Override
+	public Object dispatchTaskLog(Integer id) {
+		return tTaskLogMapper.selectByTid(id);
+	}
+
 }

+ 49 - 0
src/main/java/com/goafanti/weChat/bo/InputreleaseAndExpenseCount.java

@@ -0,0 +1,49 @@
+package com.goafanti.weChat.bo;
+
+public class InputreleaseAndExpenseCount {
+    private String contractNo;
+    private String buyerName;
+    private String depId;
+    private String aid;
+    private Integer allStatus;
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getAllStatus() {
+        return allStatus;
+    }
+
+    public void setAllStatus(Integer allStatus) {
+        this.allStatus = allStatus;
+    }
+}

+ 252 - 0
src/main/java/com/goafanti/weChat/bo/releaseAndExpenseCountOut.java

@@ -0,0 +1,252 @@
+package com.goafanti.weChat.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+import java.math.BigDecimal;
+
+public class releaseAndExpenseCountOut {
+
+
+    private String orderNo;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "客户名称")
+    private String buyerName;
+    @Excel(name = "部门名称")
+    private String depName;
+    @Excel(name = "营销员名称")
+    private String salesmanName;
+
+    @Excel(name = "应公出工时")
+    private String  maxDuration;
+    @Excel(name = "实际公出工时")
+    private String actualDuration;
+    @Excel(name = "超出工时")
+    private String exceedDuration;
+    @Excel(name = "合同金额",scale = 6)
+    private BigDecimal totalAmount;
+    @Excel(name = "已收款",scale = 6)
+    private BigDecimal settlementAmount;
+    @Excel(name = "报销总额",scale = 6)
+    private BigDecimal expenseAmount;
+    @Excel(name = "已付成本",scale = 6)
+    private BigDecimal paymentAmount;
+
+    @Excel(name = "报销人数")
+    private Integer peopleCount;
+    @Excel(name = "天数")
+    private Integer days;
+    @Excel(name = "报销单数")
+    private Integer expenseCount;
+    @Excel(name = "报销未审核")
+    private Integer notExamine;
+    @Excel(name = "驳回单数")
+    private Integer rejectCount;
+    private Integer exceedType;
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    
+    public String getBuyerName() {
+        return buyerName;
+    }
+
+    
+    public void setBuyerName(String buyerName) {
+        this.buyerName = buyerName;
+    }
+
+    
+    public String getMaxDuration() {
+        if(maxDuration==null){
+            maxDuration="0";
+        }
+        return maxDuration;
+    }
+
+    
+    public void setMaxDuration(String maxDuration) {
+        this.maxDuration = maxDuration;
+    }
+
+    
+    public String getActualDuration() {
+        if(actualDuration==null){
+            actualDuration="0";
+        }
+        return actualDuration;
+    }
+
+    
+    public void setActualDuration(String actualDuration) {
+        this.actualDuration = actualDuration;
+    }
+
+    
+    public String getExceedDuration() {
+        if(exceedDuration==null){
+            exceedDuration="0";
+        }
+        return exceedDuration;
+    }
+
+    
+    public void setExceedDuration(String exceedDuration) {
+        this.exceedDuration = exceedDuration;
+    }
+
+    
+    public BigDecimal getTotalAmount() {
+        return totalAmount;
+    }
+
+    
+    public void setTotalAmount(BigDecimal totalAmount) {
+        this.totalAmount = totalAmount;
+    }
+
+    
+    public BigDecimal getSettlementAmount() {
+        return settlementAmount;
+    }
+
+    
+    public void setSettlementAmount(BigDecimal settlementAmount) {
+        this.settlementAmount = settlementAmount;
+    }
+
+    
+    public BigDecimal getExpenseAmount() {
+        if(expenseAmount==null){
+            return BigDecimal.ZERO;
+        }
+        return expenseAmount;
+    }
+
+    
+    public void setExpenseAmount(BigDecimal expenseAmount) {
+        this.expenseAmount = expenseAmount;
+    }
+
+    
+    public BigDecimal getPaymentAmount() {
+        if(paymentAmount==null){
+            paymentAmount=BigDecimal.ZERO;
+        }
+        return paymentAmount;
+    }
+
+    
+    public void setPaymentAmount(BigDecimal paymentAmount) {
+        this.paymentAmount = paymentAmount;
+    }
+
+    
+    public Integer getPeopleCount() {
+        if(peopleCount==null){
+            peopleCount=0;
+        }
+        return peopleCount;
+    }
+
+    
+    public void setPeopleCount(Integer peopleCount) {
+        this.peopleCount = peopleCount;
+    }
+
+    
+    public Integer getDays() {
+        if(days==null){
+            days=0;
+        }
+        return days;
+    }
+
+    
+    public void setDays(Integer days) {
+        this.days = days;
+    }
+
+    
+    public Integer getExpenseCount() {
+        if(expenseCount==null){
+            expenseCount=0;
+        }
+        return expenseCount;
+    }
+
+    
+    public void setExpenseCount(Integer expenseCount) {
+        this.expenseCount = expenseCount;
+    }
+
+    
+    public Integer getNotExamine() {
+        if(notExamine==null){
+            notExamine=0;
+        }
+        return notExamine;
+    }
+
+    
+    public void setNotExamine(Integer notExamine) {
+        this.notExamine = notExamine;
+    }
+
+    
+    public Integer getRejectCount() {
+        if(rejectCount==null){
+            rejectCount=0;
+        }
+        return rejectCount;
+    }
+
+    
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+
+    public Integer getExceedType() {
+        if(exceedType==null){
+            exceedType=0;
+        }
+        return exceedType;
+    }
+
+    public void setExceedType(Integer exceedType) {
+        this.exceedType = exceedType;
+    }
+}

+ 25 - 0
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -442,6 +442,31 @@ public class AdminReleaseApiController extends CertifyApiController{
 		Result res =new Result();
 		return res.data(publicReleaseService.pushDateClock());
 	}
+	/**
+	 * 公出&报销表
+	 */
+	@RequestMapping(value = "/releaseAndExpenseCount",method = RequestMethod.GET)
+	public Result releaseAndExpenseCount (InputreleaseAndExpenseCount in){
+		Result res =new Result();
+		return res.data(publicReleaseService.releaseAndExpenseCount(in));
+	}/**
+	 * 公出&报销缓存清除
+	 */
+	@RequestMapping(value = "/releaseAndExpenseCountClear",method = RequestMethod.GET)
+	public Result releaseAndExpenseCountClear (){
+		Result res =new Result();
+		return res.data(publicReleaseService.releaseAndExpenseCountClear());
+	}
+
+	/**
+	 * 公出&报销表导出
+	 */
+	@RequestMapping(value = "/releaseAndExpenseCount/Export",method = RequestMethod.GET)
+	public Result releaseAndExpenseCountExport (InputreleaseAndExpenseCount in){
+		List<releaseAndExpenseCountOut> list = publicReleaseService.releaseAndExpenseCount(in);
+		NewExcelUtil<releaseAndExpenseCountOut> excelUtil=new NewExcelUtil<>(releaseAndExpenseCountOut.class);
+		return excelUtil.exportExcel(list,"公出&报销表",uploadPath);
+	}
 
 
 

+ 4 - 0
src/main/java/com/goafanti/weChat/service/PublicReleaseService.java

@@ -71,4 +71,8 @@ public interface PublicReleaseService {
 	void pushOutPublicDtails(List<OutPublicDtails> outList);
 
 	Object pushDateClock();
+
+	List<releaseAndExpenseCountOut> releaseAndExpenseCount(InputreleaseAndExpenseCount in);
+
+	Object releaseAndExpenseCountClear();
 }

+ 38 - 6
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -10,10 +10,7 @@ import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.*;
-import com.goafanti.common.utils.AsyncUtils;
-import com.goafanti.common.utils.DateUtils;
-import com.goafanti.common.utils.SendEmailUtil;
-import com.goafanti.common.utils.WeChatUtils;
+import com.goafanti.common.utils.*;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -25,6 +22,8 @@ import com.goafanti.weChat.bo.*;
 import com.goafanti.weChat.service.PublicReleaseService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.socket.TextMessage;
@@ -1314,8 +1313,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		Pagination<OutPublicDtails> page = (Pagination<OutPublicDtails>) findPage("listPublicDtails", "countPublicDtails", map, in.getPageNo(), in.getPageSize());
 		List<OutPublicDtails> list = (List<OutPublicDtails>)page.getList();
 		List<Integer> collect = list.stream().map(OutPublicDtails::getId).collect(Collectors.toList());
-		List<PublicReleaseClock> publicReleaseClocks = publicReleaseClockMapper.selectList(collect);
-		pushiClockInTime(list, publicReleaseClocks);
+		if (!collect.isEmpty()){
+			List<PublicReleaseClock> publicReleaseClocks = publicReleaseClockMapper.selectList(collect);
+			pushiClockInTime(list, publicReleaseClocks);
+		}
 		return page;
 	}
 
@@ -1923,6 +1924,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		return 1;
 	}
 
+
 	private void addPublicReleaseDateClock(PublicRelease e) {
 		publicReleaseDateClockMapper.deleteByPrid(e.getId());
 		List<PublicReleaseDateClock> list= new ArrayList<>();
@@ -1951,4 +1953,34 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			list.clear();
 		}
 	}
+
+
+
+
+	@Override
+	@Cacheable(value = "releaseAndExpenseCount#300", key = "'getCounts:key='+#in.buyerName+#in.contractNo+#in.aid+#in.depId+#in.allStatus")
+	public List<releaseAndExpenseCountOut> releaseAndExpenseCount(InputreleaseAndExpenseCount in) {
+		List<releaseAndExpenseCountOut> expenseCountsOrders = publicReleaseMapper.releaseAndExpenseCount(in);
+		expenseCountsOrders.forEach(e->{
+			if (e.getExceedDuration()!=null){
+				double exceedDuration = Double.parseDouble(e.getExceedDuration());
+				if (exceedDuration>0){
+					e.setExceedType(1);
+				}
+			}
+			if (e.getMaxDuration()!=null){
+				if(e.getMaxDuration().equals("-1")){
+					e.setMaxDuration("不限制");
+				}
+			}
+		});
+		return expenseCountsOrders;
+	}
+
+	@Override
+	@CacheEvict(value = "releaseAndExpenseCount#300",allEntries = true)
+	public Object releaseAndExpenseCountClear() {
+		LoggerUtils.debug(getClass(),"公出&报销缓存清除。");
+		return 1;
+	}
 }

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

@@ -1,16 +1,16 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-static.host=//static.jishutao.com/1.3.13
-#static.host=//172.16.1.187/1.3.13
+static.host=//static.jishutao.com/1.3.14
+#static.host=//172.16.1.187/1.3.14
 
-#jdbc.url=jdbc\:mysql://localhost:3306/aft20221026?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
+jdbc.url=jdbc\:mysql://localhost:3306/aft20240430?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
-#jdbc.username=root
-#jdbc.password=123456
-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
+jdbc.password=123456
+#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
 jdbc.validationQuery=SELECT 'x'
 jdbc.initialSize=3
 jdbc.maxActive=20

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

@@ -1,4 +1,5 @@
 dev.name=test
+static.host=//static.jishutao.com/1.3.14
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 jdbc.url=jdbc:mysql://127.0.0.1:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
@@ -52,7 +53,7 @@ amb.maxLvl=6
 
 portal.host=//static.jishutao.com/portal/2.0.6
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.3.13
+
 rd.static.host=//static.jishutao.com/RD/1.0.03
 avatar.upload.host=//static.jishutao.com/upload