产成品入库另开线程调用
This commit is contained in:
@@ -477,8 +477,13 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
|
||||
|
||||
BasFactoryConfig callErp = await _db.Queryable<BasFactoryConfig>().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.CALLERP);
|
||||
if(callErp.value=="1"){
|
||||
await _thirdApiRecordService.Send(new List<ThirdWebapiRecord> { thirdWebapiRecord }, "自动", _db);
|
||||
if(callErp.value=="1")
|
||||
{
|
||||
Thread thread = new(() =>
|
||||
{
|
||||
_thirdApiRecordService.Send(new List<ThirdWebapiRecord> { thirdWebapiRecord }, "自动", _db);
|
||||
});
|
||||
thread.Start();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -490,5 +495,10 @@ namespace Tnb.WarehouseMgr
|
||||
throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
}
|
||||
|
||||
private void Send(List<ThirdWebapiRecord> records, string send_type,ISqlSugarClient db=null)
|
||||
{
|
||||
_thirdApiRecordService.Send(new List<ThirdWebapiRecord> { thirdWebapiRecord }, "自动", _db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user