Kaynağa Gözat

添加分类统计sheet

songyinghao 5 yıl önce
ebeveyn
işleme
ba4f0806c0

+ 20 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdvertiserController.java

@@ -416,12 +416,20 @@ public class AdvertiserController {
         if (null == systemType || systemType.trim().equals("")) {
             systemType = null;
         }
-        SheetInfoVo totalSheetVo = advertiserService.getXxlStatisticInfo(projectId, systemType, null, null, "汇总表");
+        SheetInfoVo totalSheetVo = advertiserService.getXxlStatisticInfo(projectId, systemType, null, "汇总表");
         sheets.add(totalSheetVo);
+        if(null == systemType){
+            List<SheetInfoVo>vos = advertiserService.getSystemTypeXxlStatisticInfo(projectId);
+            if(null!=vos&&vos.size()>0){
+                for(SheetInfoVo vo:vos){
+                    sheets.add(vo);
+                }
+            }
+        }
         List<UserAllocation> allocations = userAllocationService.getByProjectId(projectId, systemType);
         if (null != allocations && allocations.size() > 0) {
             for (UserAllocation allocation : allocations) {
-                SheetInfoVo vo = advertiserService.getXxlStatisticInfo(projectId, systemType, allocation.getAccountId(), "state_date", allocation.getAuthName());
+                SheetInfoVo vo = advertiserService.getXxlStatisticInfo(projectId, systemType, allocation.getAccountId(), allocation.getAuthName());
                 sheets.add(vo);
             }
         }
@@ -443,12 +451,20 @@ public class AdvertiserController {
             systemType = null;
         }
         //查询总的消耗信息
-        SheetInfoVo totalSheetVo = advertiserService.getXxlStatisticInfo(projectId, systemType, null, null, "汇总表");
+        SheetInfoVo totalSheetVo = advertiserService.getXxlStatisticInfo(projectId, systemType, null, "汇总表");
         sheets.add(totalSheetVo);
+        if(null == systemType){
+            List<SheetInfoVo>vos = advertiserService.getSystemTypeXxlStatisticInfo(projectId);
+            if(null!=vos&&vos.size()>0){
+                for(SheetInfoVo vo:vos){
+                    sheets.add(vo);
+                }
+            }
+        }
         List<UserAllocation> allocations = userAllocationService.getByProjectId(projectId, systemType);
         if (null != allocations && allocations.size() > 0) {
             for (UserAllocation allocation : allocations) {
-                SheetInfoVo vo = advertiserService.getXxlStatisticInfo(projectId, systemType, allocation.getAccountId(), "state_date", allocation.getAuthName());
+                SheetInfoVo vo = advertiserService.getXxlStatisticInfo(projectId, systemType, allocation.getAccountId(), allocation.getAuthName());
                 sheets.add(vo);
             }
         }

+ 2 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IAdvertiserService.java

@@ -16,6 +16,7 @@ public interface IAdvertiserService extends IService<Advertiser> {
 
     List<Advertiser> getBySaleId(String saleId);
 
-    SheetInfoVo getXxlStatisticInfo(Long projectId, String systemType, Long accountId, String groupBy, String sheetName);
+    SheetInfoVo getXxlStatisticInfo(Long projectId, String systemType, Long accountId, String sheetName);
 
+    List<SheetInfoVo> getSystemTypeXxlStatisticInfo(Long projectId);
 }

+ 11 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/AdvertiserServiceImpl.java

@@ -32,7 +32,7 @@ public class AdvertiserServiceImpl extends ServiceImpl<AdvertiserMapper, Adverti
     }
 
     @Override
-    public SheetInfoVo getXxlStatisticInfo(Long projectId, String systemType, Long accountId, String groupBy, String sheetName) {
+    public SheetInfoVo getXxlStatisticInfo(Long projectId, String systemType, Long accountId, String sheetName) {
         SheetInfoVo vo = new SheetInfoVo();
         List<KuaishouXxlEntity> details = new ArrayList<>();
         vo.setSheetName(sheetName);
@@ -44,4 +44,14 @@ public class AdvertiserServiceImpl extends ServiceImpl<AdvertiserMapper, Adverti
         vo.setDetails(details);
         return vo;
     }
+
+    @Override
+    public List<SheetInfoVo> getSystemTypeXxlStatisticInfo(Long projectId) {
+        List<SheetInfoVo>vos = new ArrayList<>();
+        SheetInfoVo android = getXxlStatisticInfo(projectId,"android",null,"android汇总表");
+        vos.add(android);
+        SheetInfoVo ios = getXxlStatisticInfo(projectId,"ios",null,"ios汇总表");
+        vos.add(ios);
+        return vos;
+    }
 }