This commit is contained in:
alex
2023-08-15 15:19:14 +08:00
parent a6a4a1ebc2
commit 26dd70efb3
2 changed files with 7 additions and 10 deletions

View File

@@ -42,7 +42,6 @@ namespace Tnb.WarehouseMgr
private readonly IWareHouseService _wareHouseService;
private readonly IBillRullService _billRullService;
private readonly IUserManager _userManager;
private readonly ChannelWriter<NotifyMessage> _channelWriter;
public WmsPDAInbaleService(
ISqlSugarRepository<WmsCarryH> repository,
@@ -51,7 +50,7 @@ namespace Tnb.WarehouseMgr
IWareHouseService wareHouseService,
IUserManager userManager,
IBillRullService billRullService,
ChannelWriter<NotifyMessage> channelWriter)
ITaskMessageNotify taskMessageNotify):base(taskMessageNotify.Writer)
{
_db = repository.AsSugarClient();
_runService = runService;
@@ -59,7 +58,6 @@ namespace Tnb.WarehouseMgr
_wareHouseService = wareHouseService;
_userManager = userManager;
_billRullService = billRullService;
_channelWriter = channelWriter;
OverideFuncs.CreateAsync = Inbale;
}
@@ -173,9 +171,7 @@ namespace Tnb.WarehouseMgr
}
finally
{
//向队列写入消息
NotifyMessage message = new() { TaskName = nameof(IWareHouseService.GenTaskExecute) };
await _channelWriter.WriteAsync(message);
await Publish(nameof(IWareHouseService.GenTaskExecute));
}
return Task.FromResult(true);
}