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); + } } }