|
@@ -46,7 +46,7 @@ public class PlatformCalendarService {
|
|
|
dayToCalendarLiftMap.forEach((status, calendarLiftList) -> {
|
|
|
if (calendarLiftList != null) {
|
|
|
if (status != 0) {
|
|
|
- statusToLiftNum.put(status, calendarLiftList.stream().count());
|
|
|
+ statusToLiftNum.put(status, (long) calendarLiftList.size());
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -72,11 +72,19 @@ public class PlatformCalendarService {
|
|
|
Map<Integer, List<CalendarLiftDataModel>> statusToLiftData = dayToCalendarLift.get(CommonUtil.getDateStrDayValue(
|
|
|
platformCalendarRequest.getRequestDateDayStr(), CommonConstants.PlatformCalendarConstants.TRANS_DATE_FORMAT));
|
|
|
if (statusToLiftData != null && statusToLiftData.size() > 0) {
|
|
|
- statusToLiftData.forEach((status, calendarLiftList) -> {
|
|
|
- if(status != 0) {
|
|
|
- calendarLiftDataModelList.addAll(calendarLiftList);
|
|
|
- }
|
|
|
- });
|
|
|
+ if (platformCalendarRequest.getCalendarLiftStatus() == null) {
|
|
|
+ //如果不传类型就获取所有状态的电梯数据
|
|
|
+ List<CalendarLiftDataModel> finalCalendarLiftDataModelList = calendarLiftDataModelList;
|
|
|
+ statusToLiftData.forEach((status, calendarLiftList) -> {
|
|
|
+ if (status != 0) {
|
|
|
+ finalCalendarLiftDataModelList.addAll(calendarLiftList);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ calendarLiftDataModelList = finalCalendarLiftDataModelList;
|
|
|
+ } else {
|
|
|
+ //传类型就获取指定状态的电梯数据
|
|
|
+ calendarLiftDataModelList = statusToLiftData.get(platformCalendarRequest.getCalendarLiftStatus());
|
|
|
+ }
|
|
|
}
|
|
|
//去除id相同的电梯数据
|
|
|
removeDuplicationLift(calendarLiftDataModelList);
|