1
This commit is contained in:
@@ -18,9 +18,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
public class Dp
|
public class Dp
|
||||||
{
|
{
|
||||||
private HashSet<string> set = new HashSet<string>();
|
private HashSet<string> set = new HashSet<string>();
|
||||||
private const int Max = int.MaxValue;
|
|
||||||
private int Min = int.MaxValue;
|
|
||||||
private int Deep = 0;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 动态规划函数
|
/// 动态规划函数
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ namespace Tnb.WarehouseMgr
|
|||||||
dicMaterial = await _db.Queryable<BasMaterial>().ToDictionaryAsync(x => x.id, x => x.name);
|
dicMaterial = await _db.Queryable<BasMaterial>().ToDictionaryAsync(x => x.id, x => x.name);
|
||||||
}
|
}
|
||||||
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
||||||
List<CarryCodeDetailOutput> items = new();
|
|
||||||
List<string> carryMIds = new();
|
List<string> carryMIds = new();
|
||||||
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID)
|
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID)
|
||||||
{
|
{
|
||||||
@@ -50,11 +49,10 @@ namespace Tnb.WarehouseMgr
|
|||||||
carryMIds = carryDs.Select(x => x.membercarry_id).ToList();
|
carryMIds = carryDs.Select(x => x.membercarry_id).ToList();
|
||||||
}
|
}
|
||||||
Expression<Func<WmsCarryCode, bool>> whereExp = carryMIds?.Count > 0 ? a => carryMIds.Contains(a.carry_id) : a => a.carry_id == carryId;
|
Expression<Func<WmsCarryCode, bool>> whereExp = carryMIds?.Count > 0 ? a => carryMIds.Contains(a.carry_id) : a => a.carry_id == carryId;
|
||||||
items = await _db.Queryable<WmsCarryCode>().Where(whereExp)
|
var items = await _db.Queryable<WmsCarryCode>().Where(whereExp)
|
||||||
.Select<CarryCodeDetailOutput>()
|
.Select<CarryCodeDetailOutput>()
|
||||||
.Mapper(it => it.material_name = (it.material_id != null && dicMaterial.ContainsKey(it.material_id)) ? dicMaterial[it.material_id].ToString() : "")
|
.Mapper(it => it.material_name = (it.material_id != null && dicMaterial.ContainsKey(it.material_id)) ? dicMaterial[it.material_id].ToString() : "")
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
return items ?? Enumerable.Empty<dynamic>();
|
return items ?? Enumerable.Empty<dynamic>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user