Browse Source

增加字段

yumeng 2 years ago
parent
commit
b7b7d61816

+ 4 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -663,6 +663,9 @@ public class SupplyChainController extends BaseController {
                 export.add(date.getInteger("orderNum"));
                 export.add(date.getInteger("orderNum"));
                 export.add(date.getInteger("validOrderNUm"));
                 export.add(date.getInteger("validOrderNUm"));
                 export.add(date.getString("validRadio"));
                 export.add(date.getString("validRadio"));
+                export.add(date.getString("payAmount"));
+                export.add(date.getString("validPayAmount"));
+                export.add(date.getString("regimentalPromotionAmount"));
                 export.add(date.getString("deliveryNum"));
                 export.add(date.getString("deliveryNum"));
                 export.add(date.getString("deliveryRadio"));
                 export.add(date.getString("deliveryRadio"));
                 export.add(date.getString("notDeliveryNum"));
                 export.add(date.getString("notDeliveryNum"));
@@ -673,8 +676,7 @@ public class SupplyChainController extends BaseController {
                 exportList.add(export);
                 exportList.add(export);
             }
             }
         }
         }
-
-        String[] headers = {"达人名称", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "未发货数", "绑定人"};
+        String[] headers = {"达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "预估服务费收入(有效)", "发货数", "发货率", "未发货数", "绑定人"};
         OutputStream os = response.getOutputStream();
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
         ExportExcelUtils eeu = new ExportExcelUtils();
         XSSFWorkbook workbook = new XSSFWorkbook();
         XSSFWorkbook workbook = new XSSFWorkbook();

+ 8 - 2
ruixuan-live/src/main/resources/mapper/isc/SupplyChainMapper.xml

@@ -23,10 +23,13 @@
         count(oid) as 'orderNum',
         count(oid) as 'orderNum',
         sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
         sum(case when order_status != 80 then 1 else 0 end) as 'validOrderNUm',
         round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio',
         round(sum(case when order_status != 80 then 1 else 0 end) / count(oid),4) as 'validRadio',
+        sum(pay_amount) as 'payAmount',
+        sum(case when order_status != 80 then pay_amount else 0 end) as 'validPayAmount',
         sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
         sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
         sum(case when send_status = 0 and order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
         sum(case when send_status = 0 and order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
         round(sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when order_status != 80
         round(sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when order_status != 80
-        then 1 else 0 end),4) as 'deliveryRadio'
+        then 1 else 0 end),4) as 'deliveryRadio',
+        sum(case when order_status != 80 then regimental_promotion_amount else 0 end) as 'regimentalPromotionAmount'
         from kuaishou_supply_chain
         from kuaishou_supply_chain
         where 1= 1
         where 1= 1
         <if test="start != null and start != ''">
         <if test="start != null and start != ''">
@@ -510,7 +513,10 @@
         sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
         sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) as 'deliveryNum',
         sum(case when send_status = 0 and order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
         sum(case when send_status = 0 and order_status != 80 then 1 else 0 end) as 'notDeliveryNum',
         round(sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when order_status != 80
         round(sum(case when send_status = 1 and order_status != 80 then 1 else 0 end) / sum(case when order_status != 80
-        then 1 else 0 end) * 100,2) as 'deliveryRadio'
+        then 1 else 0 end) * 100,2) as 'deliveryRadio',
+        round(sum(pay_amount) / 100,2) as 'payAmount',
+        round(sum(case when order_status != 80 then pay_amount else 0 end) / 100 , 2 ) as 'validPayAmount',
+        round(sum(case when order_status != 80 then regimental_promotion_amount else 0 end) / 100, 2) as 'regimentalPromotionAmount'
         from kuaishou_supply_chain
         from kuaishou_supply_chain
         where 1= 1
         where 1= 1
         <if test="start != null and start != ''">
         <if test="start != null and start != ''">