U8接口调整,改为异步,响应时间5秒

This commit is contained in:
2025-06-22 09:19:56 +08:00
parent 0eb0e1b30e
commit 3858c7af34
4 changed files with 118 additions and 28 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Data;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Infrastructure.Attribute;
using Mapster;
using SqlSugar;
@@ -622,12 +623,19 @@ namespace ZR.Service.mes.wms
}
string urlBase = "http://gam.com.cn:8054/";
ERP_WMS_interactiveService _eRP_WMS_InteractiveService = new();
ERP_WMS_interactiveModelResult u8ErpResult = _eRP_WMS_InteractiveService.Outbounded(
urlBase,
u8PackageList
);
//TODO 对U8返回结果进行解析
logger.Warn(u8ErpResult);
// 后台执行不阻塞主线程
_ = Task.Run(async () => {
var u8ErpResult = await _eRP_WMS_InteractiveService.OutboundedAsync(urlBase, u8PackageList);
// 处理结果...
//TODO 对U8返回结果进行解析
logger.Warn(u8ErpResult);
});
/*
*ERP_WMS_interactiveModelResult u8ErpResult = _eRP_WMS_InteractiveService.Outbounded(
urlBase,
u8PackageList
);
logger.Warn(u8ErpResult);*/
Context.Ado.CommitTran();
return (sum_delete, sum_insert);
}