BOM代码同步

This commit is contained in:
mzr 2025-09-21 18:21:28 +08:00
parent a435c636e9
commit d9d35919a7
1 changed files with 20 additions and 8 deletions

View File

@ -39,6 +39,7 @@ import nc.vo.bd.material.MaterialVO;
import nc.vo.bd.material.MaterialVersionVO; import nc.vo.bd.material.MaterialVersionVO;
import nc.vo.bd.material.plan.MaterialPlanVO; import nc.vo.bd.material.plan.MaterialPlanVO;
import nc.vo.bd.vermatch.entity.BomMatchRtVO; import nc.vo.bd.vermatch.entity.BomMatchRtVO;
import nc.vo.org.OrgVO;
import nc.vo.pmpub.project.ProjectHeadVO; import nc.vo.pmpub.project.ProjectHeadVO;
import nc.vo.pub.BusinessException; import nc.vo.pub.BusinessException;
import nc.vo.pub.CircularlyAccessibleValueObject; import nc.vo.pub.CircularlyAccessibleValueObject;
@ -926,12 +927,23 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
} }
Object fbillstatus = agg.getParent().getAttributeValue("fbillstatus"); Object fbillstatus = agg.getParent().getAttributeValue("fbillstatus");
if (MMValueCheck.isEmpty(agg.getParent().getAttributeValue("cbomid"))) { if (MMValueCheck.isEmpty(agg.getParent().getAttributeValue("cbomid"))) {
BomVO headVO = (BomVO) agg.getParent();
UFBoolean hbdefault = headVO.getHbdefault()==null?UFBoolean.FALSE:headVO.getHbdefault();
agg.getParent().setAttributeValue("fbomtype", Integer.valueOf(1)); agg.getParent().setAttributeValue("fbomtype", Integer.valueOf(1));
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(2)); agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(2));
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) || "C029".equals(this.orgCodeFlag) || "hgqwms".equals(userCode)) { //根据传过来的是否默认进行赋值
if("C030".equals(this.orgCodeFlag)) {
//箱变根据传过来的是否默认对bom进行默认操作
if(hbdefault.booleanValue()) {
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1));
agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE);
}
}
if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode) || "C029".equals(this.orgCodeFlag)|| "C025".equals(this.orgCodeFlag)|| "hgqwms".equals(userCode)) {
// 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())) {
@ -1111,13 +1123,13 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
} }
handleEvent(items); handleEvent(items);
//
// IHttpPostOtherSys mesUtils = NCLocator.getInstance().lookup(IHttpPostOtherSys.class); IHttpPostOtherSys mesUtils = NCLocator.getInstance().lookup(IHttpPostOtherSys.class);
//
// String code = mesUtils.transferCodeByPk(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pk_org); String code = mesUtils.transferCodeByPk(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pk_org);
// if(mesUtils.checkIfIncludeOrg(code)) { if(mesUtils.checkIfIncludeOrg(code)) {
// this.handleEventTwo(agg); this.handleEventTwo(agg);
// } }
} }
private void replMaterialOidFill(BomReplVO replVO) { private void replMaterialOidFill(BomReplVO replVO) {