|
|
|
@ -509,8 +509,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);
|
|
|
|
|
}
|
|
|
|
@ -1196,6 +1198,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());
|
|
|
|
|
//生成流水码
|
|
|
|
@ -2752,9 +2757,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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|