Browse Source

高新复审开发

anderx 4 years ago
parent
commit
71f672ab4f
22 changed files with 524 additions and 592 deletions
  1. 23 0
      .idea/free-mybatis-generator-config.xml
  2. 4 0
      src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java
  3. 14 38
      src/main/java/com/goafanti/common/dao/TTaskMidMapper.java
  4. 13 14
      src/main/java/com/goafanti/common/mapper/PublicReleaseCountMapper.xml
  5. 8 0
      src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml
  6. 30 0
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  7. 62 90
      src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml
  8. 195 342
      src/main/java/com/goafanti/common/model/TTaskMid.java
  9. 2 0
      src/main/java/com/goafanti/common/task/UserFollowTask.java
  10. 1 0
      src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java
  11. 67 0
      src/main/java/com/goafanti/order/bo/OutHighNewRetrialStatistics.java
  12. 3 3
      src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java
  13. 25 7
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  14. 1 1
      src/main/java/com/goafanti/order/service/OrderNewService.java
  15. 2 10
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  16. 16 52
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  17. 8 15
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  18. 0 1
      src/main/java/com/goafanti/patent/service/PatentCostService.java
  19. 0 4
      src/main/java/com/goafanti/patent/service/impl/PatentCostServiceImpl.java
  20. 9 0
      src/main/java/com/goafanti/user/bo/outFollowStatisticsList.java
  21. 33 13
      src/main/java/com/goafanti/user/bo/outProvinceFollowStatistic.java
  22. 8 2
      src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

+ 23 - 0
.idea/free-mybatis-generator-config.xml

@@ -119,6 +119,29 @@
             </Config>
           </value>
         </entry>
+        <entry key="t_task_mid">
+          <value>
+            <Config>
+              <option name="comment" value="true" />
+              <option name="daoMvnPath" value="src/main/java" />
+              <option name="daoName" value="TTaskMidMapper" />
+              <option name="daoPackage" value="com.goafanti.common.dao" />
+              <option name="daoPostfix" value="Mapper" />
+              <option name="modelMvnPath" value="src/main/java" />
+              <option name="modelName" value="TTaskMid" />
+              <option name="modelPackage" value="com.goafanti.common.model" />
+              <option name="name" value="t_task_mid" />
+              <option name="overrideJava" value="true" />
+              <option name="overrideXML" value="true" />
+              <option name="primaryKey" value="" />
+              <option name="projectFolder" value="$PROJECT_DIR$" />
+              <option name="tableName" value="t_task_mid" />
+              <option name="useSchemaPrefix" value="true" />
+              <option name="xmlMvnPath" value="src/main/java" />
+              <option name="xmlPackage" value="com.goafanti.common.mapper" />
+            </Config>
+          </value>
+        </entry>
         <entry key="user_data">
           <value>
             <Config>

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

@@ -3,6 +3,7 @@ package com.goafanti.common.dao;
 import com.goafanti.common.bo.OrderOperator;
 import com.goafanti.common.bo.UserOrderTask;
 import com.goafanti.common.model.TOrderTask;
+import com.goafanti.order.bo.OutHighNewRetrialStatistics;
 import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
@@ -91,4 +92,7 @@ public interface TOrderTaskMapper {
 
 	ProjectTypePuls selectByTidGetDtails(Integer tid);
 
+    List<OutHighNewRetrialStatistics> highNewRetrialStatistics(@Param("depId") String depId, @Param("startDate") String startDate, @Param("endDate") String endDate);
+
+    int getHighNewRetrial(String orderNo);
 }

+ 14 - 38
src/main/java/com/goafanti/common/dao/TTaskMidMapper.java

@@ -1,61 +1,37 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TTaskMid;
+import org.apache.ibatis.annotations.Param;
 
 import java.math.BigDecimal;
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface TTaskMidMapper {
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	int deleteByPrimaryKey(Integer id);
+    int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	int insert(TTaskMid record);
+    int insert(TTaskMid record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	int insertSelective(TTaskMid record);
+    int insertSelective(TTaskMid record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	TTaskMid selectByPrimaryKey(Integer id);
+    TTaskMid selectByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	int updateByPrimaryKeySelective(TTaskMid record);
+    int updateByPrimaryKeySelective(TTaskMid record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
+    int updateByPrimaryKey(TTaskMid record);
 
-	int updateCostAmount(@Param("tid")Integer tid, @Param("count")BigDecimal costAmount);
+    int updateCostAmount(@Param("tid")Integer tid, @Param("count") BigDecimal costAmount);
 
-	int updatePaymentAmount(@Param("tid")Integer tid, @Param("paymentAmount")BigDecimal paymentAmount, @Param("type")Integer type);
+    int updatePaymentAmount(@Param("tid")Integer tid, @Param("paymentAmount")BigDecimal paymentAmount, @Param("type")Integer type);
 
-	void updateCertificatesCountByTid(@Param("tid")Integer tid, @Param("count")Integer count);
+    void updateCertificatesCountByTid(@Param("tid")Integer tid, @Param("count")Integer count);
 
-	List<TTaskMid> selectListByTid(Integer tid);
+    List<TTaskMid> selectListByTid(Integer tid);
 
-	void updateByTid(TTaskMid tm);
+    void updateByTid(TTaskMid tm);
 
-	void addValue(Integer xzs, Integer bhs);
+    void addValue(Integer xzs, Integer bhs);
 
 
-	TTaskMid selectCountBytid(@Param("tid")Integer tid, @Param("type")Integer type);
-	
+    TTaskMid selectCountBytid(@Param("tid")Integer tid, @Param("type")Integer type);
 
 }

+ 13 - 14
src/main/java/com/goafanti/common/mapper/PublicReleaseCountMapper.xml

@@ -138,17 +138,16 @@
   </update>
 
   <select id="followStatisticsList" resultType="com.goafanti.user.bo.outFollowStatisticsList">
-    select z.name,z.use_interview useInterview,z.use_quantity useQuantity,z.use_total useTotal,ifnull(z.useRatio,0)useRatio,
+    select z.id,z.name,z.use_interview useInterview,z.use_quantity useQuantity,z.use_total useTotal,ifnull(z.useRatio,0)useRatio,
     z.new_interview newInterview,z.new_quantity newQuantity,z.new_total newTotal,ifnull(z.newRatio,0)newRatio,
     z.totalInterview,z.totalQuantity,z.total,ifnull((z.totalQuantity/z.totalInterview),0)totalRatio
-    from(select name,use_interview , use_quantity ,use_total ,(use_quantity/use_interview)useRatio,
+    from(select y.id,name,use_interview , use_quantity ,use_total ,(use_quantity/use_interview)useRatio,
     new_interview ,new_quantity ,new_total ,(new_quantity/new_interview)newRatio,
     (use_interview+new_interview)totalInterview,(use_quantity+new_quantity)totalQuantity,(use_total+new_total)total
-    from (select dg.name,sum(use_interview)use_interview,sum(use_quantity)use_quantity,sum(use_total)use_total,
-    sum(new_interview)new_interview,sum(new_quantity)new_quantity,sum(new_total)new_total
-    from (select province,if(new_user=1,1,0)use_interview,if(new_user=1,a.quantity ,0)use_quantity,
-    if(new_user=1,a.total ,0)use_total,if(new_user=0,1,0)new_interview,if(new_user=0,a.quantity ,0)new_quantity,
-    if(new_user=0,a.total ,0)new_total from public_release_count a
+    from (select dg.id,dg.name,use_interview, use_quantity,use_total,new_interview,new_quantity,new_total
+    from (select province,sum(if(new_user=1,1,0))use_interview,sum(if(new_user=1,a.quantity ,0))use_quantity,sum(if(new_user=1,a.total ,0))use_total,
+    sum(if(new_user=0,1,0))new_interview,sum(if(new_user=0,a.quantity ,0))new_quantity,sum(if(new_user=0,a.total ,0))new_total
+    from public_release_count a
     where a.`date` = #{date}
     <if test="depId !=null">
       and a.dep_id= #{depId}
@@ -156,8 +155,8 @@
     <if test="province !=null">
       and a.province= #{province}
     </if>
-    )x
-    left join district_glossory dg on x.province=dg.id group by dg.id )y )z
+     group by a.province)x
+    left join district_glossory dg on x.province=dg.id )y )z
     order by
     <if test="sort==0">
       totalQuantity
@@ -171,17 +170,17 @@
     desc
   </select>
   <select id="provinceFollowStatisticsList" resultType="com.goafanti.user.bo.outProvinceFollowStatistic">
-    select x.name,c.nickname ,x.new_user newUser,d.counts interviewCount,x.quantity
-    from (select b.name,a.new_user,a.uid,sum(a.quantity)quantity from public_release_count a left join department b on a.dep_id =b.id
+    select x.id,x.name,c.id uid,c.nickname ,x.new_user newUser,x.quantity,x.sign
+    from (select b.id,b.name,a.new_user,a.uid,sum(a.quantity)quantity,sum(a.sign)sign from public_release_count a  left join department b on a.dep_id =b.id
     where a.date= #{date} and a.province = #{province}
     <if test="depId !=null">
       and a.dep_id = #{depId}
     </if>
-    group by b.name ,a.uid ,a.new_user )x
-    left join `user` c on x.uid =c.id left join (select uid,count(*)counts from public_release group by uid) d on x.uid =d.uid
+    group by b.id,b.name ,a.uid ,a.new_user )x
+    left join `user` c on x.uid =c.id
     order by
     <if test="sort==0">
-      d.counts
+      x.sign
     </if>
     <if test="sort==1">
       x.quantity

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

@@ -855,6 +855,10 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
       and a.process_status > 4
       and a.salesman_id = #{aid,jdbcType=VARCHAR}
     </if>
+    <if test="specially ==8">
+      and a.process_status > 4
+      and a.buyer_id = #{uid}
+    </if>
   	<if test="outsource != null">
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>
@@ -969,6 +973,10 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
        and a.process_status > 4
        and a.salesman_id = #{aid,jdbcType=VARCHAR}
      </if>
+     <if test="specially ==8">
+       and a.process_status > 4
+       and a.buyer_id = #{uid}
+     </if>
     <if test="outsource != null">
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>

+ 30 - 0
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -2163,4 +2163,34 @@ inner join department de on x.department_id=de.id left join business_category bc
                 left join official_fee_price c on a.patent_type =c.patent_type and b.patent_name_type =c.`type`
                 where a.id= #{tid}
   </select>
+    <select id="highNewRetrialStatistics" resultType="com.goafanti.order.bo.OutHighNewRetrialStatistics">
+      select t1. province,dg.name provinceName ,t1.quantity,t1.pass,t1.notPass,ifnull(t2.counts,0)  signBacks
+      from  (SELECT e.province ,sum(1) quantity,sum(if(a.project_status=10,1,0))pass,sum(if(a.project_status != 10,1,0))notPass
+            from t_order_task a left join business_project b on a.commodity_id =b.id
+            left join t_order_new c on a.order_no =c.order_no  left join admin d on c.salesman_id =d.id
+            left join department e on d.department_id =e.id  where b.`type` =5  and c.process_status >4
+            <if test="depId!=null">
+              and e.id= #{depId}
+            </if>
+            <if test="startDate!=null and endDate!=null">
+              and c.sign_time  between #{startDate} and #{endDate}
+            </if>
+        group by e.province )t1 left join (select y.province,count(*)counts from (select e.province,c.buyer_id,count(*)counts
+            from (select order_no from t_order_task a left join business_project b on a.commodity_id =b.id
+       where b.`type` =5 group by order_no )x left join t_order_new c on x.order_no=c.order_no left join admin d on c.salesman_id =d.id
+        left join department e on d.department_id =e.id  and c.process_status > 4
+      <if test="depId!=null">
+        and e.id= #{depId}
+      </if>
+      <if test="startDate!=null and endDate!=null">
+        and c.sign_time  between #{startDate} and #{endDate}
+      </if>
+        group by e.province,c.buyer_id )y where y.counts>1 group by y.province)t2 on t1.province=t2.province
+        left join district_glossory dg on t1.province=dg.id
+    </select>
+  <select id="getHighNewRetrial" resultType="java.lang.Integer">
+    select count(*) from t_order_new a left join t_order_new b on a.buyer_id =b.buyer_id
+    left join t_order_task c on b.order_no =c.order_no left join business_project d on c.commodity_id =d.id
+    where a.order_no =#{orderNo} and b.create_time &lt; a.create_time and d.`type` =5
+  </select>
 </mapper>

+ 62 - 90
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -2,11 +2,6 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TTaskMidMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 25 14:38:43 CST 2020.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
@@ -20,59 +15,36 @@
     <result column="end_count" jdbcType="INTEGER" property="endCount" />
     <result column="authorize_count" jdbcType="INTEGER" property="authorizeCount" />
     <result column="apply_count" jdbcType="INTEGER" property="applyCount" />
+    <result column="high_new_retrial" jdbcType="INTEGER" property="highNewRetrial" />
   </resultMap>
   <sql id="Base_Column_List">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 25 14:38:43 CST 2020.
-    -->
     id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day, 
-    if_material, reject_count, accept_count, end_count, authorize_count, apply_count
+    if_material, reject_count, accept_count, end_count, authorize_count, apply_count, 
+    high_new_retrial
   </sql>
   <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 Fri Dec 25 14:38:43 CST 2020.
-    -->
     select 
     <include refid="Base_Column_List" />
     from t_task_mid
     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 Fri Dec 25 14:38:43 CST 2020.
-    -->
     delete from t_task_mid
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TTaskMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 25 14:38:43 CST 2020.
-    -->
     insert into t_task_mid (id, tid, cost_amount, 
       party_amount, create_time, certificates_count, 
       urgent_day, if_material, reject_count, 
       accept_count, end_count, authorize_count, 
-      apply_count)
+      apply_count, high_new_retrial)
     values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, 
       #{partyAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}, 
       #{urgentDay,jdbcType=INTEGER}, #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER}, 
       #{acceptCount,jdbcType=INTEGER}, #{endCount,jdbcType=INTEGER}, #{authorizeCount,jdbcType=INTEGER}, 
-      #{applyCount,jdbcType=INTEGER})
+      #{applyCount,jdbcType=INTEGER}, #{highNewRetrial,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 25 14:38:43 CST 2020.
-    -->
     insert into t_task_mid
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -114,6 +86,9 @@
       <if test="applyCount != null">
         apply_count,
       </if>
+      <if test="highNewRetrial != null">
+        high_new_retrial,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -155,14 +130,12 @@
       <if test="applyCount != null">
         #{applyCount,jdbcType=INTEGER},
       </if>
+      <if test="highNewRetrial != null">
+        #{highNewRetrial,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 25 14:38:43 CST 2020.
-    -->
     update t_task_mid
     <set>
       <if test="tid != null">
@@ -201,15 +174,13 @@
       <if test="applyCount != null">
         apply_count = #{applyCount,jdbcType=INTEGER},
       </if>
+      <if test="highNewRetrial != null">
+        high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskMid">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Fri Dec 25 14:38:43 CST 2020.
-    -->
     update t_task_mid
     set tid = #{tid,jdbcType=INTEGER},
       cost_amount = #{costAmount,jdbcType=DECIMAL},
@@ -222,39 +193,41 @@
       accept_count = #{acceptCount,jdbcType=INTEGER},
       end_count = #{endCount,jdbcType=INTEGER},
       authorize_count = #{authorizeCount,jdbcType=INTEGER},
-      apply_count = #{applyCount,jdbcType=INTEGER}
+      apply_count = #{applyCount,jdbcType=INTEGER},
+      high_new_retrial = #{highNewRetrial,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
- 
- 
+
+
+
   <update id="updatePaymentAmount">
-  	update t_task_mid
+    update t_task_mid
     <if test="type == 0">
-    set party_amount = party_amount + #{paymentAmount,jdbcType=DECIMAL}
+      set party_amount = party_amount + #{paymentAmount,jdbcType=DECIMAL}
     </if>
     <if test="type == 1">
-    set party_amount = party_amount - #{paymentAmount,jdbcType=DECIMAL}
+      set party_amount = party_amount - #{paymentAmount,jdbcType=DECIMAL}
     </if>
     where tid = #{tid,jdbcType=INTEGER}
   </update>
   <select id="selectListByTid" resultType="com.goafanti.common.model.TTaskMid">
-	select c.id,c.tid,c.cost_amount costAmount,c.party_amount partyAmount from t_order_task a left join t_order_task b on a.order_no=b.order_no
-	left join t_task_mid c on b.id=c.tid
-	where a.id= #{tid}
+    select c.id,c.tid,c.cost_amount costAmount,c.party_amount partyAmount from t_order_task a left join t_order_task b on a.order_no=b.order_no
+                                                                                              left join t_task_mid c on b.id=c.tid
+    where a.id= #{tid}
   </select>
-  
-    <update id="updateCostAmount">
-      update t_order_task a ,t_task_mid c
+
+  <update id="updateCostAmount">
+    update t_order_task a ,t_task_mid c
     set c.cost_amount=#{count}
     where  a.id=c.tid and a.id= #{tid}
   </update>
-  
+
   <update id="updateCertificatesCountByTid">
-  	update t_task_mid
-  	set certificates_count= #{count}
-  	where tid= #{tid}
+    update t_task_mid
+    set certificates_count= #{count}
+    where tid= #{tid}
   </update>
-  
+
   <update id="updateByTid" parameterType="com.goafanti.common.model.TTaskMid">
     update t_task_mid
     <set>
@@ -277,35 +250,34 @@
     where tid = #{tid,jdbcType=INTEGER}
   </update>
   <select id="selectCountBytid" resultType="com.goafanti.common.model.TTaskMid">
-  select a.id,
-  <if test="type ==0">
-   ifnull(b.lic,0) certificatesCount
-  </if>
-  <if test="type ==1">
-   ifnull(b.acc ,0)acceptCount, ifnull(b.lic ,0)authorizeCount,ifnull(b.lic ,0)certificatesCount,
-   ifnull(b.tgc ,0)endCount,ifnull(b.bhc ,0)rejectCount
-  </if>
-  <if test="type ==2">
-  ifnull(b.acc ,0)acceptCount,ifnull(b.lic ,0)certificatesCount,ifnull(b.sqc,0) applyCount,
-  ifnull(b.bhc,0) rejectCount
-  </if>
-  from t_task_mid a left join (select task_id tid,
-  <if test="type ==0">
-  sum(if(licence_time is null,0,1))lic from task_progress where task_id= #{tid} GROUP by task_id)b  
-  </if>
-  <if test="type ==1">
-  	<!-- 下证数与授权数一样,下证统计大于则用下证,小于或者等于用授权统计 -->
- 	sum(if(if(licence_time is null,0,1) &gt; if(authorize_time is null,0,1),
-		if(licence_time is null,0,1),if(authorize_time is null,0,1)))lic ,ifnull(count(accept_time),0)acc,
-	 	sum(if(status=1,1,0))tgc,sum(if(status=2 ,1,0))bhc from task_progress where task_id= #{tid} GROUP by task_id )b
-  </if>
-  <if test="type ==2">
-  	count(*)sqc,  sum(if(licence_time is null,0,1))lic , sum(if(accept_time is null,0,1))acc,
-   	 sum(if(status=2 ,1,0))bhc  from task_progress where task_id= #{tid} GROUP by task_id )b
-  </if>
-   on a.tid =b.tid
-	where a.tid= #{tid}
+    select a.id,
+    <if test="type ==0">
+      ifnull(b.lic,0) certificatesCount
+    </if>
+    <if test="type ==1">
+      ifnull(b.acc ,0)acceptCount, ifnull(b.lic ,0)authorizeCount,ifnull(b.lic ,0)certificatesCount,
+      ifnull(b.tgc ,0)endCount,ifnull(b.bhc ,0)rejectCount
+    </if>
+    <if test="type ==2">
+      ifnull(b.acc ,0)acceptCount,ifnull(b.lic ,0)certificatesCount,ifnull(b.sqc,0) applyCount,
+      ifnull(b.bhc,0) rejectCount
+    </if>
+    from t_task_mid a left join (select task_id tid,
+    <if test="type ==0">
+      sum(if(licence_time is null,0,1))lic from task_progress where task_id= #{tid} GROUP by task_id)b
+    </if>
+    <if test="type ==1">
+      <!-- 下证数与授权数一样,下证统计大于则用下证,小于或者等于用授权统计 -->
+      sum(if(if(licence_time is null,0,1) &gt; if(authorize_time is null,0,1),
+      if(licence_time is null,0,1),if(authorize_time is null,0,1)))lic ,ifnull(count(accept_time),0)acc,
+      sum(if(status=1,1,0))tgc,sum(if(status=2 ,1,0))bhc from task_progress where task_id= #{tid} GROUP by task_id )b
+    </if>
+    <if test="type ==2">
+      count(*)sqc,  sum(if(licence_time is null,0,1))lic , sum(if(accept_time is null,0,1))acc,
+      sum(if(status=2 ,1,0))bhc  from task_progress where task_id= #{tid} GROUP by task_id )b
+    </if>
+    on a.tid =b.tid
+    where a.tid= #{tid}
   </select>
-  
- 
+
 </mapper>

+ 195 - 342
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -1,350 +1,203 @@
 package com.goafanti.common.model;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.util.Date;
-import java.io.Serializable;
 
+/**
+ * t_task_mid
+ * @author 
+ */
 public class TTaskMid implements Serializable {
-	
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.id
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.tid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer tid;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.cost_amount
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private BigDecimal costAmount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.party_amount
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private BigDecimal partyAmount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.create_time
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Date createTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.certificates_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer certificatesCount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.urgent_day
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer urgentDay;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.if_material
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer ifMaterial;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.reject_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer rejectCount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.accept_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer acceptCount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.end_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer endCount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.authorize_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer authorizeCount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.apply_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private Integer applyCount;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.id
-	 * @return  the value of t_task_mid.id
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getId() {
-		return id;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.id
-	 * @param id  the value for t_task_mid.id
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	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_mid.tid
-	 * @return  the value of t_task_mid.tid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getTid() {
-		return tid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.tid
-	 * @param tid  the value for t_task_mid.tid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setTid(Integer tid) {
-		this.tid = tid;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.cost_amount
-	 * @return  the value of t_task_mid.cost_amount
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public BigDecimal getCostAmount() {
-		return costAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.cost_amount
-	 * @param costAmount  the value for t_task_mid.cost_amount
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setCostAmount(BigDecimal costAmount) {
-		this.costAmount = costAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.party_amount
-	 * @return  the value of t_task_mid.party_amount
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public BigDecimal getPartyAmount() {
-		return partyAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.party_amount
-	 * @param partyAmount  the value for t_task_mid.party_amount
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setPartyAmount(BigDecimal partyAmount) {
-		this.partyAmount = partyAmount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.create_time
-	 * @return  the value of t_task_mid.create_time
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.create_time
-	 * @param createTime  the value for t_task_mid.create_time
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.certificates_count
-	 * @return  the value of t_task_mid.certificates_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getCertificatesCount() {
-		return certificatesCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.certificates_count
-	 * @param certificatesCount  the value for t_task_mid.certificates_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setCertificatesCount(Integer certificatesCount) {
-		this.certificatesCount = certificatesCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.urgent_day
-	 * @return  the value of t_task_mid.urgent_day
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getUrgentDay() {
-		return urgentDay;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.urgent_day
-	 * @param urgentDay  the value for t_task_mid.urgent_day
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setUrgentDay(Integer urgentDay) {
-		this.urgentDay = urgentDay;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.if_material
-	 * @return  the value of t_task_mid.if_material
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getIfMaterial() {
-		return ifMaterial;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.if_material
-	 * @param ifMaterial  the value for t_task_mid.if_material
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setIfMaterial(Integer ifMaterial) {
-		this.ifMaterial = ifMaterial;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.reject_count
-	 * @return  the value of t_task_mid.reject_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getRejectCount() {
-		return rejectCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.reject_count
-	 * @param rejectCount  the value for t_task_mid.reject_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setRejectCount(Integer rejectCount) {
-		this.rejectCount = rejectCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.accept_count
-	 * @return  the value of t_task_mid.accept_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getAcceptCount() {
-		return acceptCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.accept_count
-	 * @param acceptCount  the value for t_task_mid.accept_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setAcceptCount(Integer acceptCount) {
-		this.acceptCount = acceptCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.end_count
-	 * @return  the value of t_task_mid.end_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getEndCount() {
-		return endCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.end_count
-	 * @param endCount  the value for t_task_mid.end_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setEndCount(Integer endCount) {
-		this.endCount = endCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.authorize_count
-	 * @return  the value of t_task_mid.authorize_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getAuthorizeCount() {
-		return authorizeCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.authorize_count
-	 * @param authorizeCount  the value for t_task_mid.authorize_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setAuthorizeCount(Integer authorizeCount) {
-		this.authorizeCount = authorizeCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.apply_count
-	 * @return  the value of t_task_mid.apply_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public Integer getApplyCount() {
-		return applyCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.apply_count
-	 * @param applyCount  the value for t_task_mid.apply_count
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	public void setApplyCount(Integer applyCount) {
-		this.applyCount = applyCount;
-	}
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
-	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
-	 */
-	@Override
-	public String toString() {
-		StringBuilder sb = new StringBuilder();
-		sb.append(getClass().getSimpleName());
-		sb.append(" [");
-		sb.append("Hash = ").append(hashCode());
-		sb.append(", id=").append(id);
-		sb.append(", tid=").append(tid);
-		sb.append(", costAmount=").append(costAmount);
-		sb.append(", partyAmount=").append(partyAmount);
-		sb.append(", createTime=").append(createTime);
-		sb.append(", certificatesCount=").append(certificatesCount);
-		sb.append(", urgentDay=").append(urgentDay);
-		sb.append(", ifMaterial=").append(ifMaterial);
-		sb.append(", rejectCount=").append(rejectCount);
-		sb.append(", acceptCount=").append(acceptCount);
-		sb.append(", endCount=").append(endCount);
-		sb.append(", authorizeCount=").append(authorizeCount);
-		sb.append(", applyCount=").append(applyCount);
-		sb.append(", serialVersionUID=").append(serialVersionUID);
-		sb.append("]");
-		return sb.toString();
-	}
-
-	
-
-	public TTaskMid() {}
-    
-    public TTaskMid(Integer tid,BigDecimal costAmount) {
-    	this.tid=tid;
-    	if(costAmount!=null)this.costAmount=costAmount;
+    /**
+     * 编号
+     */
+    private Integer id;
+
+    /**
+     * 项目id
+     */
+    private Integer tid;
+
+    /**
+     * 成本金额
+     */
+    private BigDecimal costAmount;
+
+    /**
+     * 付款金额
+     */
+    private BigDecimal partyAmount;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 证书数量
+     */
+    private Integer certificatesCount;
+
+    /**
+     * 加急天数
+     */
+    private Integer urgentDay;
+
+    /**
+     * 有无材料
+     */
+    private Integer ifMaterial;
+
+    /**
+     * 驳回数
+     */
+    private Integer rejectCount;
+
+    /**
+     * 受理数
+     */
+    private Integer acceptCount;
+
+    /**
+     * 完结数
+     */
+    private Integer endCount;
+
+    /**
+     * 授权数
+     */
+    private Integer authorizeCount;
+
+    /**
+     * 申请数
+     */
+    private Integer applyCount;
+
+    /**
+     * 高新复审 0否 1是
+     */
+    private Integer highNewRetrial;
+
+    private static final long serialVersionUID = 1L;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getTid() {
+        return tid;
+    }
+
+    public void setTid(Integer tid) {
+        this.tid = tid;
+    }
+
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+
+    public BigDecimal getPartyAmount() {
+        return partyAmount;
+    }
+
+    public void setPartyAmount(BigDecimal partyAmount) {
+        this.partyAmount = partyAmount;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getCertificatesCount() {
+        return certificatesCount;
+    }
+
+    public void setCertificatesCount(Integer certificatesCount) {
+        this.certificatesCount = certificatesCount;
+    }
+
+    public Integer getUrgentDay() {
+        return urgentDay;
+    }
+
+    public void setUrgentDay(Integer urgentDay) {
+        this.urgentDay = urgentDay;
+    }
+
+    public Integer getIfMaterial() {
+        return ifMaterial;
+    }
+
+    public void setIfMaterial(Integer ifMaterial) {
+        this.ifMaterial = ifMaterial;
+    }
+
+    public Integer getRejectCount() {
+        return rejectCount;
+    }
+
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+
+    public Integer getAcceptCount() {
+        return acceptCount;
+    }
+
+    public void setAcceptCount(Integer acceptCount) {
+        this.acceptCount = acceptCount;
+    }
+
+    public Integer getEndCount() {
+        return endCount;
+    }
+
+    public void setEndCount(Integer endCount) {
+        this.endCount = endCount;
+    }
+
+    public Integer getAuthorizeCount() {
+        return authorizeCount;
+    }
+
+    public void setAuthorizeCount(Integer authorizeCount) {
+        this.authorizeCount = authorizeCount;
+    }
+
+    public Integer getApplyCount() {
+        return applyCount;
+    }
+
+    public void setApplyCount(Integer applyCount) {
+        this.applyCount = applyCount;
+    }
+
+    public Integer getHighNewRetrial() {
+        return highNewRetrial;
+    }
+
+    public void setHighNewRetrial(Integer highNewRetrial) {
+        this.highNewRetrial = highNewRetrial;
+    }
+
+    public TTaskMid(Integer tid, BigDecimal costAmount) {
+        this.tid = tid;
+        this.costAmount = costAmount;
+    }
+    public TTaskMid() {
+
     }
 }

+ 2 - 0
src/main/java/com/goafanti/common/task/UserFollowTask.java

@@ -81,6 +81,7 @@ public class UserFollowTask {
 
     public Calendar getNowDate(){
         Calendar now=Calendar.getInstance();
+        now.set(2021,9,1);
         now.set(Calendar.HOUR_OF_DAY, 0);
         now.clear(Calendar.MINUTE);
         now.clear(Calendar.SECOND);
@@ -89,6 +90,7 @@ public class UserFollowTask {
     }
     public String getYearMonth(){
         Calendar now=Calendar.getInstance();
+        now.set(2021,9,1);
         int y=now.get(Calendar.YEAR);
         int m=now.get(Calendar.MONTH);
         if(m<1){

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

@@ -175,6 +175,7 @@ public class NewExcelUtil<T> {
 	 * 	导出CXCEL表到指定目录
 	 * @param list 导出数据集合
 	 * @param sheetName 工作表的名称
+	 * @param uploadPath 导出本地地址
 	 */
 	public Result exportExcel(List<T> list, String sheetName, String uploadPath) {
 		this.init(list, sheetName);

+ 67 - 0
src/main/java/com/goafanti/order/bo/OutHighNewRetrialStatistics.java

@@ -0,0 +1,67 @@
+package com.goafanti.order.bo;
+
+import com.goafanti.common.utils.excel.Excel;
+
+public class OutHighNewRetrialStatistics {
+
+
+    private Integer province;
+    @Excel(name = "省份")
+    private String provinceName;
+    @Excel(name = "高新总数")
+    private Integer quantity;
+    @Excel(name = "已通过高新数")
+    private Integer pass;
+    @Excel(name = "已回签")
+    private Integer signBacks;
+    @Excel(name = "未通过高新数")
+    private Integer notPass;
+
+    public Integer getProvince() {
+        return province;
+    }
+
+    public void setProvince(Integer province) {
+        this.province = province;
+    }
+
+    public String getProvinceName() {
+        return provinceName;
+    }
+
+    public void setProvinceName(String provinceName) {
+        this.provinceName = provinceName;
+    }
+
+    public Integer getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(Integer quantity) {
+        this.quantity = quantity;
+    }
+
+    public Integer getPass() {
+        return pass;
+    }
+
+    public void setPass(Integer pass) {
+        this.pass = pass;
+    }
+
+    public Integer getSignBacks() {
+        return signBacks;
+    }
+
+    public void setSignBacks(Integer signBacks) {
+        this.signBacks = signBacks;
+    }
+
+    public Integer getNotPass() {
+        return notPass;
+    }
+
+    public void setNotPass(Integer notPass) {
+        this.notPass = notPass;
+    }
+}

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

@@ -236,17 +236,17 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	/**
 	 * 订单列表
 	 * 
-	 *specially  0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询 6客服查询 7统计签单订单
+	 *specially  0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询 6客服查询 7统计签单订单 8客户订单列表
 	 *distribution	(咨询师管理列表 0 未分配 1部分 2全部
 	 *amountStatus 0 10万元以下 1 10万~20万 2 20万~30万 3 30万~40万  4 40万以上
 	 */
 	@RequestMapping(value="/orderNewList", method = RequestMethod.GET)
 	public Result orderNewList(String aid,String name,String orderNo,String starTime,String endTime ,Integer specially ,Integer approval,
 			Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus,Integer amountStatus,
-							   String contractStart,String contractEnd,Integer pageNo,Integer pageSize){
+							   String contractStart,String contractEnd,String uid,Integer pageNo,Integer pageSize){
 		Result res=new Result();
 		res.data(orderNewService.orderNewList(aid,name, orderNo, starTime, endTime, specially ,approval, distribution,depId,
-				contractNo,outsource, liquidationStatus,amountStatus,contractStart, contractEnd,pageNo, pageSize));
+				contractNo,outsource, liquidationStatus,amountStatus,contractStart, contractEnd,uid,pageNo, pageSize));
 		return res;
 	}
 	

+ 25 - 7
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 
+import com.goafanti.order.bo.*;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.validation.BindingResult;
@@ -26,13 +27,6 @@ import com.goafanti.common.model.TTaskHours;
 import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.excel.NewExcelUtil;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.bo.TOrderTaskDetailBo;
-import com.goafanti.order.bo.TOrderTaskListBo;
-import com.goafanti.order.bo.TaskProgressBo;
-import com.goafanti.order.bo.UpdateProjectStatusBo;
-import com.goafanti.order.bo.inuptTaskHoursListBo;
-import com.goafanti.order.bo.inuptTaskListBo;
-import com.goafanti.order.bo.managerListBo;
 import com.goafanti.order.service.OrderProjectService;
 
 @RestController
@@ -433,6 +427,30 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.data(orderProjectService.selectProjectCheck(in));
 		return res;
 	}
+
+	/**
+	 * 高新复审统计
+	 */
+	@RequestMapping(value = "/highNewRetrialStatistics",method = RequestMethod.GET)
+	public Result highNewRetrialStatistics(String depId,String startDate,String endDate) {
+		Result res =new Result();
+		res.data(orderProjectService.highNewRetrialStatistics(depId,startDate,endDate));
+		return res;
+	}
+
+	/**
+	 * 高新复审统计
+	 */
+	@RequestMapping(value = "/highNewRetrialStatistics/export",method = RequestMethod.GET)
+	public Result highNewRetrialStatisticsExport(String depId,String startDate,String endDate,String depName) {
+		Result res =new Result();
+		List<OutHighNewRetrialStatistics>  list=orderProjectService.highNewRetrialStatistics(depId,startDate,endDate);
+		NewExcelUtil<OutHighNewRetrialStatistics> newExcelUtil=new NewExcelUtil<>(OutHighNewRetrialStatistics.class);
+		StringBuffer str=new StringBuffer("搜索条件=》");
+		if (depName!=null)str=str.append("部门:").append(depName).append(",");
+		if (startDate!=null&&endDate!=null)str=str.append("时间:").append(startDate).append("~").append(endDate).append(",");
+		return newExcelUtil.exportExcel(list,"高新复审统计",uploadPath,str.substring(0,str.toString().length()-1));
+	}
 	
 	
 	

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

@@ -81,7 +81,7 @@ public interface OrderNewService {
 	 */
 	Pagination<TOrderNewBo> orderNewList(String aid,String name, String orderNo, String starTime, String endTime,Integer specially ,
 										 Integer approval,Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus, Integer amountStatus,
-										 String contractStart, String contractEnd, Integer pageNo, Integer pageSize);
+										 String contractStart, String contractEnd,String uid, Integer pageNo, Integer pageSize);
 	/**
 	 * 订单审核
 	 * @param orderNo

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

@@ -5,16 +5,7 @@ import java.util.List;
 import com.goafanti.common.bo.UserOrderTask;
 import com.goafanti.common.model.TTaskHours;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.OutTaskProgressLog;
-import com.goafanti.order.bo.TOrderTaskDetailBo;
-import com.goafanti.order.bo.TOrderTaskListBo;
-import com.goafanti.order.bo.TaskLogBo;
-import com.goafanti.order.bo.TaskProgressBo;
-import com.goafanti.order.bo.UpdateProjectStatusBo;
-import com.goafanti.order.bo.inuptTaskHoursListBo;
-import com.goafanti.order.bo.inuptTaskListBo;
-import com.goafanti.order.bo.managerListBo;
-import com.goafanti.order.bo.taskAttributionLogBo;
+import com.goafanti.order.bo.*;
 import com.goafanti.order.controller.InputProjectCheck;
 import com.goafanti.organization.bo.OutPaymentNode;
 
@@ -87,4 +78,5 @@ public interface OrderProjectService {
 	Object selectProjectCheck(InputProjectCheck in);
 
 
+    List<OutHighNewRetrialStatistics> highNewRetrialStatistics(String depId, String startDate, String endDate);
 }

+ 16 - 52
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -20,6 +20,8 @@ import java.util.UUID;
 import javax.mail.MessagingException;
 import javax.servlet.http.HttpServletResponse;
 
+import com.goafanti.common.dao.*;
+import com.goafanti.common.model.*;
 import com.goafanti.order.bo.*;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.xssf.usermodel.XSSFCell;
@@ -40,60 +42,10 @@ import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.OrderOperator;
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.IdleContractNoMapper;
-import com.goafanti.common.dao.NewOrderDunMapper;
-import com.goafanti.common.dao.OfficialFeePriceMapper;
-import com.goafanti.common.dao.OrganizationContactBookMapper;
-import com.goafanti.common.dao.OrganizationManagementMapper;
-import com.goafanti.common.dao.OutsourceLogMapper;
-import com.goafanti.common.dao.PaymentNodeMapper;
-import com.goafanti.common.dao.ProjcetCheckLogMapper;
-import com.goafanti.common.dao.TArrearsDunMapper;
-import com.goafanti.common.dao.TDunLogMapper;
-import com.goafanti.common.dao.TOrderBackMapper;
-import com.goafanti.common.dao.TOrderDunMapper;
-import com.goafanti.common.dao.TOrderExtendMapper;
-import com.goafanti.common.dao.TOrderLogMapper;
-import com.goafanti.common.dao.TOrderMidMapper;
-import com.goafanti.common.dao.TOrderNewMapper;
-import com.goafanti.common.dao.TOrderOutsourceMapper;
-import com.goafanti.common.dao.TOrderRefundMapper;
-import com.goafanti.common.dao.TOrderTaskMapper;
-import com.goafanti.common.dao.TTaskMidMapper;
-import com.goafanti.common.dao.ThirdPartyCompanyMapper;
-import com.goafanti.common.dao.UserLockReleaseMapper;
-import com.goafanti.common.dao.UserMapper;
-import com.goafanti.common.dao.UserMidMapper;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.OfficialPatentType;
 import com.goafanti.common.enums.OrderLogProcess;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.IdleContractNo;
-import com.goafanti.common.model.NewOrderDun;
-import com.goafanti.common.model.Notice;
-import com.goafanti.common.model.OfficialFeePrice;
-import com.goafanti.common.model.OrganizationContactBook;
-import com.goafanti.common.model.OrganizationManagement;
-import com.goafanti.common.model.OutsourceLog;
-import com.goafanti.common.model.PaymentNode;
-import com.goafanti.common.model.ProjcetCheckLog;
-import com.goafanti.common.model.TArrearsDun;
-import com.goafanti.common.model.TDunLog;
-import com.goafanti.common.model.TOrderBack;
-import com.goafanti.common.model.TOrderDun;
-import com.goafanti.common.model.TOrderExtend;
-import com.goafanti.common.model.TOrderLog;
-import com.goafanti.common.model.TOrderMid;
-import com.goafanti.common.model.TOrderNew;
-import com.goafanti.common.model.TOrderNewWithBLOBs;
-import com.goafanti.common.model.TOrderOutsource;
-import com.goafanti.common.model.TOrderRefundWithBLOBs;
-import com.goafanti.common.model.TOrderTask;
-import com.goafanti.common.model.TTaskMid;
-import com.goafanti.common.model.User;
-import com.goafanti.common.model.UserMid;
 import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.LoggerUtils;
@@ -184,6 +136,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	private AsyncUtils	asyncUtils;
 	@Autowired
 	private PushOrderService pushOrderService;
+	@Autowired
+	private BusinessProjectMapper businessProjectMapper;
 	
 	@Value(value = "${mobileRemindCodeTemplate}")
 	private String					mobileRemindCodeTemplate	= null;
@@ -246,7 +200,16 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		String str=tOrderTaskMapper.selectByidGetCname(t.getCommodityId());
 		t.setCname(str);
 		tOrderTaskMapper.insertSelectiveGetId(t);
-		TTaskMid tm=new TTaskMid(t.getId(),null);
+		TTaskMid tm=new TTaskMid();
+		tm.setTid(t.getId());
+		//判断这个项目是不是高新复审
+		int highNewRetrial=0;
+		BusinessProject b=businessProjectMapper.selectByPrimaryKey(t.getCommodityId());
+		if (b.getType()==5){
+			int i=tOrderTaskMapper.getHighNewRetrial(order.getOrderNo());
+			if (i>0) highNewRetrial =1;
+		}
+		tm.setHighNewRetrial(highNewRetrial);
 		tTaskMidMapper.insertSelective(tm);
 		return 1;
 	}
@@ -611,7 +574,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public Pagination<TOrderNewBo> orderNewList(String aid,String name, String orderNo, String starTime, String endTime,Integer specially,Integer approval,
 			Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus, Integer amountStatus,
-												String contractStart, String contractEnd,  Integer pageNo, Integer pageSize) {
+												String contractStart, String contractEnd,String uid,  Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(pageSize==null||pageSize<0)pageSize=10;
 		if(pageNo==null||pageNo<0)pageNo=1;
@@ -641,6 +604,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
 		if (StringUtils.isNotBlank(contractStart)) params.put("contractStart", contractStart);
 		if (StringUtils.isNotBlank(contractEnd)) params.put("contractEnd", contractEnd+" 23:59:59");
+		if (StringUtils.isNotBlank(uid)) params.put("uid", uid);
 		params.put("outsource", outsource);
 		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectOrderNewListByPage", "selectOrderNewListCount", params, pageNo, pageSize);
 		return p;

+ 8 - 15
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -14,6 +14,7 @@ import java.util.UUID;
 import javax.mail.MessagingException;
 
 import com.goafanti.common.dao.*;
+import com.goafanti.order.bo.*;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -64,20 +65,6 @@ import com.goafanti.common.utils.SendEmailUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
-import com.goafanti.order.bo.OutNewOrderDunBo;
-import com.goafanti.order.bo.OutProjectCheck;
-import com.goafanti.order.bo.OutProjectCheckLog;
-import com.goafanti.order.bo.OutTaskProgressLog;
-import com.goafanti.order.bo.TOrderTaskBo;
-import com.goafanti.order.bo.TOrderTaskDetailBo;
-import com.goafanti.order.bo.TOrderTaskListBo;
-import com.goafanti.order.bo.TaskLogBo;
-import com.goafanti.order.bo.TaskProgressBo;
-import com.goafanti.order.bo.UpdateProjectStatusBo;
-import com.goafanti.order.bo.inuptTaskHoursListBo;
-import com.goafanti.order.bo.inuptTaskListBo;
-import com.goafanti.order.bo.managerListBo;
-import com.goafanti.order.bo.taskAttributionLogBo;
 import com.goafanti.order.controller.InputProjectCheck;
 import com.goafanti.order.enums.BonusSubject;
 import com.goafanti.order.enums.NewOrderDunType;
@@ -1024,5 +1011,11 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		map.put("aid", TokenManager.getAdminId());
 		return (Pagination<OutProjectCheck>)findPage("selectProjectCheck", "countProjectCheck", map, in.getPageNo(), in.getPageSize());
 	}
-	
+
+	@Override
+	public List<OutHighNewRetrialStatistics> highNewRetrialStatistics(String depId, String startDate, String endDate) {
+		endDate=endDate+" 23:59:59";
+		return tOrderTaskMapper.highNewRetrialStatistics(depId,startDate,endDate);
+	}
+
 }

+ 0 - 1
src/main/java/com/goafanti/patent/service/PatentCostService.java

@@ -18,7 +18,6 @@ public interface PatentCostService {
 
 	PatentCost selectByPrimaryKey(String cid);
 
-	int batchUpdateByPrimaryKey(List<PatentCost> list);
 
 
 }

+ 0 - 4
src/main/java/com/goafanti/patent/service/impl/PatentCostServiceImpl.java

@@ -82,9 +82,5 @@ public class PatentCostServiceImpl extends BaseMybatisDao<PatentCostMapper> impl
 		return patentCostMapper.selectByPrimaryKey(id);
 	}
 
-	@Override
-	public int batchUpdateByPrimaryKey(List<PatentCost> list) {
-		return patentCostMapper.batchUpdateByPrimaryKey(list);
-	}
 
 }

+ 9 - 0
src/main/java/com/goafanti/user/bo/outFollowStatisticsList.java

@@ -5,6 +5,7 @@ import com.goafanti.common.utils.excel.Excel;
 import java.math.BigDecimal;
 
 public class outFollowStatisticsList {
+    private  Integer id;
     @Excel(name = "面谈部门")
     private String name;
     @Excel(name = "老客户面谈数")
@@ -32,6 +33,14 @@ public class outFollowStatisticsList {
     @Excel(name = "总面谈率")
     private String totalRatio;
 
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
     public String getName() {
         return name;
     }

+ 33 - 13
src/main/java/com/goafanti/user/bo/outProvinceFollowStatistic.java

@@ -1,11 +1,37 @@
 package com.goafanti.user.bo;
 
 public class outProvinceFollowStatistic {
+    private String id;
     private String name;
+    private String uid;
     private String nickname;
-    private String newUser;
-    private String interviewCount;
-    private String quantity;
+    private Integer newUser;
+    private Integer sign;
+    private Integer quantity;
+
+    public Integer getSign() {
+        return sign;
+    }
+
+    public void setSign(Integer sign) {
+        this.sign = sign;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getUid() {
+        return uid;
+    }
+
+    public void setUid(String uid) {
+        this.uid = uid;
+    }
 
     public String getName() {
         return name;
@@ -23,27 +49,21 @@ public class outProvinceFollowStatistic {
         this.nickname = nickname;
     }
 
-    public String getNewUser() {
+    public Integer getNewUser() {
         return newUser;
     }
 
-    public void setNewUser(String newUser) {
+    public void setNewUser(Integer newUser) {
         this.newUser = newUser;
     }
 
-    public String getInterviewCount() {
-        return interviewCount;
-    }
 
-    public void setInterviewCount(String interviewCount) {
-        this.interviewCount = interviewCount;
-    }
 
-    public String getQuantity() {
+    public Integer getQuantity() {
         return quantity;
     }
 
-    public void setQuantity(String quantity) {
+    public void setQuantity(Integer quantity) {
         this.quantity = quantity;
     }
 }

+ 8 - 2
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -7,6 +7,7 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -30,6 +31,11 @@ public class AdminReleaseApiController extends CertifyApiController{
 	
 	@Resource
 	private PublicReleaseService publicReleaseService;
+
+	@Value(value = "${upload.path}")
+	private String					uploadPath			= null;
+
+
 	
 	/**
 	 * 发起外出申请
@@ -189,10 +195,10 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/publicReleaseDtails/export", method = RequestMethod.GET)
-	public Result publicReleaseListDtailsExport(InputPublicDtails in ,HttpServletResponse response){
+	public Result publicReleaseListDtailsExport(InputPublicDtails in ){
 		List<OutPublicDtails> list=publicReleaseService.publicReleaseListDtailsList(in);
 		NewExcelUtil<OutPublicDtails>excel=new NewExcelUtil<>(OutPublicDtails.class);
- 		 return  excel.exportExcel(list,"公出详细列表",response);
+ 		 return  excel.exportExcel(list,"公出详细列表",uploadPath);
 	}
 	
 	/** 上传图片 **/