Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using JNPF.Common.Contracts;
|
||||
using JNPF.Common.Security;
|
||||
using SqlSugar;
|
||||
|
||||
namespace Tnb.WarehouseMgr.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// 盘点任务主表
|
||||
/// </summary>
|
||||
public partial class WmsCheckstockH : BaseEntity<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// 仓库名称
|
||||
/// </summary>
|
||||
[SugarColumn(IsIgnore =true)]
|
||||
public string warehouse_name { get; set; }
|
||||
}
|
||||
@@ -370,6 +370,7 @@ namespace Tnb.WarehouseMgr
|
||||
await db.Ado.BeginTranAsync();
|
||||
|
||||
List<string> endPointIds = disTasks.Where(t => t.area_code.StartsWith("ELE", StringComparison.OrdinalIgnoreCase)).Select(t => t.endpoint_id).ToList();
|
||||
Logger.Information($"endPointIds:{string.Join(",", endPointIds)}");
|
||||
if (endPointIds?.Count > 0)
|
||||
{
|
||||
elevatorList = elevatorList.FindAll(x => endPointIds.Contains(x.point_id));
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly IVisualDevService _visualDevService;
|
||||
private readonly IRunService _runService;
|
||||
private readonly IBillRullService _billRullService;
|
||||
private readonly IDictionaryDataService _dataService;
|
||||
private static Dictionary<string, object> _carryMap = new();
|
||||
|
||||
public WmsCheckTaskService(
|
||||
@@ -51,6 +52,7 @@ namespace Tnb.WarehouseMgr
|
||||
IRunService runService,
|
||||
IBillRullService billRullService,
|
||||
IUserManager userManager,
|
||||
IDictionaryDataService dataService,
|
||||
IEventPublisher eventPublisher
|
||||
)
|
||||
{
|
||||
@@ -59,6 +61,7 @@ namespace Tnb.WarehouseMgr
|
||||
_visualDevService = visualDevService;
|
||||
_runService = runService;
|
||||
_billRullService = billRullService;
|
||||
_dataService = dataService;
|
||||
_userManager = userManager;
|
||||
|
||||
OverideFuncs.CreateAsync = Create;
|
||||
@@ -421,9 +424,17 @@ namespace Tnb.WarehouseMgr
|
||||
[HttpGet("{carryCode}")]
|
||||
public async Task<dynamic> GetCheckTaskInfo(string carryCode)
|
||||
{
|
||||
var checkTypeMap = await _dataService.GetDicByKey("CheckType");
|
||||
var checkSpeciesMap = await _dataService.GetDicByKey("CheckSpecies");
|
||||
var result = await _db.Queryable<WmsDistaskH>().InnerJoin<WmsCheckstockH>((a, b) => a.require_id == b.id)
|
||||
.Where((a, b) => a.carry_code == carryCode)
|
||||
.Select<WmsCheckstockH>()
|
||||
.InnerJoin<BasWarehouse>((a, b, c) => b.warehouse_id == c.id)
|
||||
.Where(a => a.carry_code == carryCode)
|
||||
.Select((a, b, c) => new WmsCheckstockH { warehouse_name = c.whname }, true)
|
||||
.Mapper(it =>
|
||||
{
|
||||
it.checkstock_type = checkTypeMap.ContainsKey(it.checkstock_type!) ? checkTypeMap[it.checkstock_type!]?.ToString() ?? "" : "";
|
||||
it.handle_kinds = checkTypeMap.ContainsKey(it.handle_kinds!) ? checkTypeMap[it.handle_kinds!]?.ToString() ?? "" : "";
|
||||
})
|
||||
.ToListAsync();
|
||||
return result;
|
||||
}
|
||||
@@ -569,7 +580,7 @@ namespace Tnb.WarehouseMgr
|
||||
csCode.checkstock_d_id = checkStockDMap.ContainsKey($"{csCode.carry_id}{csCode.material_id}{csCode.code_batch}") ? checkStockDMap[$"{csCode.carry_id}{csCode.material_id}{csCode.code_batch}"] : "";
|
||||
}
|
||||
//插入 盘点code表
|
||||
await _db.Insertable(checkStockCodes).ExecuteCommandAsync();
|
||||
_ = await _db.Insertable(checkStockCodes).ExecuteCommandAsync();
|
||||
var detailIds = checkStockCodes.Select(x => x.checkstock_d_id).ToList();
|
||||
var checkStockDs = await _db.Queryable<WmsCheckstockD>().Where(it => detailIds.Contains(it.id)).ToListAsync();
|
||||
foreach (var csd in checkStockDs)
|
||||
|
||||
@@ -148,7 +148,9 @@ namespace Tnb.WarehouseMgr
|
||||
org_id = _userManager.User.OrganizeId,
|
||||
startlocation_id = sPoint?.location_id!,
|
||||
startlocation_code = sPoint?.location_code!,
|
||||
startpoint_id = sPoint?.id,
|
||||
startpoint_code = sPoint?.point_code,
|
||||
endpoint_id = ePoint?.id,
|
||||
endpoint_code = ePoint?.point_code,
|
||||
endlocation_id = ePoint?.location_id!,
|
||||
endlocation_code = ePoint?.location_code!,
|
||||
|
||||
Reference in New Issue
Block a user