mmpac: 增加测试用户不同步 MES 系统的逻辑

- 在调用 MES 系统接口前增加用户排除检查
- 如果当前用户被配置为不同步,则跳过 MES 系统同步- 此修改旨在方便测试用户进行测试,而不影响生产环境
This commit is contained in:
maolei 2025-06-03 17:12:55 +08:00
parent 4f5d008934
commit a6bac28c63
1 changed files with 6 additions and 0 deletions

View File

@ -96,6 +96,12 @@ public class AfterApproveRuleSyncMes implements IRule<PMOAggVO> {
*/
private void callMesWithCustomErrorHandling(String apiPath, JSONObject requestPayload, String orderNo, String itemRow) throws BusinessException {
String responseString = null;
if (HTTP_POST_OTHER_SYS.checkIfExcludeUser()) {
obmlog.debug("当前用户为测试用户被配置为不同步跳过同步MES系统");
return;
}
try {
responseString = HTTP_POST_OTHER_SYS.callMes(apiPath, requestPayload);
obmlog.info("生产订单 " + orderNo + "" + itemRow + " MES系统原始返回: " + responseString);