|
|
@ -114,15 +114,23 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
|
List<StaffListResultDTO> staffPatrolList = staffPatrolRecordDao.selectPatrolList(formDTO); |
|
|
|
|
|
|
|
//5.封装数据
|
|
|
|
Map<String, String> map = new HashMap<>(); |
|
|
|
result.forEach(re -> { |
|
|
|
staffPatrolList.forEach(st -> { |
|
|
|
if (re.getGridId().equals(st.getGridId()) && re.getStaffId().equals(st.getStaffId())) { |
|
|
|
re.setPatrolStartTime(st.getPatrolStartTime()); |
|
|
|
re.setPatrolTotal(st.getPatrolTotal()); |
|
|
|
re.setStatus(st.getStatus()); |
|
|
|
map.put(re.getGridId()+re.getStaffId(),re.getStaffId()); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
//可能存在的在a网格有记录后在a网格将该人员移除
|
|
|
|
staffPatrolList.forEach(st->{ |
|
|
|
if(!map.containsKey(st.getGridId()+st.getStaffId())){ |
|
|
|
result.add(st); |
|
|
|
} |
|
|
|
}); |
|
|
|
//6.按条件排序
|
|
|
|
Collections.sort(result, new Comparator<StaffListResultDTO>() { |
|
|
|
@Override |
|
|
|