|
|
|
@ -92,9 +92,15 @@ public class MesSortRuleCfgOfflineServiceImpl implements IMesSortRuleCfgOfflineS
|
|
|
|
|
if (count > 0){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
MesProductVersion mesProductVersion = getMesProductVersion(productPartNo, organizeCode);
|
|
|
|
|
MesProductVersion mesProductVersion= null;
|
|
|
|
|
if (mesPartProdGroup.getEnableBomVersion() == CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()){
|
|
|
|
|
mesProductVersion = getMesProductVersion(productPartNo, organizeCode);
|
|
|
|
|
}
|
|
|
|
|
//4.总成零件号打散bom
|
|
|
|
|
String bomVersion = mesProductVersion.getAlternativePartList();
|
|
|
|
|
String bomVersion = null;
|
|
|
|
|
if (mesProductVersion != null){
|
|
|
|
|
bomVersion = mesProductVersion.getAlternativePartList();
|
|
|
|
|
}
|
|
|
|
|
MesBom bom = mesBomService.findBom(organizeCode, bomVersion, productPartNo);
|
|
|
|
|
if (bom == null) {
|
|
|
|
|
return;
|
|
|
|
@ -109,6 +115,9 @@ public class MesSortRuleCfgOfflineServiceImpl implements IMesSortRuleCfgOfflineS
|
|
|
|
|
}
|
|
|
|
|
//5.打散的bom 获取排序加工规则
|
|
|
|
|
List<MesWorkOrderPart> workOrderPartList = dismantleBom(productPartNo, 1, TimeTool.getNowTime(true), bom.getBomCode(), organizeCode, detail.getWorkCellCode());
|
|
|
|
|
if (workOrderPartList.isEmpty()){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//6.装配件获取的三种条件
|
|
|
|
|
String custCode = mesCustomerPart.getCustCode();
|
|
|
|
|
MesCustomerCarModel mesCustomerCarModel = getMesCustomerCarModel(custPartNo, organizeCode, custCode);
|
|
|
|
@ -257,7 +266,7 @@ public class MesSortRuleCfgOfflineServiceImpl implements IMesSortRuleCfgOfflineS
|
|
|
|
|
ddlPackBean.setOrderByStr(" order by createDatetime desc ");
|
|
|
|
|
List<MesProductVersion> mesProductVersionList = mesProductVersionRDao.findByHqlTopWhere(ddlPackBean, 1);
|
|
|
|
|
if (Objects.isNull(mesProductVersionList) || mesProductVersionList.isEmpty()) {
|
|
|
|
|
MesException.throwMesBusiException("物料【%s】对应的生产版本信息不存在", partNo);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
return mesProductVersionList.get(0);
|
|
|
|
|
}
|
|
|
|
|