Browse Source

快手、头条账户视频报表更换application库数据

zhaoxian 3 years ago
parent
commit
2d49b3b288

+ 8 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaiShouAccountReportServiceImpl.java

@@ -102,14 +102,18 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
             if (startDate.equals(DateUtils.date2Str())) {
             if (startDate.equals(DateUtils.date2Str())) {
                 result = kuaiShouAccountReportMapper.queryTodaySumByHourGroupAccount(filedAll, startDate, hour, accounts, target, order);
                 result = kuaiShouAccountReportMapper.queryTodaySumByHourGroupAccount(filedAll, startDate, hour, accounts, target, order);
                 JSONObject afterSum = kuaiShouAccountReportMapper.querySumByHour(filedAll, startDate, hour, accounts);
                 JSONObject afterSum = kuaiShouAccountReportMapper.querySumByHour(filedAll, startDate, hour, accounts);
+                afterSum.put("authName", "总计");
                 JSONObject beforeSum = kuaiShouAccountReportMapper.querySumByHour(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), hour, accounts);
                 JSONObject beforeSum = kuaiShouAccountReportMapper.querySumByHour(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), hour, accounts);
+                beforeSum.put("authName", "昨日总计(相对)");
                 result.add(afterSum);
                 result.add(afterSum);
                 result.add(beforeSum);
                 result.add(beforeSum);
                 result.add(countTotal(afterSum, beforeSum));
                 result.add(countTotal(afterSum, beforeSum));
             } else {
             } else {
                 result = kuaiShouAccountReportMapper.querySumByDateGroupAccount(filedAll, endDate, startDate, accounts, target, order);
                 result = kuaiShouAccountReportMapper.querySumByDateGroupAccount(filedAll, endDate, startDate, accounts, target, order);
                 JSONObject afterSum = kuaiShouAccountReportMapper.queryAllSumByStartEndDate(filedAll, endDate, startDate, accounts);
                 JSONObject afterSum = kuaiShouAccountReportMapper.queryAllSumByStartEndDate(filedAll, endDate, startDate, accounts);
+                afterSum.put("authName", "总计");
                 JSONObject beforeSum = kuaiShouAccountReportMapper.queryAllSumByStartEndDate(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, endDate, -1), DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), accounts);
                 JSONObject beforeSum = kuaiShouAccountReportMapper.queryAllSumByStartEndDate(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, endDate, -1), DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), accounts);
+                beforeSum.put("authName", "昨日总计(相对)");
                 result.add(afterSum);
                 result.add(afterSum);
                 result.add(beforeSum);
                 result.add(beforeSum);
                 result.add(countTotal(afterSum, beforeSum));
                 result.add(countTotal(afterSum, beforeSum));
@@ -120,7 +124,9 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
             } else {
             } else {
                 result = kuaiShouAccountReportMapper.querySumByDateGroupAccountAndDate(filedAll, endDate, startDate, accounts, target, order);
                 result = kuaiShouAccountReportMapper.querySumByDateGroupAccountAndDate(filedAll, endDate, startDate, accounts, target, order);
             }
             }
-            result.add(kuaiShouAccountReportMapper.queryAllSumByStartEndDate(filedAll, endDate, startDate, accounts));
+            JSONObject object = kuaiShouAccountReportMapper.queryAllSumByStartEndDate(filedAll, endDate, startDate, accounts);
+            object.put("authName", "总计");
+            result.add(object);
         }
         }
         return result;
         return result;
     }
     }
@@ -203,6 +209,7 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
                 jsonObject.put(k, (LinkUtils.countLink(after.getBigDecimal(k) == null ? zero : after.getBigDecimal(k), before.getBigDecimal(k) == null ? zero : before.getBigDecimal(k))).multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%");
                 jsonObject.put(k, (LinkUtils.countLink(after.getBigDecimal(k) == null ? zero : after.getBigDecimal(k), before.getBigDecimal(k) == null ? zero : before.getBigDecimal(k))).multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%");
             }
             }
         });
         });
+        jsonObject.put("authName", "环比");
         return jsonObject;
         return jsonObject;
     }
     }