Jelajahi Sumber

修改导出

yumeng 9 bulan lalu
induk
melakukan
6f40f298c4

+ 10 - 11
ruixuan-live/src/main/java/com/ruixuan/isc/controller/SupplyChainController.java

@@ -896,7 +896,7 @@ public class SupplyChainController extends BaseController {
                 JSONObject date = list.get(i);
                 List<Object> export = new ArrayList();
 
-                if (ownershipId.equals("miaogousi")) {
+                if (ownershipId.equals("miaogousi") || ownershipId.equals("yufu")) {
                     Long promoterId = date.getLong("promoterId");
                     export.add(promoterId);
                     String promoterNickName = date.getString("promoterNickName");
@@ -967,10 +967,10 @@ public class SupplyChainController extends BaseController {
 
         }
         String[] headers = {};
-        if (!ownershipId.equals("miaogousi")) {
-            headers = new String[]{"达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "发货数", "发货率", "未发货数", "绑定人"};
-        } else {
+        if (ownershipId.equals("miaogousi") || ownershipId.equals("yufu")) {
             headers = new String[]{"达人ID", "达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "发货数", "发货率", "未发货数", "绑定人"};
+        } else {
+            headers = new String[]{"达人名称", "订单数", "有效订单数", "有效订单率", "GVM", "有效GMV", "发货数", "发货率", "未发货数", "绑定人"};
         }
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
@@ -1015,7 +1015,7 @@ public class SupplyChainController extends BaseController {
                 Long promoterId = date.getLong("promoterId");
                 Long itemId = date.getLong("itemId");
                 String itemTitle = date.getString("itemTitle");
-                if ("miaogousi".equals(ownershipId)) {
+                if ("miaogousi".equals(ownershipId) || "yufu".equals(ownershipId)) {
                     export.add(promoterNickName);
                     export.add(promoterId);
                     export.add(itemTitle);
@@ -1037,11 +1037,10 @@ public class SupplyChainController extends BaseController {
             }
         }
         String[] headers = {};
-        if (!"miaogousi".equals(ownershipId)) {
-            headers = new String[]{"达人", "商品", "商品封面", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "商品状态"};
-
-        } else {
+        if ("miaogousi".equals(ownershipId) || "yufu".equals(ownershipId)) {
             headers = new String[]{"达人名称", "达人id", "商品名称", "商品id", "商品封面", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "商品状态"};
+        } else {
+            headers = new String[]{"达人", "商品", "商品封面", "订单数", "有效订单数", "有效订单率", "发货数", "发货率", "商品状态"};
         }
         OutputStream os = response.getOutputStream();
         ExportExcelUtils eeu = new ExportExcelUtils();
@@ -1263,7 +1262,7 @@ public class SupplyChainController extends BaseController {
         if (!Check.isNull(requestJson.getString("orderEndDate"))) {
             Long end = DateUtils.getEndLongTime(requestJson.getString("orderEndDate"));
             requestMap.put("end", end);
-            requestMap.put("endDate", requestJson.getString("orderEndDate")+" 23:59:59");
+            requestMap.put("endDate", requestJson.getString("orderEndDate") + " 23:59:59");
         }
 
         if (!Check.isNull(requestJson.getString("bindStartDate"))) {
@@ -1275,7 +1274,7 @@ public class SupplyChainController extends BaseController {
         if (!Check.isNull(requestJson.getString("bindEndDate"))) {
             Long end = DateUtils.getEndLongTime(requestJson.getString("bindEndDate"));
             requestMap.put("end", end);
-            requestMap.put("endDate", requestJson.getString("bindEndDate")+" 23:59:59");
+            requestMap.put("endDate", requestJson.getString("bindEndDate") + " 23:59:59");
 
         }