1
This commit is contained in:
@@ -31,23 +31,16 @@ namespace Tnb.WarehouseMgr
|
||||
var bizTypeId = serviceType.GetCustomAttribute<ServiceModuleAttribute>()?.BizTypeId;
|
||||
if (!bizTypeId.IsNullOrEmpty())
|
||||
{
|
||||
_serviceMap[bizTypeId!] = (BaseWareHouseService)Activator.CreateInstance(serviceType)!;
|
||||
_serviceMap[bizTypeId!] = (BaseWareHouseService)App.GetService(serviceType)!;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected Task this[WareHouseUpInput input]
|
||||
protected async Task DoUpdate(WareHouseUpInput input)
|
||||
{
|
||||
set
|
||||
if (_serviceMap.ContainsKey(input.bizTypeId))
|
||||
{
|
||||
if (_serviceMap.ContainsKey(input.bizTypeId))
|
||||
{
|
||||
_serviceMap[input.bizTypeId].ModifyAsync(input);
|
||||
}
|
||||
}
|
||||
get
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
await _serviceMap[input.bizTypeId].ModifyAsync(input);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -428,11 +428,11 @@ namespace Tnb.WarehouseMgr
|
||||
var upInput = new WareHouseUpInput { bizTypeId = dt.biz_type, requireId = dt.require_id };
|
||||
if (dt.is_chain == 0)
|
||||
{
|
||||
await base[upInput];
|
||||
await DoUpdate(upInput);
|
||||
}
|
||||
else if (dt.is_chain == 1 && dt.chain_type == "3")
|
||||
{
|
||||
await base[upInput];
|
||||
await DoUpdate(upInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly IWareHouseService _wareHouseService;
|
||||
private readonly IBillRullService _billRullService;
|
||||
private readonly IUserManager _userManager;
|
||||
|
||||
|
||||
public WmsCarryMoveInStockService(
|
||||
ISqlSugarRepository<WmsCarryH> repository,
|
||||
IRunService runService,
|
||||
|
||||
Reference in New Issue
Block a user