Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -123,4 +123,8 @@ public partial class BasLocation : BaseEntity<string>
|
|||||||
/// 列
|
/// 列
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int loc_column { get; set; }
|
public int loc_column { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否超配(1:不超配 2:超配)
|
||||||
|
/// </summary>
|
||||||
|
public string is_overmatch { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
[Route("api/[area]/[controller]/[action]")]
|
[Route("api/[area]/[controller]/[action]")]
|
||||||
public class BaseWareHouseService : IOverideVisualDevService, IDynamicApiController, ITransient
|
public class BaseWareHouseService : IOverideVisualDevService, IDynamicApiController, ITransient
|
||||||
{
|
{
|
||||||
private static Lazy<Dictionary<string, IWHStorageService>> _stroageMap;
|
private static Lazy<Dictionary<string, IWHStorageService>> _stroageMapLazy;
|
||||||
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
||||||
private readonly ChannelWriter<NotifyMessage> _channelWriter;
|
private readonly ChannelWriter<NotifyMessage> _channelWriter;
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
static BaseWareHouseService()
|
static BaseWareHouseService()
|
||||||
{
|
{
|
||||||
_stroageMap = new Lazy<Dictionary<string, IWHStorageService>>(() =>
|
_stroageMapLazy = new Lazy<Dictionary<string, IWHStorageService>>(() =>
|
||||||
{
|
{
|
||||||
Dictionary<string, IWHStorageService> map = new(StringComparer.OrdinalIgnoreCase);
|
Dictionary<string, IWHStorageService> map = new(StringComparer.OrdinalIgnoreCase);
|
||||||
var serviceTypes = App.EffectiveTypes.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(IWHStorageService).IsAssignableFrom(u)).ToList();
|
var serviceTypes = App.EffectiveTypes.Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(IWHStorageService).IsAssignableFrom(u)).ToList();
|
||||||
@@ -140,9 +140,9 @@ namespace Tnb.WarehouseMgr
|
|||||||
[NonAction]
|
[NonAction]
|
||||||
protected async Task DoUpdate(WareHouseUpInput input)
|
protected async Task DoUpdate(WareHouseUpInput input)
|
||||||
{
|
{
|
||||||
if (_stroageMap.Value.ContainsKey(input.loginType))
|
if (_stroageMapLazy.Value.ContainsKey(input.loginType))
|
||||||
{
|
{
|
||||||
await _stroageMap.Value[input.loginType].Do(input);
|
await _stroageMapLazy.Value[input.loginType].Do(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[NonAction]
|
[NonAction]
|
||||||
|
|||||||
@@ -96,7 +96,20 @@ namespace Tnb.WarehouseMgr
|
|||||||
x.modify_id = null;
|
x.modify_id = null;
|
||||||
x.modify_time = null;
|
x.modify_time = null;
|
||||||
});
|
});
|
||||||
row = await _db.Insertable(carrys).ExecuteCommandAsync();
|
if (carrys.Count > 1000)
|
||||||
|
{
|
||||||
|
await _db.Fastest<WmsCarryH>().BulkCopyAsync(carrys);
|
||||||
|
}
|
||||||
|
else if (carrys.Count > 400)
|
||||||
|
{
|
||||||
|
_db.Utilities.PageEach(carrys, 100, async pageList => {
|
||||||
|
await _db.Insertable(pageList).ExecuteCommandAsync();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row = await _db.Insertable(carrys).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -800,7 +800,7 @@ namespace JNPF.VisualDev
|
|||||||
var overideSvc = OverideVisualDevManager.GetOrDefault(modelId);
|
var overideSvc = OverideVisualDevManager.GetOrDefault(modelId);
|
||||||
if (overideSvc != null && overideSvc.OverideFuncs.ImportDataAsync != null)
|
if (overideSvc != null && overideSvc.OverideFuncs.ImportDataAsync != null)
|
||||||
{
|
{
|
||||||
await overideSvc.OverideFuncs.ImportDataAsync(list);
|
result = await overideSvc.OverideFuncs.ImportDataAsync(list);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user