Explorar o código

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

anderx %!s(int64=3) %!d(string=hai) anos
pai
achega
6ab3b16b9c

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

@@ -34,4 +34,4 @@ public interface TTaskMidMapper {
 
     TTaskMid selectCountBytid(@Param("tid")Integer tid, @Param("type")Integer type);
 
-}
+}

+ 52 - 94
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1579,7 +1579,7 @@
     where a.split_status in (0,2) and b. delete_sign in (0,2)
     <!--  筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
     <if test="screen ==0">
-      and a.project_status in(1,2,3)
+      and a.project_status in(0,1,2,3)
     </if>
     <if test="screen ==2">
       and a.project_status &gt; 3
@@ -1684,7 +1684,7 @@
     where a.split_status in (0,2) and b. delete_sign in (0,2)
     <!--  筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请 -->
     <if test="screen ==0">
-      and a.project_status in(1,2,3)
+      and a.project_status in(0,1,2,3)
     </if>
     <if test="screen ==2">
       and a.project_status &gt; 3
@@ -1747,91 +1747,45 @@
 
 
   <select id="selectProvincialStatisticsListByPage" resultType="com.goafanti.order.bo.OutProvincialStatistics">
-    select dg.name provinceName,de.name thchDepName ,bc.cname projectStatus,
-    dg.id province, de.id thchDepId,bc.id bpId,
-    ifnull(x.kcs,0) stockCount, ifnull(x.pds,0) distributeCount,
-    <if test="status==1">
-      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 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.gss,0) publicityCount,
-    </if>
-    x.amountCount,x.costAmount,x.profit
-    from (select dep.province, ad.department_id,bp.cid ,sum(kcs.kcs) kcs,sum(kcs.pds)pds,
-    <if test="status==1">
-      sum(wcs.wcs)wcs, sum(wcs.lxs)lxs,sum(wcs.ccs)ccs,sum(wcs.wtg)wtg,
-    </if>
-    <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.wcs)wcs, sum(wcs.gss)gss,
-    </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 and b.delete_sign in(0,2) left join t_task_mid ttm on a.id=ttm.tid
-    left join department dep on b.order_dep =dep.id  inner join admin ad on a.task_receiver =ad.id
-    left join business_project bp on a.commodity_id =bp.id
-    left join (select id,if(project_status BETWEEN  1 and 3,commodity_quantity,0) kcs,
-    if(task_status in (1,2,3),commodity_quantity,0) pds from t_order_task)kcs on a.id=kcs.id
-
-    <if test="status==1">
-      left join (select id,if(project_status > 3,commodity_quantity,0) wcs, if( set_up_status=1,commodity_quantity,0) lxs,
-      if(spot_check_status in (1,2),commodity_quantity,0) ccs, if( spot_check_status =1,commodity_quantity,0) wtg
-      from t_order_task )wcs on a.id=wcs.id
-    </if>
-    <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 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,if(project_status > 3,commodity_quantity,0) wcs,
-      if( if_publicity=1,commodity_quantity,0) gss
-      from t_order_task )wcs on a.id=wcs.id
-
-    </if>
-    where a.split_status in(0,2)
-    <if test="startDate != null and endDate != null">
-      and a.task_distribution_time between #{startDate} and #{endDate}
+    select z.cid bpId, bc.cname projectStatus,z.dispatch_province province,dg.name provinceName,
+    z.duty_dep thchDepId,d.name  thchDepName,z.distributeCount,z.stockCount,z.completeCount,z.publicityCount,
+    z.setUpCount,z.spotCheckCount,z.failCount,z.certificatesCount,z.acceptCount,z.endCount,z.authorizeCount,
+    z.rejectCount,z.applyCount,z.amountCount,z.costAmount,z.profit
+    from ( select  y.dispatch_province, y.cid, y.duty_dep, sum(y.dispatch_count)distributeCount,
+      sum(y.stock_count)stockCount, sum(y.complete_count)completeCount,sum(y.promulgate_count)publicityCount,
+      sum(y.set_up_count)setUpCount,sum(y.spot_check_count)spotCheckCount,sum(y.fail_count)failCount,
+      sum(y.certificates_count)certificatesCount,sum(y.accept_count)acceptCount,sum(y.end_count)endCount,
+      sum(y.authorize_count)authorizeCount,sum(y.reject_count)rejectCount, sum(y.apply_count)applyCount,
+      sum(y.commodity_price)amountCount,sum(y.cost_amount)costAmount, sum(y.commodity_price-y.cost_amount)profit
+      from(select b.dispatch_province, bp.cid, b.duty_dep,
+        b.stock_count,b.dispatch_count,b.promulgate_count, b.complete_count,b.set_up_count ,b.spot_check_count ,
+        b.fail_count ,b.certificates_count,     b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
+        a.commodity_price ,b.cost_amount, a.task_distribution_time     from t_order_task a
+        left join t_task_mid b on a.id=b.tid     left join business_project bp on a.commodity_id =bp.id
+    left join t_order_new ton on a.order_no =ton .order_no
+    where a.task_status in(1,2,3)  and ton.delete_sign in (0,2)
+    <if test="projectId !=null">
+    and a.commodity_id = #{projectId}
     </if>
     <if test="province !=null">
-      and dep.province = #{province}
+    and b.dispatch_province = #{province}
     </if>
     <if test="thchDepId !=null">
-      and ad.department_id = #{thchDepId}
-    </if>
-    <if test="projectStatus !=null">
-      and bp.cid =  #{projectStatus}
+    and b.duty_dep = #{thchDepId}
     </if>
     <if test="projectType !=null">
-      and bp.`type` = #{projectType}
+    and bp.`type` = #{projectType}
     </if>
-    <if test="projectId !=null">
-      and a.commodity_id = #{projectId}
+    <if test="projectStatus !=null">
+    and bp.cid= #{projectStatus}
+    </if>
+    <if test="startDate != null and endDate != null">
+    and a.task_distribution_time  between #{startDate} and #{endDate}
     </if>
-    group by  dep.province,ad.department_id,bp.cid )x inner join district_glossory dg on x.province=dg.id
-    inner join department de on x.department_id=de.id left join business_category bc on x.cid=bc.id
+    )y
+    group by   y.dispatch_province, y.cid, y.duty_dep  )z
+    left join business_category bc on z.cid=bc.id left join district_glossory dg on z.dispatch_province=dg.id
+    left join department d on z.duty_dep=d.id
     <if test="page_sql!=null">
       ${page_sql}
     </if>
@@ -1839,31 +1793,35 @@
 
   <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  and b.delete_sign in(0,2) left join t_task_mid ttm on a.id=ttm.tid
-    left join department dep on b.order_dep =dep.id  inner join admin ad on a.task_receiver =ad.id
+    from(select y.dispatch_province  from (select bp.cid,
+    b.dispatch_province,b.duty_dep,a.cname,b.stock_count,b.dispatch_count,b.promulgate_count,
+    b.complete_count,b.set_up_count ,b.spot_check_count ,b.fail_count ,b.certificates_count,
+    b.accept_count,b.end_count,b.authorize_count,b.reject_count,b.apply_count,
+    a.commodity_price ,b.cost_amount, a.task_distribution_time
+    from t_order_task a
+    left join t_task_mid b on a.id=b.tid
     left join business_project bp on a.commodity_id =bp.id
-    where   a.split_status in(0,2)
-    <if test="startDate != null and endDate != null">
-      and a.task_distribution_time between #{startDate} and #{endDate}
+    left join t_order_new ton on a.order_no =ton .order_no
+    where a.task_status in(1,2,3)  and ton.delete_sign in (0,2)
+    <if test="projectId !=null">
+      and a.commodity_id = #{projectId}
     </if>
     <if test="province !=null">
-      and dep.province = #{province}
+      and b.dispatch_province = #{province}
     </if>
     <if test="thchDepId !=null">
-      and ad.department_id = #{thchDepId}
-    </if>
-    <if test="projectStatus !=null">
-      and bp.cid =  #{projectStatus}
+      and b.duty_dep = #{thchDepId}
     </if>
     <if test="projectType !=null">
       and bp.`type` = #{projectType}
     </if>
-    <if test="projectId !=null">
-      and a.commodity_id = #{projectId}
+    <if test="projectStatus !=null">
+      and bp.cid= #{projectStatus}
+    </if>
+    <if test="startDate != null and endDate != null">
+      and a.task_distribution_time  between #{startDate} and #{endDate}
     </if>
-    group by  dep.province,ad.department_id,bp.cid )x inner join district_glossory dg on x.province=dg.id
-    inner join department de on x.department_id=de.id left join business_category bc on x.cid=bc.id
+    )y group by y.dispatch_province, y.cid, y.duty_dep )x
   </select>
 
   <select id="managerSelectByPage" resultType="com.goafanti.order.bo.managerListBo">

+ 178 - 21
src/main/java/com/goafanti/common/mapper/TTaskMidMapper.xml

@@ -16,14 +16,24 @@
     <result column="authorize_count" jdbcType="INTEGER" property="authorizeCount" />
     <result column="apply_count" jdbcType="INTEGER" property="applyCount" />
     <result column="high_new_retrial" jdbcType="INTEGER" property="highNewRetrial" />
+    <result column="dispatch_count" jdbcType="INTEGER" property="dispatchCount" />
+    <result column="stock_count" jdbcType="INTEGER" property="stockCount" />
+    <result column="complete_count" jdbcType="INTEGER" property="completeCount" />
+    <result column="promulgate_count" jdbcType="INTEGER" property="promulgateCount" />
+    <result column="dispatch_province" jdbcType="INTEGER" property="dispatchProvince" />
+    <result column="duty_dep" jdbcType="VARCHAR" property="dutyDep" />
+    <result column="set_up_count" jdbcType="INTEGER" property="setUpCount" />
+    <result column="spot_check_count" jdbcType="INTEGER" property="spotCheckCount" />
+    <result column="fail_count" jdbcType="INTEGER" property="failCount" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day, 
-    if_material, reject_count, accept_count, end_count, authorize_count, apply_count, 
-    high_new_retrial
+    id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day,
+    if_material, reject_count, accept_count, end_count, authorize_count, apply_count,
+    high_new_retrial, dispatch_count, stock_count, complete_count, promulgate_count,
+    dispatch_province, duty_dep, set_up_count, spot_check_count, fail_count
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from t_task_mid
     where id = #{id,jdbcType=INTEGER}
@@ -33,16 +43,22 @@
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" parameterType="com.goafanti.common.model.TTaskMid">
-    insert into t_task_mid (id, tid, cost_amount, 
-      party_amount, create_time, certificates_count, 
-      urgent_day, if_material, reject_count, 
-      accept_count, end_count, authorize_count, 
-      apply_count, high_new_retrial)
-    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, 
-      #{partyAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}, 
-      #{urgentDay,jdbcType=INTEGER}, #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER}, 
-      #{acceptCount,jdbcType=INTEGER}, #{endCount,jdbcType=INTEGER}, #{authorizeCount,jdbcType=INTEGER}, 
-      #{applyCount,jdbcType=INTEGER}, #{highNewRetrial,jdbcType=INTEGER})
+    insert into t_task_mid (id, tid, cost_amount,
+      party_amount, create_time, certificates_count,
+      urgent_day, if_material, reject_count,
+      accept_count, end_count, authorize_count,
+      apply_count, high_new_retrial, dispatch_count,
+      stock_count, complete_count, promulgate_count,
+      dispatch_province, duty_dep, set_up_count,
+      spot_check_count, fail_count)
+    values (#{id,jdbcType=INTEGER}, #{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL},
+      #{partyAmount,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER},
+      #{urgentDay,jdbcType=INTEGER}, #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER},
+      #{acceptCount,jdbcType=INTEGER}, #{endCount,jdbcType=INTEGER}, #{authorizeCount,jdbcType=INTEGER},
+      #{applyCount,jdbcType=INTEGER}, #{highNewRetrial,jdbcType=INTEGER}, #{dispatchCount,jdbcType=INTEGER},
+      #{stockCount,jdbcType=INTEGER}, #{completeCount,jdbcType=INTEGER}, #{promulgateCount,jdbcType=INTEGER},
+      #{dispatchProvince,jdbcType=INTEGER}, #{dutyDep,jdbcType=VARCHAR}, #{setUpCount,jdbcType=INTEGER},
+      #{spotCheckCount,jdbcType=INTEGER}, #{failCount,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.TTaskMid">
     insert into t_task_mid
@@ -89,6 +105,33 @@
       <if test="highNewRetrial != null">
         high_new_retrial,
       </if>
+      <if test="dispatchCount != null">
+        dispatch_count,
+      </if>
+      <if test="stockCount != null">
+        stock_count,
+      </if>
+      <if test="completeCount != null">
+        complete_count,
+      </if>
+      <if test="promulgateCount != null">
+        promulgate_count,
+      </if>
+      <if test="dispatchProvince != null">
+        dispatch_province,
+      </if>
+      <if test="dutyDep != null">
+        duty_dep,
+      </if>
+      <if test="setUpCount != null">
+        set_up_count,
+      </if>
+      <if test="spotCheckCount != null">
+        spot_check_count,
+      </if>
+      <if test="failCount != null">
+        fail_count,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -133,6 +176,33 @@
       <if test="highNewRetrial != null">
         #{highNewRetrial,jdbcType=INTEGER},
       </if>
+      <if test="dispatchCount != null">
+        #{dispatchCount,jdbcType=INTEGER},
+      </if>
+      <if test="stockCount != null">
+        #{stockCount,jdbcType=INTEGER},
+      </if>
+      <if test="completeCount != null">
+        #{completeCount,jdbcType=INTEGER},
+      </if>
+      <if test="promulgateCount != null">
+        #{promulgateCount,jdbcType=INTEGER},
+      </if>
+      <if test="dispatchProvince != null">
+        #{dispatchProvince,jdbcType=INTEGER},
+      </if>
+      <if test="dutyDep != null">
+        #{dutyDep,jdbcType=VARCHAR},
+      </if>
+      <if test="setUpCount != null">
+        #{setUpCount,jdbcType=INTEGER},
+      </if>
+      <if test="spotCheckCount != null">
+        #{spotCheckCount,jdbcType=INTEGER},
+      </if>
+      <if test="failCount != null">
+        #{failCount,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
@@ -177,6 +247,33 @@
       <if test="highNewRetrial != null">
         high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
       </if>
+      <if test="dispatchCount != null">
+        dispatch_count = #{dispatchCount,jdbcType=INTEGER},
+      </if>
+      <if test="stockCount != null">
+        stock_count = #{stockCount,jdbcType=INTEGER},
+      </if>
+      <if test="completeCount != null">
+        complete_count = #{completeCount,jdbcType=INTEGER},
+      </if>
+      <if test="promulgateCount != null">
+        promulgate_count = #{promulgateCount,jdbcType=INTEGER},
+      </if>
+      <if test="dispatchProvince != null">
+        dispatch_province = #{dispatchProvince,jdbcType=INTEGER},
+      </if>
+      <if test="dutyDep != null">
+        duty_dep = #{dutyDep,jdbcType=VARCHAR},
+      </if>
+      <if test="setUpCount != null">
+        set_up_count = #{setUpCount,jdbcType=INTEGER},
+      </if>
+      <if test="spotCheckCount != null">
+        spot_check_count = #{spotCheckCount,jdbcType=INTEGER},
+      </if>
+      <if test="failCount != null">
+        fail_count = #{failCount,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -194,7 +291,16 @@
       end_count = #{endCount,jdbcType=INTEGER},
       authorize_count = #{authorizeCount,jdbcType=INTEGER},
       apply_count = #{applyCount,jdbcType=INTEGER},
-      high_new_retrial = #{highNewRetrial,jdbcType=INTEGER}
+      high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
+      dispatch_count = #{dispatchCount,jdbcType=INTEGER},
+      stock_count = #{stockCount,jdbcType=INTEGER},
+      complete_count = #{completeCount,jdbcType=INTEGER},
+      promulgate_count = #{promulgateCount,jdbcType=INTEGER},
+      dispatch_province = #{dispatchProvince,jdbcType=INTEGER},
+      duty_dep = #{dutyDep,jdbcType=VARCHAR},
+      set_up_count = #{setUpCount,jdbcType=INTEGER},
+      spot_check_count = #{spotCheckCount,jdbcType=INTEGER},
+      fail_count = #{failCount,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -231,20 +337,71 @@
   <update id="updateByTid" parameterType="com.goafanti.common.model.TTaskMid">
     update t_task_mid
     <set>
+      <if test="tid != null">
+        tid = #{tid,jdbcType=INTEGER},
+      </if>
+      <if test="costAmount != null">
+        cost_amount = #{costAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="partyAmount != null">
+        party_amount = #{partyAmount,jdbcType=DECIMAL},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="certificatesCount != null">
+        certificates_count = #{certificatesCount,jdbcType=INTEGER},
+      </if>
       <if test="urgentDay != null">
-        urgent_Day = #{urgentDay},
+        urgent_day = #{urgentDay,jdbcType=INTEGER},
       </if>
       <if test="ifMaterial != null">
-        if_material = #{ifMaterial},
+        if_material = #{ifMaterial,jdbcType=INTEGER},
       </if>
       <if test="rejectCount != null">
-        reject_count = #{rejectCount},
+        reject_count = #{rejectCount,jdbcType=INTEGER},
       </if>
       <if test="acceptCount != null">
-        accept_count = #{acceptCount},
+        accept_count = #{acceptCount,jdbcType=INTEGER},
+      </if>
+      <if test="endCount != null">
+        end_count = #{endCount,jdbcType=INTEGER},
       </if>
       <if test="authorizeCount != null">
-        authorize_count = #{authorizeCount},
+        authorize_count = #{authorizeCount,jdbcType=INTEGER},
+      </if>
+      <if test="applyCount != null">
+        apply_count = #{applyCount,jdbcType=INTEGER},
+      </if>
+      <if test="highNewRetrial != null">
+        high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
+      </if>
+      <if test="dispatchCount != null">
+        dispatch_count = #{dispatchCount,jdbcType=INTEGER},
+      </if>
+      <if test="stockCount != null">
+        stock_count = #{stockCount,jdbcType=INTEGER},
+      </if>
+      <if test="completeCount != null">
+        complete_count = #{completeCount,jdbcType=INTEGER},
+      </if>
+      <if test="promulgateCount != null">
+        promulgate_count = #{promulgateCount,jdbcType=INTEGER},
+      </if>
+      <if test="dispatchProvince != null">
+        dispatch_province = #{dispatchProvince,jdbcType=INTEGER},
+      </if>
+      <if test="dutyDep != null">
+        duty_dep = #{dutyDep,jdbcType=VARCHAR},
+      </if>
+      <if test="setUpCount != null">
+        set_up_count = #{setUpCount,jdbcType=INTEGER},
+      </if>
+      <if test="spotCheckCount != null">
+        spot_check_count = #{spotCheckCount,jdbcType=INTEGER},
+      </if>
+      <if test="failCount != null">
+        fail_count = #{failCount,jdbcType=INTEGER},
       </if>
     </set>
     where tid = #{tid,jdbcType=INTEGER}
@@ -280,4 +437,4 @@
     where a.tid= #{tid}
   </select>
 
-</mapper>
+</mapper>

+ 118 - 2
src/main/java/com/goafanti/common/model/TTaskMid.java

@@ -6,7 +6,7 @@ import java.util.Date;
 
 /**
  * t_task_mid
- * @author 
+ * @author
  */
 public class TTaskMid implements Serializable {
     /**
@@ -79,6 +79,51 @@ public class TTaskMid implements Serializable {
      */
     private Integer highNewRetrial;
 
+    /**
+     * 派单数
+     */
+    private Integer dispatchCount;
+
+    /**
+     * 库存数
+     */
+    private Integer stockCount;
+
+    /**
+     * 完成数
+     */
+    private Integer completeCount;
+
+    /**
+     * 公示数
+     */
+    private Integer promulgateCount;
+
+    /**
+     * 派单省份
+     */
+    private Integer dispatchProvince;
+
+    /**
+     * 责任部门
+     */
+    private String dutyDep;
+
+    /**
+     * 立项数
+     */
+    private Integer setUpCount;
+
+    /**
+     * 抽查数
+     */
+    private Integer spotCheckCount;
+
+    /**
+     * 未通过数
+     */
+    private Integer failCount;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -193,6 +238,77 @@ public class TTaskMid implements Serializable {
         this.highNewRetrial = highNewRetrial;
     }
 
+    public Integer getDispatchCount() {
+        return dispatchCount;
+    }
+
+    public void setDispatchCount(Integer dispatchCount) {
+        this.dispatchCount = dispatchCount;
+    }
+
+    public Integer getStockCount() {
+        return stockCount;
+    }
+
+    public void setStockCount(Integer stockCount) {
+        this.stockCount = stockCount;
+    }
+
+    public Integer getCompleteCount() {
+        return completeCount;
+    }
+
+    public void setCompleteCount(Integer completeCount) {
+        this.completeCount = completeCount;
+    }
+
+    public Integer getPromulgateCount() {
+        return promulgateCount;
+    }
+
+    public void setPromulgateCount(Integer promulgateCount) {
+        this.promulgateCount = promulgateCount;
+    }
+
+    public Integer getDispatchProvince() {
+        return dispatchProvince;
+    }
+
+    public void setDispatchProvince(Integer dispatchProvince) {
+        this.dispatchProvince = dispatchProvince;
+    }
+
+    public String getDutyDep() {
+        return dutyDep;
+    }
+
+    public void setDutyDep(String dutyDep) {
+        this.dutyDep = dutyDep;
+    }
+
+    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 getFailCount() {
+        return failCount;
+    }
+
+    public void setFailCount(Integer failCount) {
+        this.failCount = failCount;
+    }
     public TTaskMid(Integer tid, BigDecimal costAmount) {
         this.tid = tid;
         this.costAmount = costAmount;
@@ -200,4 +316,4 @@ public class TTaskMid implements Serializable {
     public TTaskMid() {
 
     }
-}
+}

+ 44 - 42
src/main/java/com/goafanti/order/bo/OutProvincialStatistics.java

@@ -3,42 +3,16 @@ package com.goafanti.order.bo;
 import java.math.BigDecimal;
 
 public class OutProvincialStatistics {
-	
+
 	private String provinceName;
-	
+
 	private String thchDepName;
-	
+
 	private String projectStatus;
-	
+
 	private Integer province;
 	private String thchDepId;
 	private String bpId;
-	
-	
-	
-	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 getBpId() {
-		return bpId;
-	}
-
-	public void setBpId(String bpId) {
-		this.bpId = bpId;
-	}
 
 	/** 库存数 */
 	private Integer stockCount;
@@ -64,18 +38,46 @@ public class OutProvincialStatistics {
 	private Integer	applyCount;
 	/** 公示数 */
 	private Integer	publicityCount;
-	
+
 	private BigDecimal amountCount;
-	
+
 	private BigDecimal costAmount;
-	
+
 	private BigDecimal profit;
-	
-	
-	
 
-	
-	
+
+
+	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 getBpId() {
+		return bpId;
+	}
+
+	public void setBpId(String bpId) {
+		this.bpId = bpId;
+	}
+
+
+
+
+
+
+
+
 
 	public Integer getAcceptCount() {
 		return acceptCount;
@@ -173,7 +175,7 @@ public class OutProvincialStatistics {
 		this.projectStatus = projectStatus;
 	}
 
-	
+
 
 	public BigDecimal getAmountCount() {
 		return amountCount;
@@ -222,8 +224,8 @@ public class OutProvincialStatistics {
 	public void setPublicityCount(Integer publicityCount) {
 		this.publicityCount = publicityCount;
 	}
-	
-	
-	
+
+
+
 
 }

+ 29 - 9
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -425,16 +425,22 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			e.printStackTrace();
 		}
 		tOrderTaskMapper.updateByPrimaryKeySelective(task);
-		//订单中间表修改
+		//项目中间表修改
 		if (t.getUrgentDay()!=null||t.getIfMaterial()!=null||t.getRejectCount()!=null||
-				t.getAcceptCount()!=null||t.getAuthorizeCount()!=null) {
+				t.getAcceptCount()!=null||t.getAuthorizeCount()!=null||t.getSpotCheckStatus()!=null) {
 			TTaskMid tm=new TTaskMid();
 			tm.setTid(task.getId());
-			tm.setUrgentDay(t.getUrgentDay());
-			tm.setIfMaterial(t.getIfMaterial());
-			tm.setRejectCount(t.getRejectCount());
-			tm.setAcceptCount(t.getAcceptCount());
-			tm.setAuthorizeCount(t.getAuthorizeCount());
+			if (t.getUrgentDay()!=null)tm.setUrgentDay(t.getUrgentDay());
+			if (t.getIfMaterial()!=null)tm.setIfMaterial(t.getIfMaterial());
+			if (t.getRejectCount()!=null)tm.setRejectCount(t.getRejectCount());
+			if (t.getAcceptCount()!=null)tm.setAcceptCount(t.getAcceptCount());
+			if (t.getAuthorizeCount()!=null)tm.setAuthorizeCount(t.getAuthorizeCount());
+			if (t.getSpotCheckStatus()==1||t.getSpotCheckStatus()==2){
+				tm.setSpotCheckCount(t.getCommodityQuantity());
+				if (t.getSpotCheckStatus()==2){
+					tm.setFailCount(t.getCommodityQuantity());
+				}
+			}
 			tTaskMidMapper.updateByTid(tm);
 		}
 		TaskLog tl=new TaskLog();
@@ -457,8 +463,22 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if (b.getPubicityUrl()!=null)t.setPubicityUrl(b.getPubicityUrl());
 		TOrderTask task2=tOrderTaskMapper.selectByPrimaryKey(b.getTid());//查询出项目信息
 		if(b.getProjectStatus()!=task2.getProjectStatus()){
-			if(b.getProjectStatus()==NewProjectStatus.YLX.getCode()) t.setSetUpStatus(1);
-			if(b.getProjectStatus()==NewProjectStatus.YNGS.getCode()) t.setSetUpStatus(1);
+				TTaskMid taskMid = new TTaskMid();
+				taskMid.setTid(b.getTid());
+			if(b.getProjectStatus()==NewProjectStatus.YLX.getCode()||b.getProjectStatus()==NewProjectStatus.YNGS.getCode()){
+				t.setSetUpStatus(1);
+				taskMid.setSetUpCount(task2.getCommodityQuantity());
+				if (b.getProjectStatus()==NewProjectStatus.YNGS.getCode()){
+					t.setIfPublicity(1);
+					taskMid.setPromulgateCount(task2.getCommodityQuantity());
+				}
+			}
+			//大于3计做已完成 不计做库存
+			if (b.getProjectStatus()>3){
+				taskMid.setCompleteCount(task2.getCommodityQuantity());
+				taskMid.setStockCount(0);
+			}
+			tTaskMidMapper.updateByTid(taskMid);
 			tOrderTaskMapper.updateByPrimaryKeySelective(t);
 			projectSplitPush(b.getTid(), b.getProjectStatus(),task2);
 			pushTaskLog(b.getTid(), b.getProjectStatus());

+ 3 - 2
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -343,8 +343,9 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	public Object publicReleaseListDtails(InputPublicDtails in) {
 		Map<String,Object> map =new HashMap<String, Object>();
 		addParams(in, map);
-
-		return (Pagination<OutPublicDtails>) findPage("listPublicDtails", "countPublicDtails", map, in.getPageNo(), in.getPageSize());
+		Date date = new Date();
+		Pagination<OutPublicDtails> page = (Pagination<OutPublicDtails>) findPage("listPublicDtails", "countPublicDtails", map, in.getPageNo(), in.getPageSize());
+		return page;
 	}
 
 	private void addParams(InputPublicDtails in, Map<String, Object> map) {