This commit is contained in:
alex
2023-08-15 14:27:10 +08:00
parent e09251ef76
commit 2f3cf868d7
10 changed files with 88 additions and 24 deletions

View File

@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Channels;
using System.Threading.Tasks;
using JNPF.Common.Core.Manager;
using JNPF.Common.Dtos.VisualDev;
@@ -21,6 +22,7 @@ using Tnb.WarehouseMgr.Entities;
using Tnb.WarehouseMgr.Entities.Attributes;
using Tnb.WarehouseMgr.Entities.Consts;
using Tnb.WarehouseMgr.Entities.Dto;
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
using Tnb.WarehouseMgr.Interfaces;
namespace Tnb.WarehouseMgr
@@ -39,6 +41,7 @@ namespace Tnb.WarehouseMgr
private readonly IWareHouseService _wareHouseService;
private readonly IBillRullService _billRullService;
private readonly IUserManager _userManager;
private readonly ChannelWriter<NotifyMessage> _channelWriter;
public WmsCarryMoveInStockService(
@@ -47,7 +50,9 @@ namespace Tnb.WarehouseMgr
IVisualDevService visualDevService,
IWareHouseService wareHouseService,
IUserManager userManager,
IBillRullService billRullService)
IBillRullService billRullService,
ITaskMessageNotify taskMessageNotify
) : base(taskMessageNotify.Writer)
{
_db = repository.AsSugarClient();
_runService = runService;
@@ -55,6 +60,7 @@ namespace Tnb.WarehouseMgr
_wareHouseService = wareHouseService;
_userManager = userManager;
_billRullService = billRullService;
OverideFuncs.CreateAsync = CarryMoveIn;
}
@@ -167,6 +173,11 @@ namespace Tnb.WarehouseMgr
await _db.Ado.RollbackTranAsync();
throw;
}
finally
{
//向队列写入消息
await Publish(nameof(IWareHouseService.GenTaskExecute));
}
return Task.FromResult(true);
}