List实体转map

Map<String, List<ScSchedule>> schedulesNonNxNoWiringsMap = new HashMap<>();
if (!nonNxInfos.isEmpty()) {
List<ScSchedule> schedulesNonNxNoWirings = scScheduleRepository.findAllNonNxSchedulesNoWiring(nonNxInfos, Constants.WERKS_HD, weekly);
for (ScSchedule nonNxScheduleNoWiring : schedulesNonNxNoWirings) {
List<ScSchedule> tmpDetails = schedulesNonNxNoWiringsMap.computeIfAbsent(
nonNxScheduleNoWiring.getPlanid() + nonNxScheduleNoWiring.getSerialNumber() + nonNxScheduleNoWiring.getMaterielCode(), k -> new ArrayList<>());
tmpDetails.add(nonNxScheduleNoWiring);
}
}

展开阅读全文

没有更多推荐了,返回首页