bom新增接口优化_V8_添加表头物料翻译判断
This commit is contained in:
parent
089b56a8b6
commit
7764819dd9
|
@ -117,6 +117,15 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
||||||
IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class);
|
IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class);
|
||||||
for (AggBomVO aggtwo : aggVOs) {
|
for (AggBomVO aggtwo : aggVOs) {
|
||||||
BomItemVO[] items = aggtwo.getChildrenVO();
|
BomItemVO[] items = aggtwo.getChildrenVO();
|
||||||
|
//2025年5月9日08点56分--添加表头物料翻译校验 start
|
||||||
|
if(aggtwo.getParent().getAttributeValue("hcmaterialid")!=null){
|
||||||
|
MaterialVO headMaterialVO = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class,
|
||||||
|
aggtwo.getParent().getAttributeValue("hcmaterialid").toString());
|
||||||
|
if(headMaterialVO==null){
|
||||||
|
ExceptionUtils.wrappBusinessException("根据物料【"+aggtwo.getParent().getAttributeValue("hcmaterialid").toString()+"】查询物料失败,请在BIP里确认是否物料已存在!!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//2025年5月9日08点56分--添加表头物料翻译校验 end
|
||||||
for (int i = 0; i < items.length; i++) {
|
for (int i = 0; i < items.length; i++) {
|
||||||
MaterialVO bankAccSub = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class,
|
MaterialVO bankAccSub = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class,
|
||||||
items[i].getAttributeValue("cmaterialid").toString());
|
items[i].getAttributeValue("cmaterialid").toString());
|
||||||
|
@ -191,10 +200,10 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
||||||
return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999",
|
return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999",
|
||||||
"BOM保存提交成功部分成功部分失败", true);
|
"BOM保存提交成功部分成功部分失败", true);
|
||||||
}else{
|
}else{
|
||||||
return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999");
|
ExceptionUtils.wrappBusinessException("未匹配到符合条件的三方注册用户账号【"+userCode+"】,请检查!!!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ExceptionUtils.wrappBusinessException("未匹配到符合条件的三方注册账号,请检查!!!");
|
return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999");
|
||||||
}
|
}
|
||||||
// 请求参数状态为审批通过时,自动提交--不设审批流 end
|
// 请求参数状态为审批通过时,自动提交--不设审批流 end
|
||||||
return ResultMessageUtil.toJSON(result, "BOM保存成功");
|
return ResultMessageUtil.toJSON(result, "BOM保存成功");
|
||||||
|
|
Loading…
Reference in New Issue