APIBOM 新增: 添加 MES 用户对 BOM 版本和默认的特殊处理逻辑
- 新增 MES 用户判断逻辑,允许 MES 用户在特定条件下设置 BOM 默认版本 - 在数据补充阶段添加 MES 用户的特殊处理方法
This commit is contained in:
parent
27017dcd41
commit
27225bf8f4
|
@ -58,6 +58,8 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
||||||
|
|
||||||
private static final IHttpPostOtherSys HTTP_POST_OTHER_SYS = NCLocator.getInstance().lookup(IHttpPostOtherSys.class);
|
private static final IHttpPostOtherSys HTTP_POST_OTHER_SYS = NCLocator.getInstance().lookup(IHttpPostOtherSys.class);
|
||||||
|
|
||||||
|
public static final String MESUSERCODE = "MES";
|
||||||
|
|
||||||
private static String HEADTABLE = "bd_bom";
|
private static String HEADTABLE = "bd_bom";
|
||||||
|
|
||||||
private static String BODYTABLE = "bd_bom_b";
|
private static String BODYTABLE = "bd_bom_b";
|
||||||
|
@ -788,6 +790,8 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
||||||
// sdlizheng --添加独立判断--plm三方越过此校验
|
// sdlizheng --添加独立判断--plm三方越过此校验
|
||||||
if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)|| "C029".equals(this.orgCodeFlag)) {
|
if ("gaoning".equals(userCode) || "dlkgsrm".equals(userCode)|| "C029".equals(this.orgCodeFlag)) {
|
||||||
// AggBomVO afterVO = service.canceldefault(aggBomVO);
|
// AggBomVO afterVO = service.canceldefault(aggBomVO);
|
||||||
|
} else if (MESUSERCODE.equals(userCode)) {
|
||||||
|
//2025-6-20 添加MES用户判断
|
||||||
} else {
|
} else {
|
||||||
return UFBoolean.TRUE;
|
return UFBoolean.TRUE;
|
||||||
}
|
}
|
||||||
|
@ -811,6 +815,9 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
||||||
private void dataSupplement(AggBomVO agg, String userCode) {
|
private void dataSupplement(AggBomVO agg, String userCode) {
|
||||||
orgSupplement(agg, userCode);
|
orgSupplement(agg, userCode);
|
||||||
|
|
||||||
|
// 2025年6月20日 - 处理MES用户的hbdefault(默认)字段设置
|
||||||
|
handleMesUserDefaultSetting(agg, userCode);
|
||||||
|
|
||||||
versionTypeSupplement(agg);
|
versionTypeSupplement(agg);
|
||||||
|
|
||||||
materialidSupplement(agg);
|
materialidSupplement(agg);
|
||||||
|
@ -1663,4 +1670,32 @@ public class APIBomBusinessServiceImpl implements IAPIBomBusinessService {
|
||||||
throw new BusinessException("计算BOM版本号异常:" + e.getMessage());
|
throw new BusinessException("计算BOM版本号异常:" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理MES用户的hbdefault字段设置逻辑
|
||||||
|
* 2025年6月20日新增 - 专门用于MES用户的处理
|
||||||
|
* 仿照orgSupplement方法编写
|
||||||
|
* @auther 毛磊
|
||||||
|
* @param agg AggBomVO对象
|
||||||
|
* @param userCode 用户代码
|
||||||
|
*/
|
||||||
|
private void handleMesUserDefaultSetting(AggBomVO agg, String userCode) {
|
||||||
|
// 仅针对MES用户进行处理
|
||||||
|
if (!MESUSERCODE.equals(userCode)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object fbillstatus = agg.getParent().getAttributeValue("fbillstatus");
|
||||||
|
|
||||||
|
// MES用户新增时,按照与gaoning和dlkgsrm相同的逻辑处理hbdefault字段
|
||||||
|
if (fbillstatus != null && "1".equals(fbillstatus.toString())) {
|
||||||
|
// 审批态时:设置为默认且有效
|
||||||
|
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1));
|
||||||
|
agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE);
|
||||||
|
} else if (fbillstatus != null && "-1".equals(fbillstatus.toString())) {
|
||||||
|
// 自由态时:设置为默认且有效(与gaoning用户逻辑一致)
|
||||||
|
agg.getParent().setAttributeValue("hfversiontype", Integer.valueOf(1));
|
||||||
|
agg.getParent().setAttributeValue("hbdefault", UFBoolean.TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue