将依赖事件总线的发布订阅模式,改为直接调用的形式

This commit is contained in:
yang.lee
2023-11-02 15:58:15 +08:00
parent 02e4dbb45a
commit b13574530d
32 changed files with 226 additions and 154 deletions

View File

@@ -55,7 +55,7 @@ namespace Tnb.WarehouseMgr
_warehouseService = warehouseService;
_billRullService = billRullService;
_wmsKittingInStkService = wmsKittingInStkService;
EventPublisher = publisher;
}
/// <summary>
/// 机器人完成任务后回调接口
@@ -92,6 +92,11 @@ namespace Tnb.WarehouseMgr
var kittingout = await _db.Queryable<WmsKittingoutH>().FirstAsync(it => it.collocation_scheme_id == carry.collocation_scheme_id && it.status == WmsWareHouseConst.BILLSTATUS_CALLED_ID);
if (kittingout != null)
{
await Publish(nameof(IWmskittingOutService.KittingOutByAdd));
await Publish(nameof(IWmskittingOutService.KittingOutByIsToBeShipped));
visualDevModelCrInput.data = new Dictionary<string, object>();
visualDevModelCrInput.data[nameof(InStockStrategyQuery.warehouse_id)] = kittingout.warehouse_id;
visualDevModelCrInput.data[nameof(WmsKittingInstock.carry_id)] = input.carry_id;
@@ -147,7 +152,8 @@ 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 });
await Publish(nameof(IWareHouseService.GenTaskExecute));
await InvokeGenPretaskExcute();
}
}
else