Browse Source

报表修改

小么熊🐻 2 years ago
parent
commit
39a2b40344

+ 2 - 2
jsjp-service/src/main/java/com/miaxis/order/dto/QuerySchoolOrderListDTO.java

@@ -15,12 +15,12 @@ public class QuerySchoolOrderListDTO extends BaseBusinessEntity {
     private static final long serialVersionUID = 1L;
 
 
-    @ApiModelProperty(value = "开始时间,格式yyyyMMdd")
+    @ApiModelProperty(value = "开始时间,格式yyyy-MM-dd HH:mm:ss")
 //    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
     private String startTime;
 
 
-    @ApiModelProperty(value = "结束时间,格式yyyyMMdd")
+    @ApiModelProperty(value = "结束时间,格式yyyy-MM-dd HH:mm:ss")
 //    @JsonFormat(pattern="yyyyMMdd",timezone = "GMT+8")
     private String endTime;
 

+ 17 - 0
jsjp-service/src/main/java/com/miaxis/order/vo/QuerySchoolOrderListVo.java

@@ -30,5 +30,22 @@ public class QuerySchoolOrderListVo  {
     @ApiModelProperty(value = "驾校提成")
     private String schoolCommission;
 
+    @Excel(name = "购买人数")
+    @ApiModelProperty(value = "购买人数")
+    private String peopleCount;
+
+    @Excel(name = "订单总数")
+    @ApiModelProperty(value = "订单总数")
+    private String orderCount;
+
+    @Excel(name = "激活金额")
+    @ApiModelProperty(value = "激活金额")
+    private String activationCommission;
+
+    @Excel(name = "补贴金额")
+    @ApiModelProperty(value = "补贴金额")
+    private String subsidy;
+
+
 
 }

+ 18 - 2
jsjp-service/src/main/resources/mapper/order/OrderInfoMapper.xml

@@ -61,7 +61,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         school,
         school_name,
         sum(school_commission) as school_commission,
-        sum(total) as orderTotal
+        sum(total) as order_total,
+        COUNT(DISTINCT logincode) as people_count,
+        COUNT(id) as order_count,
+        IFNULL(COUNT(DISTINCT logincode),0)*49*100 as activation_commission,
+        (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) as subsidy_bak,
+        (case
+        when (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) <![CDATA[ <= ]]> 0 then 0
+        when (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) <![CDATA[ > ]]> 0 then (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission))
+        else 0 end) as subsidy
         from order_info
         <where>
             <if test="isShare != null">
@@ -92,7 +100,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         school,
         school_name,
         sum(school_commission)/100 as school_commission,
-        sum(total)/100 as orderTotal
+        sum(total)/100 as order_total,
+        COUNT(DISTINCT logincode) as people_count,
+        COUNT(id) as order_count,
+        IFNULL(COUNT(DISTINCT logincode),0)*49 as activation_commission,
+        (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission/100)) as subsidy_bak,
+        (case
+        when (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100) <![CDATA[ <= ]]> 0 then 0
+        when (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100) <![CDATA[ > ]]> 0 then (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100)
+        else 0 end) as subsidy
         from order_info
         <where>
             <if test="isShare != null">