Browse Source

Merge branch 'test'

anderx 3 years ago
parent
commit
e780da8ef3

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

@@ -1224,7 +1224,7 @@
   <select id="selectProjectStatisticsListByPage" resultType="com.goafanti.order.bo.OutProjectStatistics">
     select  date_format( a.task_distribution_time, '%Y-%m-%d %H:%i:%S' ) distributionTime ,d.name province  ,c.name depName,e.salesman_name salesmanName,
     b.contract_no contractNo ,b.order_no orderNo ,e.buyer_name userName,bc.cname ,a.commodity_name pname,ta.name techName,td.name techDepName,
-    a.project_status projectStatus,a.id,
+    a.project_status projectStatus,a.id,b.order_remarks orderRemarks,
     <if test="status==1">
       a.set_up_status setUpStatus , date_format( a.set_up_time , '%Y-%m-%d' ) setUpTime ,a.spot_check_status spotCheckStatus ,b.contact_mobile contactMobile ,
       b.legal_person_tel legalPersonTel , a.certificate_number certificateNumber,a.declaration_batch declarationBatch,

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

@@ -5,21 +5,21 @@ import java.math.BigDecimal;
 
 public class OutProjectStatistics {
 	private Integer id;
-	private String distributionTime; 
+	private String distributionTime;
 	private String province;
 	private String depName;
 	private String salesmanName;
 	private String contractNo;
-	private String orderNo; 
+	private String orderNo;
 	private String  userName;
 	private String cname;
 	private String  pname;
 	private String techName;
 	private String techDepName;
 	private Integer projectStatus;
-	
 
-	
+
+
 	private Integer  setUpStatus;
 	private Integer  highTechstatus;
 	private String setUpTime;
@@ -30,13 +30,13 @@ public class OutProjectStatistics {
 	private String  declarationBatch;
 	private Integer  commodityQuantity;
 	private BigDecimal  commodityPrice;
-	
-	
+
+
 	/**下证时间*/
 	private String	licenceTime;
 	/**任务备注*/
 	private String	taskComment;
-	
+
 	/**下证数*/
 	private Integer	certificatesCount;
 	/**加急天数*/
@@ -56,8 +56,17 @@ public class OutProjectStatistics {
 	/**受理时间*/
 	private String	acceptTime;
 	private String	specialComment;
-	
-	
+
+	private String orderRemarks;
+
+	public String getOrderRemarks() {
+		return orderRemarks;
+	}
+
+	public void setOrderRemarks(String orderRemarks) {
+		this.orderRemarks = orderRemarks;
+	}
+
 	public Integer getSetUpStatus() {
 		return setUpStatus;
 	}
@@ -112,7 +121,7 @@ public class OutProjectStatistics {
 	public void setCommodityPrice(BigDecimal commodityPrice) {
 		this.commodityPrice = commodityPrice;
 	}
-	
+
 
 
 	public String getDistributionTime() {

+ 293 - 0
src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsCommon.java

@@ -0,0 +1,293 @@
+package com.goafanti.order.bo.outStatistics;
+
+import com.goafanti.common.utils.excel.Excel;
+import com.goafanti.order.bo.OutProjectStatistics;
+
+import java.math.BigDecimal;
+
+public class OutProjectStatisticsCommon extends OutProjectStatistics {
+    private Integer id;
+    @Excel(name = "派单时间")
+    private String distributionTime;
+    @Excel(name = "派单省份")
+    private String province;
+    @Excel(name = "订单部门")
+    private String depName;
+    @Excel(name = "营销员")
+    private String salesmanName;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "客户名称")
+    private String  userName;
+    @Excel(name = "项目类型")
+    private String cname;
+    @Excel(name = "项目名称")
+    private String  pname;
+    @Excel(name = "数量")
+    private Integer  commodityQuantity;
+    @Excel(name = "负责部门")
+    private String techDepName;
+    @Excel(name = "咨询师/咨询师经理")
+    private String techName;
+    @Excel(name = "项目状态" ,enumsName = "com.goafanti.order.enums.NewProjectStatus")
+    private Integer projectStatus;
+    @Excel(name = "项目金额",scale = 6)
+    private BigDecimal  commodityPrice;
+    @Excel(name = "特别说明")
+    private String	specialComment;
+    @Excel(name = "项目说明")
+    private String	taskComment;
+    @Excel(name = "订单说明")
+    private String orderRemarks;
+
+    private Integer  setUpStatus;
+    private String setUpTime;
+    private Integer  spotCheckStatus;
+    private String  contactMobile;
+    private String  legalPersonTel;
+    private String  certificateNumber;
+    private String  declarationBatch;
+    private String	licenceTime;
+    private Integer	ifMaterial;
+    private Integer	urgentDay;
+    private BigDecimal	costAmount;
+    private BigDecimal	profit;
+    private Integer  highTechstatus;
+    private Integer	rejectCount;
+    private String	patentNo;
+    private String	patentName;
+    private String	acceptTime;
+
+
+
+    private Integer	certificatesCount;
+
+
+    public String getOrderRemarks() {
+        return orderRemarks;
+    }
+
+    public void setOrderRemarks(String orderRemarks) {
+        this.orderRemarks = orderRemarks;
+    }
+
+    public Integer getSetUpStatus() {
+        return setUpStatus;
+    }
+    public void setSetUpStatus(Integer setUpStatus) {
+        this.setUpStatus = setUpStatus;
+    }
+    public String getSetUpTime() {
+        return setUpTime;
+    }
+    public void setSetUpTime(String setUpTime) {
+        this.setUpTime = setUpTime;
+    }
+    public Integer getSpotCheckStatus() {
+        return spotCheckStatus;
+    }
+    public void setSpotCheckStatus(Integer spotCheckStatus) {
+        this.spotCheckStatus = spotCheckStatus;
+    }
+    public String getContactMobile() {
+        return contactMobile;
+    }
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+    public String getLegalPersonTel() {
+        return legalPersonTel;
+    }
+    public void setLegalPersonTel(String legalPersonTel) {
+        this.legalPersonTel = legalPersonTel;
+    }
+    public String getCertificateNumber() {
+        return certificateNumber;
+    }
+    public void setCertificateNumber(String certificateNumber) {
+        this.certificateNumber = certificateNumber;
+    }
+    public String getDeclarationBatch() {
+        return declarationBatch;
+    }
+    public void setDeclarationBatch(String declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+
+
+    public String getDistributionTime() {
+        return distributionTime;
+    }
+    public void setDistributionTime(String distributionTime) {
+        this.distributionTime = distributionTime;
+    }
+    public String getProvince() {
+        return province;
+    }
+    public void setProvince(String province) {
+        this.province = province;
+    }
+    public String getDepName() {
+        return depName;
+    }
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+    public String getContractNo() {
+        return contractNo;
+    }
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getUserName() {
+        return userName;
+    }
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+    public String getCname() {
+        return cname;
+    }
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+    public String getPname() {
+        return pname;
+    }
+    public void setPname(String pname) {
+        this.pname = pname;
+    }
+    public String getTechName() {
+        return techName;
+    }
+    public void setTechName(String techName) {
+        this.techName = techName;
+    }
+    public String getTechDepName() {
+        return techDepName;
+    }
+    public void setTechDepName(String techDepName) {
+        this.techDepName = techDepName;
+    }
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+    public String getLicenceTime() {
+        return licenceTime;
+    }
+    public void setLicenceTime(String licenceTime) {
+        this.licenceTime = licenceTime;
+    }
+    public String getTaskComment() {
+        return taskComment;
+    }
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+    public Integer getCertificatesCount() {
+        return certificatesCount;
+    }
+    public void setCertificatesCount(Integer certificatesCount) {
+        this.certificatesCount = certificatesCount;
+    }
+    public Integer getUrgentDay() {
+        return urgentDay;
+    }
+    public void setUrgentDay(Integer urgentDay) {
+        this.urgentDay = urgentDay;
+    }
+    public Integer getIfMaterial() {
+        return ifMaterial;
+    }
+    public void setIfMaterial(Integer ifMaterial) {
+        this.ifMaterial = ifMaterial;
+    }
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+    public BigDecimal getProfit() {
+        if (profit==null&&commodityPrice!=null&&costAmount!=null) {
+            return  commodityPrice.subtract(costAmount);
+        }
+        return profit;
+    }
+    public void setProfit(BigDecimal profit) {
+        this.profit = profit;
+    }
+    public Integer getRejectCount() {
+        return rejectCount;
+    }
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+    public String getPatentName() {
+        return patentName;
+    }
+    public void setPatentName(String patentName) {
+        this.patentName = patentName;
+    }
+    public String getAcceptTime() {
+        return acceptTime;
+    }
+    public void setAcceptTime(String acceptTime) {
+        this.acceptTime = acceptTime;
+    }
+    public Integer getHighTechstatus() {
+        return highTechstatus;
+    }
+    public void setHighTechstatus(Integer highTechstatus) {
+        this.highTechstatus = highTechstatus;
+    }
+    public Integer getId() {
+        return id;
+    }
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getSpecialComment() {
+        return specialComment;
+    }
+    public void setSpecialComment(String specialComment) {
+        this.specialComment = specialComment;
+    }
+    public String getPatentNo() {
+        return patentNo;
+    }
+    public void setPatentNo(String patentNo) {
+        this.patentNo = patentNo;
+    }
+
+}

+ 295 - 0
src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsDoubleSoft.java

@@ -0,0 +1,295 @@
+package com.goafanti.order.bo.outStatistics;
+
+import com.goafanti.common.utils.excel.Excel;
+import com.goafanti.order.bo.OutProjectStatistics;
+
+import java.math.BigDecimal;
+
+public class OutProjectStatisticsDoubleSoft extends OutProjectStatistics {
+    private Integer id;
+    @Excel(name = "派单时间")
+    private String distributionTime;
+    @Excel(name = "派单省份")
+    private String province;
+    @Excel(name = "订单部门")
+    private String depName;
+    @Excel(name = "营销员")
+    private String salesmanName;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "客户名称")
+    private String  userName;
+    @Excel(name = "项目类型")
+    private String cname;
+    @Excel(name = "项目名称")
+    private String  pname;
+    @Excel(name = "数量")
+    private Integer  commodityQuantity;
+    @Excel(name = "负责部门")
+    private String techDepName;
+    @Excel(name = "咨询师/咨询师经理")
+    private String techName;
+    @Excel(name = "项目状态" ,enumsName = "com.goafanti.order.enums.NewProjectStatus")
+    private Integer projectStatus;
+    @Excel(name = "下证时间")
+    private String	licenceTime;
+    @Excel(name = "项目金额")
+    private BigDecimal  commodityPrice;
+    @Excel(name = "特别说明")
+    private String	specialComment;
+    @Excel(name = "项目说明")
+    private String	taskComment;
+    @Excel(name = "订单说明")
+    private String orderRemarks;
+
+
+
+    private Integer  setUpStatus;
+    private String setUpTime;
+    private Integer  spotCheckStatus;
+    private String  contactMobile;
+    private String  legalPersonTel;
+    private String  certificateNumber;
+    private String  declarationBatch;
+
+    private Integer	ifMaterial;
+    private Integer	urgentDay;
+    private BigDecimal	costAmount;
+    private BigDecimal	profit;
+    private Integer  highTechstatus;
+    private Integer	rejectCount;
+    private String	patentNo;
+    private String	patentName;
+    private String	acceptTime;
+
+
+    private Integer	certificatesCount;
+
+
+    public String getOrderRemarks() {
+        return orderRemarks;
+    }
+
+    public void setOrderRemarks(String orderRemarks) {
+        this.orderRemarks = orderRemarks;
+    }
+    public Integer getSetUpStatus() {
+        return setUpStatus;
+    }
+    public void setSetUpStatus(Integer setUpStatus) {
+        this.setUpStatus = setUpStatus;
+    }
+    public String getSetUpTime() {
+        return setUpTime;
+    }
+    public void setSetUpTime(String setUpTime) {
+        this.setUpTime = setUpTime;
+    }
+    public Integer getSpotCheckStatus() {
+        return spotCheckStatus;
+    }
+    public void setSpotCheckStatus(Integer spotCheckStatus) {
+        this.spotCheckStatus = spotCheckStatus;
+    }
+    public String getContactMobile() {
+        return contactMobile;
+    }
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+    public String getLegalPersonTel() {
+        return legalPersonTel;
+    }
+    public void setLegalPersonTel(String legalPersonTel) {
+        this.legalPersonTel = legalPersonTel;
+    }
+    public String getCertificateNumber() {
+        return certificateNumber;
+    }
+    public void setCertificateNumber(String certificateNumber) {
+        this.certificateNumber = certificateNumber;
+    }
+    public String getDeclarationBatch() {
+        return declarationBatch;
+    }
+    public void setDeclarationBatch(String declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+
+
+    public String getDistributionTime() {
+        return distributionTime;
+    }
+    public void setDistributionTime(String distributionTime) {
+        this.distributionTime = distributionTime;
+    }
+    public String getProvince() {
+        return province;
+    }
+    public void setProvince(String province) {
+        this.province = province;
+    }
+    public String getDepName() {
+        return depName;
+    }
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+    public String getContractNo() {
+        return contractNo;
+    }
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getUserName() {
+        return userName;
+    }
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+    public String getCname() {
+        return cname;
+    }
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+    public String getPname() {
+        return pname;
+    }
+    public void setPname(String pname) {
+        this.pname = pname;
+    }
+    public String getTechName() {
+        return techName;
+    }
+    public void setTechName(String techName) {
+        this.techName = techName;
+    }
+    public String getTechDepName() {
+        return techDepName;
+    }
+    public void setTechDepName(String techDepName) {
+        this.techDepName = techDepName;
+    }
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+    public String getLicenceTime() {
+        return licenceTime;
+    }
+    public void setLicenceTime(String licenceTime) {
+        this.licenceTime = licenceTime;
+    }
+    public String getTaskComment() {
+        return taskComment;
+    }
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+    public Integer getCertificatesCount() {
+        return certificatesCount;
+    }
+    public void setCertificatesCount(Integer certificatesCount) {
+        this.certificatesCount = certificatesCount;
+    }
+    public Integer getUrgentDay() {
+        return urgentDay;
+    }
+    public void setUrgentDay(Integer urgentDay) {
+        this.urgentDay = urgentDay;
+    }
+    public Integer getIfMaterial() {
+        return ifMaterial;
+    }
+    public void setIfMaterial(Integer ifMaterial) {
+        this.ifMaterial = ifMaterial;
+    }
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+    public BigDecimal getProfit() {
+        if (profit==null&&commodityPrice!=null&&costAmount!=null) {
+            return  commodityPrice.subtract(costAmount);
+        }
+        return profit;
+    }
+    public void setProfit(BigDecimal profit) {
+        this.profit = profit;
+    }
+    public Integer getRejectCount() {
+        return rejectCount;
+    }
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+    public String getPatentName() {
+        return patentName;
+    }
+    public void setPatentName(String patentName) {
+        this.patentName = patentName;
+    }
+    public String getAcceptTime() {
+        return acceptTime;
+    }
+    public void setAcceptTime(String acceptTime) {
+        this.acceptTime = acceptTime;
+    }
+    public Integer getHighTechstatus() {
+        return highTechstatus;
+    }
+    public void setHighTechstatus(Integer highTechstatus) {
+        this.highTechstatus = highTechstatus;
+    }
+    public Integer getId() {
+        return id;
+    }
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getSpecialComment() {
+        return specialComment;
+    }
+    public void setSpecialComment(String specialComment) {
+        this.specialComment = specialComment;
+    }
+    public String getPatentNo() {
+        return patentNo;
+    }
+    public void setPatentNo(String patentNo) {
+        this.patentNo = patentNo;
+    }
+
+}

+ 302 - 0
src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsHighTech.java

@@ -0,0 +1,302 @@
+package com.goafanti.order.bo.outStatistics;
+
+import com.goafanti.common.utils.excel.Excel;
+import com.goafanti.order.bo.OutProjectStatistics;
+
+import java.math.BigDecimal;
+
+public class OutProjectStatisticsHighTech extends OutProjectStatistics {
+    private Integer id;
+    @Excel(name = "派单时间")
+    private String distributionTime;
+    @Excel(name = "派单省份")
+    private String province;
+    @Excel(name = "订单部门")
+    private String depName;
+    @Excel(name = "营销员")
+    private String salesmanName;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "客户名称")
+    private String  userName;
+    @Excel(name = "项目类型")
+    private String cname;
+    @Excel(name = "项目名称")
+    private String  pname;
+    @Excel(name = "数量")
+    private Integer  commodityQuantity;
+    @Excel(name = "负责部门")
+    private String techDepName;
+    @Excel(name = "咨询师/咨询师经理")
+    private String techName;
+    @Excel(name = "项目状态" ,enumsName = "com.goafanti.order.enums.NewProjectStatus")
+    private Integer projectStatus;
+
+
+    @Excel(name = "立项",readConverterExp = "0=否,1=是")
+    private Integer  setUpStatus;
+    @Excel(name = "立项时间")
+    private String setUpTime;
+    @Excel(name = "抽查",readConverterExp = "0=否,1=未通过,2=通过")
+    private Integer  spotCheckStatus;
+    @Excel(name = "联系人电话")
+    private String  contactMobile;
+    @Excel(name = "法人电话")
+    private String  legalPersonTel;
+    @Excel(name = "证书编号")
+    private String  certificateNumber;
+    @Excel(name = "申请批次")
+    private String  declarationBatch;
+    @Excel(name = "项目金额")
+    private BigDecimal  commodityPrice;
+    @Excel(name = "特别说明")
+    private String	specialComment;
+    @Excel(name = "项目说明")
+    private String	taskComment;
+    @Excel(name = "订单说明")
+    private String orderRemarks;
+
+
+
+
+    private String	licenceTime;
+    private Integer	ifMaterial;
+    private Integer	urgentDay;
+    private BigDecimal	costAmount;
+    private BigDecimal	profit;
+    private Integer  highTechstatus;
+    private Integer	rejectCount;
+    private String	patentNo;
+    private String	patentName;
+    private String	acceptTime;
+
+
+    private Integer	certificatesCount;
+
+    public String getOrderRemarks() {
+        return orderRemarks;
+    }
+
+    public void setOrderRemarks(String orderRemarks) {
+        this.orderRemarks = orderRemarks;
+    }
+    public Integer getSetUpStatus() {
+        return setUpStatus;
+    }
+    public void setSetUpStatus(Integer setUpStatus) {
+        this.setUpStatus = setUpStatus;
+    }
+    public String getSetUpTime() {
+        return setUpTime;
+    }
+    public void setSetUpTime(String setUpTime) {
+        this.setUpTime = setUpTime;
+    }
+    public Integer getSpotCheckStatus() {
+        return spotCheckStatus;
+    }
+    public void setSpotCheckStatus(Integer spotCheckStatus) {
+        this.spotCheckStatus = spotCheckStatus;
+    }
+    public String getContactMobile() {
+        return contactMobile;
+    }
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+    public String getLegalPersonTel() {
+        return legalPersonTel;
+    }
+    public void setLegalPersonTel(String legalPersonTel) {
+        this.legalPersonTel = legalPersonTel;
+    }
+    public String getCertificateNumber() {
+        return certificateNumber;
+    }
+    public void setCertificateNumber(String certificateNumber) {
+        this.certificateNumber = certificateNumber;
+    }
+    public String getDeclarationBatch() {
+        return declarationBatch;
+    }
+    public void setDeclarationBatch(String declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+
+
+    public String getDistributionTime() {
+        return distributionTime;
+    }
+    public void setDistributionTime(String distributionTime) {
+        this.distributionTime = distributionTime;
+    }
+    public String getProvince() {
+        return province;
+    }
+    public void setProvince(String province) {
+        this.province = province;
+    }
+    public String getDepName() {
+        return depName;
+    }
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+    public String getContractNo() {
+        return contractNo;
+    }
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getUserName() {
+        return userName;
+    }
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+    public String getCname() {
+        return cname;
+    }
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+    public String getPname() {
+        return pname;
+    }
+    public void setPname(String pname) {
+        this.pname = pname;
+    }
+    public String getTechName() {
+        return techName;
+    }
+    public void setTechName(String techName) {
+        this.techName = techName;
+    }
+    public String getTechDepName() {
+        return techDepName;
+    }
+    public void setTechDepName(String techDepName) {
+        this.techDepName = techDepName;
+    }
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+    public String getLicenceTime() {
+        return licenceTime;
+    }
+    public void setLicenceTime(String licenceTime) {
+        this.licenceTime = licenceTime;
+    }
+    public String getTaskComment() {
+        return taskComment;
+    }
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+    public Integer getCertificatesCount() {
+        return certificatesCount;
+    }
+    public void setCertificatesCount(Integer certificatesCount) {
+        this.certificatesCount = certificatesCount;
+    }
+    public Integer getUrgentDay() {
+        return urgentDay;
+    }
+    public void setUrgentDay(Integer urgentDay) {
+        this.urgentDay = urgentDay;
+    }
+    public Integer getIfMaterial() {
+        return ifMaterial;
+    }
+    public void setIfMaterial(Integer ifMaterial) {
+        this.ifMaterial = ifMaterial;
+    }
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+    public BigDecimal getProfit() {
+        if (profit==null&&commodityPrice!=null&&costAmount!=null) {
+            return  commodityPrice.subtract(costAmount);
+        }
+        return profit;
+    }
+    public void setProfit(BigDecimal profit) {
+        this.profit = profit;
+    }
+    public Integer getRejectCount() {
+        return rejectCount;
+    }
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+    public String getPatentName() {
+        return patentName;
+    }
+    public void setPatentName(String patentName) {
+        this.patentName = patentName;
+    }
+    public String getAcceptTime() {
+        return acceptTime;
+    }
+    public void setAcceptTime(String acceptTime) {
+        this.acceptTime = acceptTime;
+    }
+    public Integer getHighTechstatus() {
+        return highTechstatus;
+    }
+    public void setHighTechstatus(Integer highTechstatus) {
+        this.highTechstatus = highTechstatus;
+    }
+    public Integer getId() {
+        return id;
+    }
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getSpecialComment() {
+        return specialComment;
+    }
+    public void setSpecialComment(String specialComment) {
+        this.specialComment = specialComment;
+    }
+    public String getPatentNo() {
+        return patentNo;
+    }
+    public void setPatentNo(String patentNo) {
+        this.patentNo = patentNo;
+    }
+
+}

+ 306 - 0
src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsPatent.java

@@ -0,0 +1,306 @@
+package com.goafanti.order.bo.outStatistics;
+
+import com.goafanti.common.utils.excel.Excel;
+import com.goafanti.order.bo.OutProjectStatistics;
+
+import java.math.BigDecimal;
+
+public class OutProjectStatisticsPatent extends OutProjectStatistics {
+    private Integer id;
+    @Excel(name = "派单时间")
+    private String distributionTime;
+    @Excel(name = "派单省份")
+    private String province;
+    @Excel(name = "订单部门")
+    private String depName;
+    @Excel(name = "营销员")
+    private String salesmanName;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "客户名称")
+    private String  userName;
+    @Excel(name = "项目类型")
+    private String cname;
+    @Excel(name = "项目名称")
+    private String  pname;
+    @Excel(name = "数量")
+    private Integer  commodityQuantity;
+    @Excel(name = "负责部门")
+    private String techDepName;
+    @Excel(name = "咨询师/咨询师经理")
+    private String techName;
+    @Excel(name = "项目状态" ,enumsName = "com.goafanti.order.enums.NewProjectStatus")
+    private Integer projectStatus;
+    @Excel(name = "是否高新",readConverterExp = "0=否,1=是")
+    private Integer  highTechstatus;
+    @Excel(name = "项目数/下证数")
+    private String quantityAndcount;
+    @Excel(name = "驳回数")
+    private Integer	rejectCount;
+    @Excel(name = "专利号")
+    private String	patentNo;
+    @Excel(name = "专利名称")
+    private String	patentName;
+    @Excel(name = "受理时间")
+    private String	acceptTime;
+    @Excel(name = "成本",scale = 6)
+    private BigDecimal	costAmount;
+    @Excel(name = "利润",scale = 6)
+    private BigDecimal	profit;
+    @Excel(name = "项目金额",scale = 6)
+    private BigDecimal  commodityPrice;
+    @Excel(name = "特别说明")
+    private String	specialComment;
+    @Excel(name = "项目说明")
+    private String	taskComment;
+    @Excel(name = "订单说明")
+    private String orderRemarks;
+
+
+    private Integer  setUpStatus;
+    private String setUpTime;
+    private Integer  spotCheckStatus;
+    private String  contactMobile;
+    private String  legalPersonTel;
+    private String  certificateNumber;
+    private String  declarationBatch;
+    private String	licenceTime;
+    private Integer	ifMaterial;
+    private Integer	urgentDay;
+    private Integer	certificatesCount;
+
+    public String getQuantityAndcount() {
+        return quantityAndcount;
+    }
+
+    public void setQuantityAndcount(String quantityAndcount) {
+        this.quantityAndcount = quantityAndcount;
+    }
+
+    public String getOrderRemarks() {
+        return orderRemarks;
+    }
+
+    public void setOrderRemarks(String orderRemarks) {
+        this.orderRemarks = orderRemarks;
+    }
+    public Integer getSetUpStatus() {
+        return setUpStatus;
+    }
+    public void setSetUpStatus(Integer setUpStatus) {
+        this.setUpStatus = setUpStatus;
+    }
+    public String getSetUpTime() {
+        return setUpTime;
+    }
+    public void setSetUpTime(String setUpTime) {
+        this.setUpTime = setUpTime;
+    }
+    public Integer getSpotCheckStatus() {
+        return spotCheckStatus;
+    }
+    public void setSpotCheckStatus(Integer spotCheckStatus) {
+        this.spotCheckStatus = spotCheckStatus;
+    }
+    public String getContactMobile() {
+        return contactMobile;
+    }
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+    public String getLegalPersonTel() {
+        return legalPersonTel;
+    }
+    public void setLegalPersonTel(String legalPersonTel) {
+        this.legalPersonTel = legalPersonTel;
+    }
+    public String getCertificateNumber() {
+        return certificateNumber;
+    }
+    public void setCertificateNumber(String certificateNumber) {
+        this.certificateNumber = certificateNumber;
+    }
+    public String getDeclarationBatch() {
+        return declarationBatch;
+    }
+    public void setDeclarationBatch(String declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+
+
+    public String getDistributionTime() {
+        return distributionTime;
+    }
+    public void setDistributionTime(String distributionTime) {
+        this.distributionTime = distributionTime;
+    }
+    public String getProvince() {
+        return province;
+    }
+    public void setProvince(String province) {
+        this.province = province;
+    }
+    public String getDepName() {
+        return depName;
+    }
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+    public String getContractNo() {
+        return contractNo;
+    }
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getUserName() {
+        return userName;
+    }
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+    public String getCname() {
+        return cname;
+    }
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+    public String getPname() {
+        return pname;
+    }
+    public void setPname(String pname) {
+        this.pname = pname;
+    }
+    public String getTechName() {
+        return techName;
+    }
+    public void setTechName(String techName) {
+        this.techName = techName;
+    }
+    public String getTechDepName() {
+        return techDepName;
+    }
+    public void setTechDepName(String techDepName) {
+        this.techDepName = techDepName;
+    }
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+    public String getLicenceTime() {
+        return licenceTime;
+    }
+    public void setLicenceTime(String licenceTime) {
+        this.licenceTime = licenceTime;
+    }
+    public String getTaskComment() {
+        return taskComment;
+    }
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+    public Integer getCertificatesCount() {
+        return certificatesCount;
+    }
+    public void setCertificatesCount(Integer certificatesCount) {
+        this.certificatesCount = certificatesCount;
+    }
+    public Integer getUrgentDay() {
+        return urgentDay;
+    }
+    public void setUrgentDay(Integer urgentDay) {
+        this.urgentDay = urgentDay;
+    }
+    public Integer getIfMaterial() {
+        return ifMaterial;
+    }
+    public void setIfMaterial(Integer ifMaterial) {
+        this.ifMaterial = ifMaterial;
+    }
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+    public BigDecimal getProfit() {
+        if (profit==null&&commodityPrice!=null&&costAmount!=null) {
+            return  commodityPrice.subtract(costAmount);
+        }
+        return profit;
+    }
+    public void setProfit(BigDecimal profit) {
+        this.profit = profit;
+    }
+    public Integer getRejectCount() {
+        return rejectCount;
+    }
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+    public String getPatentName() {
+        return patentName;
+    }
+    public void setPatentName(String patentName) {
+        this.patentName = patentName;
+    }
+    public String getAcceptTime() {
+        return acceptTime;
+    }
+    public void setAcceptTime(String acceptTime) {
+        this.acceptTime = acceptTime;
+    }
+    public Integer getHighTechstatus() {
+        return highTechstatus;
+    }
+    public void setHighTechstatus(Integer highTechstatus) {
+        this.highTechstatus = highTechstatus;
+    }
+    public Integer getId() {
+        return id;
+    }
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getSpecialComment() {
+        return specialComment;
+    }
+    public void setSpecialComment(String specialComment) {
+        this.specialComment = specialComment;
+    }
+    public String getPatentNo() {
+        return patentNo;
+    }
+    public void setPatentNo(String patentNo) {
+        this.patentNo = patentNo;
+    }
+
+}

+ 305 - 0
src/main/java/com/goafanti/order/bo/outStatistics/OutProjectStatisticsSoftwareWorks.java

@@ -0,0 +1,305 @@
+package com.goafanti.order.bo.outStatistics;
+
+import com.goafanti.common.utils.excel.Excel;
+import com.goafanti.order.bo.OutProjectStatistics;
+
+import java.math.BigDecimal;
+
+public class OutProjectStatisticsSoftwareWorks extends OutProjectStatistics {
+    private Integer id;
+    @Excel(name = "派单时间")
+    private String distributionTime;
+    @Excel(name = "派单省份")
+    private String province;
+    @Excel(name = "订单部门")
+    private String depName;
+    @Excel(name = "营销员")
+    private String salesmanName;
+    @Excel(name = "合同编号")
+    private String contractNo;
+    @Excel(name = "订单编号")
+    private String orderNo;
+    @Excel(name = "客户名称")
+    private String  userName;
+    @Excel(name = "项目类型")
+    private String cname;
+    @Excel(name = "项目名称")
+    private String  pname;
+    @Excel(name = "数量")
+    private Integer  commodityQuantity;
+    @Excel(name = "负责部门")
+    private String techDepName;
+    @Excel(name = "咨询师/咨询师经理")
+    private String techName;
+    @Excel(name = "项目状态" ,enumsName = "com.goafanti.order.enums.NewProjectStatus")
+    private Integer projectStatus;
+    @Excel(name = "项目数/下证数")
+    private String quantityAndcount;
+    @Excel(name = "有无材料",readConverterExp = "0=否,1=是")
+    private Integer	ifMaterial;
+    @Excel(name = "加急天数",readConverterExp = "0=否,1=是")
+    private Integer	urgentDay;
+    @Excel(name = "下证时间")
+    private String	licenceTime;
+    @Excel(name = "证书编号")
+    private String  certificateNumber;
+    @Excel(name = "成本")
+    private BigDecimal	costAmount;
+    @Excel(name = "利润")
+    private BigDecimal	profit;
+    @Excel(name = "项目金额")
+    private BigDecimal  commodityPrice;
+    @Excel(name = "特别说明")
+    private String	specialComment;
+    @Excel(name = "项目说明")
+    private String	taskComment;
+    @Excel(name = "订单说明")
+    private String orderRemarks;
+
+    private Integer  setUpStatus;
+    private String setUpTime;
+    private Integer  spotCheckStatus;
+    private String  contactMobile;
+    private String  legalPersonTel;
+    private String  declarationBatch;
+    private Integer  highTechstatus;
+    private Integer	rejectCount;
+    private String	patentNo;
+    private String	patentName;
+    private String	acceptTime;
+    private Integer	certificatesCount;
+
+
+    public String getOrderRemarks() {
+        return orderRemarks;
+    }
+
+    public void setOrderRemarks(String orderRemarks) {
+        this.orderRemarks = orderRemarks;
+    }
+    public String getQuantityAndcount() {
+        return quantityAndcount;
+    }
+
+    public void setQuantityAndcount(String quantityAndcount) {
+        this.quantityAndcount = quantityAndcount;
+    }
+
+    public Integer getSetUpStatus() {
+        return setUpStatus;
+    }
+    public void setSetUpStatus(Integer setUpStatus) {
+        this.setUpStatus = setUpStatus;
+    }
+    public String getSetUpTime() {
+        return setUpTime;
+    }
+    public void setSetUpTime(String setUpTime) {
+        this.setUpTime = setUpTime;
+    }
+    public Integer getSpotCheckStatus() {
+        return spotCheckStatus;
+    }
+    public void setSpotCheckStatus(Integer spotCheckStatus) {
+        this.spotCheckStatus = spotCheckStatus;
+    }
+    public String getContactMobile() {
+        return contactMobile;
+    }
+    public void setContactMobile(String contactMobile) {
+        this.contactMobile = contactMobile;
+    }
+    public String getLegalPersonTel() {
+        return legalPersonTel;
+    }
+    public void setLegalPersonTel(String legalPersonTel) {
+        this.legalPersonTel = legalPersonTel;
+    }
+    public String getCertificateNumber() {
+        return certificateNumber;
+    }
+    public void setCertificateNumber(String certificateNumber) {
+        this.certificateNumber = certificateNumber;
+    }
+    public String getDeclarationBatch() {
+        return declarationBatch;
+    }
+    public void setDeclarationBatch(String declarationBatch) {
+        this.declarationBatch = declarationBatch;
+    }
+    public Integer getCommodityQuantity() {
+        return commodityQuantity;
+    }
+    public void setCommodityQuantity(Integer commodityQuantity) {
+        this.commodityQuantity = commodityQuantity;
+    }
+    public BigDecimal getCommodityPrice() {
+        return commodityPrice;
+    }
+    public void setCommodityPrice(BigDecimal commodityPrice) {
+        this.commodityPrice = commodityPrice;
+    }
+
+
+
+    public String getDistributionTime() {
+        return distributionTime;
+    }
+    public void setDistributionTime(String distributionTime) {
+        this.distributionTime = distributionTime;
+    }
+    public String getProvince() {
+        return province;
+    }
+    public void setProvince(String province) {
+        this.province = province;
+    }
+    public String getDepName() {
+        return depName;
+    }
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+    public String getContractNo() {
+        return contractNo;
+    }
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+    public String getOrderNo() {
+        return orderNo;
+    }
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getUserName() {
+        return userName;
+    }
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+    public String getCname() {
+        return cname;
+    }
+    public void setCname(String cname) {
+        this.cname = cname;
+    }
+    public String getPname() {
+        return pname;
+    }
+    public void setPname(String pname) {
+        this.pname = pname;
+    }
+    public String getTechName() {
+        return techName;
+    }
+    public void setTechName(String techName) {
+        this.techName = techName;
+    }
+    public String getTechDepName() {
+        return techDepName;
+    }
+    public void setTechDepName(String techDepName) {
+        this.techDepName = techDepName;
+    }
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+    public String getLicenceTime() {
+        return licenceTime;
+    }
+    public void setLicenceTime(String licenceTime) {
+        this.licenceTime = licenceTime;
+    }
+    public String getTaskComment() {
+        return taskComment;
+    }
+    public void setTaskComment(String taskComment) {
+        this.taskComment = taskComment;
+    }
+    public Integer getCertificatesCount() {
+        return certificatesCount;
+    }
+    public void setCertificatesCount(Integer certificatesCount) {
+        this.certificatesCount = certificatesCount;
+    }
+    public Integer getUrgentDay() {
+        return urgentDay;
+    }
+    public void setUrgentDay(Integer urgentDay) {
+        this.urgentDay = urgentDay;
+    }
+    public Integer getIfMaterial() {
+        return ifMaterial;
+    }
+    public void setIfMaterial(Integer ifMaterial) {
+        this.ifMaterial = ifMaterial;
+    }
+    public BigDecimal getCostAmount() {
+        return costAmount;
+    }
+    public void setCostAmount(BigDecimal costAmount) {
+        this.costAmount = costAmount;
+    }
+    public BigDecimal getProfit() {
+        if (profit==null&&commodityPrice!=null&&costAmount!=null) {
+            return  commodityPrice.subtract(costAmount);
+        }
+        return profit;
+    }
+    public void setProfit(BigDecimal profit) {
+        this.profit = profit;
+    }
+    public Integer getRejectCount() {
+        return rejectCount;
+    }
+    public void setRejectCount(Integer rejectCount) {
+        this.rejectCount = rejectCount;
+    }
+    public String getPatentName() {
+        return patentName;
+    }
+    public void setPatentName(String patentName) {
+        this.patentName = patentName;
+    }
+    public String getAcceptTime() {
+        return acceptTime;
+    }
+    public void setAcceptTime(String acceptTime) {
+        this.acceptTime = acceptTime;
+    }
+    public Integer getHighTechstatus() {
+        return highTechstatus;
+    }
+    public void setHighTechstatus(Integer highTechstatus) {
+        this.highTechstatus = highTechstatus;
+    }
+    public Integer getId() {
+        return id;
+    }
+    public void setId(Integer id) {
+        this.id = id;
+    }
+    public String getSpecialComment() {
+        return specialComment;
+    }
+    public void setSpecialComment(String specialComment) {
+        this.specialComment = specialComment;
+    }
+    public String getPatentNo() {
+        return patentNo;
+    }
+    public void setPatentNo(String patentNo) {
+        this.patentNo = patentNo;
+    }
+
+}

+ 2 - 12
src/main/java/com/goafanti/order/controller/StatisticsApiController.java

@@ -53,18 +53,8 @@ public class StatisticsApiController extends CertifyApiController {
 	 * @throws IOException
 	 */
 	@RequestMapping(value = "/exporTaskList", method = RequestMethod.GET)
-	public Result exporTaskList(HttpServletResponse response,InputProjectStatistics ib) throws IOException{
-		Result res=new Result();
-		try {
-			projectStatisticsService.exporTaskList( response, ib);
-		} catch (Exception e) {
-			res.getError().add(buildError("格式不正确"));
-			e.printStackTrace();
-			return res;
-		}
-     res.data(1);
-	return res;
-
+	public Result exporTaskList(InputProjectStatistics ib,HttpServletResponse response) {
+			return projectStatisticsService.exporTaskList(  ib,response);
 	}
 
 

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

@@ -12,7 +12,7 @@ public interface ProjectStatisticsService {
 
 	Object selectTaskList(InputProjectStatistics ps);
 
-	void exporTaskList(HttpServletResponse response, InputProjectStatistics ib) throws IOException;
+	Result exporTaskList(InputProjectStatistics ib,HttpServletResponse response) ;
 
 	Object selectProvincialStatistics(InputProvincialStatistics is);
 

+ 61 - 115
src/main/java/com/goafanti/order/service/impl/ProjectStatisticsServiceImpl.java

@@ -8,8 +8,12 @@ import java.text.SimpleDateFormat;
 import java.util.*;
 
 import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
 
 import com.goafanti.common.bo.Result;
+import com.goafanti.common.utils.excel.NewExcelUtil;
+import com.goafanti.order.bo.*;
+import com.goafanti.order.bo.outStatistics.*;
 import groovy.util.logging.Log4j;
 import org.apache.commons.collections4.map.HashedMap;
 import org.apache.commons.lang3.StringUtils;
@@ -18,6 +22,7 @@ import org.apache.poi.xssf.usermodel.XSSFCell;
 import org.apache.poi.xssf.usermodel.XSSFRow;
 import org.apache.poi.xssf.usermodel.XSSFSheet;
 import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
@@ -27,10 +32,6 @@ import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.InputProjectStatistics;
-import com.goafanti.order.bo.InputProvincialStatistics;
-import com.goafanti.order.bo.OutProjectStatistics;
-import com.goafanti.order.bo.OutProvincialStatistics;
 import com.goafanti.order.enums.NewProjectStatus;
 import com.goafanti.order.service.ProjectStatisticsService;
 
@@ -41,6 +42,7 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 	@Value("${upload.path}")
 	private String downloadPath;
 
+
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<OutProjectStatistics> selectTaskList(InputProjectStatistics ps) {
@@ -88,125 +90,69 @@ public class ProjectStatisticsServiceImpl extends BaseMybatisDao<TOrderTaskMappe
 		return p;
 	}
 
+
+
+
 	@Override
-	public void exporTaskList(HttpServletResponse response, InputProjectStatistics ib) throws IOException {
-		OutputStream out = response.getOutputStream();
-		try {
+	public Result exporTaskList( InputProjectStatistics ib,HttpServletResponse response)  {
 			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<>();
-			Collections.addAll(ls, comment);
+			Result res =new Result();
 			if (ib.getStatus()==null||ib.getStatus()==0){
-				String[] ss= {"数量","负责部门","咨询师/咨询经理","项目状态"};
-				Collections.addAll(ls, ss);
-			}else if (ib.getStatus()==1) {
-				//高新、科技
-    			//是否立项 立项时间 是否抽查 联系人电话 法人电话 证书编号 申报批次
-    			String[] ss= {"负责部门","咨询师/咨询经理","项目状态","是否立项","立项时间","是否抽查","联系人电话","法人电话","证书编号","申报批次"};
-    			Collections.addAll(ls, ss);
-			}else if (ib.getStatus()==2) {
-				//双软
-				String[] ss= {"负责部门","咨询师/咨询经理","项目状态","下证时间"};
-				Collections.addAll(ls, ss);
-			}else if (ib.getStatus()==3) {
-				//软著
-				String[] ss= {"负责部门","咨询师/咨询经理","项目状态","软著数量/已下证","有无材料","加急天数","下证时间","证书编号","成本","利润"};
-				Collections.addAll(ls, ss);
-			}else if (ib.getStatus()==4) {
-				//专利
-				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,"项目汇总表");
-    		//根据列表编写文档
-    		XSSFSheet sheet =wb.getSheetAt(0);
-    		XSSFRow row = sheet.createRow(2);
-    		//4.创建一个cell
-    		XSSFCell cell = row.createCell(0);
-    		cell.setCellValue(getInputString(ib));
-    		sheet.addMergedRegion(new CellRangeAddress(2, 2, 0, comment.length-1));//合并单元格
-    		for (OutProjectStatistics ob : list) {
-    			//新增一行
-    			XSSFRow r = sheet.createRow(sheet.getLastRowNum()+1);
-    			for (int i = 0; i < comment.length; i++) {
-    				//当前列的只
-    				String o = "";
-    				switch (comment[i]) {
-//    				"派单时间","派单省份","订单部门","营销员","合同编号","订单编号","签单客户","项目类型",
-    				//	"项目名称","负责部门","咨询师/咨询经理","项目状态","签单金额"
-    				case "派单时间": o = ob.getDistributionTime(); break;
-    				case "派单省份": o = ob.getProvince(); break;
-    				case "订单部门": o = ob.getDepName(); break;
-    				case "营销员": o = ob.getSalesmanName(); break;
-    				case "合同编号": o = ob.getContractNo(); break;
-    				case "订单编号": o = ob.getOrderNo(); break;
-    				case "签单客户": o = ob.getUserName(); break;
-    				case "项目类型": o = ob.getCname(); break;
-    				case "项目名称": o = ob.getPname(); break;
-    				case "数量": o = ob.getCommodityQuantity().toString(); break;
-    				case "负责部门": o = ob.getTechDepName(); break;
-    				case "咨询师/咨询经理": o = ob.getTechName(); break;
-    				case "项目状态": o = NewProjectStatus.getValueByCode(ob.getProjectStatus()); break;
+				List<OutProjectStatisticsCommon> tl=new ArrayList<>();
+				for (OutProjectStatistics o : list) {
+					OutProjectStatisticsCommon common = new OutProjectStatisticsCommon();
+					BeanUtils.copyProperties(o,common);
+					tl.add(common);
+				}
+				NewExcelUtil<OutProjectStatisticsCommon> excelUtil=new NewExcelUtil<>(OutProjectStatisticsCommon.class);
+				res=excelUtil.exportExcel(tl,"项目汇总表(通用)",downloadPath);
+			}else if (ib.getStatus()==1){//高新、科技
+				List<OutProjectStatisticsHighTech> tl=new ArrayList<>();
+				for (OutProjectStatistics o : list) {
+					OutProjectStatisticsHighTech highTech = new OutProjectStatisticsHighTech();
+					BeanUtils.copyProperties(o,highTech);
+					tl.add(highTech);
+				}
+				NewExcelUtil<OutProjectStatisticsHighTech> excelUtil=new NewExcelUtil<>(OutProjectStatisticsHighTech.class);
+				res=excelUtil.exportExcel(tl,"项目汇总表(高新)",downloadPath);
 
-    				//是否立项 立项时间 是否抽查 联系人电话 法人电话 证书编号 申报批次
-    				case "是否立项": o = ob.getSetUpStatus()==null?"":ob.getSetUpStatus()==1?"是":"否"; break;
-    				case "立项时间": o = ob.getSetUpTime(); break;
-    				case "是否抽查":
-    					//是否抽查 0否 1未通过 2通过
-    					if (ob.getSpotCheckStatus()==null) o="";
-    					else if (ob.getSpotCheckStatus()==0) o="否";
-						else if (ob.getSpotCheckStatus()==1) o="未通过";
-						else if (ob.getSpotCheckStatus()==2) o="通过";
-    					break;
-    				case "联系人电话": o = ob.getContactMobile(); break;
-    				case "法人电话": o = ob.getLegalPersonTel(); break;
-    				case "证书编号": o = ob.getCertificateNumber(); break;
-    				case "申报批次": o = ob.getDeclarationBatch(); break;
-    				//"下证时间"
-    				case "下证时间": o = ob.getLicenceTime(); break;
-    				//"软著数量/已下证","有无材料","加急天数","下证时间","证书编号","成本","利润"
-    				case "软著数量/已下证": o = 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.getPatentNo(); break;
-    				case "专利名称": o = ob.getPatentName(); break;
-    				case "受理时间": o = ob.getAcceptTime(); break;
+			}else if (ib.getStatus()==2){//双软
+				List<OutProjectStatisticsDoubleSoft> tl=new ArrayList<>();
+				for (OutProjectStatistics o : list) {
+					OutProjectStatisticsDoubleSoft doubleSoft = new OutProjectStatisticsDoubleSoft();
+					BeanUtils.copyProperties(o,doubleSoft);
 
-    				case "签单金额": o = ob.getCommodityPrice().stripTrailingZeros().toPlainString(); break;
-    				case "特别说明": o = ob.getSpecialComment(); break;
-    				default: o = ""; break;
-    				}
-    				XSSFCell c = r.createCell(i);
-    				c.setCellValue(o);
-    			}
-    		}
-    		//返回名称及参数
-			 response.addHeader("Content-Disposition", "attachment;filename="  + new String(fileName.getBytes(),"iso-8859-1"));
-			 response.setContentType("application/octet-stream;charset=utf-8");
-    		 // 返回数据流
-			 wb.write(out);
-			 out.flush();
-			 out.close();
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new BusinessException(new Error("表格生成错误。"));
-		}finally {
-			out.flush();
-			 out.close();
-		}
+					tl.add(doubleSoft);
+				}
+				NewExcelUtil<OutProjectStatisticsDoubleSoft> excelUtil=new NewExcelUtil<>(OutProjectStatisticsDoubleSoft.class);
+				res=excelUtil.exportExcel(tl,"项目汇总表(双软)",downloadPath);
+
+			}else if (ib.getStatus()==3){//软著
+				List<OutProjectStatisticsSoftwareWorks> tl=new ArrayList<>();
+				for (OutProjectStatistics o : list) {
+					OutProjectStatisticsSoftwareWorks softwareWorks = new OutProjectStatisticsSoftwareWorks();
+					BeanUtils.copyProperties(o,softwareWorks);
+					softwareWorks.setQuantityAndcount(softwareWorks.getCommodityQuantity()+"/"+softwareWorks.getCertificatesCount());
+					tl.add(softwareWorks);
+				}
+				NewExcelUtil<OutProjectStatisticsSoftwareWorks> excelUtil=new NewExcelUtil<>(OutProjectStatisticsSoftwareWorks.class);
+				res=excelUtil.exportExcel(tl,"项目汇总表(软著)",downloadPath);
+
+			}else if (ib.getStatus()==4){//软著
+				List<OutProjectStatisticsPatent> tl=new ArrayList<>();
+				for (OutProjectStatistics o : list) {
+					OutProjectStatisticsPatent patent = new OutProjectStatisticsPatent();
+					BeanUtils.copyProperties(o,patent);
+					patent.setQuantityAndcount(patent.getCommodityQuantity()+"/"+patent.getCertificatesCount());
+					tl.add(patent);
+				}
+				NewExcelUtil<OutProjectStatisticsPatent> excelUtil=new NewExcelUtil<>(OutProjectStatisticsPatent.class);
+				res=excelUtil.exportExcel(tl,"项目汇总表(专利)",downloadPath);
+			}
+			return  res;
 	}