|
@@ -288,6 +288,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
String parkCode = params.getParkCode();
|
|
|
Integer type = params.getType();
|
|
|
Integer timeIndex = params.getTimeIndex();
|
|
|
+ String date = params.getDate();
|
|
|
List<Integer> indexs = Arrays.asList(0, 3, 6, 9, 12, 15, 18, 21, 23);
|
|
|
if (!indexs.contains(timeIndex)) {
|
|
|
return ResponseBuilder.fail("暂不支持该时间段查询");
|
|
@@ -299,9 +300,9 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
if (StringUtils.isBlank(parkCode)) {
|
|
|
parkCodeList = ParkUtils.getParkCodeList();
|
|
|
}
|
|
|
+ String format = StringUtils.isNotBlank(date) ? date.replace("-", "") : LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
List<Map> results = new ArrayList<>();
|
|
|
parkCodeList.forEach(code -> {
|
|
|
- String format = LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
JSONObject obj = mongoTemplate.findById(code + "_" + format, JSONObject.class, ParkType.getTypeByNo(type).getCode());
|
|
|
if (obj == null) {
|
|
|
return;
|
|
@@ -332,6 +333,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
public ResponseBean getTodayFlowAnalysisByPage(FlowAnalysisReq params) {
|
|
|
String parkCode = params.getParkCode();
|
|
|
Integer type = params.getType();
|
|
|
+ String date = params.getDate();
|
|
|
if (type != 1 && type != 2 && type != 3) {
|
|
|
return ResponseBuilder.fail("类型只能为入场、出场、异常");
|
|
|
}
|
|
@@ -339,9 +341,9 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
if (StringUtils.isBlank(parkCode)) {
|
|
|
parkCodeList = ParkUtils.getParkCodeList();
|
|
|
}
|
|
|
+ String format = StringUtils.isNotBlank(date) ? date.replace("-", "") : LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
List<Map> results = new ArrayList<>();
|
|
|
parkCodeList.forEach(code -> {
|
|
|
- String format = LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
JSONObject obj = mongoTemplate.findById(code + "_" + format, JSONObject.class, ParkType.getTypeByNo(type).getCode());
|
|
|
if (obj == null) {
|
|
|
return;
|
|
@@ -503,6 +505,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
public ResponseBean parkingHoursTodayByPage(ParkHoursPageReq params) {
|
|
|
String parkCode = params.getParkCode();
|
|
|
String hour = params.getHour();
|
|
|
+ String date = params.getDate();
|
|
|
List<String> parkCodeList = Arrays.asList(parkCode);
|
|
|
if (StringUtils.isBlank(parkCode)) {
|
|
|
parkCodeList = ParkUtils.getParkCodeList();
|
|
@@ -511,9 +514,9 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
if (StringUtils.isBlank(hour) || !ids.contains(hour)) {
|
|
|
return ResponseBuilder.fail("不支持的时间");
|
|
|
}
|
|
|
+ String format = StringUtils.isNotBlank(date) ? date.replace("-", "") : LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
List<Map> result = new ArrayList<>();
|
|
|
parkCodeList.forEach(code -> {
|
|
|
- String format = LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
JSONObject obj = mongoTemplate.findById(code + "_" + format, JSONObject.class, "parkHourList");
|
|
|
if (obj == null) {
|
|
|
return;
|
|
@@ -640,6 +643,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
public ResponseBean exceptionAnalysisByPage(ExceptionTrendReq params) {
|
|
|
String parkCode = params.getParkCode();
|
|
|
String paramsCode = params.getCode();
|
|
|
+ String date = params.getDate();
|
|
|
List<String> parkCodeList = Arrays.asList(parkCode);
|
|
|
if (StringUtils.isBlank(parkCode)) {
|
|
|
parkCodeList = ParkUtils.getParkCodeList();
|
|
@@ -647,9 +651,9 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
if (!ParkExceptionType.codeList().contains(paramsCode)) {
|
|
|
return ResponseBuilder.fail("异常编号错误");
|
|
|
}
|
|
|
+ String format = StringUtils.isNotBlank(date) ? date.replace("-", "") : LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
List<Map> result = new ArrayList<>();
|
|
|
parkCodeList.forEach(code -> {
|
|
|
- String format = LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
JSONObject obj = mongoTemplate.findById(code + "_" + format, JSONObject.class, ParkType.EXCEPTION.getCode());
|
|
|
if (obj == null) {
|
|
|
return;
|
|
@@ -738,7 +742,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
});
|
|
|
Map<String, List<Map>> payType = result.stream().collect(Collectors.groupingBy(x -> x.get("payType").toString()));
|
|
|
result.clear();
|
|
|
- payType.keySet().forEach(x -> result.add(Levi.by("name", StringUtils.isNotBlank(PayTypeCode.getTypeByCode(x)) ? PayTypeCode.getTypeByCode(x) : "未知方式").set("code", x).set("count", payType.get(x).size())));
|
|
|
+ Arrays.stream(PayTypeCode.values()).forEach(x -> result.add(Levi.by("name", x.getType()).set("code", x.getCode()).set("count", payType.get(x.getCode()) == null ? 0 : payType.get(x.getCode()).size())));
|
|
|
return ResponseBuilder.ok(result);
|
|
|
}
|
|
|
|
|
@@ -752,6 +756,7 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
public ResponseBean differentPayByPage(DifferentPayPageReq params) {
|
|
|
String parkCode = params.getParkCode();
|
|
|
String payType = params.getPayType();
|
|
|
+ String date = params.getDate();
|
|
|
String split = "否";
|
|
|
List<String> parkCodeList = Arrays.asList(parkCode);
|
|
|
if (StringUtils.isBlank(parkCode)) {
|
|
@@ -764,9 +769,9 @@ public class ParkSystemServiceImpl implements ParkSystemService {
|
|
|
split = "是";
|
|
|
}
|
|
|
}
|
|
|
+ String format = StringUtils.isNotBlank(date) ? date.replace("-", "") : LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
List<Map> result = new ArrayList<>();
|
|
|
parkCodeList.forEach(code -> {
|
|
|
- String format = LocalDateTimeUtil.format(LocalDateTime.now(), DatePattern.PURE_DATE_PATTERN);
|
|
|
JSONObject obj = mongoTemplate.findById(code + "_" + format, JSONObject.class, "parkCharge");
|
|
|
if (obj == null) {
|
|
|
return;
|