|
|
@@ -1037,8 +1037,8 @@ public class TMapPolygonPropertiesServiceImpl extends ServiceImpl<TMapPolygonPro
|
|
1037
|
1037
|
Map<String,Object> statisticsMap=new HashMap<>();
|
|
1038
|
1038
|
statisticsMap.put("name",item.getfCategoryname());
|
|
1039
|
1039
|
statisticsMap.put("total",Category.size());
|
|
1040
|
|
- statisticsMap.put("normal",Category.stream().filter(x->x.getFStateid()>0));
|
|
1041
|
|
- statisticsMap.put("abnormal",Category.stream().filter(x->x.getFStateid().equals(0)));
|
|
|
1040
|
+ statisticsMap.put("normal",Category.stream().filter(x->x.getFStateid()!=null&&x.getFStateid()>0).collect(Collectors.toList()));
|
|
|
1041
|
+ statisticsMap.put("abnormal",Category.stream().filter(x->x.getFStateid()!=null&&x.getFStateid().equals(0)).collect(Collectors.toList()));
|
|
1042
|
1042
|
statistics.add(statisticsMap);
|
|
1043
|
1043
|
}
|
|
1044
|
1044
|
}
|
|
|
@@ -1046,32 +1046,26 @@ public class TMapPolygonPropertiesServiceImpl extends ServiceImpl<TMapPolygonPro
|
|
1046
|
1046
|
Map<String,Object> statisticsMap=new HashMap<>();
|
|
1047
|
1047
|
statisticsMap.put("name","监控");
|
|
1048
|
1048
|
statisticsMap.put("total",Driveinfos.size());
|
|
1049
|
|
- statisticsMap.put("normal",Driveinfos.stream().filter(x->x.getfState()>0));
|
|
1050
|
|
- statisticsMap.put("abnormal",Driveinfos.stream().filter(x->x.getfState().equals(0)));
|
|
|
1049
|
+ statisticsMap.put("normal",Driveinfos.stream().filter(x->x.getfState()!=null&&x.getfState()>0).collect(Collectors.toList()));
|
|
|
1050
|
+ statisticsMap.put("abnormal",Driveinfos.stream().filter(x->x.getfState()!=null&&x.getfState().equals(0)).collect(Collectors.toList()));
|
|
1051
|
1051
|
statistics.add(statisticsMap);
|
|
1052
|
1052
|
map.put("statistics",statistics);
|
|
1053
|
1053
|
|
|
1054
|
1054
|
//保养
|
|
1055
|
|
- List<TEquipmentMaintenance> maintenance=
|
|
1056
|
|
- equipmentMaintenances.stream().filter(x->x.getParkId().equals(map.get("fParkid"))).
|
|
1057
|
|
- collect(Collectors.toList());
|
|
1058
|
|
- map.put("maintenance",maintenance);
|
|
|
1055
|
+ map.put("maintenance",equipmentMaintenances);
|
|
1059
|
1056
|
//出勤
|
|
1060
|
1057
|
|
|
1061
|
1058
|
Map<String,Object> attendance=new HashMap<>();
|
|
1062
|
|
- attendance.put("dueToArrive",employeeinfos.stream().filter(x->x.getfParkid().equals(map.get("fParkid"))).count() );
|
|
1063
|
|
- attendance.put("present",baseEmployeeinfos.stream().filter(x->x.getfParkid().equals(map.get("fParkid"))&&
|
|
1064
|
|
- (x.getfWorktype()==1|| x.getfWorktype()==2|| x.getfWorktype()==3) ).count() );
|
|
1065
|
|
- attendance.put("leave",baseEmployeeinfos.stream().filter(x->x.getfParkid().equals(map.get("fParkid"))&&
|
|
1066
|
|
- (x.getfWorktype()==4|| x.getfWorktype()==5|| x.getfWorktype()==6) ).count() );
|
|
|
1059
|
+ attendance.put("dueToArrive",employeeinfos.size());
|
|
|
1060
|
+ attendance.put("present",baseEmployeeinfos.stream().filter(x->x.getfWorktype()==1|| x.getfWorktype()==2|| x.getfWorktype()==3
|
|
|
1061
|
+ ).count() );
|
|
|
1062
|
+ attendance.put("leave",baseEmployeeinfos.stream().filter(x->
|
|
|
1063
|
+ x.getfWorktype()==4|| x.getfWorktype()==5|| x.getfWorktype()==6 ).count() );
|
|
1067
|
1064
|
map.put("attendance",attendance);
|
|
1068
|
1065
|
|
|
1069
|
1066
|
//预警
|
|
1070
|
|
- List<TWoWorkorderbase> warningOrder=
|
|
1071
|
|
- warningWorklist.stream().filter(x->x.getfSguserid().equals(map.get("fParkid"))).
|
|
1072
|
|
- collect(Collectors.toList());
|
|
1073
|
|
- map.put("warningOrder",warningOrder);
|
|
1074
|
|
- map.put("warningOrderCount",warningOrder.size());
|
|
|
1067
|
+ map.put("warningOrder",warningWorklist);
|
|
|
1068
|
+ map.put("warningOrderCount",warningWorklist.size());
|
|
1075
|
1069
|
|
|
1076
|
1070
|
return ResultResponse.builder().status(ResultCodeEnum.SUCCESS.getCode()).message
|
|
1077
|
1071
|
(ResultCodeEnum.SUCCESS.getMessage()).data(map).build();
|