carry查询 新增物料名称
This commit is contained in:
@@ -177,8 +177,10 @@
|
|||||||
/// 供应商
|
/// 供应商
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string supplier_id { get; set; }
|
public string supplier_id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料名称
|
||||||
|
/// </summary>
|
||||||
|
public string material_name { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -741,10 +741,10 @@ namespace Tnb.WarehouseMgr
|
|||||||
_ = await _db.Updateable<WmsPretaskH>().SetColumns(it => new WmsPretaskH { status = WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID }).Where(it => preTaskIds.Contains(it.id)).ExecuteCommandAsync();
|
_ = await _db.Updateable<WmsPretaskH>().SetColumns(it => new WmsPretaskH { status = WmsWareHouseConst.PRETASK_BILL_STATUS_COMPLE_ID }).Where(it => preTaskIds.Contains(it.id)).ExecuteCommandAsync();
|
||||||
|
|
||||||
//更新电梯任务数量
|
//更新电梯任务数量
|
||||||
/* var eles = await _db.Queryable<WmsElevatorH>().Where(it => disTasks.Select(x => x.area_code).Contains(it.area_code)).ToListAsync();
|
var eles = await _db.Queryable<WmsElevatorH>().Where(it => disTasks.Select(x => x.area_code).Contains(it.area_code)).ToListAsync();
|
||||||
if (eles?.Count > 0)
|
if (eles?.Count > 0)
|
||||||
await _db.Updateable(eles).ReSetValue(it => it.task_nums--).ExecuteCommandAsync();
|
await _db.Updateable(eles).ReSetValue(it => it.task_nums--).ExecuteCommandAsync();
|
||||||
*/
|
|
||||||
//更新载具,锁定状态为未锁定,更新载具的库位当前任务的目标库位
|
//更新载具,锁定状态为未锁定,更新载具的库位当前任务的目标库位
|
||||||
Logger.Information("更新载具及库位准备中.....");
|
Logger.Information("更新载具及库位准备中.....");
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ using JNPF.Common.Extension;
|
|||||||
using JNPF.FriendlyException;
|
using JNPF.FriendlyException;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Senparc.Weixin.MP.AdvancedAPIs.Semantic;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Tnb.BasicData.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities.Consts;
|
using Tnb.WarehouseMgr.Entities.Consts;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
@@ -15,6 +17,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
public class WmsCarryQueryService : BaseWareHouseService, IWmsCarryQueryService
|
public class WmsCarryQueryService : BaseWareHouseService, IWmsCarryQueryService
|
||||||
{
|
{
|
||||||
private readonly ISqlSugarClient _db;
|
private readonly ISqlSugarClient _db;
|
||||||
|
private static Dictionary<string, object> s_materialMap = new();
|
||||||
public WmsCarryQueryService(ISqlSugarRepository<WmsCarryH> repository)
|
public WmsCarryQueryService(ISqlSugarRepository<WmsCarryH> repository)
|
||||||
{
|
{
|
||||||
_db = repository.AsSugarClient();
|
_db = repository.AsSugarClient();
|
||||||
@@ -65,6 +68,11 @@ namespace Tnb.WarehouseMgr
|
|||||||
throw new ArgumentNullException("input");
|
throw new ArgumentNullException("input");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (s_materialMap.Count < 1)
|
||||||
|
{
|
||||||
|
s_materialMap = await _db.Queryable<BasMaterial>().ToDictionaryAsync(x => x.id, x => x.name);
|
||||||
|
}
|
||||||
|
|
||||||
CarryQueryOutput data = new();
|
CarryQueryOutput data = new();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -96,9 +104,14 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
foreach ((string _, object v) in mCarryIdDic)
|
foreach ((string mCarryId, object v) in mCarryIdDic)
|
||||||
{
|
{
|
||||||
carryCodes[i].member_carrycode = v?.ToString() ?? string.Empty;
|
carryCodes[i].member_carrycode = v?.ToString() ?? string.Empty;
|
||||||
|
var carryCode = carryCodes.Find(x => x.carry_id == mCarryId);
|
||||||
|
if (carryCode != null)
|
||||||
|
{
|
||||||
|
carryCodes[i].material_name = s_materialMap.ContainsKey(carryCode.material_id) ? s_materialMap[carryCode.material_id]?.ToString() ?? "" : "";
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user