anderx лет назад: 5
Родитель
Сommit
bdbac83c7a

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

@@ -7,17 +7,40 @@ import java.util.List;
 import org.apache.ibatis.annotations.Param;
 
 public interface TTaskMidMapper {
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	int deleteByPrimaryKey(Integer id);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	int insert(TTaskMid record);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	int insertSelective(TTaskMid record);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	TTaskMid selectByPrimaryKey(Integer id);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	int updateByPrimaryKeySelective(TTaskMid record);
 
-	int updateByPrimaryKey(TTaskMid record);
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 
 	int updateCostAmount(@Param("tid")Integer tid, @Param("costAmount")BigDecimal costAmount);
 
@@ -31,7 +54,8 @@ public interface TTaskMidMapper {
 
 	void addValue(Integer xzs, Integer bhs);
 
-	void updateCountBytid(Integer taskId);
+
+	TTaskMid selectCountBytid(@Param("tid")Integer tid, @Param("type")Integer type);
 	
 
 }

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

@@ -8,19 +8,40 @@ import java.util.List;
 
 public interface TaskProgressMapper {
 
-
-
-
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	int deleteByPrimaryKey(Integer id);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	int insert(TaskProgress record);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	int insertSelective(TaskProgress record);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	TaskProgress selectByPrimaryKey(Integer id);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	int updateByPrimaryKeySelective(TaskProgress record);
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	int updateByPrimaryKey(TaskProgress record);
 
 	List<TaskProgressBo> selectTaskProgress(Integer tid);

+ 44 - 14
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1832,17 +1832,18 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
 	a.certificate_number certificateNumber,a.declaration_batch declarationBatch,
 	</if>
 	<if test="status==2">
-	a.licence_time licenceTime,
+	date_format(a.licence_time, '%Y-%m-%d %H:%i:%S' ) licenceTime,
 	</if>
 	<if test="status==3">
 	a.commodity_quantity commodityQuantity ,ttm.certificates_count certificatesCount,ttm.urgent_day urgentDay ,ttm.if_material ifMaterial,
-	tp.licence_time  licenceTime,
+	date_format(tp.licence_time, '%Y-%m-%d' )  licenceTime,
 	a.certificate_number certificateNumber,ttm.cost_amount costAmount ,
 	(a.commodity_price-ttm.cost_amount)profit,
 	</if>
 	<if test="status==4">
 	a.commodity_quantity commodityQuantity ,ttm.certificates_count certificatesCount,a.high_tech_status highTechStatus,
-	tp.patent_name patentName ,tp.patent_no patentNo ,tp.accept_time acceptTime ,tp.licence_time licenceTime ,tp.authorize_time  authorizeTime,
+	tp.patent_name patentName ,tp.patent_no patentNo ,date_format(tp.accept_time, '%Y-%m-%d ' ) acceptTime ,
+	date_format(tp.licence_time, '%Y-%m-%d' ) licenceTime ,date_format(tp.authorize_time, '%Y-%m-%d ' )  authorizeTime,
 	ttm.reject_count	rejectCount ,ttm.cost_amount costAmount ,(a.commodity_price-ttm.cost_amount)profit,
 	</if>
 	
@@ -1932,37 +1933,66 @@ ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice,a.outsou
   
   
    <select id="selectProvincialStatisticsListByPage" resultType="com.goafanti.order.bo.OutProvincialStatistics">
-	select dg.name provinceName,de.name thchDepName ,bc.cname projectStatus,
+	select dg.name provinceName,de.name thchDepName ,bc.cname projectStatus, ifnull(x.kcs,0) stockCount,
+	 ifnull(x.pds,0) distributeCount,
 	<if test="status==1">
-	ifnull(x.kcs,0) stockCount, ifnull(x.pds,0) distributeCount,ifnull(x.wcs,0) completeCount,
-	ifnull(x.lxs,0) setUpCount,ifnull(x.ccs,0) spotCheckCount,ifnull(x.wtg,0) failedCount,
+	ifnull(x.wcs,0) completeCount, ifnull(x.lxs,0) setUpCount,ifnull(x.ccs,0) spotCheckCount,ifnull(x.wtg,0) failedCount,
 	</if>
-	<if test="status==2">
-	x.sls acceptCount,x.wjs completeCount,x.sqs authorizeCount,x.bhs rejectCount,
+	<if test="status==2 or status==3">
+	ifnull(x.sls,0) acceptCount,ifnull(x.wjs,0) completeCount,ifnull(x.sqs,0) authorizeCount,ifnull(x.bhs,0) rejectCount,
+	</if>
+	<if test="status==4">
+	ifnull(x.xzs,0) certificatesCount,
+	</if>
+	<if test="status==5">
+	ifnull(x.sqs,0)applyCount ,ifnull(x.bhs,0)rejectCount ,ifnull(x.xzs,0) certificatesCount,
+	</if>
+	<if test="status==0">
+	ifnull(x.wcs,0) completeCount, ifnull(x.lxs,0) setUpCount,
 	</if>
 	x.amountCount,x.costAmount,x.profit
-	from (select dep.province, ad.department_id,bp.cid ,
+	from (select dep.province, ad.department_id,bp.cid ,sum(kcs.cq) kcs,sum(pds.cq)pds,
 	<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,
+	sum(wcs.cq)wcs, sum(lxs.cq)lxs,sum(ccs.cq)ccs,sum(pds.cq)wtg,
 	</if>
-	<if test="status==2">
+	<if test="status==2 or status==3">
 	sum(tj.sls) sls,sum(tj.wjs)wjs,sum(tj.sqs)sqs, sum(tj.bhs)bhs,
 	</if>
+	<if test="status==4">
+	sum(tj.xzs) xzs,
+	</if>
+	<if test="status==5">
+	sum(tj.sqs) sqs,sum(tj.bhs) bhs,sum(tj.xzs) xzs,
+	</if>
+	<if test="status==0">
+	sum(wcs.cq)wcs, sum(lxs.cq)lxs,
+	</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
+	<if test="status==1">
 	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>
-	<if test="status==2">
+	<if test="status==2 or status==3">
 	left join (select tid ,accept_count sls,end_count wjs,authorize_count sqs,reject_count bhs from t_task_mid 
-	where certificates_count &gt; 0)tj on a.id=tj.tid
+	where authorize_count &gt; 0)tj on a.id=tj.tid
+	</if>
+	<if test="status==4">
+	left join (select tid ,certificates_count xzs from t_task_mid where certificates_count &gt; 0)tj on a.id=tj.tid
+	</if>
+	<if test="status==5">
+	left join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid 
+	where apply_count &gt; 0)tj on a.id=tj.tid
+	</if>
+	<if test="status==0">
+	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
 	</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">

+ 159 - 12
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -2,35 +2,77 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.TTaskMidMapper">
   <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="tid" jdbcType="INTEGER" property="tid" />
     <result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
     <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="certificates_count" jdbcType="INTEGER" property="certificatesCount" />
+    <result column="urgent_day" jdbcType="INTEGER" property="urgentDay" />
+    <result column="if_material" jdbcType="INTEGER" property="ifMaterial" />
+    <result column="reject_count" jdbcType="INTEGER" property="rejectCount" />
+    <result column="accept_count" jdbcType="INTEGER" property="acceptCount" />
+    <result column="end_count" jdbcType="INTEGER" property="endCount" />
+    <result column="authorize_count" jdbcType="INTEGER" property="authorizeCount" />
+    <result column="apply_count" jdbcType="INTEGER" property="applyCount" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, tid, cost_amount, party_amount, create_time, certificates_count
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
+    id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day, 
+    if_material, reject_count, accept_count, end_count, authorize_count, apply_count
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     select 
     <include refid="Base_Column_List" />
     from t_task_mid
     where id = #{id,jdbcType=INTEGER}
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     delete from t_task_mid
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     insert into t_task_mid (id, tid, cost_amount, 
-      party_amount, create_time, certificates_count
-      )
+      party_amount, create_time, certificates_count, 
+      urgent_day, if_material, reject_count, 
+      accept_count, end_count, authorize_count, 
+      apply_count)
     values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, 
-      #{partyAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}
-      )
+      #{partyAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}, 
+      #{urgentDay,jdbcType=INTEGER}, #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER}, 
+      #{acceptCount,jdbcType=INTEGER}, #{endCount,jdbcType=INTEGER}, #{authorizeCount,jdbcType=INTEGER}, 
+      #{applyCount,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     insert into t_task_mid
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -51,6 +93,27 @@
       <if test="certificatesCount != null">
         certificates_count,
       </if>
+      <if test="urgentDay != null">
+        urgent_day,
+      </if>
+      <if test="ifMaterial != null">
+        if_material,
+      </if>
+      <if test="rejectCount != null">
+        reject_count,
+      </if>
+      <if test="acceptCount != null">
+        accept_count,
+      </if>
+      <if test="endCount != null">
+        end_count,
+      </if>
+      <if test="authorizeCount != null">
+        authorize_count,
+      </if>
+      <if test="applyCount != null">
+        apply_count,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -71,9 +134,35 @@
       <if test="certificatesCount != null">
         #{certificatesCount,jdbcType=INTEGER},
       </if>
+      <if test="urgentDay != null">
+        #{urgentDay,jdbcType=INTEGER},
+      </if>
+      <if test="ifMaterial != null">
+        #{ifMaterial,jdbcType=INTEGER},
+      </if>
+      <if test="rejectCount != null">
+        #{rejectCount,jdbcType=INTEGER},
+      </if>
+      <if test="acceptCount != null">
+        #{acceptCount,jdbcType=INTEGER},
+      </if>
+      <if test="endCount != null">
+        #{endCount,jdbcType=INTEGER},
+      </if>
+      <if test="authorizeCount != null">
+        #{authorizeCount,jdbcType=INTEGER},
+      </if>
+      <if test="applyCount != null">
+        #{applyCount,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     update t_task_mid
     <set>
       <if test="tid != null">
@@ -91,19 +180,53 @@
       <if test="certificatesCount != null">
         certificates_count = #{certificatesCount,jdbcType=INTEGER},
       </if>
+      <if test="urgentDay != null">
+        urgent_day = #{urgentDay,jdbcType=INTEGER},
+      </if>
+      <if test="ifMaterial != null">
+        if_material = #{ifMaterial,jdbcType=INTEGER},
+      </if>
+      <if test="rejectCount != null">
+        reject_count = #{rejectCount,jdbcType=INTEGER},
+      </if>
+      <if test="acceptCount != null">
+        accept_count = #{acceptCount,jdbcType=INTEGER},
+      </if>
+      <if test="endCount != null">
+        end_count = #{endCount,jdbcType=INTEGER},
+      </if>
+      <if test="authorizeCount != null">
+        authorize_count = #{authorizeCount,jdbcType=INTEGER},
+      </if>
+      <if test="applyCount != null">
+        apply_count = #{applyCount,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskMid">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:38:43 CST 2020.
+    -->
     update t_task_mid
     set tid = #{tid,jdbcType=INTEGER},
       cost_amount = #{costAmount,jdbcType=DECIMAL},
       party_amount = #{partyAmount,jdbcType=DECIMAL},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      certificates_count = #{certificatesCount,jdbcType=INTEGER}
+      certificates_count = #{certificatesCount,jdbcType=INTEGER},
+      urgent_day = #{urgentDay,jdbcType=INTEGER},
+      if_material = #{ifMaterial,jdbcType=INTEGER},
+      reject_count = #{rejectCount,jdbcType=INTEGER},
+      accept_count = #{acceptCount,jdbcType=INTEGER},
+      end_count = #{endCount,jdbcType=INTEGER},
+      authorize_count = #{authorizeCount,jdbcType=INTEGER},
+      apply_count = #{applyCount,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
  
+ 
   <update id="updatePaymentAmount">
   	update t_task_mid
     <if test="type == 0">
@@ -147,11 +270,35 @@
     </set>
     where tid = #{tid,jdbcType=INTEGER}
   </update>
+  <select id="selectCountBytid" resultType="com.goafanti.common.model.TTaskMid">
+  select a.id,
+  <if test="type ==0">
+   ifnull(b.lic,0) certificatesCount
+  </if>
+  <if test="type ==1">
+   ifnull(b.acc ,0)acceptCount, ifnull(b.lic ,0)authorizeCount,ifnull(b.lic ,0)certificatesCount,
+   ifnull(b.tgc ,0)endCount,ifnull(b.bhc ,0)rejectCount
+  </if>
+  <if test="type ==2">
+  ifnull(b.acc ,0)acceptCount,ifnull(b.lic ,0)certificatesCount,ifnull(b.sqc,0) applyCount
+  </if>
+  from t_task_mid a left join (select task_id tid,
+  <if test="type ==0">
+  sum(if(licence_time is null,0,1))lic from task_progress where task_id= #{tid} GROUP by task_id)b  
+  </if>
+  <if test="type ==1">
+  	<!-- 下证数与授权数一样,下证统计大于则用下证,小于或者等于用授权统计 -->
+ 	sum(if(if(licence_time is null,0,1) &gt; if(authorize_time is null,0,1),
+		if(licence_time is null,0,1),if(authorize_time is null,0,1)))lic ,ifnull(count(accept_time),0)acc,
+	 	sum(if(status=1,1,0))tgc,sum(if(status=2 ,1,0))bhc from task_progress where task_id= #{tid} GROUP by task_id )b
+  </if>
+  <if test="type ==2">
+  	count(*)sqc,  sum(if(licence_time is null,0,1))lic , sum(if(accept_time is null,0,1))acc,
+   	 sum(if(status=2 ,1,0))bhc  from task_progress where task_id= #{tid} GROUP by task_id )b
+  </if>
+   on a.tid =b.tid
+	where a.tid= #{tid}
+  </select>
   
-  <update id="updateCountBytid">
-  	    update t_task_mid a,(select task_id tid,ifnull(count(licence_time),0)lic ,ifnull(count(accept_time),0)acc,ifnull(count(authorize_time),0)auc,
-    count(if(status=1,1,0))tgc,count(if(status ,2,0))bhc from task_progress where task_id= #{tid} GROUP by task_id )b
-    set a.accept_count =b.acc,a.authorize_count =b.auc,a.certificates_count =b.lic,a.end_count =b.tgc,a.reject_count =b.bhc
-    where a.tid =b.tid
-  </update>
+ 
 </mapper>

+ 56 - 4
src/main/java/com/goafanti/common/mapper/TaskProgressMapper.xml

@@ -2,6 +2,11 @@
 <!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 Fri Dec 25 14:12:14 CST 2020.
+    -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="already_number" jdbcType="INTEGER" property="alreadyNumber" />
     <result column="licence_time" jdbcType="TIMESTAMP" property="licenceTime" />
@@ -12,32 +17,58 @@
     <result column="patent_no" jdbcType="VARCHAR" property="patentNo" />
     <result column="patent_name" jdbcType="VARCHAR" property="patentName" />
     <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="type" jdbcType="INTEGER" property="type" />
   </resultMap>
   <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:12:14 CST 2020.
+    -->
     id, already_number, licence_time, task_id, create_time, accept_time, authorize_time, 
-    patent_no, patent_name, `status`
+    patent_no, patent_name, `status`, `type`
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri Dec 25 14:12:14 CST 2020.
+    -->
     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 Fri Dec 25 14:12:14 CST 2020.
+    -->
     delete from task_progress
     where id = #{id,jdbcType=INTEGER}
   </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 Fri Dec 25 14:12:14 CST 2020.
+    -->
     insert into task_progress (id, already_number, licence_time, 
       task_id, create_time, accept_time, 
       authorize_time, patent_no, patent_name, 
-      `status`)
+      `status`, `type`)
     values (#{id,jdbcType=INTEGER}, #{alreadyNumber,jdbcType=INTEGER}, #{licenceTime,jdbcType=TIMESTAMP}, 
       #{taskId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{acceptTime,jdbcType=TIMESTAMP}, 
       #{authorizeTime,jdbcType=TIMESTAMP}, #{patentNo,jdbcType=VARCHAR}, #{patentName,jdbcType=VARCHAR}, 
-      #{status,jdbcType=INTEGER})
+      #{status,jdbcType=INTEGER}, #{type,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 Fri Dec 25 14:12:14 CST 2020.
+    -->
     insert into task_progress
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -70,6 +101,9 @@
       <if test="status != null">
         `status`,
       </if>
+      <if test="type != null">
+        `type`,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -102,9 +136,17 @@
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
     </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 Fri Dec 25 14:12:14 CST 2020.
+    -->
     update task_progress
     <set>
       <if test="alreadyNumber != null">
@@ -134,10 +176,18 @@
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
+      <if test="type != null">
+        `type` = #{type,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 Fri Dec 25 14:12:14 CST 2020.
+    -->
     update task_progress
     set already_number = #{alreadyNumber,jdbcType=INTEGER},
       licence_time = #{licenceTime,jdbcType=TIMESTAMP},
@@ -147,9 +197,11 @@
       authorize_time = #{authorizeTime,jdbcType=TIMESTAMP},
       patent_no = #{patentNo,jdbcType=VARCHAR},
       patent_name = #{patentName,jdbcType=VARCHAR},
-      `status` = #{status,jdbcType=INTEGER}
+      `status` = #{status,jdbcType=INTEGER},
+      `type` = #{type,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
+  
   <select id="selectTaskProgress" resultType="com.goafanti.order.bo.TaskProgressBo">
       select a.id,a.task_id as taskId,a.already_number as alreadyNumber,date_format(a.licence_time,'%Y-%m-%d')as licenceTimes,
 		date_format(a.create_time,'%Y-%m-%d %H:%i:%S')as createTimes ,b.commodity_quantity as ingCount,

+ 231 - 0
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -6,89 +6,315 @@ import java.io.Serializable;
 
 public class TTaskMid implements Serializable {
 	
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.id
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.tid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Integer tid;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.cost_amount
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private BigDecimal costAmount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.party_amount
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private BigDecimal partyAmount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.create_time
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.certificates_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Integer certificatesCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.urgent_day
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Integer urgentDay;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.if_material
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Integer ifMaterial;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.reject_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private Integer rejectCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.accept_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	private Integer acceptCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.end_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	private Integer endCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.authorize_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	private Integer authorizeCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column t_task_mid.apply_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	private Integer applyCount;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.id
+	 * @return  the value of t_task_mid.id
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Integer getId() {
 		return id;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.id
+	 * @param id  the value for t_task_mid.id
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setId(Integer id) {
 		this.id = id;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.tid
+	 * @return  the value of t_task_mid.tid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Integer getTid() {
 		return tid;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.tid
+	 * @param tid  the value for t_task_mid.tid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setTid(Integer tid) {
 		this.tid = tid;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.cost_amount
+	 * @return  the value of t_task_mid.cost_amount
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public BigDecimal getCostAmount() {
 		return costAmount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.cost_amount
+	 * @param costAmount  the value for t_task_mid.cost_amount
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setCostAmount(BigDecimal costAmount) {
 		this.costAmount = costAmount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.party_amount
+	 * @return  the value of t_task_mid.party_amount
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public BigDecimal getPartyAmount() {
 		return partyAmount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.party_amount
+	 * @param partyAmount  the value for t_task_mid.party_amount
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setPartyAmount(BigDecimal partyAmount) {
 		this.partyAmount = partyAmount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.create_time
+	 * @return  the value of t_task_mid.create_time
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Date getCreateTime() {
 		return createTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.create_time
+	 * @param createTime  the value for t_task_mid.create_time
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.certificates_count
+	 * @return  the value of t_task_mid.certificates_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Integer getCertificatesCount() {
 		return certificatesCount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.certificates_count
+	 * @param certificatesCount  the value for t_task_mid.certificates_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setCertificatesCount(Integer certificatesCount) {
 		this.certificatesCount = certificatesCount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.urgent_day
+	 * @return  the value of t_task_mid.urgent_day
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Integer getUrgentDay() {
 		return urgentDay;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.urgent_day
+	 * @param urgentDay  the value for t_task_mid.urgent_day
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setUrgentDay(Integer urgentDay) {
 		this.urgentDay = urgentDay;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.if_material
+	 * @return  the value of t_task_mid.if_material
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Integer getIfMaterial() {
 		return ifMaterial;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.if_material
+	 * @param ifMaterial  the value for t_task_mid.if_material
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setIfMaterial(Integer ifMaterial) {
 		this.ifMaterial = ifMaterial;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.reject_count
+	 * @return  the value of t_task_mid.reject_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public Integer getRejectCount() {
 		return rejectCount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.reject_count
+	 * @param rejectCount  the value for t_task_mid.reject_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	public void setRejectCount(Integer rejectCount) {
 		this.rejectCount = rejectCount;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.accept_count
+	 * @return  the value of t_task_mid.accept_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public Integer getAcceptCount() {
+		return acceptCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.accept_count
+	 * @param acceptCount  the value for t_task_mid.accept_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public void setAcceptCount(Integer acceptCount) {
+		this.acceptCount = acceptCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.end_count
+	 * @return  the value of t_task_mid.end_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public Integer getEndCount() {
+		return endCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.end_count
+	 * @param endCount  the value for t_task_mid.end_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public void setEndCount(Integer endCount) {
+		this.endCount = endCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.authorize_count
+	 * @return  the value of t_task_mid.authorize_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public Integer getAuthorizeCount() {
+		return authorizeCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.authorize_count
+	 * @param authorizeCount  the value for t_task_mid.authorize_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public void setAuthorizeCount(Integer authorizeCount) {
+		this.authorizeCount = authorizeCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column t_task_mid.apply_count
+	 * @return  the value of t_task_mid.apply_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public Integer getApplyCount() {
+		return applyCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column t_task_mid.apply_count
+	 * @param applyCount  the value for t_task_mid.apply_count
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
+	public void setApplyCount(Integer applyCount) {
+		this.applyCount = applyCount;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table t_task_mid
+	 * @mbg.generated  Fri Dec 25 14:38:43 CST 2020
+	 */
 	@Override
 	public String toString() {
 		StringBuilder sb = new StringBuilder();
@@ -104,11 +330,16 @@ public class TTaskMid implements Serializable {
 		sb.append(", urgentDay=").append(urgentDay);
 		sb.append(", ifMaterial=").append(ifMaterial);
 		sb.append(", rejectCount=").append(rejectCount);
+		sb.append(", acceptCount=").append(acceptCount);
+		sb.append(", endCount=").append(endCount);
+		sb.append(", authorizeCount=").append(authorizeCount);
+		sb.append(", applyCount=").append(applyCount);
 		sb.append(", serialVersionUID=").append(serialVersionUID);
 		sb.append("]");
 		return sb.toString();
 	}
 
+	
 
 	public TTaskMid() {}
     

+ 164 - 0
src/main/java/com/goafanti/common/model/TaskProgress.java

@@ -5,107 +5,269 @@ import java.io.Serializable;
 
 public class TaskProgress implements Serializable {
 
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.id
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Integer id;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.already_number
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Integer alreadyNumber;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.licence_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Date licenceTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.task_id
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Integer taskId;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.create_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Date createTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.accept_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Date acceptTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.authorize_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Date authorizeTime;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.patent_no
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private String patentNo;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.patent_name
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private String patentName;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.status
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Integer status;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column task_progress.type
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	private Integer type;
+	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 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 task_progress.already_number
+	 * @return  the value of task_progress.already_number
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public Integer getAlreadyNumber() {
 		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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	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  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.accept_time
+	 * @return  the value of task_progress.accept_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public Date getAcceptTime() {
 		return acceptTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.accept_time
+	 * @param acceptTime  the value for task_progress.accept_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setAcceptTime(Date acceptTime) {
 		this.acceptTime = acceptTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.authorize_time
+	 * @return  the value of task_progress.authorize_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public Date getAuthorizeTime() {
 		return authorizeTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.authorize_time
+	 * @param authorizeTime  the value for task_progress.authorize_time
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setAuthorizeTime(Date authorizeTime) {
 		this.authorizeTime = authorizeTime;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.patent_no
+	 * @return  the value of task_progress.patent_no
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public String getPatentNo() {
 		return patentNo;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.patent_no
+	 * @param patentNo  the value for task_progress.patent_no
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setPatentNo(String patentNo) {
 		this.patentNo = patentNo == null ? null : patentNo.trim();
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.patent_name
+	 * @return  the value of task_progress.patent_name
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public String getPatentName() {
 		return patentName;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.patent_name
+	 * @param patentName  the value for task_progress.patent_name
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setPatentName(String patentName) {
 		this.patentName = patentName == null ? null : patentName.trim();
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.status
+	 * @return  the value of task_progress.status
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public Integer getStatus() {
 		return status;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.status
+	 * @param status  the value for task_progress.status
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setStatus(Integer status) {
 		this.status = status;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column task_progress.type
+	 * @return  the value of task_progress.type
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public Integer getType() {
 		return type;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column task_progress.type
+	 * @param type  the value for task_progress.type
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	public void setType(Integer type) {
 		this.type = type;
 	}
 
+	/**
+	 * This method was generated by MyBatis Generator. This method corresponds to the database table task_progress
+	 * @mbg.generated  Fri Dec 25 14:12:14 CST 2020
+	 */
 	@Override
 	public String toString() {
 		StringBuilder sb = new StringBuilder();
@@ -127,4 +289,6 @@ public class TaskProgress implements Serializable {
 		sb.append("]");
 		return sb.toString();
 	}
+
+	
 }

+ 13 - 3
src/main/java/com/goafanti/order/bo/InputProvincialStatistics.java

@@ -4,7 +4,7 @@ public class InputProvincialStatistics {
 
 	private String startDate;
 	
-	private String EndDate;
+	private String endDate;
 	
 	private Integer province;
 	
@@ -19,6 +19,8 @@ public class InputProvincialStatistics {
 	private Integer pageSize;
 	
 	private Integer pageNo;
+	
+	private String provinceName;
 
 	private String thchDepName;
 	
@@ -130,11 +132,11 @@ public class InputProvincialStatistics {
 	}
 
 	public String getEndDate() {
-		return EndDate;
+		return endDate;
 	}
 
 	public void setEndDate(String endDate) {
-		EndDate = endDate;
+		this.endDate = endDate;
 	}
 
 	public Integer getStatus() {
@@ -144,6 +146,14 @@ public class InputProvincialStatistics {
 	public void setStatus(Integer status) {
 		this.status = status;
 	}
+
+	public String getProvinceName() {
+		return provinceName;
+	}
+
+	public void setProvinceName(String provinceName) {
+		this.provinceName = provinceName;
+	}
 	
 	
 }

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

@@ -42,7 +42,7 @@ public class OutProjectStatistics {
 	/**加急天数*/
 	private Integer	urgentDay;
 	/**有无材料*/
-	private String	ifMaterial;
+	private Integer	ifMaterial;
 	/**成本*/
 	private BigDecimal	costAmount;
 	/**利润*/
@@ -50,7 +50,7 @@ public class OutProjectStatistics {
 	/**驳回数*/
 	private Integer	rejectCount;
 	/**专利编号*/
-	private String	patentNumber;
+	private String	patentNo;
 	/**专利名称*/
 	private String	patentName;
 	/**受理时间*/
@@ -211,10 +211,10 @@ public class OutProjectStatistics {
 	public void setUrgentDay(Integer urgentDay) {
 		this.urgentDay = urgentDay;
 	}
-	public String getIfMaterial() {
+	public Integer getIfMaterial() {
 		return ifMaterial;
 	}
-	public void setIfMaterial(String ifMaterial) {
+	public void setIfMaterial(Integer ifMaterial) {
 		this.ifMaterial = ifMaterial;
 	}
 	public BigDecimal getCostAmount() {
@@ -238,12 +238,6 @@ public class OutProjectStatistics {
 	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;
 	}
@@ -274,5 +268,11 @@ public class OutProjectStatistics {
 	public void setSpecialComment(String specialComment) {
 		this.specialComment = specialComment;
 	}
+	public String getPatentNo() {
+		return patentNo;
+	}
+	public void setPatentNo(String patentNo) {
+		this.patentNo = patentNo;
+	}
 
 }

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

@@ -28,6 +28,10 @@ public class OutProvincialStatistics {
 	private Integer authorizeCount;
 	/** 驳回数 */
 	private Integer rejectCount;
+	/** 下证数 */
+	private Integer certificatesCount;
+	/** 申请数 */
+	private Integer	applyCount;
 	
 	private BigDecimal amountCount;
 	
@@ -161,6 +165,22 @@ public class OutProvincialStatistics {
 	public void setProfit(BigDecimal profit) {
 		this.profit = profit;
 	}
+
+	public Integer getCertificatesCount() {
+		return certificatesCount;
+	}
+
+	public void setCertificatesCount(Integer certificatesCount) {
+		this.certificatesCount = certificatesCount;
+	}
+
+	public Integer getApplyCount() {
+		return applyCount;
+	}
+
+	public void setApplyCount(Integer applyCount) {
+		this.applyCount = applyCount;
+	}
 	
 	
 	

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

@@ -172,7 +172,7 @@ public class OrderProjectApiController extends CertifyApiController {
 	}
 	
 	/**
-	 * 	新增项目申报进度
+	 * 	修改项目申报进度
 	 */
 	@RequestMapping(value="/updateTaskProgress" ,method = RequestMethod.POST)
 	public Result updateTaskProgress(TaskProgressBo t){

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

@@ -7,10 +7,8 @@ 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;

+ 11 - 3
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -779,7 +779,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		TaskProgressLog tpl=new TaskProgressLog(t.getTaskId(),t.getPatentName(),0,new Date());
 		taskProgressLogMapper.insertSelective(tpl);
 		int i=taskProgressMapper.insertSelective(tp);
-		tTaskMidMapper.updateCountBytid(t.getTaskId());
+		countByTid(tp.getTaskId(),tp.getType());
 		return i; 
 	}
 	
@@ -804,7 +804,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		TaskProgressLog tpl=new TaskProgressLog(t.getTaskId(),t.getPatentName(),2,new Date());
 		taskProgressLogMapper.insertSelective(tpl);
 		int i=taskProgressMapper.updateByPrimaryKeySelective(tp);
-		tTaskMidMapper.updateCountBytid(t.getTaskId());
+		countByTid(tp.getTaskId(),tp.getType());
 		return i; 
 	}
 
@@ -817,9 +817,17 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		int i=taskProgressMapper.deleteByPrimaryKey(id);
 		TaskProgressLog tpl=new TaskProgressLog(tp.getTaskId(),tp.getPatentName(),1,new Date());
 		taskProgressLogMapper.insertSelective(tpl);
-		tTaskMidMapper.updateCountBytid(tp.getTaskId());
+		countByTid(tp.getTaskId(),tp.getType());
 		return i;
 	}
+	private void countByTid(Integer taskId, Integer type) {
+		TTaskMid ttm=tTaskMidMapper.selectCountBytid(taskId,type);
+		tTaskMidMapper.updateByPrimaryKeySelective(ttm);
+		
+	}
+
+
+
 	@Override
 	public List<TaskProgressBo> selectTaskProgress(Integer tid) {
 		List<TaskProgressBo>  l=taskProgressMapper.selectTaskProgress(tid);

+ 50 - 27
src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java

@@ -2,6 +2,7 @@ package com.goafanti.order.service.impl;
 
 import java.io.IOException;
 import java.io.OutputStream;
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -82,10 +83,11 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		OutputStream out = response.getOutputStream();
 		try {
 			if(ib.getPageSize()==null)ib.setPageSize(9999999);
+			if(ib.getStatus()==null)ib.setStatus(0);
 			@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) {
@@ -105,6 +107,8 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 				String[] ss= {"是否高新","项目数量/下证数","驳回数","专利号","专利名称","受理时间","下证时间","成本","利润"};
 				Collections.addAll(ls, ss);
 			}
+    		ls.add("签单金额");
+    		ls.add("特别说明");
     		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,"项目汇总表");
@@ -136,10 +140,9 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
     				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.getSetUpStatus()==null?"":ob.getSetUpStatus()==1?"是":"否"; break;
     				case "立项时间": o = ob.getSetUpTime(); break;
     				case "是否抽查": o = ob.getSpotCheckStatus(); break;
     				case "联系人电话": o = ob.getContactMobile(); break;
@@ -149,17 +152,21 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
     				//"下证时间"
     				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 = StringUtils.join(ob.getCommodityQuantity(),"/",ob.getCertificatesCount()); break;
+    				case "有无材料": o = ob.getIfMaterial()==null?"":ob.getIfMaterial()==1?"是":"否"; break;
+    				case "加急天数": o = ob.getUrgentDay()==null?"":ob.getUrgentDay()==1?"是":"否"; break;
+    				case "成本": o = ob.getCostAmount().stripTrailingZeros().toPlainString(); break;
+    				case "利润": o = ob.getProfit().stripTrailingZeros().toPlainString(); break;
     				//"是否高新","项目数量/下证数","驳回数","专利号","专利名称","受理时间","下证时间","成本","利润"
     				case "是否高新": o = ob.getHighTechstatus()==null?"":ob.getHighTechstatus()==1?"是":"否"; break;
+    				case "项目数量/下证数": o = StringUtils.join(ob.getCommodityQuantity(),"/",ob.getCertificatesCount()); break;
     				case "驳回数": o = ob.getRejectCount()==null?"":ob.getRejectCount().toString(); break;
-    				case "专利号": o = ob.getPatentNumber(); break;
+    				case "专利号": o = ob.getPatentNo(); break;
     				case "专利名称": o = ob.getPatentName(); break;
     				case "受理时间": o = ob.getAcceptTime(); break;
+    				
+    				case "签单金额": o = ob.getCommodityPrice().stripTrailingZeros().toPlainString(); break;
+    				case "特别说明": o = ob.getSpecialComment(); break;
     				default: o = ""; break;
     				}
     				XSSFCell c = r.createCell(i);
@@ -242,7 +249,7 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		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());
-		params.put("status",is.getStatus()==null?2:is.getStatus());
+		params.put("status",is.getStatus()==null?0:is.getStatus());
 		if(is.getPageNo()!=null)pageNo=is.getPageNo();
 		if(is.getPageSize()!=null)pageSize=is.getPageSize();
 		Pagination<OutProvincialStatistics> p = (Pagination<OutProvincialStatistics>)findPage("selectProvincialStatisticsListByPage",
@@ -255,34 +262,34 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		OutputStream out = response.getOutputStream();
 		try {
 			if(ib.getPageSize()==null)ib.setPageSize(9999999);
+			if(ib.getStatus()==null)ib.setStatus(0);
 			@SuppressWarnings("unchecked")
 			List<OutProvincialStatistics> list=  (List<OutProvincialStatistics>) selectProvincialStatistics(ib).getList();
 			//派单賞份负责部门项目类別陸存数(个)派单数(个)下证数(个)签单额(万元)成本(万元)利润(万元)
-			String[] comment = {"派单省份","负责部门","项目别类","库存数(个)","派单数(个)"};
+			String[] comment = {"派单省份","负责部门","项目别类","库存数","派单数"};
 			List<String> ls = new ArrayList<String>();
 			Collections.addAll(ls, comment);
     		if (ib.getStatus()==1) {
 				//高新
     			//是否立项 立项时间 是否抽查 联系人电话 法人电话 证书编号 申报批次
-    			String[] ss= {"完成数","立项数","抽查数","未通过","法人电话","证书编号","申报批次"};
+    			String[] ss= {"完成数","立项数","抽查数","未通过"};
     			Collections.addAll(ls, ss);
-			}else if (ib.getStatus()==2) {
+			}else if (ib.getStatus()==2||ib.getStatus()==3) {
 				//发明专利、实用新型
 				ls.add("受理数");
-				ls.add("完结数");
+				ls.add("完结数");
 				ls.add("授权数");
 				ls.add("驳回数");
 				
-			}else if (ib.getStatus()==3) {
+			}else if (ib.getStatus()==4) {
 				//软著
 				ls.add("下证数");
-			}else if (ib.getStatus()==4) {
+			}else if (ib.getStatus()==5) {
 				//商标
 				String[] ss= {"申请数","驳回数","下证数"};
 				Collections.addAll(ls, ss);
-			}else if (ib.getStatus()==5) {
-				//商标
-				String[] ss= {"完成数","公示数"};
+			}else if (ib.getStatus()==0) {
+				String[] ss= {"完成数","公示/立项数"};
 				Collections.addAll(ls, ss);
 			}
     		String[] ss= {"签单额(万元)","成本(万元)","利润(万元)"};
@@ -309,10 +316,25 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
     				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.getStockCount().toString(); break;
+    				case "派单数": o = ob.getDistributeCount().toString(); break;
+    				//"完成数","立项数","抽查数","未通过"
+    				case "完成数": o = ob.getCompleteCount().toString(); break;
+    				case "立项数": o = ob.getSetUpCount().toString(); break;
+    				case "抽查数": o = ob.getSpotCheckCount().toString(); break;
+    				case "未通过": o = ob.getFailedCount().toString(); break;
+    				//受理数 完结数 授权数 驳回数
+    				case "受理数": o = ob.getFailedCount().toString(); break;
+    				case "完结数": o = ob.getFailedCount().toString(); break;
+    				case "授权数": o = ob.getFailedCount().toString(); break;
+    				case "驳回数": o = ob.getRejectCount().toString(); break;
+    				//下证数
+    				case "下证数": o = ob.getCertificatesCount().toString(); break;
+    				//"申请数","驳回数","下证数"
+    				case "申请数": o = ob.getApplyCount().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;
@@ -343,10 +365,11 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		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.getProvince()!=null)str=StringUtils.join(str,i++,"-省份:",ib.getProvinceName(),"   ");
 		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(ib.getProjectStatus()!=null)str=StringUtils.join(str,i++,"-项目别类:",ib.getProjectStatusName(),"   ");
+		if(ib.getProjectType()!=null)str=StringUtils.join(str,i++,"-项目分类:",ib.getProjectTypeName(),"   ");
+		if(ib.getProjectId()!=null)str=StringUtils.join(str,i++,"-项目名称:",ib.getProjectName(),"   ");
 		if(i==1)StringUtils.join(str,"无");
 		return str;
 	}