diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java index 570efc6..e754a9f 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/busi/MesNcProcessingService.java @@ -537,16 +537,14 @@ public class MesNcProcessingService implements IMesNcProcessingService { } partInspectionRepository.save(model.getPartInspection()); - if (!headModel) { - if (!CollectionUtils.isEmpty(mesPartModels) && mesPartModels.size() > 0) { - List moveList = new ArrayList<>(); - for (MesPartModel mesPartModel : mesPartModels) { - MesMove move = createMove(model, sourceValue, areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE, mesPartModel.getPartNo()); - ConvertBean.serviceModelInitialize(move, model.getUserName()); - moveList.add(move); - } - moveRepository.saveAll(moveList); + if (!headModel && !CollectionUtils.isEmpty(mesPartModels) && mesPartModels.size() > 0) { + List moveList = new ArrayList<>(); + for (MesPartModel mesPartModel : mesPartModels) { + MesMove move = createMove(model, sourceValue, areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE, mesPartModel.getPartNo()); + ConvertBean.serviceModelInitialize(move, model.getUserName()); + moveList.add(move); } + moveRepository.saveAll(moveList); } else { MesMove move = createMove(model, sourceValue, areaCode, org, null == sn ? workCenterCode : sn.getWorkCenterCode(), MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE); ConvertBean.serviceModelInitialize(move, model.getUserName());