|
|
|
@ -1487,7 +1487,7 @@ public class MesWorkOrderService implements IMesWorkOrderService {
|
|
|
|
|
private MesProductVersion getMesProductVersion(Map<String, List<MesProductVersion>> productVersionMap, String reportPartNo, String productVersion) {
|
|
|
|
|
Optional<MesProductVersion> optional = Objects.isNull(productVersionMap) || !productVersionMap.containsKey(reportPartNo) ? Optional.empty() : productVersionMap.get(reportPartNo).stream().filter(t -> t.getProductVersion().equals(productVersion)).findFirst();
|
|
|
|
|
if (!optional.isPresent()) {
|
|
|
|
|
MesPcnException.throwMesBusiException("零件:【%s】生产版本:【%s】信息存在", reportPartNo, productVersion);
|
|
|
|
|
MesPcnException.throwMesBusiException("零件:【%s】生产版本:【%s】信息不存在", reportPartNo, productVersion);
|
|
|
|
|
}
|
|
|
|
|
return optional.get();
|
|
|
|
|
}
|
|
|
|
|