|
@ -139,7 +139,7 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
|
|
|
if (result != null) {
|
|
|
return (result.get("amount") != null ? Math.round((double) result.get("amount")) : 0) + todayAmount;
|
|
|
return (result.get("amount") != null ? Math.round(Double.valueOf(result.get("amount").toString())) : 0) + todayAmount;
|
|
|
} else {
|
|
|
return 0 + todayAmount;
|
|
|
}
|
|
@ -309,7 +309,7 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
|
|
|
if (result != null) {
|
|
|
return (result.get("amount") != null ? Math.round((double) result.get("amount")) : 0) + todayAmount;
|
|
|
return (result.get("amount") != null ? Math.round(Double.valueOf(result.get("amount").toString())) : 0) + todayAmount;
|
|
|
} else {
|
|
|
return 0 + todayAmount;
|
|
|
}
|
|
@ -373,7 +373,7 @@ public class StatisticsService extends BaseService {
|
|
|
if (resultList != null) {
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") != null ? Math.round((double) map.get("amount")) : 0);
|
|
|
map.put("amount", map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0);
|
|
|
// if(level > 3){
|
|
|
// map.put("rate",df.format(map.get("rate") != null ? map.get("rate") : 0));
|
|
|
// }
|
|
@ -434,7 +434,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
if (resultList != null) {
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") != null ? Math.round((double) map.get("amount")) : 0);
|
|
|
map.put("amount", map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0);
|
|
|
}
|
|
|
|
|
|
return new JSONArray(resultList);
|
|
@ -583,7 +583,7 @@ public class StatisticsService extends BaseService {
|
|
|
if (resultList != null) {
|
|
|
DecimalFormat df = new DecimalFormat("0.0000");
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") != null ? Math.round((double) map.get("amount")) : 0);
|
|
|
map.put("amount", map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0);
|
|
|
// 截止日期包含当天,则从redis查询当天统计数据
|
|
|
if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
|
|
|
String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
|
|
@ -776,7 +776,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
if (resultList != null) {
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") != null ? Math.round((double) map.get("amount")) : 0);
|
|
|
map.put("amount", map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0);
|
|
|
// 截止日期包含当天,则从redis查询当天统计数据
|
|
|
if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
|
|
|
String code = map.get("code") != null ? String.valueOf(map.get("code")) : "";
|
|
@ -938,7 +938,7 @@ public class StatisticsService extends BaseService {
|
|
|
if (countResult.containsKey(map.get("range").toString())) {
|
|
|
JSONObject range = (JSONObject) countResult.get(map.get("range").toString());
|
|
|
long amount = range.getLong("amount");
|
|
|
long resultAmount = map.get("amount") != null ? Math.round((double) map.get("amount")) : 0;
|
|
|
long resultAmount = map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0;
|
|
|
range.put("amount", amount + resultAmount);
|
|
|
}
|
|
|
}
|
|
@ -1103,7 +1103,7 @@ public class StatisticsService extends BaseService {
|
|
|
if (resultList != null) {
|
|
|
// 计算结果
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
long resultAmount = map.get("amount") != null ? Math.round((double) map.get("amount")) : 0;
|
|
|
long resultAmount = map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0;
|
|
|
String range = map.get("range").toString();
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotEmpty(range)) {
|
|
@ -1299,7 +1299,7 @@ public class StatisticsService extends BaseService {
|
|
|
if (resultList != null) {
|
|
|
// 计算结果
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
long resultAmount = map.get("amount") != null ? Math.round((double) map.get("amount")) : 0;
|
|
|
long resultAmount = map.get("amount") != null ? Math.round(Double.valueOf(map.get("amount").toString())) : 0;
|
|
|
String range = map.get("range").toString();
|
|
|
|
|
|
if (org.apache.commons.lang3.StringUtils.isNotEmpty(range)) {
|
|
@ -1515,9 +1515,9 @@ public class StatisticsService extends BaseService {
|
|
|
resultList.add(map2);
|
|
|
|
|
|
Map<String, Object> map3 = new HashMap<>();
|
|
|
map2.put("code", "2");
|
|
|
map2.put("name", "已退费人数");
|
|
|
map2.put("amount", Double.valueOf("0.0"));
|
|
|
map3.put("code", "2");
|
|
|
map3.put("name", "已退费人数");
|
|
|
map3.put("amount", Double.valueOf("0.0"));
|
|
|
resultList.add(map3);
|
|
|
} else if (index.equals("15")) {
|
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
@ -1556,7 +1556,7 @@ public class StatisticsService extends BaseService {
|
|
|
long total = 0;
|
|
|
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") == null ? 0 : Math.round((double) map.get("amount")));
|
|
|
map.put("amount", map.get("amount") == null ? 0 : Math.round(Double.valueOf(map.get("amount").toString())));
|
|
|
|
|
|
// 当天数据统计
|
|
|
if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
|
|
@ -1703,7 +1703,7 @@ public class StatisticsService extends BaseService {
|
|
|
|
|
|
if (resultList != null) {
|
|
|
for (Map<String, Object> map : resultList) {
|
|
|
map.put("amount", map.get("amount") == null ? 0 : Math.round((double) map.get("amount")));
|
|
|
map.put("amount", map.get("amount") == null ? 0 : Math.round(Double.valueOf(map.get("amount").toString())));
|
|
|
|
|
|
// 当天数据统计
|
|
|
if (endDate.compareTo(new SimpleDateFormat("yyyy-MM-dd").format(new Date())) >= 0) {
|
|
@ -1787,7 +1787,7 @@ public class StatisticsService extends BaseService {
|
|
|
}
|
|
|
|
|
|
if (result != null && result.containsKey("amount")) {
|
|
|
total += (result.get("amount") == null ? 0 : Math.round((double) result.get("amount")));
|
|
|
total += (result.get("amount") == null ? 0 : Math.round(Double.valueOf(result.get("amount").toString())));
|
|
|
}
|
|
|
|
|
|
String code = "6";
|