|
@@ -229,11 +229,13 @@ public class KuaiShouAccountReportServiceImpl implements IKuaiShouAccountReportS
|
|
private JSONObject countTotal(JSONObject after, JSONObject before) {
|
|
private JSONObject countTotal(JSONObject after, JSONObject before) {
|
|
JSONObject jsonObject = new JSONObject();
|
|
JSONObject jsonObject = new JSONObject();
|
|
after.forEach((k, v) -> {
|
|
after.forEach((k, v) -> {
|
|
- //去除没法计算的字段
|
|
|
|
- if ("accountId".equals(k) || "authName".equals(k) || v.toString().contains("%") || before.getString(k).contains("%")) {
|
|
|
|
- jsonObject.put(k, "-");
|
|
|
|
- } else {
|
|
|
|
- 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) + "%");
|
|
|
|
|
|
+ if (!Check.isNull(v)) {
|
|
|
|
+ //去除没法计算的字段
|
|
|
|
+ if ("accountId".equals(k) || "authName".equals(k) || v.toString().contains("%") || before.getString(k).contains("%")) {
|
|
|
|
+ jsonObject.put(k, "-");
|
|
|
|
+ } else {
|
|
|
|
+ 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", "环比");
|
|
jsonObject.put("authName", "环比");
|