uapbd_bom新增接口根据单据状态添加自动提交

This commit is contained in:
李正@用友 2025-04-11 18:15:04 +08:00
parent 24753585bd
commit 1fb65a9ecb
1 changed files with 12 additions and 3 deletions

View File

@ -191,7 +191,10 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
mapInit(original);
AggBomVO agg = aggInit(paramMap);
//2025年4月11日14点35分 --重新赋值上制单人创建人 --start
agg.getParentVO().setAttributeValue("billmaker", original.getParent().getAttributeValue("billmaker"));
agg.getParentVO().setAttributeValue("creator", original.getParent().getAttributeValue("creator"));
//2025年4月11日14点35分 --重新赋值上制单人创建人 --end
JSONString checkInfo = requiredCheck(agg);
if (checkInfo != null) {
return checkInfo;
@ -211,7 +214,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
if (UFBoolean.TRUE.equals(flag)) {
UFBoolean bHasOtherDefaultVersion = getIsExistDefaultVersion(agg);
if (bHasOtherDefaultVersion.equals(UFBoolean.TRUE)) {
ExceptionUtils.wrappBusinessException("hasOtherDefaultVersion");
ExceptionUtils.wrappBusinessException("有其它默认版本,请检查!!!");
}
}
@ -677,7 +680,8 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
.getNewVIDByOrgID(agg.getParent().getAttributeValue("pk_org").toString());
agg.getParent().setAttributeValue("pk_org_v", pk_org_v);
}
//1对于之前不存在的BOM新增时如果是传自由态不默认且无效如果传的是审批态默认且有效2025年4月11日16点28分 start
Object fbillstatus = agg.getParent().getAttributeValue("fbillstatus");
if (MMValueCheck.isEmpty(agg.getParent().getAttributeValue("cbomid"))) {
agg.getParent().setAttributeValue("fbomtype", Integer.valueOf(1));
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(2));
@ -685,6 +689,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
agg.getParent().setAttributeValue("hfbomsource", Integer.valueOf(1));
agg.getParent().setAttributeValue("hfbomcategory", Integer.valueOf(1));
}
if(fbillstatus!=null&&"1".equals(fbillstatus.toString())){
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1));
agg.getParent().setAttributeValue("hbdefault",UFBoolean.TRUE);
}
//1对于之前不存在的BOM新增时如果是传自由态不默认且无效如果传的是审批态默认且有效2025年4月11日16点28分 end
}
private void materialidSupplement(AggBomVO agg) {