anderx пре 5 година
родитељ
комит
5ff554008d
32 измењених фајлова са 1792 додато и 539 уклоњено
  1. 56 8
      GeneratorConfig.xml
  2. 3 0
      src/main/java/com/goafanti/common/dao/BusinessProjectMapper.java
  3. 5 2
      src/main/java/com/goafanti/common/dao/TTaskMidMapper.java
  4. 22 0
      src/main/java/com/goafanti/common/dao/TaskProgressLogMapper.java
  5. 0 56
      src/main/java/com/goafanti/common/dao/TaskProgressMapper.java
  6. 0 1
      src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml
  7. 116 12
      src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml
  8. 23 1
      src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml
  9. 100 0
      src/main/java/com/goafanti/common/mapper/TaskProgressLogMapper.xml
  10. 61 194
      src/main/java/com/goafanti/common/mapper/TaskProgressMapper.xml
  11. 46 0
      src/main/java/com/goafanti/common/model/TOrderTask.java
  12. 108 168
      src/main/java/com/goafanti/common/model/TTaskMid.java
  13. 92 74
      src/main/java/com/goafanti/common/model/TaskProgress.java
  14. 104 0
      src/main/java/com/goafanti/common/model/TaskProgressLog.java
  15. 1 1
      src/main/java/com/goafanti/common/utils/ExportExcelUtil.java
  16. 27 3
      src/main/java/com/goafanti/order/bo/InputProjectStatistics.java
  17. 149 0
      src/main/java/com/goafanti/order/bo/InputProvincialStatistics.java
  18. 114 10
      src/main/java/com/goafanti/order/bo/OutProjectStatistics.java
  19. 130 0
      src/main/java/com/goafanti/order/bo/OutProvincialStatistics.java
  20. 42 0
      src/main/java/com/goafanti/order/bo/OutTaskProgressLog.java
  21. 9 0
      src/main/java/com/goafanti/order/bo/Outproject.java
  22. 60 0
      src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java
  23. 20 0
      src/main/java/com/goafanti/order/bo/TaskProgressBo.java
  24. 15 0
      src/main/java/com/goafanti/order/controller/OrderProjectApiController.java
  25. 57 0
      src/main/java/com/goafanti/order/controller/ProjectStatisticsApiController.java
  26. 69 0
      src/main/java/com/goafanti/order/enums/ProjectType.java
  27. 6 0
      src/main/java/com/goafanti/order/service/OrderProjectService.java
  28. 11 0
      src/main/java/com/goafanti/order/service/ProjectStatisticsService.java
  29. 1 1
      src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java
  30. 47 1
      src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java
  31. 296 2
      src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java
  32. 2 5
      src/main/webapp/WEB-INF/web.xml

+ 56 - 8
GeneratorConfig.xml

@@ -1,14 +1,62 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
 <generatorConfiguration>
-   <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-8.0.17.jar" /> 
-   <!-- <classPathEntry location="C:\Users\Administrator\.dbeaver-drivers\maven\maven-central\mysql\mysql-connector-java-5.1.44.jar" /> -->
-  <context id="context1">	
+   <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-5.1.39.jar" /> 
+   <!-- <classPathEntry location="C:\Users\Administrator.SC-202009251130\AppData\Roaming\DBeaverData\drivers\maven\maven-central\mysql\mysql-connector-java-8.0.17.jar" /> /> -->
+  <context  id="MysqlTables" targetRuntime="MyBatis3" defaultModelType="flat">
+  <!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
+        <property name="autoDelimitKeywords" value="true"/>	
+        <!-- 生成的Java文件的编码 -->
+        <property name="javaFileEncoding" value="utf-8"/>
+        <!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
+        <property name="beginningDelimiter" value="`"/>
+        <property name="endingDelimiter" value="`"/>
+        
+        <!-- 格式化XML代码 -->
+        <property name="xmlFormatter" value="org.mybatis.generator.api.dom.DefaultXmlFormatter"/>
+        <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
+        <plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
+
+        <!-- 注释 -->
+        <commentGenerator>
+            <property name="suppressAllComments" value="true"/><!-- 是否取消注释 -->
+            <property name="suppressDate" value="false"/> <!-- 是否生成注释代时间戳-->
+        </commentGenerator>
+        
+        
      <jdbcConnection connectionURL="jdbc:mysql://localhost:3306/aft?serverTimezone=UTC"  
-    	driverClass="com.mysql.cj.jdbc.Driver" password="123456" userId="root" />
-    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" />
-    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" />
-    <javaClientGenerator  targetPackage="com.goafanti.common.dao"  type="XMLMAPPER" targetProject="kede-server"  />
-    <table schema="aft" tableName="t_order_outsource"/>
+    	driverClass="com.mysql.jdbc.Driver" password="123456" userId="root" >
+    	 <!-- 防止生成其它库的表 -->
+            <property name="nullCatalogMeansCurrent" value="true"/>
+        </jdbcConnection>
+         <!-- 类型转换 -->
+        <javaTypeResolver>
+            <!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
+            <property name="forceBigDecimals" value="false"/>
+        </javaTypeResolver>
+    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="kede-server" >
+    		<!-- 是否让schema作为包的后缀 -->
+            <property name="enableSubPackages" value="false"/>
+            <!-- 从数据库返回的值去掉前后空格 -->
+            <property name="trimStrings" value="true"/>
+    </javaModelGenerator>
+    <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="kede-server" >
+    	<property name="enableSubPackages" value="false"/>
+    </sqlMapGenerator>
+    <javaClientGenerator  targetPackage="com.goafanti.common.dao"  type="XMLMAPPER" targetProject="kede-server"  >
+    <property name="enableSubPackages" value="false"/>
+     <property name="nullCatalogMeansCurrent" value="true"/>
+    </javaClientGenerator>
+    <table schema="aft" tableName="task_progress"   enableCountByExample="false"
+               enableUpdateByExample="false"
+               enableDeleteByExample="false"
+               enableSelectByExample="false"
+               selectByExampleQueryId="false"
+               enableSelectByPrimaryKey="true"
+               enableUpdateByPrimaryKey="true"
+               enableDeleteByPrimaryKey="true"
+        >
+         <property name="useActualColumnNames" value="false"/>
+        </table>
   </context>
 </generatorConfiguration>

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

@@ -4,6 +4,7 @@ import com.goafanti.app.bo.ProjectBo;
 import com.goafanti.app.bo.ProjectDetailBo;
 import com.goafanti.common.model.BusinessProject;
 import com.goafanti.common.model.BusinessProjectExample;
+import com.goafanti.order.bo.Outproject;
 import com.goafanti.common.model.BusinessCategory;
 
 import java.util.List;
@@ -96,5 +97,7 @@ public interface BusinessProjectMapper {
 
 	 List<BusinessCategory> selectBusinessProjectCatalog();
 
+	List<Outproject> queryItems(String name);
+
 	
 }

+ 5 - 2
src/main/java/com/goafanti/common/dao/TTaskMidMapper.java

@@ -96,10 +96,13 @@ public interface TTaskMidMapper {
      */
     int updateByPrimaryKey(TTaskMid record);
 
+	int updateCostAmount(@Param("tid")Integer tid, @Param("costAmount")BigDecimal costAmount);
 
 	int updatePaymentAmount(@Param("tid")Integer tid, @Param("paymentAmount")BigDecimal paymentAmount, @Param("type")Integer type);
 
-	List<TTaskMid> selectByTid(Integer tid);
+	void updateCertificatesCountByTid(@Param("tid")Integer tid, @Param("count")Integer count);
 
-	void updateCostAmount(@Param("tid")Integer tid, @Param("count")BigDecimal count);
+	List<TTaskMid> selectListByTid(Integer tid);
+
+	void updateByTid(TTaskMid tm);
 }

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

@@ -0,0 +1,22 @@
+package com.goafanti.common.dao;
+
+import java.util.List;
+
+import com.goafanti.common.model.TaskProgressLog;
+import com.goafanti.order.bo.OutTaskProgressLog;
+
+public interface TaskProgressLogMapper {
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(TaskProgressLog record);
+
+    int insertSelective(TaskProgressLog record);
+
+    TaskProgressLog selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(TaskProgressLog record);
+
+    int updateByPrimaryKey(TaskProgressLog record);
+
+	List<OutTaskProgressLog> selectTaskProgressLog(Integer tid);
+}

+ 0 - 56
src/main/java/com/goafanti/common/dao/TaskProgressMapper.java

@@ -1,79 +1,23 @@
 package com.goafanti.common.dao;
 
 import com.goafanti.common.model.TaskProgress;
-import com.goafanti.common.model.TaskProgressExample;
 import com.goafanti.order.bo.TOrderTaskListBo;
 import com.goafanti.order.bo.TaskProgressBo;
 
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface TaskProgressMapper {
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
-	long countByExample(TaskProgressExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
-	int deleteByExample(TaskProgressExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
 	int deleteByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
 	int insert(TaskProgress record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
 	int insertSelective(TaskProgress record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
-	List<TaskProgress> selectByExample(TaskProgressExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
 	TaskProgress selectByPrimaryKey(Integer id);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
-	int updateByExampleSelective(@Param("record") TaskProgress record, @Param("example") TaskProgressExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
-	int updateByExample(@Param("record") TaskProgress record, @Param("example") TaskProgressExample example);
-
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
 	int updateByPrimaryKeySelective(TaskProgress record);
 
-	/**
-	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
 	int updateByPrimaryKey(TaskProgress record);
 
 	List<TaskProgressBo> selectTaskProgress(Integer tid);

+ 0 - 1
src/main/java/com/goafanti/common/mapper/BusinessProjectMapper.xml

@@ -833,6 +833,5 @@
   <select id="selectBusinessProjectCatalog" resultType="com.goafanti.common.model.BusinessCategory">
   	select id,cname from business_category where delete_sign=0
   </select>
-  
 
 </mapper>

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

@@ -985,6 +985,21 @@
       <if test="attachmentUrl != null">
         attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
       </if>
+      <if test="setUpStatus != null">
+      	set_up_status = #{setUpStatus,jdbcType=INTEGER},
+      </if>
+      <if test="setUpTime != null">
+      	set_up_time	 = #{setUpTime,jdbcType=VARCHAR},
+      </if>
+      <if test="highTechStatus != null">
+      	high_tech_status = #{highTechStatus,jdbcType=INTEGER},
+      </if>
+      <if test="spotCheckStatus != null">
+		spot_check_status = #{spotCheckStatus,jdbcType=INTEGER},
+      </if>
+      <if test="specialComment != null">
+		special_comment = #{specialComment,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -1424,13 +1439,12 @@
    <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
 	    select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
 a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
-e.approval,l.refund_status outsourceStatus,l.start_type outsourceType,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
+e.approval,l.refund_status outsourceStatus,l.start_type outsourceType,ifnull(ttm.certificates_count ,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
 ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType,ifnull(ttm.cost_amount,0) costAmount,
 ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsource
     from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id 
   	left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
-    left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress 
-    group by task_id) i on a.id=i.task_id left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
+    left join department h on e.order_dep=h.id  left join task_hours_count k on a.id=k.tid and a.task_receiver=k.aid left join t_order_outsource l
     on a.id=l.tid  left join t_task_mid ttm  on a.id=ttm.tid where  e.delete_sign in (0,2,3)  and e.order_status in (2,4) 
     and a.outsource= #{outsource,jdbcType=INTEGER}
     <if test="role == 0 ">
@@ -1808,15 +1822,28 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
   
   
   <select id="selectProjectStatisticsListByPage" resultType="com.goafanti.order.bo.OutProjectStatistics">
- 	select  a.task_distribution_time distributionTime ,d.name province  ,c.name depName,e.salesman_name salesmanName,b.contract_no contractNo ,
-	b.order_no orderNo ,e.buyer_name userName,bc.cname ,a.commodity_name pname,ta.name techName,td.name techDepName,
-	a.status projectStatus , a.set_up_status setUpStatus ,a.set_up_time setUpTime ,a.spot_check_status spotCheckStatus,
-	b.contact_mobile contactMobile , b.legal_person_tel legalPersonTel ,a.certificate_number certificateNumber,
-	a.declaration_batch declarationBatch ,a.commodity_quantity commodityQuantity , a.commodity_price commodityPrice  
-	from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id left join district_glossory d on c.id=d.id 
+	select  date_format( a.task_distribution_time, '%Y-%m-%d %H:%i:%S' ) distributionTime ,d.name province  ,c.name depName,e.salesman_name salesmanName,
+	b.contract_no contractNo ,b.order_no orderNo ,e.buyer_name userName,bc.cname ,a.commodity_name pname,ta.name techName,td.name techDepName,
+	a.status projectStatus , a.commodity_price commodityPrice ,a.special_comment,
+	<if test="status==1">
+	a.set_up_status setUpStatus ,a.set_up_time setUpTime ,a.spot_check_status spotCheckStatus ,b.contact_mobile contactMobile , b.legal_person_tel legalPersonTel ,
+	a.certificate_number certificateNumber,a.declaration_batch declarationBatch
+	</if>
+	<if test="status==2">
+	a.licence_time licenceTime
+	</if>
+	<if test="status==3">
+	a.commodity_quantity commodityQuantity ,ttm.certificates_count certificatesCount,ttm.urgent_day urgentDay ,ttm.if_material ifMaterial,
+	a.accept_time	acceptTime ,a.licence_time licenceTime,a.certificate_number certificateNumber,ttm.cost_amount costAmount ,
+	(a.commodity_price-ttm.cost_amount)profit
+	</if>
+	ttm.reject_count	rejectCount ,ttm.patent_number patentNumber ,
+	ttm.patent_name patentName,
+	a.high_tech_status highTechStatus
+	from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id left join district_glossory d on c.province=d.id 
 	left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id 
 	left join t_task_mid ttm on a.id=ttm.tid left join admin ta on a.task_receiver =ta.id left join department td on ta.department_id =td.id
-	where 1=1
+	where a.split_status in (0,2) and a.task_status in (1,2,3)
     <if test="startDate != null and endDate != null">
   	and a.task_distribution_time between #{startDate} and #{endDate}
   	</if>
@@ -1827,7 +1854,7 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
 	and td.id= #{thchDepId}
   	</if>
   	<if test="projectStatus !=null">
-	and bc.id= #{projectStatus}
+	and bp.cid= #{projectStatus}
   	</if>
   	<if test="projectType !=null">
 	and bp.type= #{projectType}
@@ -1860,7 +1887,7 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
 	from t_order_task a left join t_order_new b on a.order_no =b.order_no  left join department c on b.order_dep =c.id  left join district_glossory d on c.id=d.id 
 	left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id 
 	 left join admin ta on a.task_receiver =ta.id left join department td on ta.department_id =td.id
-	where 1=1
+	where a.split_status in (0,2) and a.task_status in (1,2,3)
   <if test="startDate != null and endDate != null">
   	and a.task_distribution_time between #{startDate} and #{endDate}
   	</if>
@@ -1893,4 +1920,81 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
 	</if>
   </select>
   
+  
+   <select id="selectProvincialStatisticsListByPage" resultType="com.goafanti.order.bo.OutProvincialStatistics">
+	select dg.name provinceName,de.name thchDepName ,bc.cname projectStatus,
+	<if test="status==1">
+	x.kcs ,x.pds ,x.wcs,x.lxs,x.ccs,x.wtg,
+	</if>
+	x.amountCount,x.costAmount,x.profit
+	from (select dep.province, ad.department_id,bp.cid ,
+	<if test="status==1">
+	sum(kcs.cq) kcs,sum(pds.cq)pds,sum(wcs.cq)wcs, sum(lxs.cq)lxs,sum(ccs.cq)ccs,sum(pds.cq)wtg,
+	</if>
+	sum(a.commodity_price)amountCount,sum(ttm.cost_amount)costAmount, (sum(a.commodity_price)-sum(ttm.cost_amount))profit
+	from t_order_task a left join t_order_new b on a.order_no =b.order_no left join t_task_mid ttm on a.id=ttm.tid 
+	left join department dep on b.order_dep =dep.id  left join admin ad on a.task_receiver =ad.id
+	left join business_project bp on a.commodity_id =bp.id 
+	<if test="status==1">
+	left join (select id,commodity_quantity cq from t_order_task where status in(0,1,2,3,5,6))kcs on a.id=kcs.id
+	left join (select id,commodity_quantity cq from t_order_task where task_status in (1,2,3))pds on a.id=pds.id
+	left join (select id,commodity_quantity cq from t_order_task where status in(4,6))wcs on a.id=wcs.id
+	left join (select id,commodity_quantity cq from t_order_task where  set_up_status =1)lxs on a.id=lxs.id
+	left join (select id,commodity_quantity cq from t_order_task where spot_check_status in (1,2))ccs on a.id=ccs.id
+	left join (select id,commodity_quantity cq from t_order_task where spot_check_status =1)wtg on a.id=wtg.id
+	</if>
+	where  b.order_dep is not null and a.split_status in(0,2) and a.task_status in (1,2,3)
+	<if test="startDate != null and endDate != null">
+  	and a.task_distribution_time between #{startDate} and #{endDate}
+  	</if>
+  	<if test="province !=null">
+	and dep.province = #{province} 
+  	</if>
+	<if test="thchDepId !=null">
+	and ad.department_id = #{thchDepId}
+  	</if>  	
+	<if test="projectStatus !=null">
+	and bp.cid =  #{projectStatus}
+  	</if>  	
+	<if test="projectType !=null">
+	and bp.`type` = #{projectType}
+  	</if>  	
+	<if test="projectId !=null">
+	 and a.commodity_id = #{projectId}
+  	</if>  	
+	group by  dep.province,ad.department_id,bp.cid )x left join district_glossory dg on x.province=dg.id
+left join department de on x.department_id=de.id left join business_category bc on x.cid=bc.id
+  	<if test="page_sql!=null">
+			${page_sql}
+	</if>
+  </select>
+  
+  <select id="selectProvincialStatisticsCount" resultType="java.lang.Integer">
+  select count(*)
+	from (select dep.province, ad.department_id,bp.cid 
+	from t_order_task a left join t_order_new b on a.order_no =b.order_no left join t_task_mid ttm on a.id=ttm.tid 
+	left join department dep on b.order_dep =dep.id  left join admin ad on a.task_receiver =ad.id
+	left join business_project bp on a.commodity_id =bp.id 
+	where  b.order_dep is not null  and a.split_status in(0,2) and a.task_status in (1,2,3)
+	<if test="startDate != null and endDate != null">
+  	and a.task_distribution_time between #{startDate} and #{endDate}
+  	</if>
+  	<if test="province !=null">
+	and dep.province = #{province} 
+  	</if>
+	<if test="thchDepId !=null">
+	and ad.department_id = #{thchDepId}
+  	</if>  	
+	<if test="projectStatus !=null">
+	and bp.cid =  #{projectStatus}
+  	</if>  	
+	<if test="projectType !=null">
+	and bp.`type` = #{projectType}
+  	</if>  	
+	<if test="projectId !=null">
+	 and a.commodity_id = #{projectId}
+  	</if>  	
+	group by  dep.province,ad.department_id,bp.cid )x 
+  </select>
+  
 </mapper>

+ 23 - 1
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -295,7 +295,7 @@
     where tid = #{tid,jdbcType=INTEGER}
   </update>
   <select id="selectByTid" resultType="com.goafanti.common.model.TTaskMid">
-	    select c.tid,c.cost_amount costAmount from t_order_task a left join t_order_task b on a.order_no=b.order_no
+	    select c.id,c.tid,c.cost_amount costAmount 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>
@@ -305,4 +305,26 @@
     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>
+  
+  <update id="updateByTid" parameterType="com.goafanti.common.model.TTaskMid">
+    update t_task_mid
+    <set>
+      <if test="urgentDay != null">
+        urgent_Day = #{urgentDay},
+      </if>
+      <if test="ifMaterial != null">
+        if_material = #{ifMaterial},
+      </if>
+      <if test="rejectCount != null">
+        reject_count = #{rejectCount},
+      </if>
+    </set>
+    where tid = #{tid,jdbcType=INTEGER}
+  </update>
 </mapper>

+ 100 - 0
src/main/java/com/goafanti/common/mapper/TaskProgressLogMapper.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.goafanti.common.dao.TaskProgressLogMapper">
+  <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskProgressLog">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="tid" jdbcType="INTEGER" property="tid" />
+    <result column="patent_name" jdbcType="VARCHAR" property="patentName" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    id, tid, patent_name, `status`, create_time
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from task_progress_log
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from task_progress_log
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <insert id="insert" parameterType="com.goafanti.common.model.TaskProgressLog">
+    insert into task_progress_log (id, tid, patent_name, 
+      `status`, create_time)
+    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{patentName,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.goafanti.common.model.TaskProgressLog">
+    insert into task_progress_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="tid != null">
+        tid,
+      </if>
+      <if test="patentName != null">
+        patent_name,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="tid != null">
+        #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="patentName != null">
+        #{patentName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskProgressLog">
+    update task_progress_log
+    <set>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="patentName != null">
+        patent_name = #{patentName,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </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.TaskProgressLog">
+    update task_progress_log
+    set tid = #{tid,jdbcType=INTEGER},
+      patent_name = #{patentName,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  
+  <select id="selectTaskProgressLog" resultType="com.goafanti.order.bo.OutTaskProgressLog">
+    select 
+	   id, tid, patent_name patentName, `status`, date_format(create_time,'%Y-%m-%d %H:%i:%S')createTime
+    from task_progress_log
+    where tid = #{tid,jdbcType=INTEGER}
+  </select>
+</mapper>

+ 61 - 194
src/main/java/com/goafanti/common/mapper/TaskProgressMapper.xml

@@ -2,160 +2,42 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TaskProgressMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TaskProgress">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="already_number" jdbcType="INTEGER" property="alreadyNumber" />
     <result column="licence_time" jdbcType="TIMESTAMP" property="licenceTime" />
     <result column="task_id" jdbcType="INTEGER" property="taskId" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="accept_time" jdbcType="TIMESTAMP" property="acceptTime" />
+    <result column="authorize_time" jdbcType="TIMESTAMP" property="authorizeTime" />
+    <result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
+    <result column="patent_name" jdbcType="VARCHAR" property="patentName" />
+    <result column="status" jdbcType="INTEGER" property="status" />
   </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 Wed Jun 05 14:03:08 CST 2019.
-    -->
-    <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 Wed Jun 05 14:03:08 CST 2019.
-    -->
-    <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 Wed Jun 05 14:03:08 CST 2019.
-    -->
-    id, already_number, licence_time, task_id, create_time
+    id, already_number, licence_time, task_id, create_time, accept_time, authorize_time, 
+    patent_no, patent_name, `status`
   </sql>
-  <select id="selectByExample" parameterType="com.goafanti.common.model.TaskProgressExample" resultMap="BaseResultMap">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from task_progress
-    <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 Wed Jun 05 14:03:08 CST 2019.
-    -->
     select 
     <include refid="Base_Column_List" />
     from task_progress
     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 Wed Jun 05 14:03:08 CST 2019.
-    -->
     delete from task_progress
     where id = #{id,jdbcType=INTEGER}
   </delete>
-  <delete id="deleteByExample" parameterType="com.goafanti.common.model.TaskProgressExample">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
-    delete from task_progress
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TaskProgress">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
     insert into task_progress (id, already_number, licence_time, 
-      task_id, create_time)
+      task_id, create_time, accept_time, 
+      authorize_time, patent_no, patent_name, 
+      `status`)
     values (#{id,jdbcType=INTEGER}, #{alreadyNumber,jdbcType=INTEGER}, #{licenceTime,jdbcType=TIMESTAMP}, 
-      #{taskId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
+      #{taskId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{acceptTime,jdbcType=TIMESTAMP}, 
+      #{authorizeTime,jdbcType=TIMESTAMP}, #{patentNo,jdbcType=VARCHAR}, #{patentName,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TaskProgress">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
     insert into task_progress
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -173,6 +55,21 @@
       <if test="createTime != null">
         create_time,
       </if>
+      <if test="acceptTime != null">
+        accept_time,
+      </if>
+      <if test="authorizeTime != null">
+        authorize_time,
+      </if>
+      <if test="patentNo != null">
+        patent_no,
+      </if>
+      <if test="patentName != null">
+        patent_name,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -190,69 +87,24 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
-    </trim>
-  </insert>
-  <select id="countByExample" parameterType="com.goafanti.common.model.TaskProgressExample" resultType="java.lang.Long">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
-    select count(*) from task_progress
-    <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 Wed Jun 05 14:03:08 CST 2019.
-    -->
-    update task_progress
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=INTEGER},
+      <if test="acceptTime != null">
+        #{acceptTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="record.alreadyNumber != null">
-        already_number = #{record.alreadyNumber,jdbcType=INTEGER},
+      <if test="authorizeTime != null">
+        #{authorizeTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="record.licenceTime != null">
-        licence_time = #{record.licenceTime,jdbcType=TIMESTAMP},
+      <if test="patentNo != null">
+        #{patentNo,jdbcType=VARCHAR},
       </if>
-      <if test="record.taskId != null">
-        task_id = #{record.taskId,jdbcType=INTEGER},
+      <if test="patentName != null">
+        #{patentName,jdbcType=VARCHAR},
       </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
       </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 Wed Jun 05 14:03:08 CST 2019.
-    -->
-    update task_progress
-    set id = #{record.id,jdbcType=INTEGER},
-      already_number = #{record.alreadyNumber,jdbcType=INTEGER},
-      licence_time = #{record.licenceTime,jdbcType=TIMESTAMP},
-      task_id = #{record.taskId,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP}
-    <if test="_parameter != null">
-      <include refid="Update_By_Example_Where_Clause" />
-    </if>
-  </update>
+    </trim>
+  </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TaskProgress">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
     update task_progress
     <set>
       <if test="alreadyNumber != null">
@@ -267,20 +119,35 @@
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="acceptTime != null">
+        accept_time = #{acceptTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="authorizeTime != null">
+        authorize_time = #{authorizeTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="patentNo != null">
+        patent_no = #{patentNo,jdbcType=VARCHAR},
+      </if>
+      <if test="patentName != null">
+        patent_name = #{patentName,jdbcType=VARCHAR},
+      </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.TaskProgress">
-    <!--
-      WARNING - @mbg.generated
-      This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Wed Jun 05 14:03:08 CST 2019.
-    -->
     update task_progress
     set already_number = #{alreadyNumber,jdbcType=INTEGER},
       licence_time = #{licenceTime,jdbcType=TIMESTAMP},
       task_id = #{taskId,jdbcType=INTEGER},
-      create_time = #{createTime,jdbcType=TIMESTAMP}
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      accept_time = #{acceptTime,jdbcType=TIMESTAMP},
+      authorize_time = #{authorizeTime,jdbcType=TIMESTAMP},
+      patent_no = #{patentNo,jdbcType=VARCHAR},
+      patent_name = #{patentName,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   <select id="selectTaskProgress" resultType="com.goafanti.order.bo.TaskProgressBo">

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

@@ -246,6 +246,7 @@ public class TOrderTask {
 	 * @return  the value of t_order_task.id
 	 * @mbg.generated  Thu Jun 11 09:59:01 CST 2020
 	 */
+	private String specialComment;
 	public Integer getId() {
 		return id;
 	}
@@ -1110,6 +1111,51 @@ public class TOrderTask {
 	public void setEmail(String email) {
 		this.email = email;
 	}
+	
+	private Integer setUpStatus;
+	private String setUpTime;
+	private Integer spotCheckStatus;
+	private Integer highTechStatus;
+	public Integer getSetUpStatus() {
+		return setUpStatus;
+	}
+
+	public void setSetUpStatus(Integer setUpStatus) {
+		this.setUpStatus = setUpStatus;
+	}
+
+	public String getSetUpTime() {
+		return setUpTime;
+	}
 
+	public void setSetUpTime(String setUpTime) {
+		this.setUpTime = setUpTime;
+	}
+
+	public Integer getSpotCheckStatus() {
+		return spotCheckStatus;
+	}
+
+	public void setSpotCheckStatus(Integer spotCheckStatus) {
+		this.spotCheckStatus = spotCheckStatus;
+	}
+
+	public Integer getHighTechStatus() {
+		return highTechStatus;
+	}
+
+	public void setHighTechStatus(Integer highTechStatus) {
+		this.highTechStatus = highTechStatus;
+	}
+
+	public String getSpecialComment() {
+		return specialComment;
+	}
+
+	public void setSpecialComment(String specialComment) {
+		this.specialComment = specialComment;
+	}
+
+	
 	
 }

+ 108 - 168
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -2,179 +2,119 @@ package com.goafanti.common.model;
 
 import java.math.BigDecimal;
 import java.util.Date;
+import javax.annotation.Generated;
 
 public class TTaskMid {
-    /**
-     *
-     * This field was generated by MyBatis Generator.
-     * This field corresponds to the database column t_task_mid.id
-     *
-     * @mbg.generated Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 CST 2020
-     */
-    private Date createTime;
-
-    
-    
-    public TTaskMid() {}
+    @Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.616+08:00", comments = "Source field: t_task_mid.id")
+	private Integer id;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.622+08:00", comments = "Source field: t_task_mid.tid")
+	private Integer tid;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.cost_amount")
+	private BigDecimal costAmount;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.party_amount")
+	private BigDecimal partyAmount;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.create_time")
+	private Date createTime;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.certificates_count")
+	private Integer certificatesCount;
+
+
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.622+08:00", comments = "Source field: t_task_mid.id")
+	public Integer getId() {
+		return id;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.622+08:00", comments = "Source field: t_task_mid.id")
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.622+08:00", comments = "Source field: t_task_mid.tid")
+	public Integer getTid() {
+		return tid;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.622+08:00", comments = "Source field: t_task_mid.tid")
+	public void setTid(Integer tid) {
+		this.tid = tid;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.cost_amount")
+	public BigDecimal getCostAmount() {
+		return costAmount;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.cost_amount")
+	public void setCostAmount(BigDecimal costAmount) {
+		this.costAmount = costAmount;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.party_amount")
+	public BigDecimal getPartyAmount() {
+		return partyAmount;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.party_amount")
+	public void setPartyAmount(BigDecimal partyAmount) {
+		this.partyAmount = partyAmount;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.create_time")
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.create_time")
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.certificates_count")
+	public Integer getCertificatesCount() {
+		return certificatesCount;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:48:45.623+08:00", comments = "Source field: t_task_mid.certificates_count")
+	public void setCertificatesCount(Integer certificatesCount) {
+		this.certificatesCount = certificatesCount;
+	}
+
+	private Integer urgentDay;
+	private Integer ifMaterial;
+	private Integer rejectCount;
+	
+	
+
+	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 TTaskMid() {}
     
     public TTaskMid(Integer tid,BigDecimal costAmount) {
     	this.tid=tid;
     	if(costAmount!=null)this.costAmount=costAmount;
     }
-    
-    /**
-     * 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 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 Thu Jun 18 15:57:30 CST 2020
-     */
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
 }

+ 92 - 74
src/main/java/com/goafanti/common/model/TaskProgress.java

@@ -1,125 +1,143 @@
 package com.goafanti.common.model;
 
 import java.util.Date;
+import javax.annotation.Generated;
+import java.io.Serializable;
 
-public class TaskProgress {
+public class TaskProgress implements Serializable {
 
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.id
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.978+08:00", comments = "Source field: task_progress.id")
 	private Integer id;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.already_number
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.979+08:00", comments = "Source field: task_progress.already_number")
 	private Integer alreadyNumber;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.licence_time
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.98+08:00", comments = "Source field: task_progress.licence_time")
 	private Date licenceTime;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.task_id
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.981+08:00", comments = "Source field: task_progress.task_id")
 	private Integer taskId;
-	/**
-	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.create_time
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.981+08:00", comments = "Source field: task_progress.create_time")
 	private Date createTime;
+	private static final long serialVersionUID = 1L;
 
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.id
-	 * @return  the value of task_progress.id
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.978+08:00", comments = "Source field: task_progress.id")
 	public Integer getId() {
 		return id;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.id
-	 * @param id  the value for task_progress.id
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.978+08:00", comments = "Source field: task_progress.id")
 	public void setId(Integer id) {
 		this.id = id;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.already_number
-	 * @return  the value of task_progress.already_number
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.979+08:00", comments = "Source field: task_progress.already_number")
 	public Integer getAlreadyNumber() {
-		if (alreadyNumber==null) {
-			return 0;
-		}
 		return alreadyNumber;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.already_number
-	 * @param alreadyNumber  the value for task_progress.already_number
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.98+08:00", comments = "Source field: task_progress.already_number")
 	public void setAlreadyNumber(Integer alreadyNumber) {
 		this.alreadyNumber = alreadyNumber;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.licence_time
-	 * @return  the value of task_progress.licence_time
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.98+08:00", comments = "Source field: task_progress.licence_time")
 	public Date getLicenceTime() {
 		return licenceTime;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.licence_time
-	 * @param licenceTime  the value for task_progress.licence_time
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.98+08:00", comments = "Source field: task_progress.licence_time")
 	public void setLicenceTime(Date licenceTime) {
 		this.licenceTime = licenceTime;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.task_id
-	 * @return  the value of task_progress.task_id
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.981+08:00", comments = "Source field: task_progress.task_id")
 	public Integer getTaskId() {
 		return taskId;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.task_id
-	 * @param taskId  the value for task_progress.task_id
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.981+08:00", comments = "Source field: task_progress.task_id")
 	public void setTaskId(Integer taskId) {
 		this.taskId = taskId;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.create_time
-	 * @return  the value of task_progress.create_time
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.981+08:00", comments = "Source field: task_progress.create_time")
 	public Date getCreateTime() {
 		return createTime;
 	}
 
-	/**
-	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.create_time
-	 * @param createTime  the value for task_progress.create_time
-	 * @mbg.generated  Wed Jun 05 14:03:08 CST 2019
-	 */
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T11:51:42.981+08:00", comments = "Source field: task_progress.create_time")
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
+
+	
+
+	@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(", alreadyNumber=").append(alreadyNumber);
+		sb.append(", licenceTime=").append(licenceTime);
+		sb.append(", taskId=").append(taskId);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", acceptTime=").append(acceptTime);
+		sb.append(", authorizeTime=").append(authorizeTime);
+		sb.append(", patentNo=").append(patentNo);
+		sb.append(", patentName=").append(patentName);
+		sb.append(", status=").append(status);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+
+	private Date acceptTime;
+	private Date authorizeTime;
+	private String patentNo;
+	private String patentName;
+	private Integer status;
+	
+	
+
+	public Date getAcceptTime() {
+		return acceptTime;
+	}
+
+	public void setAcceptTime(Date acceptTime) {
+		this.acceptTime = acceptTime;
+	}
+
+	public Date getAuthorizeTime() {
+		return authorizeTime;
+	}
+
+	public void setAuthorizeTime(Date authorizeTime) {
+		this.authorizeTime = authorizeTime;
+	}
+
+	public String getPatentNo() {
+		return patentNo;
+	}
+
+	public void setPatentNo(String patentNo) {
+		this.patentNo = patentNo;
+	}
+
+	public String getPatentName() {
+		return patentName;
+	}
+
+	public void setPatentName(String patentName) {
+		this.patentName = patentName;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
 }

+ 104 - 0
src/main/java/com/goafanti/common/model/TaskProgressLog.java

@@ -0,0 +1,104 @@
+package com.goafanti.common.model;
+
+import java.util.Date;
+import javax.annotation.Generated;
+import java.io.Serializable;
+
+public class TaskProgressLog implements Serializable {
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.id")
+	private Integer id;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.tid")
+	private Integer tid;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.patent_name")
+	private String patentName;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.status")
+	private Integer status;
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.create_time")
+	private Date createTime;
+	private static final long serialVersionUID = 1L;
+	
+	public TaskProgressLog() {
+	}
+	
+	/**
+	 * 
+	 * @param tid	项目编号
+	 * @param patentName	专利名称
+	 * @param status	0新增 1删除 2修改
+	 * @param createTime 创建时间
+	 */
+	public TaskProgressLog(Integer tid,String patentName,Integer status,Date createTime) {
+		this.tid=tid;
+		this.patentName=patentName;
+		this.status=status;
+		this.createTime=createTime;
+	}
+
+	
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.id")
+	public Integer getId() {
+		return id;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.id")
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.tid")
+	public Integer getTid() {
+		return tid;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.tid")
+	public void setTid(Integer tid) {
+		this.tid = tid;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.317+08:00", comments = "Source field: task_progress_log.patent_name")
+	public String getPatentName() {
+		return patentName;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.patent_name")
+	public void setPatentName(String patentName) {
+		this.patentName = patentName == null ? null : patentName.trim();
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.status")
+	public Integer getStatus() {
+		return status;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.status")
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.create_time")
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	@Generated(value = "org.mybatis.generator.api.MyBatisGenerator", date = "2020-12-23T14:10:13.318+08:00", comments = "Source field: task_progress_log.create_time")
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	@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(", patentName=").append(patentName);
+		sb.append(", status=").append(status);
+		sb.append(", createTime=").append(createTime);
+		sb.append(", serialVersionUID=").append(serialVersionUID);
+		sb.append("]");
+		return sb.toString();
+	}
+}

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

@@ -743,7 +743,7 @@ public class ExportExcelUtil {
 		sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, comment.length-1));//合并单元格
 		//设置其他单位格式
 		//创建表头
-		XSSFRow row2 = sheet.createRow(1);
+		XSSFRow row2 = sheet.createRow(2);
 		for(int i = 0; i < comment.length; i++){
 			sheet.setColumnWidth(i, 3000);//设置列宽
 			XSSFCell c = row2.createCell(i);

+ 27 - 3
src/main/java/com/goafanti/order/bo/InputProjectStatistics.java

@@ -6,7 +6,7 @@ public class InputProjectStatistics {
 	private String endDate;
 	private String depId;
 	private String thchDepId;
-	private Integer projectStatus;
+	private String projectStatus;
 	private Integer projectType;
 	private String orderNo;
 	private String contractNo;
@@ -16,6 +16,30 @@ public class InputProjectStatistics {
 	private Integer projectAmount;
 	private Integer pageNo;
 	private Integer pageSize;
+	
+	private Integer status;
+	private String depName;
+	private String thchDepName;
+	
+	
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public String getDepName() {
+		return depName;
+	}
+	public void setDepName(String depName) {
+		this.depName = depName;
+	}
+	public String getThchDepName() {
+		return thchDepName;
+	}
+	public void setThchDepName(String thchDepName) {
+		this.thchDepName = thchDepName;
+	}
 	public String getStartDate() {
 		return startDate;
 	}
@@ -40,10 +64,10 @@ public class InputProjectStatistics {
 	public void setThchDepId(String thchDepId) {
 		this.thchDepId = thchDepId;
 	}
-	public Integer getProjectStatus() {
+	public String getProjectStatus() {
 		return projectStatus;
 	}
-	public void setProjectStatus(Integer projectStatus) {
+	public void setProjectStatus(String projectStatus) {
 		this.projectStatus = projectStatus;
 	}
 	public Integer getProjectType() {

+ 149 - 0
src/main/java/com/goafanti/order/bo/InputProvincialStatistics.java

@@ -0,0 +1,149 @@
+package com.goafanti.order.bo;
+
+public class InputProvincialStatistics {
+
+	private String startDate;
+	
+	private String EndDate;
+	
+	private Integer province;
+	
+	private String thchDepId;
+	
+	private String projectStatus;
+	
+	private Integer projectType;
+	
+	private String projectId;
+	
+	private Integer pageSize;
+	
+	private Integer pageNo;
+
+	private String thchDepName;
+	
+	private String projectStatusName;
+	
+	private Integer projectTypeName;
+	
+	private String projectName;
+	
+	private Integer status;
+	
+	
+	
+
+	public String getThchDepName() {
+		return thchDepName;
+	}
+
+	public void setThchDepName(String thchDepName) {
+		this.thchDepName = thchDepName;
+	}
+
+	public String getProjectStatusName() {
+		return projectStatusName;
+	}
+
+	public void setProjectStatusName(String projectStatusName) {
+		this.projectStatusName = projectStatusName;
+	}
+
+	public Integer getProjectTypeName() {
+		return projectTypeName;
+	}
+
+	public void setProjectTypeName(Integer projectTypeName) {
+		this.projectTypeName = projectTypeName;
+	}
+
+	public String getProjectName() {
+		return projectName;
+	}
+
+	public void setProjectName(String projectName) {
+		this.projectName = projectName;
+	}
+
+	public Integer getProvince() {
+		return province;
+	}
+
+	public void setProvince(Integer province) {
+		this.province = province;
+	}
+
+	public String getThchDepId() {
+		return thchDepId;
+	}
+
+	public void setThchDepId(String thchDepId) {
+		this.thchDepId = thchDepId;
+	}
+
+	public String getProjectStatus() {
+		return projectStatus;
+	}
+
+	public void setProjectStatus(String projectStatus) {
+		this.projectStatus = projectStatus;
+	}
+
+	public Integer getProjectType() {
+		return projectType;
+	}
+
+	public void setProjectType(Integer projectType) {
+		this.projectType = projectType;
+	}
+
+	public String getProjectId() {
+		return projectId;
+	}
+
+	public void setProjectId(String projectId) {
+		this.projectId = projectId;
+	}
+
+	public Integer getPageSize() {
+		return pageSize;
+	}
+
+	public void setPageSize(Integer pageSize) {
+		this.pageSize = pageSize;
+	}
+
+	public Integer getPageNo() {
+		return pageNo;
+	}
+
+	public void setPageNo(Integer pageNo) {
+		this.pageNo = pageNo;
+	}
+
+	public String getStartDate() {
+		return startDate;
+	}
+
+	public void setStartDate(String startDate) {
+		this.startDate = startDate;
+	}
+
+	public String getEndDate() {
+		return EndDate;
+	}
+
+	public void setEndDate(String endDate) {
+		EndDate = endDate;
+	}
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	
+	
+}

+ 114 - 10
src/main/java/com/goafanti/order/bo/OutProjectStatistics.java

@@ -1,5 +1,8 @@
 package com.goafanti.order.bo;
 
+import java.math.BigDecimal;
+
+
 public class OutProjectStatistics {
 	private String distributionTime; 
 	private String province;
@@ -12,11 +15,12 @@ public class OutProjectStatistics {
 	private String  pname;
 	private String techName;
 	private String techDepName;
-	private String projectStatus;
+	private Integer projectStatus;
 	
 
 	
-	private String  setUpStatus;
+	private Integer  setUpStatus;
+	private Integer  highTechstatus;
 	private String setUpTime;
 	private String  spotCheckStatus;
 	private String  contactMobile;
@@ -24,13 +28,38 @@ public class OutProjectStatistics {
 	private String  certificateNumber;
 	private String  declarationBatch;
 	private String  commodityQuantity;
-	private String  commodityPrice;
-
+	private BigDecimal  commodityPrice;
+	
 	
-	public String getSetUpStatus() {
+	/**下证时间*/
+	private String	licenceTime;
+	/**任务备注*/
+	private String	taskComment;
+	
+	/**下证数*/
+	private Integer	certificatesCount;
+	/**加急天数*/
+	private Integer	urgentDay;
+	/**有无材料*/
+	private String	ifMaterial;
+	/**成本*/
+	private BigDecimal	costAmount;
+	/**利润*/
+	private BigDecimal	profit;
+	/**驳回数*/
+	private Integer	rejectCount;
+	/**专利编号*/
+	private String	patentNumber;
+	/**专利名称*/
+	private String	patentName;
+	/**受理时间*/
+	private String	acceptTime;
+	
+	
+	public Integer getSetUpStatus() {
 		return setUpStatus;
 	}
-	public void setSetUpStatus(String setUpStatus) {
+	public void setSetUpStatus(Integer setUpStatus) {
 		this.setUpStatus = setUpStatus;
 	}
 	public String getSetUpTime() {
@@ -75,10 +104,10 @@ public class OutProjectStatistics {
 	public void setCommodityQuantity(String commodityQuantity) {
 		this.commodityQuantity = commodityQuantity;
 	}
-	public String getCommodityPrice() {
+	public BigDecimal getCommodityPrice() {
 		return commodityPrice;
 	}
-	public void setCommodityPrice(String commodityPrice) {
+	public void setCommodityPrice(BigDecimal commodityPrice) {
 		this.commodityPrice = commodityPrice;
 	}
 	
@@ -150,11 +179,86 @@ public class OutProjectStatistics {
 	public void setTechDepName(String techDepName) {
 		this.techDepName = techDepName;
 	}
-	public String getProjectStatus() {
+	public Integer getProjectStatus() {
 		return projectStatus;
 	}
-	public void setProjectStatus(String projectStatus) {
+	public void setProjectStatus(Integer projectStatus) {
 		this.projectStatus = projectStatus;
 	}
+	public String getLicenceTime() {
+		return licenceTime;
+	}
+	public void setLicenceTime(String licenceTime) {
+		this.licenceTime = licenceTime;
+	}
+	public String getTaskComment() {
+		return taskComment;
+	}
+	public void setTaskComment(String taskComment) {
+		this.taskComment = taskComment;
+	}
+	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 String getIfMaterial() {
+		return ifMaterial;
+	}
+	public void setIfMaterial(String ifMaterial) {
+		this.ifMaterial = ifMaterial;
+	}
+	public BigDecimal getCostAmount() {
+		return costAmount;
+	}
+	public void setCostAmount(BigDecimal costAmount) {
+		this.costAmount = costAmount;
+	}
+	public BigDecimal getProfit() {
+		if (profit==null&&commodityPrice!=null&&costAmount!=null) {
+			return  commodityPrice.subtract(costAmount);
+		}
+		return profit;
+	}
+	public void setProfit(BigDecimal profit) {
+		this.profit = profit;
+	}
+	public Integer getRejectCount() {
+		return rejectCount;
+	}
+	public void setRejectCount(Integer rejectCount) {
+		this.rejectCount = rejectCount;
+	}
+	public String getPatentNumber() {
+		return patentNumber;
+	}
+	public void setPatentNumber(String patentNumber) {
+		this.patentNumber = patentNumber;
+	}
+	public String getPatentName() {
+		return patentName;
+	}
+	public void setPatentName(String patentName) {
+		this.patentName = patentName;
+	}
+	public String getAcceptTime() {
+		return acceptTime;
+	}
+	public void setAcceptTime(String acceptTime) {
+		this.acceptTime = acceptTime;
+	}
+	public Integer getHighTechstatus() {
+		return highTechstatus;
+	}
+	public void setHighTechstatus(Integer highTechstatus) {
+		this.highTechstatus = highTechstatus;
+	}
 
 }

+ 130 - 0
src/main/java/com/goafanti/order/bo/OutProvincialStatistics.java

@@ -0,0 +1,130 @@
+package com.goafanti.order.bo;
+
+import java.math.BigDecimal;
+
+public class OutProvincialStatistics {
+	
+	private String provinceName;
+	
+	private String thchDepName;
+	
+	private String projectStatus;
+	
+	private Integer stockCount;
+	
+	private Integer distributeCount;
+	
+	private Integer completeCount;
+	
+	private Integer setUpCount;
+	
+	private Integer spotCheckCount;
+	
+	private Integer failedCount;
+	
+	private BigDecimal amountCount;
+	
+	private BigDecimal costAmount;
+	
+	private BigDecimal profit;
+
+	public String getProvinceName() {
+		return provinceName;
+	}
+
+	public void setProvinceName(String provinceName) {
+		this.provinceName = provinceName;
+	}
+
+	public String getThchDepName() {
+		return thchDepName;
+	}
+
+	public void setThchDepName(String thchDepName) {
+		this.thchDepName = thchDepName;
+	}
+
+	public String getProjectStatus() {
+		return projectStatus;
+	}
+
+	public void setProjectStatus(String projectStatus) {
+		this.projectStatus = projectStatus;
+	}
+
+	public Integer getStockCount() {
+		return stockCount;
+	}
+
+	public void setStockCount(Integer stockCount) {
+		this.stockCount = stockCount;
+	}
+
+	public Integer getDistributeCount() {
+		return distributeCount;
+	}
+
+	public void setDistributeCount(Integer distributeCount) {
+		this.distributeCount = distributeCount;
+	}
+
+	public Integer getCompleteCount() {
+		return completeCount;
+	}
+
+	public void setCompleteCount(Integer completeCount) {
+		this.completeCount = completeCount;
+	}
+
+	public Integer getSetUpCount() {
+		return setUpCount;
+	}
+
+	public void setSetUpCount(Integer setUpCount) {
+		this.setUpCount = setUpCount;
+	}
+
+	public Integer getSpotCheckCount() {
+		return spotCheckCount;
+	}
+
+	public void setSpotCheckCount(Integer spotCheckCount) {
+		this.spotCheckCount = spotCheckCount;
+	}
+
+	public Integer getFailedCount() {
+		return failedCount;
+	}
+
+	public void setFailedCount(Integer failedCount) {
+		this.failedCount = failedCount;
+	}
+
+	public BigDecimal getAmountCount() {
+		return amountCount;
+	}
+
+	public void setAmountCount(BigDecimal amountCount) {
+		this.amountCount = amountCount;
+	}
+
+	public BigDecimal getCostAmount() {
+		return costAmount;
+	}
+
+	public void setCostAmount(BigDecimal costAmount) {
+		this.costAmount = costAmount;
+	}
+
+	public BigDecimal getProfit() {
+		return profit;
+	}
+
+	public void setProfit(BigDecimal profit) {
+		this.profit = profit;
+	}
+	
+	
+	
+
+}

+ 42 - 0
src/main/java/com/goafanti/order/bo/OutTaskProgressLog.java

@@ -0,0 +1,42 @@
+package com.goafanti.order.bo;
+
+public class OutTaskProgressLog {
+	private Integer id;
+	private Integer  tid;
+	private String   patentName;
+	private Integer  status;
+	private String  createTime;
+	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 String getPatentName() {
+		return patentName;
+	}
+	public void setPatentName(String patentName) {
+		this.patentName = patentName;
+	}
+	public Integer getStatus() {
+		return status;
+	}
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+	public String getCreateTime() {
+		return createTime;
+	}
+	public void setCreateTime(String createTime) {
+		this.createTime = createTime;
+	}
+	
+	
+
+}

+ 9 - 0
src/main/java/com/goafanti/order/bo/Outproject.java

@@ -0,0 +1,9 @@
+package com.goafanti.order.bo;
+
+public class Outproject {
+	
+	private String id;
+	
+	private String name;
+
+}

+ 60 - 0
src/main/java/com/goafanti/order/bo/TOrderTaskDetailBo.java

@@ -88,6 +88,60 @@ public class TOrderTaskDetailBo {
 	/** 费减 */
 	private Integer costReduction;
 	
+	private Integer setUpStatus;
+	private String setUpTime;
+	private Integer spotCheckStatus;
+	private Integer highTechStatus;
+	
+	private Integer urgentDay;
+	private Integer ifMaterial;
+	private Integer rejectCount;
+	private String specialComment;
+	
+	
+	
+	public Integer getSetUpStatus() {
+		return setUpStatus;
+	}
+	public void setSetUpStatus(Integer setUpStatus) {
+		this.setUpStatus = setUpStatus;
+	}
+	public String getSetUpTime() {
+		return setUpTime;
+	}
+	public void setSetUpTime(String setUpTime) {
+		this.setUpTime = setUpTime;
+	}
+	public Integer getSpotCheckStatus() {
+		return spotCheckStatus;
+	}
+	public void setSpotCheckStatus(Integer spotCheckStatus) {
+		this.spotCheckStatus = spotCheckStatus;
+	}
+	public Integer getHighTechStatus() {
+		return highTechStatus;
+	}
+	public void setHighTechStatus(Integer highTechStatus) {
+		this.highTechStatus = highTechStatus;
+	}
+	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 getSplitStatus() {
 		return splitStatus;
@@ -378,6 +432,12 @@ public class TOrderTaskDetailBo {
 	public void setCostReduction(Integer costReduction) {
 		this.costReduction = costReduction;
 	}
+	public String getSpecialComment() {
+		return specialComment;
+	}
+	public void setSpecialComment(String specialComment) {
+		this.specialComment = specialComment;
+	}
 	
 	
 }

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

@@ -1,6 +1,7 @@
 package com.goafanti.order.bo;
 
 
+
 import com.goafanti.common.model.TaskProgress;
 
 public class TaskProgressBo extends TaskProgress {
@@ -9,6 +10,9 @@ public class TaskProgressBo extends TaskProgress {
 	
 	private String createTimes;
 	
+	private String acceptTimes;
+	private String authorizeTimes;
+	
 	private Integer ingCount;
 	
 	private Integer notCount;
@@ -44,6 +48,22 @@ public class TaskProgressBo extends TaskProgress {
 	public void setIngCount(Integer ingCount) {
 		this.ingCount = ingCount;
 	}
+
+	public String getAcceptTimes() {
+		return acceptTimes;
+	}
+
+	public void setAcceptTimes(String acceptTimes) {
+		this.acceptTimes = acceptTimes;
+	}
+
+	public String getAuthorizeTimes() {
+		return authorizeTimes;
+	}
+
+	public void setAuthorizeTimes(String authorizeTimes) {
+		this.authorizeTimes = authorizeTimes;
+	}
 	
 	
 }

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

@@ -8,6 +8,7 @@ import java.text.SimpleDateFormat;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang3.text.StrTokenizer;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -195,6 +196,19 @@ public class OrderProjectApiController extends CertifyApiController {
 		res.setData(orderProjectService.selectTaskProgress(tid));
 		return res;
 	}
+	
+	/**
+	 * 	项目申报进度日志
+	 */
+	@RequestMapping(value="/selectTaskProgressLog" ,method = RequestMethod.GET)
+	public Result selectTaskProgressLog(Integer tid){
+		Result res=new Result();
+		if (null==tid) {
+			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"参数","参数"));
+		}
+		res.setData(orderProjectService.selectTaskProgressLog(tid));
+		return res;
+	}
 	/**
 	 * 	拆分项目
 	 */
@@ -229,6 +243,7 @@ public class OrderProjectApiController extends CertifyApiController {
 	}
 	
 	
+	
 	/**
 	 * 我的工时列表导出xls
 	 * @throws IOException 

+ 57 - 0
src/main/java/com/goafanti/order/controller/ProjectStatisticsApiController.java

@@ -2,6 +2,10 @@ package com.goafanti.order.controller;
 
 
 
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletResponse;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -10,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.order.bo.InputProjectStatistics;
+import com.goafanti.order.bo.InputProvincialStatistics;
 import com.goafanti.order.service.ProjectStatisticsService;
 
 @RestController
@@ -33,4 +38,56 @@ public class ProjectStatisticsApiController extends CertifyApiController {
 	
 	
 	
+	/**
+	 * 项目汇总列表导出xls
+	 * @throws IOException 
+	 */
+	@RequestMapping(value = "/exporTaskList", method = RequestMethod.GET)
+	public Result exporTaskList(HttpServletResponse response,InputProjectStatistics ib) throws IOException{
+		Result res=new Result();
+		try {
+			projectStatisticsService.exporTaskList( response, ib);
+		} catch (Exception e) {
+			res.getError().add(buildError("格式不正确"));
+			e.printStackTrace();
+			return res;
+		}
+     res.data(1); 
+	return res;
+		
+	}
+	
+	
+	/**
+	 * 	项目省份统计列表
+	 */
+	@RequestMapping(value="/selectProvincialStatistics" ,method = RequestMethod.GET)
+	public Result selectProvincialStatistics(InputProvincialStatistics is){
+		Result res=new Result();
+		res.setData(projectStatisticsService.selectProvincialStatistics( is));
+		return res;
+	}
+	
+	
+	/**
+	 * 	项目省份统计列表导出xls
+	 * @throws IOException 
+	 */
+	@RequestMapping(value = "/exporProvincialList", method = RequestMethod.GET)
+	public Result exporProvincialList(HttpServletResponse response,InputProvincialStatistics ib) throws IOException{
+		Result res=new Result();
+		try {
+			projectStatisticsService.exporProvincialList( response, ib);
+		} catch (Exception e) {
+			res.getError().add(buildError("格式不正确"));
+			e.printStackTrace();
+			return res;
+		}
+     res.data(1); 
+	return res;
+		
+	}
+	
+	
+	
 }

+ 69 - 0
src/main/java/com/goafanti/order/enums/ProjectType.java

@@ -0,0 +1,69 @@
+package com.goafanti.order.enums;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Administrator
+ *
+ */
+public enum ProjectType {
+//	0 正常 1专利 2软著 3审计 4双软
+	/** 未达立项条件 **/
+	ZC(0,"通用"),
+	/** 等待立项 **/
+	ZL(1,"专利 "),
+	/** 已立项 **/
+	RZ(2,"软著"),
+	/** 已结项 **/
+	SJ(3,"审计"),
+	/** 已撤项 **/
+	SR(4,"双软"),
+	/** 无效 **/
+	INVALID(10, "INVALID");
+	
+	private ProjectType(Integer code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	private static Map<Integer, ProjectType> status = new HashMap<Integer, ProjectType>();
+
+	public static String getValueByCode(Integer code){
+        for(ProjectType projectType:ProjectType.values()){
+            if(code.equals(projectType.getCode())){
+                return projectType.getDesc();
+            }
+        }
+        return  null;
+    }
+	
+	static {
+		for (ProjectType value : ProjectType.values()) {
+			status.put(value.getCode(), value);
+		}
+	}
+	public static ProjectType getStatus(Integer code) {
+		if (containsType(code)) {
+			return status.get(code);
+		}
+		return INVALID;
+	}
+	public static boolean containsType(Integer code) {
+		return status.containsKey(code);
+	}
+	private Integer	code;
+	private String	desc;
+	public Integer getCode() {
+		return code;
+	}
+	public void setCode(Integer code) {
+		this.code = code;
+	}
+	public String getDesc() {
+		return desc;
+	}
+	public void setDesc(String desc) {
+		this.desc = desc;
+	}
+}

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

@@ -7,7 +7,10 @@ import javax.servlet.http.HttpServletResponse;
 
 
 import com.goafanti.common.model.TTaskHours;
+import com.goafanti.common.model.TaskProgressLog;
 import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.OutTaskProgressLog;
+import com.goafanti.order.bo.Outproject;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
 import com.goafanti.order.bo.TaskLogBo;
@@ -58,5 +61,8 @@ public interface OrderProjectService {
 
 	void exporProjectList(HttpServletResponse response, inuptTaskListBo ib)throws IOException;
 
+	List<OutTaskProgressLog> selectTaskProgressLog(Integer tid);
+
+
 
 }

+ 11 - 0
src/main/java/com/goafanti/order/service/ProjectStatisticsService.java

@@ -1,9 +1,20 @@
 package com.goafanti.order.service;
 
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletResponse;
+
 import com.goafanti.order.bo.InputProjectStatistics;
+import com.goafanti.order.bo.InputProvincialStatistics;
 
 public interface ProjectStatisticsService {
 
 	Object selectTaskList(InputProjectStatistics ps);
 
+	void exporTaskList(HttpServletResponse response, InputProjectStatistics ib) throws IOException;
+
+	Object selectProvincialStatistics(InputProvincialStatistics is);
+
+	void exporProvincialList(HttpServletResponse response, InputProvincialStatistics ib)throws IOException;
+
 }

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

@@ -1356,7 +1356,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tTaskMidMapper.updateCostAmount(tid,tCount);
 		//计算订单成本
 		BigDecimal oCount=new BigDecimal(0);
-		List <TTaskMid> tlist=tTaskMidMapper.selectByTid(tid);
+		List <TTaskMid> tlist=tTaskMidMapper.selectListByTid(tid);
 		for (TTaskMid tm : tlist) {
 			if (tm!=null&&tm.getCostAmount()!=null)oCount=oCount.add(tm.getCostAmount()==null?new BigDecimal(0):tm.getCostAmount());
 		}

+ 47 - 1
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -51,6 +51,7 @@ import com.goafanti.common.dao.TTaskLogMapper;
 import com.goafanti.common.dao.TTaskMidMapper;
 import com.goafanti.common.dao.TaskHoursCountMapper;
 import com.goafanti.common.dao.TaskLogMapper;
+import com.goafanti.common.dao.TaskProgressLogMapper;
 import com.goafanti.common.dao.TaskProgressMapper;
 import com.goafanti.common.dao.UserBusinessMapper;
 import com.goafanti.common.dao.UserLockReleaseMapper;
@@ -75,6 +76,7 @@ import com.goafanti.common.model.TTaskMid;
 import com.goafanti.common.model.TaskHoursCount;
 import com.goafanti.common.model.TaskLog;
 import com.goafanti.common.model.TaskProgress;
+import com.goafanti.common.model.TaskProgressLog;
 import com.goafanti.common.model.UserBusiness;
 import com.goafanti.common.model.UserLockRelease;
 import com.goafanti.common.utils.DateUtils;
@@ -85,6 +87,8 @@ 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.OutTaskProgressLog;
+import com.goafanti.order.bo.Outproject;
 import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.bo.TOrderTaskDetailBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
@@ -119,6 +123,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Autowired
 	private TaskProgressMapper	taskProgressMapper;
 	@Autowired
+	private TaskProgressLogMapper	taskProgressLogMapper;
+	@Autowired
 	private OrganizationContactBookMapper	organizationContactBookMapper;
 	@Autowired
 	private OrganizationIdentityMapper	 organizationIdentityMapper;
@@ -357,6 +363,11 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		task.setSetUpAmount(t.getSetUpAmount());
 		task.setOutsourceName(t.getOutsourceName());
 		task.setDeclarationBatch(t.getDeclarationBatch());
+		task.setSetUpStatus(t.getSetUpStatus());
+		task.setSetUpTime(t.getSetUpTime());
+		task.setSpotCheckStatus(t.getSpotCheckStatus());
+		task.setHighTechStatus(t.getHighTechStatus());
+		task.setSpecialComment(t.getSpecialComment());
 		if(StringUtils.isNotBlank(t.getOutsourcePrice()))task.setOutsourcePrice(new BigDecimal(t.getOutsourcePrice()));
 		//根据修改的修改订单法人与联系人
 		if(StringUtils.isNotEmpty(t.getContacts()))tn.setContacts(t.getContacts());
@@ -401,6 +412,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		TOrderTask task2=tOrderTaskMapper.selectByPrimaryKey(task.getId());//查询出项目信息
 		tOrderTaskMapper.updateByPrimaryKeySelective(task);
+		//订单中间表修改
+		if (t.getUrgentDay()!=null||t.getIfMaterial()!=null||t.getRejectCount()!=null) {
+			TTaskMid tm=new TTaskMid();
+			tm.setTid(task.getId());
+			tm.setUrgentDay(t.getUrgentDay());
+			tm.setIfMaterial(t.getIfMaterial());
+			tm.setRejectCount(t.getRejectCount());
+			tTaskMidMapper.updateByTid(tm);
+		}
 		TaskLog tl=new TaskLog();
 		tl.setCreateTime(new Date());
 		tl.setTaskId(t.getId());
@@ -749,12 +769,29 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if(tt.getCommodityQuantity()<count)throw new BusinessException(new Error( "数量不能大于总量!" ,"数量不能大于总量!"));
 		tp.setAlreadyNumber(t.getAlreadyNumber());
 		tp.setLicenceTime(DateUtils.StringToDate(t.getLicenceTimes(), AFTConstants.YYYYMMDD));
+		tp.setPatentName(t.getPatentName());
+		tp.setPatentNo(t.getPatentNo());
+		tp.setAcceptTime(DateUtils.StringToDate(t.getAcceptTimes(), AFTConstants.YYYYMMDD));
+		tp.setAuthorizeTime(DateUtils.StringToDate(t.getAuthorizeTimes(), AFTConstants.YYYYMMDD));
+		tp.setStatus(t.getStatus());
 		tp.setTaskId(t.getTaskId());
+		tTaskMidMapper.updateCertificatesCountByTid(t.getTaskId(),count);
+		TaskProgressLog tpl=new TaskProgressLog(t.getTaskId(),t.getPatentName(),0,new Date());
+		taskProgressLogMapper.insertSelective(tpl);
 		return taskProgressMapper.insertSelective(tp);
 	}
 	@Override
 	public int delectTaskProgress(Integer id) {
-		return taskProgressMapper.deleteByPrimaryKey(id);
+		TaskProgress tp=taskProgressMapper.selectByPrimaryKey(id);
+		if (tp==null) {
+			return 0;
+		}
+		taskProgressMapper.deleteByPrimaryKey(id);
+		int count =taskProgressMapper.AlreadyNuberCount(tp.getTaskId());
+		TaskProgressLog tpl=new TaskProgressLog(tp.getTaskId(),tp.getPatentName(),1,new Date());
+		taskProgressLogMapper.insertSelective(tpl);
+		tTaskMidMapper.updateCertificatesCountByTid(tp.getTaskId(),count);
+		return 1;
 	}
 	@Override
 	public List<TaskProgressBo> selectTaskProgress(Integer tid) {
@@ -949,6 +986,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	
 		
 	}
+
+
+
+	@Override
+	public List<OutTaskProgressLog> selectTaskProgressLog(Integer tid) {
+		return taskProgressLogMapper.selectTaskProgressLog(tid);
+	}
+
+
 	
 	
 }

+ 296 - 2
src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java

@@ -1,16 +1,36 @@
 package com.goafanti.order.service.impl;
 
-import java.math.BigDecimal;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.commons.collections4.map.HashedMap;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFRow;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.springframework.stereotype.Service;
 
+import com.goafanti.common.bo.Error;
 import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.InputProjectStatistics;
+import com.goafanti.order.bo.InputProvincialStatistics;
 import com.goafanti.order.bo.OutProjectStatistics;
+import com.goafanti.order.bo.OutProvincialStatistics;
+import com.goafanti.order.enums.ProjectType;
 import com.goafanti.order.service.ProjectStatisticsService;
 
 @Service
@@ -18,7 +38,7 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Object selectTaskList(InputProjectStatistics ps) {
+	public Pagination<OutProjectStatistics> selectTaskList(InputProjectStatistics ps) {
 		Map<String, Object> params= new HashedMap<>();
 		Integer pageNo=1,pageSize=10;
 		if(ps.getStartDate()!=null)params.put("startDate", ps.getStartDate());
@@ -49,11 +69,285 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 			params.put("amountStart", s);
 			params.put("amountEnd", e);
 		}
+		if (ps.getStatus() !=null) params.put("status",ps.getStatus());
 		if(ps.getPageNo()!=null)pageNo=ps.getPageNo();
 		if(ps.getPageSize()!=null)pageSize=ps.getPageSize();
 		Pagination<OutProjectStatistics> p = (Pagination<OutProjectStatistics>)findPage("selectProjectStatisticsListByPage",
 				"selectProjectStatisticsCount", params, pageNo, pageSize);
 		return p;
+	}
+
+	@Override
+	public void exporTaskList(HttpServletResponse response, InputProjectStatistics ib) throws IOException {
+		OutputStream out = response.getOutputStream();
+		try {
+			if(ib.getPageSize()==null)ib.setPageSize(9999999);
+			@SuppressWarnings("unchecked")
+			List<OutProjectStatistics> list=  (List<OutProjectStatistics>) selectTaskList(ib).getList();
+			String[] comment = {"派单时间","派单省份","订单部门","营销员","合同编号","订单编号","签单客户","项目类型","项目名称","负责部门",
+					"咨询师/咨询经理","项目状态","签单金额","特别说明"};
+			List<String> ls = new ArrayList<String>();
+			Collections.addAll(ls, comment);
+    		if (ib.getStatus()==1) {
+				//高新、科技
+    			//是否立项 立项时间 是否抽查 联系人电话 法人电话 证书编号 申报批次
+    			String[] ss= {"是否立项","立项时间","是否抽查","联系人电话","法人电话","证书编号","申报批次"};
+    			Collections.addAll(ls, ss);
+			}else if (ib.getStatus()==2) {
+				//双软
+    			ls.add("下证时间");
+			}else if (ib.getStatus()==3) {
+				//软著
+				String[] ss= {"软著数量/已下证","有无材料","加急天数","下证时间","证书编号","成本","利润"};
+				Collections.addAll(ls, ss);
+			}else if (ib.getStatus()==4) {
+				//专利	
+				String[] ss= {"是否高新","项目数量/下证数","驳回数","专利号","专利名称","受理时间","下证时间","成本","利润"};
+				Collections.addAll(ls, ss);
+			}
+    		comment= ls.toArray(new String[ls.size()]);
+    		String fileName ="项目汇总表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
+    		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"项目汇总表");
+    		//根据列表编写文档
+    		XSSFSheet sheet =wb.getSheetAt(0);
+    		XSSFRow row = sheet.createRow(1);
+    		//4.创建一个cell
+    		XSSFCell cell = row.createCell(0);
+    		cell.setCellValue(getInputString(ib));
+    		sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, comment.length-1));//合并单元格
+    		for (OutProjectStatistics ob : list) {
+    			//新增一行
+    			XSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
+    			for (int i = 0; i < comment.length; i++) {
+    				//当前列的只
+    				String o = "";
+    				switch (comment[i]) {
+//    				"派单时间","派单省份","订单部门","营销员","合同编号","订单编号","签单客户","项目类型",
+    				//	"项目名称","负责部门","咨询师/咨询经理","项目状态","签单金额"
+    				case "派单时间": o = ob.getDistributionTime(); break;
+    				case "派单省份": o = ob.getProvince(); break;
+    				case "订单部门": o = ob.getDepName(); break;
+    				case "营销员": o = ob.getSalesmanName(); break;
+    				case "合同编号": o = ob.getContractNo(); break;
+    				case "订单编号": o = ob.getOrderNo(); break;
+    				case "签单客户": o = ob.getUserName(); break;
+    				case "项目类型": o = ob.getCname(); break;
+    				case "项目名称": o = ob.getPname(); break;
+    				case "负责部门": o = ob.getTechDepName(); break;
+    				case "咨询师/咨询经理": o = ob.getTechName(); break;
+    				case "项目状态": o = ProjectType.getValueByCode(ob.getProjectStatus()); break;
+    				case "签单金额": o = ob.getCommodityPrice().toString(); break;
+    				case "特别说明": o = ob.getTaskComment(); break;
+    				//是否立项 立项时间 是否抽查 联系人电话 法人电话 证书编号 申报批次
+    				case "是否立项": o = ob.getSetUpStatus()==1?"是":"否"; break;
+    				case "立项时间": o = ob.getSetUpTime(); break;
+    				case "是否抽查": o = ob.getSpotCheckStatus(); break;
+    				case "联系人电话": o = ob.getContactMobile(); break;
+    				case "法人电话": o = ob.getLegalPersonTel(); break;
+    				case "证书编号": o = ob.getCertificateNumber(); break;
+    				case "申报批次": o = ob.getDeclarationBatch(); break;
+    				//"下证时间"
+    				case "下证时间": o = ob.getLicenceTime(); break;
+    				//"软著数量/已下证","有无材料","加急天数","下证时间","证书编号","成本","利润"
+    				case "软著数量/已下证": o = ob.getCommodityQuantity()+"/"+ob.getCertificatesCount(); break;
+    				case "有无材料": o = ob.getIfMaterial(); break;
+    				case "加急天数": o = ob.getUrgentDay().toString(); break;
+    				case "成本": o = ob.getCostAmount().toString(); break;
+    				case "利润": o = ob.getProfit().toString(); break;
+    				//"是否高新","项目数量/下证数","驳回数","专利号","专利名称","受理时间","下证时间","成本","利润"
+    				case "是否高新": o = ob.getHighTechstatus()==null?"":ob.getHighTechstatus()==1?"是":"否"; break;
+    				case "驳回数": o = ob.getRejectCount()==null?"":ob.getRejectCount().toString(); break;
+    				case "专利号": o = ob.getPatentNumber(); break;
+    				case "专利名称": o = ob.getPatentName(); break;
+    				case "受理时间": o = ob.getAcceptTime(); break;
+    				default: o = ""; break;
+    				}
+    				XSSFCell c = r.createCell(i);
+    				c.setCellValue(o);
+    			}
+    		}
+    		//返回名称及参数
+			 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));  
+			 response.setContentType("application/octet-stream;charset=utf-8");
+    		 // 返回数据流
+			 wb.write(out); 
+			 out.flush();
+			 out.close();
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw new BusinessException(new Error("表格生成错误。"));
+		}finally {
+			out.flush(); 
+			 out.close(); 
+		}
 	} 
 
+	
+	private String getInputString(InputProjectStatistics ib) {
+		String str="搜索条件:";
+		int i=1;
+		if(ib.getStartDate()!=null) {
+			str=StringUtils.join(str,i++,"-开始时间:",ib.getStartDate(),"   ");
+		}
+		if(ib.getEndDate()!=null)str=StringUtils.join(str,i++,"-结束时间:",ib.getEndDate(),"   ");
+		if(ib.getDepId()!=null)str=StringUtils.join(str,i++,"-订单部门:",ib.getDepName(),"   ");
+		if(ib.getThchDepId()!=null)str=StringUtils.join(str,i++,"-责任部门:",ib.getThchDepName(),"   ");
+		if(ib.getProjectStatus()!=null)str=StringUtils.join(str,i++,"-项目别类:",ib.getProjectStatus(),"   ");
+		if(ib.getProjectType()!=null)str=StringUtils.join(str,i++,"-项目分类:",ib.getProjectType(),"   ");
+		if(ib.getOrderNo()!=null)str=StringUtils.join(str,i++,"-订单编号:",ib.getOrderNo(),"   ");
+		if(ib.getContractNo()!=null)str=StringUtils.join(str,i++,"-合同编号:",ib.getContractNo(),"   ");
+		if(ib.getUserName()!=null)str=StringUtils.join(str,i++,"-客户名称:",ib.getUserName(),"   ");
+		if(ib.getDeclarationBatch()!=null)str=StringUtils.join(str,i++,"-申报批次:",ib.getDeclarationBatch(),"   ");
+		if(ib.getProjectSituation()!=null) {
+			//0 正常 1专利 2软著 3审计 4双软
+			String str3="";
+			if (ib.getProjectSituation()==0) { str3="通用";
+			}else if (ib.getProjectAmount()==1) { str3="专利";
+			}else if (ib.getProjectAmount()==2) { str3="软著";
+			}else if (ib.getProjectAmount()==3) { str3="审计";
+			}else if (ib.getProjectAmount()==4) { str3="双软";
+			}
+			str=StringUtils.join(str,i++,"-项目情况:",str3,"   ");
+		}
+		if(ib.getProjectAmount()!=null) {
+			String str2="";
+			// 0~0.5万、0.5~1万、1~2万、2~5万、5~10万、10~30万、30~50万、50到80万、80万上
+			if (ib.getProjectAmount()==0) { str2="0~0.5万";
+			}else if (ib.getProjectAmount()==1) { str2="0~0.5万";
+			}else if (ib.getProjectAmount()==2) { str2="0.5~1万";
+			}else if (ib.getProjectAmount()==3) { str2="1~2万";
+			}else if (ib.getProjectAmount()==4) { str2="2~5万";
+			}else if (ib.getProjectAmount()==5) { str2="5~10万";
+			}else if (ib.getProjectAmount()==6) { str2="10~30万";
+			}else if (ib.getProjectAmount()==7) { str2="30~50万";
+			}else if (ib.getProjectAmount()==8) { str2="50到80万";
+			}else if (ib.getProjectAmount()==9) { str2="80万上";
+			}
+			str=StringUtils.join(str,i++,"-项目金额:",str2,"   ");
+		}
+		if(i==1)str=StringUtils.join(str,"无");
+		return str;
+		
+	}
+
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<OutProvincialStatistics> selectProvincialStatistics(InputProvincialStatistics is) {
+		Map<String, Object> params= new HashedMap<>();
+		Integer pageNo=1,pageSize=10;
+		if(is.getStartDate()!=null)params.put("startDate", is.getStartDate());
+		if(is.getEndDate()!=null)params.put("endDate", is.getEndDate()+" 23:59:59");
+		if(is.getThchDepId()!=null)params.put("thchDepId", is.getThchDepId());
+		if(is.getProjectStatus()!=null)params.put("projectStatus", is.getProjectStatus());
+		if(is.getProjectType()!=null)params.put("projectType", is.getProjectType());
+		if(is.getProvince()!=null)params.put("province", is.getProvince());
+		if(is.getProjectId()!=null)params.put("projectId", is.getProjectId());
+		if(is.getPageNo()!=null)pageNo=is.getPageNo();
+		if(is.getPageSize()!=null)pageSize=is.getPageSize();
+		Pagination<OutProvincialStatistics> p = (Pagination<OutProvincialStatistics>)findPage("selectProvincialStatisticsListByPage",
+				"selectProvincialStatisticsCount", params, pageNo, pageSize);
+		return p;
+	}
+
+	@Override
+	public void exporProvincialList(HttpServletResponse response, InputProvincialStatistics ib) throws IOException {
+		OutputStream out = response.getOutputStream();
+		try {
+			if(ib.getPageSize()==null)ib.setPageSize(9999999);
+			@SuppressWarnings("unchecked")
+			List<OutProvincialStatistics> list=  (List<OutProvincialStatistics>) selectProvincialStatistics(ib).getList();
+			//派单賞份负责部门项目类別陸存数(个)派单数(个)下证数(个)签单额(万元)成本(万元)利润(万元)
+			String[] comment = {"派单省份","负责部门","项目别类","库存数(个)","派单数(个)"};
+			List<String> ls = new ArrayList<String>();
+			Collections.addAll(ls, comment);
+    		if (ib.getStatus()==1) {
+				//高新
+    			//是否立项 立项时间 是否抽查 联系人电话 法人电话 证书编号 申报批次
+    			String[] ss= {"完成数","立项数","抽查数","未通过","法人电话","证书编号","申报批次"};
+    			Collections.addAll(ls, ss);
+			}else if (ib.getStatus()==2) {
+				//发明专利、实用新型
+				ls.add("受理数");
+				ls.add("完结总数");
+				ls.add("授权数");
+				ls.add("驳回数");
+				
+			}else if (ib.getStatus()==3) {
+				//软著
+				ls.add("下证数");
+			}else if (ib.getStatus()==4) {
+				//商标
+				String[] ss= {"申请数","驳回数","下证数"};
+				Collections.addAll(ls, ss);
+			}else if (ib.getStatus()==5) {
+				//商标
+				String[] ss= {"完成数","公示数"};
+				Collections.addAll(ls, ss);
+			}
+    		String[] ss= {"签单额(万元)","成本(万元)","利润(万元)"};
+			Collections.addAll(ls, ss);
+    		comment= ls.toArray(new String[ls.size()]);
+    		String fileName ="项目数据统计" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
+    		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"项目数据统计");
+    		//根据列表编写文档
+    		XSSFSheet sheet =wb.getSheetAt(0);
+    		XSSFRow row = sheet.createRow(1);
+    		//4.创建一个cell
+    		XSSFCell cell = row.createCell(0);
+    		
+    		cell.setCellValue(getProvincialInputString(ib));
+    		sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, comment.length-1));//合并单元格
+    		for (OutProvincialStatistics ob : list) {
+    			//新增一行
+    			XSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
+    			for (int i = 0; i < comment.length; i++) {
+    				//当前列的只
+    				String o = "";
+    				switch (comment[i]) {
+//    				"派单省份","负责部门","项目别类","库存数(个)","派单数(个)","下证数(个)","签单数(个)","成本(万元)","利润(万元)"
+    				case "派单省份": o = ob.getProvinceName(); break;
+    				case "负责部门": o = ob.getThchDepName(); break;
+    				case "项目别类": o = ob.getProjectStatus(); break;
+    				case "库存数(个)": o = ob.getStockCount().toString(); break;
+    				case "派单数(个)": o = ob.getDistributeCount().toString(); break;
+    				case "下证数(个)": o = ob.getCompleteCount().toString(); break;
+    				case "签单数(个)": o = ob.getSetUpCount().toString(); break;
+    				case "签单额(万元)": o = ob.getAmountCount().toString(); break;
+    				case "成本(万元)": o = ob.getCostAmount().toString(); break;
+    				case "利润(万元)": o = ob.getProfit().toString(); break;
+    				default: o = ""; break;
+    				}
+    				XSSFCell c = r.createCell(i);
+    				c.setCellValue(o);
+    			}
+    		}
+    		//返回名称及参数
+			 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));  
+			 response.setContentType("application/octet-stream;charset=utf-8");
+    		 // 返回数据流
+			 wb.write(out); 
+			 out.flush();
+			 out.close();
+		} catch (Exception e) {
+			e.printStackTrace();
+			throw new BusinessException(new Error("表格生成错误。"));
+		}finally {
+			out.flush(); 
+			 out.close(); 
+		}
+	}
+
+	private String getProvincialInputString(InputProvincialStatistics ib) {
+		String str="搜索条件:";
+		int i=1;
+		if(ib.getStartDate()!=null) str=StringUtils.join(str,i++,"-开始时间:",ib.getStartDate(),"   ");
+		if(ib.getEndDate()!=null)str=StringUtils.join(str,i++,"-结束时间:",ib.getEndDate(),"   ");
+		if(ib.getThchDepId()!=null)str=StringUtils.join(str,i++,"-责任部门:",ib.getThchDepName(),"   ");
+		if(ib.getProjectStatus()!=null)str=StringUtils.join(str,i++,"-项目别类:",ib.getThchDepName(),"   ");
+		if(ib.getProjectType()!=null)str=StringUtils.join(str,i++,"-项目分类:",ib.getThchDepName(),"   ");
+		if(ib.getProjectId()!=null)str=StringUtils.join(str,i++,"-项目名称:",ib.getThchDepName(),"   ");
+		if(i==1)StringUtils.join(str,"无");
+		return str;
+	}
+
 }

+ 2 - 5
src/main/webapp/WEB-INF/web.xml

@@ -1,8 +1,5 @@
-<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
-         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
-         version="3.1">
+<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
+         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
 
 	<display-name>AFT</display-name>