|
|
|
@ -317,16 +317,24 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z |
|
|
|
|
List<StationMachine> stationMachineList = iStationMachineService.list(new LambdaQueryWrapper<StationMachine>().eq(StationMachine::getStationId, station.getId())); |
|
|
|
|
if (!ObjectUtils.isEmpty(stationMachineList)) { |
|
|
|
|
//工位设备ids
|
|
|
|
|
List<String> stationMachineIds = Optional.ofNullable(stationMachineList).orElse(new ArrayList<>()).stream().map(StationMachine::getMachineId).collect(Collectors.toList()); |
|
|
|
|
List<String> stationMachineIds = Optional.ofNullable(stationMachineList).orElse(new ArrayList<>()).stream() |
|
|
|
|
.map(StationMachine::getMachineId).collect(Collectors.toList()); |
|
|
|
|
List<ZyDevice> zyDeviceList = iZyDeviceService.list(new LambdaQueryWrapper<ZyDevice>().in(ZyDevice::getId, stationMachineIds)); |
|
|
|
|
List<String> zyDevice_typeCodes = Optional.ofNullable(zyDeviceList).orElse(new ArrayList<>()).stream().map(ZyDevice::getTypeCode).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 工位设备包含工序设备即匹配成功 |
|
|
|
|
*/ |
|
|
|
|
if (zyDevice_typeCodes.containsAll(zyDevicetype_codes)) { |
|
|
|
|
String collect = zyProcessMachineList.stream().map(ZyProcessMachine::getMachineId).collect(Collectors.joining(",")); |
|
|
|
|
zyPlanProcess.setMachineIds(collect); |
|
|
|
|
zyPlanProcess.setMachineNames(iStationMachineService.convertByMachineIds(stationMachineIds)); |
|
|
|
|
List<ZyDevice> machineList = iZyDeviceService.list(new LambdaQueryWrapper<ZyDevice>() |
|
|
|
|
.in(ZyDevice::getId, stationMachineIds) |
|
|
|
|
.in(ZyDevice::getTypeCode, zyDevicetype_codes) |
|
|
|
|
); |
|
|
|
|
if (!ObjectUtils.isEmpty(machineList)) { |
|
|
|
|
String ids = machineList.stream().map(ZyDevice::getId).collect(Collectors.joining(",")); |
|
|
|
|
List<String> collect = machineList.stream().map(ZyDevice::getId).collect(Collectors.toList()); |
|
|
|
|
zyPlanProcess.setMachineIds(ids); |
|
|
|
|
zyPlanProcess.setMachineNames(iStationMachineService.convertByMachineIds(collect)); |
|
|
|
|
zyPlanProcess.setStationId(station.getId()); |
|
|
|
|
zyPlanProcess.setStationName(station.getStationName()); |
|
|
|
|
zyPlanProcess.setStationNum(station.getStationNum()); |
|
|
|
@ -335,6 +343,7 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|