From b63158e9ffa55469bdb29f574636825e97891a23 Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Fri, 27 Sep 2024 10:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=88=90=E5=93=81=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=8F=A6=E5=BC=80=E7=BA=BF=E7=A8=8B=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.WarehouseMgr/WmsPrdInstockHService.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs index 1500fc20..0f0666ea 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPrdInstockHService.cs @@ -477,8 +477,13 @@ namespace Tnb.WarehouseMgr await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync(); BasFactoryConfig callErp = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP); - if(callErp.value=="1"){ - await _thirdApiRecordService.Send(new List { thirdWebapiRecord }, "自动", _db); + if(callErp.value=="1") + { + Thread thread = new(() => + { + _thirdApiRecordService.Send(new List { thirdWebapiRecord }, "自动", _db); + }); + thread.Start(); } } @@ -490,5 +495,10 @@ namespace Tnb.WarehouseMgr throw Oops.Oh(ErrorCode.COM1001); } } + + private void Send(List records, string send_type,ISqlSugarClient db=null) + { + _thirdApiRecordService.Send(new List { thirdWebapiRecord }, "自动", _db); + } } }