|
@@ -93,13 +93,11 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
|
|
public List<JSONObject> getListDataBy(String mediaId, BigDecimal discount, JSONArray accounts, String startDate, String endDate, int hour, String target, String order) {
|
|
public List<JSONObject> getListDataBy(String mediaId, BigDecimal discount, JSONArray accounts, String startDate, String endDate, int hour, String target, String order) {
|
|
List<JSONObject> result;
|
|
List<JSONObject> result;
|
|
String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapKs);
|
|
String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.dicMapKs);
|
|
- System.err.println(filedAll);
|
|
|
|
- if (startDate.equals(endDate)) {
|
|
|
|
|
|
+ if (startDate.equals(endDate)) {
|
|
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);
|
|
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);
|
|
- System.err.println(afterSum);
|
|
|
|
result.add(afterSum);
|
|
result.add(afterSum);
|
|
result.add(beforeSum);
|
|
result.add(beforeSum);
|
|
result.add(countTotal(afterSum, beforeSum));
|
|
result.add(countTotal(afterSum, beforeSum));
|
|
@@ -196,8 +194,6 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
|
|
if ("accountId".equals(k) || "authName".equals(k) || v.toString().contains("%") || before.getString(k).contains("%")) {
|
|
if ("accountId".equals(k) || "authName".equals(k) || v.toString().contains("%") || before.getString(k).contains("%")) {
|
|
jsonObject.put(k, "-");
|
|
jsonObject.put(k, "-");
|
|
} else {
|
|
} else {
|
|
- System.err.println(k);
|
|
|
|
- System.err.println(k);
|
|
|
|
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) + "%");
|
|
}
|
|
}
|
|
});
|
|
});
|