uapbd_bom新增接口优化_修改三方注册编码_添加物料查询为空判断
This commit is contained in:
parent
eef8d75183
commit
d119f9afb0
|
@ -120,6 +120,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
|||
for (int i = 0; i < items.length; i++) {
|
||||
MaterialVO bankAccSub = (MaterialVO) iUifService.queryByPrimaryKey(MaterialVO.class,
|
||||
items[i].getAttributeValue("cmaterialid").toString());
|
||||
//2025年5月7日08点41分 添加为空校验 sdlizheng --start
|
||||
if(bankAccSub==null){
|
||||
ExceptionUtils.wrappBusinessException("根据【cmaterialid:"+items[i].getAttributeValue("cmaterialid").toString()+"】查询物料失败!!!");
|
||||
}
|
||||
//2025年5月7日08点41分 添加为空校验 sdlizheng --end
|
||||
items[i].setAttributeValue("cmaterialvid", bankAccSub.getAttributeValue("pk_source"));
|
||||
}
|
||||
}
|
||||
|
@ -162,7 +167,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
|||
newAggVOList.add(result[0]);
|
||||
}
|
||||
return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "BOM保存成功");
|
||||
} else if ("dlkght".equals(userCode)) {
|
||||
} else if ("dlkgsrm".equals(userCode)) {
|
||||
for (AggBomVO aggvo : commitAggvoList) {
|
||||
try {
|
||||
result = service.insertCommitBomWithParam_RequiresNew(new AggBomVO[] { aggvo }, true, true);
|
||||
|
@ -185,10 +190,12 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
|||
}
|
||||
return ResultMessageUtil.toJSON(newAggVOList.toArray(new AggBomVO[0]), "100999",
|
||||
"BOM保存提交成功部分成功部分失败", true);
|
||||
}
|
||||
}else{
|
||||
return ResultMessageUtil.exceptionToJSON("BOM保存失败,新增不允许单据状态自由或者空和审批通过同时存在", "999");
|
||||
}
|
||||
} else {
|
||||
ExceptionUtils.wrappBusinessException("未匹配到符合条件的三方注册账号,请检查!!!");
|
||||
}
|
||||
// 请求参数状态为审批通过时,自动提交--不设审批流 end
|
||||
return ResultMessageUtil.toJSON(result, "BOM保存成功");
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue