|
|
|
@ -522,8 +522,10 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
if (!MesExtEnumUtil.ORDER_TYPE_IDENTIFICATION.P.getValue().equals(item.getOrderFlag())) {
|
|
|
|
|
//获取生产版本
|
|
|
|
|
mesProductVersion = getMesProductVersion(item.getOrganizeCode(),item.getPartNo());
|
|
|
|
|
if (mesProductVersion != null) {
|
|
|
|
|
item.setProductVersion(mesProductVersion.getProductVersion());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//是否自动发布
|
|
|
|
|
return isAuto(item, mesProductVersion);
|
|
|
|
|
}
|
|
|
|
@ -1209,6 +1211,9 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
if (StringUtil.isEmpty(model.getSn())) {
|
|
|
|
|
//获取生产版本
|
|
|
|
|
MesProductVersion mesProductVersion = getMesProductVersion(model.getOrganizeCode(),model.getPartNo());
|
|
|
|
|
if (Objects.isNull(mesProductVersion)) {
|
|
|
|
|
MesException.throwMesBusiException("物料【%s】生产版本信息不存在", model.getPartNo());
|
|
|
|
|
}
|
|
|
|
|
//获取bom
|
|
|
|
|
List<MesBom> mesBoms = mesBomService.findBomList(mesPart.getOrganizeCode(), mesPart, mesProductVersion.getAlternativePartList());
|
|
|
|
|
//生成流水码
|
|
|
|
@ -2771,9 +2776,6 @@ public class MesWorkOrderService extends BaseMesService<MesWorkOrder> implements
|
|
|
|
|
|
|
|
|
|
private MesProductVersion getMesProductVersion(String organizeCode, String partNo) {
|
|
|
|
|
MesProductVersion mesProductVersion = mesProductVersionService.getMesProductVersionByPartNoAndProductVersion(organizeCode, partNo, null);
|
|
|
|
|
if (Objects.isNull(mesProductVersion)) {
|
|
|
|
|
MesException.throwMesBusiException("物料【%s】生产版本信息不存在", partNo);
|
|
|
|
|
}
|
|
|
|
|
return mesProductVersion;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|