|
@@ -102,14 +102,18 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
|
|
|
if (startDate.equals(DateUtils.date2Str())) {
|
|
|
result = kuaiShouAccountReportMapper.queryTodaySumByHourGroupAccount(filedAll, startDate, hour, accounts, target, order);
|
|
|
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);
|
|
|
+ beforeSum.put("authName", "昨日总计(相对)");
|
|
|
result.add(afterSum);
|
|
|
result.add(beforeSum);
|
|
|
result.add(countTotal(afterSum, beforeSum));
|
|
|
} else {
|
|
|
result = kuaiShouAccountReportMapper.querySumByDateGroupAccount(filedAll, endDate, startDate, accounts, target, order);
|
|
|
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);
|
|
|
+ beforeSum.put("authName", "昨日总计(相对)");
|
|
|
result.add(afterSum);
|
|
|
result.add(beforeSum);
|
|
|
result.add(countTotal(afterSum, beforeSum));
|
|
@@ -120,7 +124,9 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
|
|
|
} else {
|
|
|
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;
|
|
|
}
|
|
@@ -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("authName", "环比");
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|