Browse Source

新增订单项目数据统计表开发

anderx 1 year ago
parent
commit
4c7202202d

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

@@ -2513,7 +2513,7 @@
 
   <select id="selectStatisticsOrderProject" resultType="com.goafanti.order.bo.OutOrderProject">
     SELECT a.order_no as orderNo, a.order_type orderType,a.sales_type as salesType,b.service_type AS serviceType,a.liquidation_status as liquidationStatus,
-           b.dun_node_content as dunNodeContent,b.project_type as projectType, a.total_amount as totalAmount,a.approval ,a.sign_time as signTime,
+           b2.big_customer as bigCustomer, b.dun_node_content as dunNodeContent,b.project_type as projectType, a.total_amount as totalAmount,a.approval ,a.sign_time as signTime,
            a.create_time as createTime,b.buyer_name as buyerName,a.contract_no as contractNo, d.bname htlx,b.order_receivables orderReceivables,
            a.settlement_amount as settlementAmount,b.invoice_amount as invicueAmount, b.cost_amount as costAmount,b.payment_amount as paymentAmount,
            b.finance_name as financeName,b.salesman_name as salesmanName, e.commodity_name as commodityName,e2.service_year as serviceYear,
@@ -2524,6 +2524,7 @@
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
         left join admin a2 on a.salesman_id=a2.id left join department a3 on a2.department_id=a3.id
         left join district_glossory a4 on a3.province=a4.id
+        left join user_mid b2 on a.buyer_id=b2.uid
                        left join t_order_task c on a.order_no =c.order_no and c.main =1
                        left join business_project d on c.commodity_id =d.id left join business_category d2 on d.cid =d2.id
                        left join t_order_task e on a.order_no =e.order_no and e.split_status in (0,2)

+ 422 - 0
src/main/java/com/goafanti/order/bo/InputOrderProject.java

@@ -1,4 +1,426 @@
 package com.goafanti.order.bo;
 
 public class InputOrderProject {
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+    /**
+     * 合同编号
+     */
+    private String contractNo;
+    /**
+     * 企业名称
+     */
+    private String userName;
+    /**
+     * 项目分类
+     */
+    private Integer businessCategory;
+    /**
+     * 项目名称
+     */
+    private String projectName;
+    /**
+     * 订单金额类型 1=10万以下,2=10-20万,3=20-30万,4=30-40万,5=40万以上
+     */
+    private Integer orderAmountType;
+    /**
+     * 订单部门
+     */
+    private String depId;
+    /**
+     * 负债部门
+     */
+    private String liabilitiesDepId;
+    /**
+     * 申报批次
+     */
+    private Integer effectiveCount;
+    /**
+     * 项目金额类型 1=1万以下,2=1-5万,3=5-10万,4=10-20万,5=20万以上
+     */
+    private Integer projectAmountType;
+    /**
+     * 项目状态
+     */
+    private Integer projectStatus;
+
+    /**
+     * 满意度 0非常满意 1满意 2一般 3不满意
+     */
+    private Integer satisfactionDegree;
+    /**
+     * 派单时间开始
+     */
+    private String startDate;
+    /**
+     * 派单时间结束
+     */
+    private String endDate;
+    /**
+     * 项目时间结束
+     */
+    private String projectStartDate;
+    /**
+     * 项目时间结束
+     */
+    private String projectEndDate;
+    /**
+     * 销售类型 0=电话新开发,1=电话自带资源,2=网络,3=渠道,4=转介绍,5=其他,6=高新复购,7=其他复购,8=私有/渠道
+     */
+    private Integer salesType;
+    /**
+     * 服务类型(订单类型)
+     */
+    private String serviceType;
+    /**
+     * 清算状态(结算状态) 0-首付待付请,1-尾款待付清,2-已付请,3-部分退款,4-全部退款
+     */
+    private Integer liquidationStatus;
+    /**
+     * 催款节点筛选
+     */
+    private Integer dunType;
+    /**
+     * 签单时间结束
+     */
+    private String signStartDate;
+    /**
+     * 签单时间结束
+     */
+    private String signEndDate;
+    /**
+     * 省份
+     */
+    private Integer province;
+    /**
+     * 财务负责人
+     */
+    private String financeName;
+    /**
+     * 营销负责人
+     */
+    private String salesmanName;
+    /**
+     * 技术负责人
+     */
+    private String techName;
+    /**
+     * 是否特批 0否 1是
+     */
+    private Integer approval;
+    /**
+     * 是否会员 0否 1是
+     */
+    private Integer projectType;
+    /**
+     * 大客户 0=否,1=是
+     */
+    private Integer bigCustomer;
+    /**
+     * 重报  0否,1是
+     */
+    private Integer restatement;
+    /**
+     * 科技项目 0否 1是
+     */
+    private Integer orderType;
+    /**
+     * 变更  0否 1是
+     */
+    private Integer changeType;
+    /**
+     * 退单 0否 1是
+     */
+    private Integer refundType;
+    /**
+     * 项目完成时间开始
+     */
+    private Integer projectCompleteStartTime;
+    /**
+     * 项目完成时间结束
+     */
+    private Integer projectCompleteEndTime;
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public Integer getBusinessCategory() {
+        return businessCategory;
+    }
+
+    public void setBusinessCategory(Integer businessCategory) {
+        this.businessCategory = businessCategory;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public Integer getOrderAmountType() {
+        return orderAmountType;
+    }
+
+    public void setOrderAmountType(Integer orderAmountType) {
+        this.orderAmountType = orderAmountType;
+    }
+
+    public String getDepId() {
+        return depId;
+    }
+
+    public void setDepId(String depId) {
+        this.depId = depId;
+    }
+
+    public String getLiabilitiesDepId() {
+        return liabilitiesDepId;
+    }
+
+    public void setLiabilitiesDepId(String liabilitiesDepId) {
+        this.liabilitiesDepId = liabilitiesDepId;
+    }
+
+    public Integer getEffectiveCount() {
+        return effectiveCount;
+    }
+
+    public void setEffectiveCount(Integer effectiveCount) {
+        this.effectiveCount = effectiveCount;
+    }
+
+    public Integer getProjectAmountType() {
+        return projectAmountType;
+    }
+
+    public void setProjectAmountType(Integer projectAmountType) {
+        this.projectAmountType = projectAmountType;
+    }
+
+    public Integer getProjectStatus() {
+        return projectStatus;
+    }
+
+    public void setProjectStatus(Integer projectStatus) {
+        this.projectStatus = projectStatus;
+    }
+
+    public Integer getSatisfactionDegree() {
+        return satisfactionDegree;
+    }
+
+    public void setSatisfactionDegree(Integer satisfactionDegree) {
+        this.satisfactionDegree = satisfactionDegree;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getProjectStartDate() {
+        return projectStartDate;
+    }
+
+    public void setProjectStartDate(String projectStartDate) {
+        this.projectStartDate = projectStartDate;
+    }
+
+    public String getProjectEndDate() {
+        return projectEndDate;
+    }
+
+    public void setProjectEndDate(String projectEndDate) {
+        this.projectEndDate = projectEndDate;
+    }
+
+    public Integer getSalesType() {
+        return salesType;
+    }
+
+    public void setSalesType(Integer salesType) {
+        this.salesType = salesType;
+    }
+
+    public String getServiceType() {
+        return serviceType;
+    }
+
+    public void setServiceType(String serviceType) {
+        this.serviceType = serviceType;
+    }
+
+    public Integer getLiquidationStatus() {
+        return liquidationStatus;
+    }
+
+    public void setLiquidationStatus(Integer liquidationStatus) {
+        this.liquidationStatus = liquidationStatus;
+    }
+
+    public Integer getDunType() {
+        return dunType;
+    }
+
+    public void setDunType(Integer dunType) {
+        this.dunType = dunType;
+    }
+
+    public String getSignStartDate() {
+        return signStartDate;
+    }
+
+    public void setSignStartDate(String signStartDate) {
+        this.signStartDate = signStartDate;
+    }
+
+    public String getSignEndDate() {
+        return signEndDate;
+    }
+
+    public void setSignEndDate(String signEndDate) {
+        this.signEndDate = signEndDate;
+    }
+
+    public Integer getProvince() {
+        return province;
+    }
+
+    public void setProvince(Integer province) {
+        this.province = province;
+    }
+
+    public String getFinanceName() {
+        return financeName;
+    }
+
+    public void setFinanceName(String financeName) {
+        this.financeName = financeName;
+    }
+
+    public String getSalesmanName() {
+        return salesmanName;
+    }
+
+    public void setSalesmanName(String salesmanName) {
+        this.salesmanName = salesmanName;
+    }
+
+    public String getTechName() {
+        return techName;
+    }
+
+    public void setTechName(String techName) {
+        this.techName = techName;
+    }
+
+    public Integer getApproval() {
+        return approval;
+    }
+
+    public void setApproval(Integer approval) {
+        this.approval = approval;
+    }
+
+    public Integer getProjectType() {
+        return projectType;
+    }
+
+    public void setProjectType(Integer projectType) {
+        this.projectType = projectType;
+    }
+
+    public Integer getBigCustomer() {
+        return bigCustomer;
+    }
+
+    public void setBigCustomer(Integer bigCustomer) {
+        this.bigCustomer = bigCustomer;
+    }
+
+    public Integer getRestatement() {
+        return restatement;
+    }
+
+    public void setRestatement(Integer restatement) {
+        this.restatement = restatement;
+    }
+
+    public Integer getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(Integer orderType) {
+        this.orderType = orderType;
+    }
+
+    public Integer getChangeType() {
+        return changeType;
+    }
+
+    public void setChangeType(Integer changeType) {
+        this.changeType = changeType;
+    }
+
+    public Integer getRefundType() {
+        return refundType;
+    }
+
+    public void setRefundType(Integer refundType) {
+        this.refundType = refundType;
+    }
+
+    public Integer getProjectCompleteStartTime() {
+        return projectCompleteStartTime;
+    }
+
+    public void setProjectCompleteStartTime(Integer projectCompleteStartTime) {
+        this.projectCompleteStartTime = projectCompleteStartTime;
+    }
+
+    public Integer getProjectCompleteEndTime() {
+        return projectCompleteEndTime;
+    }
+
+    public void setProjectCompleteEndTime(Integer projectCompleteEndTime) {
+        this.projectCompleteEndTime = projectCompleteEndTime;
+    }
 }

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

@@ -41,7 +41,7 @@ public class OutOrderProject {
      * 大客户
      */
     @Excel(name = "大客户",readConverterExp = "0=否,1=是")
-    private Integer bigUser;
+    private Integer bigCustomer;
     /**
      * 是否特批 0-非特批 ,1-负责人审核,2-负责人通过,3-负责人驳回 4董事长待审核 5董事长通过 6董事长驳回
      */
@@ -152,7 +152,7 @@ public class OutOrderProject {
     @Excel(name = "项目转入时间")
     private String taskDistributionTime;
     @Excel(name = "是否重报")
-    private String cb;
+    private String restatement;
     /**
      * 订单类型 0认证项目 1科技项目 2 两化融化管理体系认证项目
      */
@@ -181,9 +181,9 @@ public class OutOrderProject {
     @Excel(name = "订单情况",readConverterExp = "0=待签单,1=签单待审,2=签单审核通过,3=签单审核拒绝,4=已结项,5=已驳回,6=已退单")
     private String orderStatus;
     @Excel(name = "变更情况")
-    private String counts;
+    private String changeType;
     @Excel(name = "退单退款")
-    private String tdtk;
+    private String refundType;
 
     public String getOrderNo() {
         return orderNo;
@@ -233,12 +233,12 @@ public class OutOrderProject {
         this.projectType = projectType;
     }
 
-    public Integer getBigUser() {
-        return bigUser;
+    public Integer getBigCustomer() {
+        return bigCustomer;
     }
 
-    public void setBigUser(Integer bigUser) {
-        this.bigUser = bigUser;
+    public void setBigCustomer(Integer bigCustomer) {
+        this.bigCustomer = bigCustomer;
     }
 
     public String getApproval() {
@@ -465,12 +465,12 @@ public class OutOrderProject {
         this.taskDistributionTime = taskDistributionTime;
     }
 
-    public String getCb() {
-        return cb;
+    public String getRestatement() {
+        return restatement;
     }
 
-    public void setCb(String cb) {
-        this.cb = cb;
+    public void setRestatement(String restatement) {
+        this.restatement = restatement;
     }
 
     public String getOrderType() {
@@ -569,19 +569,19 @@ public class OutOrderProject {
         this.orderStatus = orderStatus;
     }
 
-    public String getCounts() {
-        return counts;
+    public String getChangeType() {
+        return changeType;
     }
 
-    public void setCounts(String counts) {
-        this.counts = counts;
+    public void setChangeType(String changeType) {
+        this.changeType = changeType;
     }
 
-    public String getTdtk() {
-        return tdtk;
+    public String getRefundType() {
+        return refundType;
     }
 
-    public void setTdtk(String tdtk) {
-        this.tdtk = tdtk;
+    public void setRefundType(String refundType) {
+        this.refundType = refundType;
     }
 }

+ 6 - 12
src/main/java/com/goafanti/order/service/impl/UserStatisticsServiceImpl.java

@@ -100,12 +100,6 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 	public List<OutOrderProject> orderProject(InputOrderProject in) {
 		List<OutOrderProject> outOrderProject = tOrderTaskMapper.selectStatisticsOrderProject(in);
 		for (OutOrderProject e : outOrderProject) {
-			//是否是大客户
-			if (e.getTotalAmount().compareTo(new BigDecimal(10)) >= 0){
-				e.setBigUser(1);
-			}else {
-				e.setBigUser(0);
-			}
 			//计算比例
 			BigDecimal orderReceivables=BigDecimal.ZERO;
 			if (e.getOrderReceivables()!=null)orderReceivables=e.getOrderReceivables();
@@ -116,15 +110,15 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 				BigDecimal multiply = divide.multiply(new BigDecimal(100));
 				e.setContractAmountProportion(multiply+"%");
 			}
-			if (e.getTdtk()!=null&&e.getTdtk().equals("1")){
-				e.setTdtk("有");
+			if (e.getRefundType()!=null&&e.getRefundType().equals("1")){
+				e.setRefundType("有");
 			}else {
-				e.setTdtk("无");
+				e.setRefundType("无");
 			}
-			if (e.getCb()!=null&&e.getCb().equals("1")){
-				e.setCb("有");
+			if (e.getRestatement()!=null&&e.getRestatement().equals("1")){
+				e.setRestatement("有");
 			}else {
-				e.setCb("无");
+				e.setRestatement("无");
 			}
 			if (e.getOrderType()!=null&&e.getOrderType().equals("1")){
 				e.setOrderType("有");