gaoningbom新增接口添加成套公司逻辑_三方应用绑定用户会变

This commit is contained in:
李正@用友 2025-05-14 21:19:48 +08:00
parent 48f6b832fe
commit 1742100242
1 changed files with 11 additions and 5 deletions

View File

@ -88,6 +88,8 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
private static Map<String, Object> tsMap = new HashMap(); private static Map<String, Object> tsMap = new HashMap();
private String orgCodeFlag =null;
private static Map<String, Object> voMap = new HashMap(); private static Map<String, Object> voMap = new HashMap();
private static Map<String, Set<String>> idsMap = new HashMap(); private static Map<String, Set<String>> idsMap = new HashMap();
@ -112,7 +114,11 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
list.add(agg); list.add(agg);
} }
AggBomVO[] aggVOs = (AggBomVO[]) list.toArray(new AggBomVO[list.size()]); AggBomVO[] aggVOs = (AggBomVO[]) list.toArray(new AggBomVO[list.size()]);
if(aggVOs[0].getParentVO().getAttributeValue("pk_org")==null||aggVOs[0].getParentVO().getAttributeValue("pk_org")==""){
ExceptionUtils.wrappBusinessException("请求参数pk_org为空请检查");
}else{
this.orgCodeFlag=aggVOs[0].getParentVO().getAttributeValue("pk_org").toString();
}
BillFieldsCodeToPkUtil.doTranslateVOFields(aggVOs); BillFieldsCodeToPkUtil.doTranslateVOFields(aggVOs);
IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class); IUifService iUifService = NCLocator.getInstance().lookup(IUifService.class);
for (AggBomVO aggtwo : aggVOs) { for (AggBomVO aggtwo : aggVOs) {
@ -170,7 +176,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
result = service.insertBom((AggBomVO[]) addAggvoList.toArray(new AggBomVO[0])); result = service.insertBom((AggBomVO[]) addAggvoList.toArray(new AggBomVO[0]));
} else if (!commitAggvoList.isEmpty() && addAggvoList.isEmpty()) { } else if (!commitAggvoList.isEmpty() && addAggvoList.isEmpty()) {
List<AggBomVO> newAggVOList = new ArrayList<>(); List<AggBomVO> newAggVOList = new ArrayList<>();
if ("gaoning".equals(userCode)) { if ("gaoning".equals(userCode)|| "C029".equals(orgCodeFlag)) {
for (AggBomVO aggvo : commitAggvoList) { for (AggBomVO aggvo : commitAggvoList) {
result = service.insertCommitBomWithParam(new AggBomVO[] { aggvo }, true, true); result = service.insertCommitBomWithParam(new AggBomVO[] { aggvo }, true, true);
newAggVOList.add(result[0]); newAggVOList.add(result[0]);
@ -720,7 +726,7 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
if (VersionTypeEnum.AVAILABLE.equalsValue(head.getHfversiontype()) if (VersionTypeEnum.AVAILABLE.equalsValue(head.getHfversiontype())
&& !head.getCbomid().equals(headvo.getCbomid())) { && !head.getCbomid().equals(headvo.getCbomid())) {
// sdlizheng --添加独立判断--plm三方越过此校验 // sdlizheng --添加独立判断--plm三方越过此校验
if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)) { if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)|| "C029".equals(this.orgCodeFlag)) {
// AggBomVO afterVO = service.canceldefault(aggBomVO); // AggBomVO afterVO = service.canceldefault(aggBomVO);
} else { } else {
return UFBoolean.TRUE; return UFBoolean.TRUE;
@ -774,14 +780,14 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
agg.getParent().setAttributeValue("fbillstatus", Integer.valueOf(-1)); agg.getParent().setAttributeValue("fbillstatus", Integer.valueOf(-1));
agg.getParent().setAttributeValue("hfbomsource", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfbomsource", Integer.valueOf(1));
agg.getParent().setAttributeValue("hfbomcategory", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfbomcategory", Integer.valueOf(1));
if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)) { if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)|| "C029".equals(this.orgCodeFlag)) {
// sdlizheng // sdlizheng
// 1对于之前不存在的BOM新增时如果是传自由态不默认且无效走标准逻辑如果传的是审批态默认且有效2025年4月11日16点28分 start // 1对于之前不存在的BOM新增时如果是传自由态不默认且无效走标准逻辑如果传的是审批态默认且有效2025年4月11日16点28分 start
if (fbillstatus != null && "1".equals(fbillstatus.toString())) { if (fbillstatus != null && "1".equals(fbillstatus.toString())) {
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1));
agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE); agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE);
}else if(fbillstatus != null && "-1".equals(fbillstatus.toString())){ }else if(fbillstatus != null && "-1".equals(fbillstatus.toString())){
if("gaoning".equals(userCode)){ if("gaoning".equals(userCode)|| "C029".equals(this.orgCodeFlag)){
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1)); agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1));
agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE); agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE);
} }