소스 검색

财务订单特批相关修改

anderx 1 년 전
부모
커밋
74ee56d30f

+ 26 - 1
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1526,7 +1526,7 @@
     tm.service_life serviceLife,tm.service_year serviceyear, tm.year_sum yearsum,tm.contract_term contractTerm, a.commodity_price commodityPrice ,
     a.special_comment specialComment,a.task_comment taskComment,ttm.last_year lastYear,ttm.last_year_capital lastYearCapital,ttm.last_year_income lastYearIncome,
     e.service_type serviceType,e.service_project serviceProject, a.form_retrieve formRetrieve  ,a.satisfaction_degree satisfactionDegree,
-    b.approval_type approvalType,b.approval_type_explain approvalTypeExplain
+    toa.type,toa.type_explain typeExplain
     from t_order_task a left join t_order_new b on a.order_no =b.order_no left join department c on b.order_dep =c.id
     left join district_glossory d on c.province=d.id left join task_progress tp  on a.id=tp.task_id left join t_task_member tm on a.id=tm.tid
     left join t_order_mid e on b.order_no =e.order_no left join business_project bp on a.commodity_id =bp.id left join business_category bc on bp.cid =bc.id
@@ -1550,6 +1550,21 @@
       right join (select tid ,apply_count sqs,reject_count bhs,certificates_count xzs from t_task_mid
       where apply_count > 0)tj on a.id=tj.tid
     </if>
+    <if test="type !=null">
+      inner join
+    </if>
+    <if test="type ==null">
+      left join
+    </if>
+    (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
+    from t_order_approval
+    <if test="type !=null">
+      where `type` in
+      <foreach collection="type" item="item" separator="," open="(" close=")">
+        #{item}
+      </foreach>
+    </if>
+    group by order_no) toa on b.order_no=toa.order_no
     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">
@@ -1693,6 +1708,16 @@
       right 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="type !=null">
+      inner join
+      (select order_no ,GROUP_CONCAT(`type`)`type` ,GROUP_CONCAT(type_explain)type_explain
+      from t_order_approval
+      where `type` in
+      <foreach collection="type" item="item" separator="," open="(" close=")">
+        #{item}
+      </foreach>
+      group by order_no) toa on o.order_no=toa.order_no
+    </if>
     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">

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

@@ -28,6 +28,7 @@ public class InputProjectStatistics {
 	private Integer province;
 	private String provinceName;
 	private String projectId;
+	private String type;
 	/**
 	 * 筛选项 0库存 1派单 2完成 3立项 4抽查 5未通过 6受理 7完结 8授权 9驳回 10下证 11申请
 	 */
@@ -40,6 +41,14 @@ public class InputProjectStatistics {
 	 */
 	private Integer sdStatus;
 
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
 	public Integer getSdStatus() {
 		return sdStatus;
 	}

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

@@ -74,25 +74,27 @@ public class OutProjectStatistics {
 	private BigDecimal lastYearCapital;
 	private BigDecimal lastYearIncome;
 
-	private Integer approvalType;
-	private String approvalTypeExplain;
 
-	public Integer getApprovalType() {
-		return approvalType;
+	private String type;
+	private String typeExplain;
+
+	public String getType() {
+		return type;
 	}
 
-	public void setApprovalType(Integer approvalType) {
-		this.approvalType = approvalType;
+	public void setType(String type) {
+		this.type = type;
 	}
 
-	public String getApprovalTypeExplain() {
-		return approvalTypeExplain;
+	public String getTypeExplain() {
+		return typeExplain;
 	}
 
-	public void setApprovalTypeExplain(String approvalTypeExplain) {
-		this.approvalTypeExplain = approvalTypeExplain;
+	public void setTypeExplain(String typeExplain) {
+		this.typeExplain = typeExplain;
 	}
 
+
 	public Integer getFormRetrieve() {
 		return formRetrieve;
 	}

+ 21 - 23
src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java

@@ -1,25 +1,21 @@
 package com.goafanti.order.service.impl;
 
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
 import com.goafanti.admin.service.DepartmentService;
+import com.goafanti.common.bo.Error;
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.error.BusinessException;
+import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.excel.NewExcelUtil;
-import com.goafanti.order.bo.*;
+import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
+import com.goafanti.order.bo.InputProjectStatistics;
+import com.goafanti.order.bo.InputProvincialStatistics;
+import com.goafanti.order.bo.OutProjectStatistics;
+import com.goafanti.order.bo.OutProvincialStatistics;
 import com.goafanti.order.bo.outStatistics.*;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
+import com.goafanti.order.service.ProjectStatisticsService;
 import groovy.util.logging.Log4j;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
@@ -33,14 +29,12 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import com.goafanti.common.bo.Error;
-import com.goafanti.common.dao.TOrderTaskMapper;
-import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.utils.ExportExcelUtil;
-import com.goafanti.core.mybatis.BaseMybatisDao;
-import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.enums.NewProjectStatus;
-import com.goafanti.order.service.ProjectStatisticsService;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.*;
 
 @Service
 @Log4j
@@ -68,6 +62,10 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		if(ps.getContractNo()!=null)params.put("contractNo", ps.getContractNo());
 		if(ps.getUserName()!=null)params.put("userName", ps.getUserName());
 		if (ps.getThchId()!=null)params.put("thchId", ps.getThchId());
+		if (ps.getType()!=null){
+			String[] split = ps.getType().split(",");
+			params.put("type", split);
+		}
 		if(ps.getDeclarationBatch()!=null)params.put("declarationBatch", ps.getDeclarationBatch());
 		if(ps.getProjectSituation()!=null)params.put("projectSituation", ps.getProjectSituation());
 		if(ps.getProjectAmount()!=null) {