修改消息发布
This commit is contained in:
@@ -37,7 +37,7 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly IWareHouseService _warehouseService;
|
||||
private readonly IBillRullService _billRullService;
|
||||
private readonly IWmsKittingInStkService _wmsKittingInStkService;
|
||||
private readonly ChannelWriter<NotifyMessage> _channelWriter;
|
||||
|
||||
public WmsRobotCallbackService(
|
||||
IWmsCarryBindService wmsCarryBindService,
|
||||
ISqlSugarRepository<WmsCarrybindH> repository,
|
||||
@@ -45,7 +45,8 @@ namespace Tnb.WarehouseMgr
|
||||
IWareHouseService warehouseService,
|
||||
IBillRullService billRullService,
|
||||
IWmsKittingInStkService wmsKittingInStkService,
|
||||
ChannelWriter<NotifyMessage> channelWriter)
|
||||
ITaskMessageNotify taskMessageNotify
|
||||
) : base(taskMessageNotify.Writer)
|
||||
{
|
||||
_wmsCarryBindService = wmsCarryBindService;
|
||||
_db = repository.AsSugarClient();
|
||||
@@ -53,7 +54,6 @@ namespace Tnb.WarehouseMgr
|
||||
_warehouseService = warehouseService;
|
||||
_billRullService = billRullService;
|
||||
_wmsKittingInStkService = wmsKittingInStkService;
|
||||
_channelWriter = channelWriter;
|
||||
}
|
||||
/// <summary>
|
||||
/// 机器人完成任务后回调接口
|
||||
@@ -84,7 +84,7 @@ namespace Tnb.WarehouseMgr
|
||||
carry.carry_status = ((int)EnumCarryStatus.齐套).ToString();
|
||||
await _db.Updateable(carry).UpdateColumns(it => new { it.collocation_scheme_id, it.collocation_scheme_code, it.carry_status }).ExecuteCommandAsync();
|
||||
|
||||
|
||||
|
||||
if (input.isLast)
|
||||
{
|
||||
var kittingout = await _db.Queryable<WmsKittingoutH>().FirstAsync(it => it.collocation_scheme_id == carry.collocation_scheme_id && it.status == WmsWareHouseConst.BILLSTATUS_CALLED_ID);
|
||||
@@ -145,8 +145,7 @@ namespace Tnb.WarehouseMgr
|
||||
genPreTaskAfterUpInput.CarryIds = preTasks.Select(x => x.carry_id).ToList();
|
||||
genPreTaskAfterUpInput.LocationIds = new List<string> { carry.location_id! };
|
||||
await _warehouseService.GenInStockTaskHandleAfter(genPreTaskAfterUpInput, it => new WmsCarryH { is_lock = 1 }, it => new BasLocation { is_lock = 1 });
|
||||
NotifyMessage message = new() { TaskName = nameof(IWareHouseService.GenTaskExecute) };
|
||||
await _channelWriter.WriteAsync(message);
|
||||
await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user