|
@@ -248,7 +248,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
JSONObject exceptionData = exceptionObj != null ? exceptionObj.getJSONObject("data") : null;
|
|
|
JSONObject exceptionObjOld = mongoTemplate.findById(code + "_" + formatOld, JSONObject.class, ParkType.EXCEPTION.getCode());
|
|
|
ParkExceptionType.codeList().forEach(x -> exceptionCountResult.set(exceptionObj == null ? 0 : exceptionObj.getDouble(x + "Count").intValue() + exceptionCountResult.get()));
|
|
|
- ParkExceptionType.codeList().forEach(x -> exceptionCountOldResult.set(exceptionObjOld == null ? 0 : exceptionObjOld.getDouble(x + "Count").intValue() + exceptionCountOldResult.get()));
|
|
|
+ ParkExceptionType.codeList().forEach(x -> exceptionCountOldResult.set(exceptionObjOld == null ? 0 : (exceptionObjOld.getDouble(x + "Count").intValue() + exceptionCountOldResult.get())));
|
|
|
Double inCount = inObj == null ? 0 : inObj.getDouble("count");
|
|
|
Double inCountOld = inObjOld == null ? 0 : inObjOld.getDouble("count");
|
|
|
Double outCount = outObj == null ? 0 : outObj.getDouble("count");
|
|
@@ -605,7 +605,8 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
ParkExceptionType.codeList().forEach(x -> result.set(x, 0));
|
|
|
JSONObject obj = mongoTemplate.findById(ParkType.EXCEPTION.getCode(), JSONObject.class, ParkType.EXCEPTION.getCode());
|
|
|
if (obj == null) {
|
|
|
- return ResponseBuilder.ok(result);
|
|
|
+ result.keySet().forEach(x -> list.add(Levi.by("name", ParkExceptionType.getTypeByCode(x.toString()).getName()).set("code", x).set("count", result.get(x))));
|
|
|
+ return ResponseBuilder.ok(list);
|
|
|
}
|
|
|
parkCodeList.forEach(code -> ParkExceptionType.codeList().forEach(x -> result.set(x, result.getInt(x) + (obj.getInteger(x + "Count") == null ? 0 : obj.getInteger(x + "Count")))));
|
|
|
result.keySet().forEach(x -> list.add(Levi.by("name", ParkExceptionType.getTypeByCode(x.toString()).getName()).set("code", x).set("count", result.get(x))));
|