Selaa lähdekoodia

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

anderx 6 kuukautta sitten
vanhempi
commit
7c6748c520

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

@@ -3240,7 +3240,7 @@
           and a.task_receiver = #{aid}
     </select>
     <select id="orderNewSignToList" resultType="com.goafanti.order.bo.outStatistics.OutOrderNewSignBo">
-        select a.name,department.name depName,
+        select a.name,department.name depName,(newCounts+counts)allCounts,(newAmount+amount) allAmount,
                newCounts,newAmount,(newCounts/(newCounts+counts)) newCountProportion,(newAmount/(newAmount+amount))newAmountProportion,
                counts,amount,(counts/(newCounts+counts)) countProportion,(amount/(newAmount+amount))amountProportion
         from (SELECT b.salesman_id,

+ 18 - 0
src/main/java/com/goafanti/order/bo/InputOrderNewSignBo.java

@@ -7,10 +7,28 @@ public class InputOrderNewSignBo {
     private Integer type;
     private Date startTime;
     private Date endTime;
+    private String startTimeStr;
+    private String endTimeStr;
 
     private Integer pageSize;
     private Integer pageNo;
 
+    public String getStartTimeStr() {
+        return startTimeStr;
+    }
+
+    public void setStartTimeStr(String startTimeStr) {
+        this.startTimeStr = startTimeStr;
+    }
+
+    public String getEndTimeStr() {
+        return endTimeStr;
+    }
+
+    public void setEndTimeStr(String endTimeStr) {
+        this.endTimeStr = endTimeStr;
+    }
+
     public Date getStartTime() {
         return startTime;
     }

+ 24 - 4
src/main/java/com/goafanti/order/bo/outStatistics/OutOrderNewSignBo.java

@@ -9,23 +9,43 @@ public class OutOrderNewSignBo {
     private String name;
     @Excel(name = "部门")
     private String depName;
-    @Excel(name = "新客户签单数")
+    @Excel(name = "总签单数",isStatistics = true)
+    private String allCounts;
+    @Excel(name = "总签单金额",isStatistics = true)
+    private BigDecimal allAmount;
+    @Excel(name = "新客户签单数",isStatistics = true)
     private String newCounts;
-    @Excel(name = "新客户签单金额")
+    @Excel(name = "新客户签单金额",isStatistics = true)
     private BigDecimal newAmount;
     @Excel(name = "新客户签单数占比", percentage = 1,scale = 2)
     private String newCountProportion;
     @Excel(name = "新客户签单金额占比", percentage = 1,scale = 2)
     private String newAmountProportion;
-    @Excel(name = "旧客户签单数")
+    @Excel(name = "旧客户签单数",isStatistics = true)
     private String counts;
-    @Excel(name = "旧客户签单金额")
+    @Excel(name = "旧客户签单金额",isStatistics = true)
     private BigDecimal amount;
     @Excel(name = "旧客户签单数占比",percentage = 1,scale = 2)
     private String countProportion;
     @Excel(name = "旧客户签单金额占比", percentage = 1,scale = 2)
     private String amountProportion;
 
+    public String getAllCounts() {
+        return allCounts;
+    }
+
+    public void setAllCounts(String allCounts) {
+        this.allCounts = allCounts;
+    }
+
+    public BigDecimal getAllAmount() {
+        return allAmount;
+    }
+
+    public void setAllAmount(BigDecimal allAmount) {
+        this.allAmount = allAmount;
+    }
+
     public String getDepName() {
         return depName;
     }

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

@@ -205,10 +205,10 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 
 	@Override
 	public String getOrderNewSignTime(InputOrderNewSignBo in) {
-		if(in.getType()==null){
-			in.setStartTime(DateUtils.parseDate("2024-01-01"));
-			in.setEndTime(DateUtils.parseDate("2025-01-01"));
-		}else if(in.getType()==0){
+		if(in.getType()==null||in.getType()==0){
+			in.setStartTime(DateUtils.parseDate(in.getStartTimeStr()));
+			in.setEndTime(DateUtils.parseDate(in.getEndTimeStr()));
+		}else if(in.getType()==1){
 			//获取本周起止时间开始时间和结束时间
 			// 获取当前日期
 			LocalDate today = LocalDate.now();
@@ -221,7 +221,7 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 			Date endDate = Date.from(endOfWeek.atStartOfDay(ZoneId.systemDefault()).toInstant());
 			in.setStartTime(startDate);
 			in.setEndTime(endDate);
-		}else {
+		}else if(in.getType()==2){
 			//获取本月第一天和下月第一天
 			// 获取当前日期
 			LocalDate today = LocalDate.now();