与任务执行,新增信号量锁,解决并发环境下数据的一致性问题
This commit is contained in:
@@ -17,7 +17,9 @@ using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Spire.Doc.Formatting;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
@@ -38,7 +40,7 @@ namespace Tnb.WarehouseMgr
|
||||
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID)]
|
||||
[ServiceModule(BizTypeId)]
|
||||
|
||||
public class WmsEmptyInstockService : BaseWareHouseService, IWmsEmptyInstockService
|
||||
public class WmsEmptyInstockService : BaseWareHouseService<WmsEmptyInstockService>, IWmsEmptyInstockService
|
||||
{
|
||||
private const string BizTypeId = "26121986416677";
|
||||
private readonly ISqlSugarClient _db;
|
||||
@@ -64,7 +66,7 @@ namespace Tnb.WarehouseMgr
|
||||
_wareHouseService = wareHouseService;
|
||||
_userManager = userManager;
|
||||
_billRullService = billRullService;
|
||||
|
||||
|
||||
OverideFuncs.CreateAsync = WmsEmptyIn;
|
||||
}
|
||||
private async Task<dynamic> WmsEmptyIn(VisualDevModelDataCrInput input)
|
||||
@@ -189,6 +191,7 @@ namespace Tnb.WarehouseMgr
|
||||
finally
|
||||
{
|
||||
//向队列写入消息
|
||||
Logger.Information("调用预任务生成");
|
||||
await InvokeGenPretaskExcute();
|
||||
}
|
||||
return Task.FromResult(true);
|
||||
|
||||
Reference in New Issue
Block a user