|
@@ -164,7 +164,9 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
List<EquMaintenanceScheduleDo> maintenanceScheduleList = aspCheckItems.stream().map(info -> {
|
|
|
// 数据转换(设备——计划)
|
|
|
EquMaintenanceScheduleDo maintenanceScheduleDo = dataShiftFacilityToPlan(info, batchCreate.getYear());
|
|
|
- equMaintenancePartList.addAll(dataShiftSpareStandToPlan(standradMap.get(maintenanceScheduleDo.getEquipmentid()), maintenanceScheduleDo.getId()));
|
|
|
+ if(standradMap.containsKey(maintenanceScheduleDo.getEquipmentid())){
|
|
|
+ equMaintenancePartList.addAll(dataShiftSpareStandToPlan(standradMap.get(maintenanceScheduleDo.getEquipmentid()), maintenanceScheduleDo.getId()));
|
|
|
+ }
|
|
|
return maintenanceScheduleDo;
|
|
|
}).collect(Collectors.toList());
|
|
|
maintenanceScheduleService.saveBatchList(maintenanceScheduleList);
|
|
@@ -404,8 +406,8 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
Date newDate = new Date();
|
|
|
final EquMaintenancePartDo[] maintenancePart = {null};
|
|
|
// SysUserVo currentUser = CommonUtils.getCurrentUser();
|
|
|
- return partsSetoutStandardList.stream().map(info -> {
|
|
|
- maintenancePart[0] = new EquMaintenancePartDo();
|
|
|
+ List<EquMaintenancePartDo> collect = partsSetoutStandardList.stream().map(info -> {
|
|
|
+ maintenancePart[0] = new EquMaintenancePartDo();
|
|
|
BeanUtils.copyProperties(info, maintenancePart[0]);
|
|
|
maintenancePart[0].setId(SecurityUtil.getUUID())
|
|
|
.setCreatedate(newDate)
|
|
@@ -421,6 +423,7 @@ public class MaintenanceServiceImpl implements MaintenanceService {
|
|
|
.setMasterid(id);
|
|
|
return maintenancePart[0];
|
|
|
}).collect(Collectors.toList());
|
|
|
+ return collect;
|
|
|
}
|
|
|
|
|
|
|