调整齐套出库,拼接查询表达式代码
This commit is contained in:
@@ -368,16 +368,17 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
List<WmsCarryMat> carryMats = new();
|
||||
List<WmsCarryCode> carryCodes = new();
|
||||
var whereExp = Expressionable.Create<WmsCarryH, WmsCarryCode, BasLocation>()
|
||||
.And((a, b, c) => a.is_lock == 0)
|
||||
.And((a, b, c) => !string.IsNullOrEmpty(a.location_id))
|
||||
.And((a, b, c) => a.status == (int)EnumCarryStatus.占用)
|
||||
.And((a, b, c) => c.is_type == ((int)EnumLocationType.存储库位).ToString());
|
||||
|
||||
|
||||
foreach (var os in outStockDList)
|
||||
{
|
||||
whereExp.And((a, b, c) => b.material_id == os.material_id)
|
||||
.AndIF(!string.IsNullOrEmpty(os.code_batch), (a, b, c) => b.code_batch == os.code_batch);
|
||||
var whereExp = Expressionable.Create<WmsCarryH, WmsCarryCode, BasLocation>()
|
||||
.And((a, b, c) => a.is_lock == 0)
|
||||
.And((a, b, c) => !string.IsNullOrEmpty(a.location_id))
|
||||
.And((a, b, c) => a.status == (int)EnumCarryStatus.占用)
|
||||
.And((a, b, c) => c.is_type == ((int)EnumLocationType.存储库位).ToString())
|
||||
.And((a, b, c) => b.material_id == os.material_id)
|
||||
.AndIF(!string.IsNullOrEmpty(os.code_batch), (a, b, c) => b.code_batch == os.code_batch);
|
||||
|
||||
var carryCodesPart = await _db.Queryable<WmsCarryH>().InnerJoin<WmsCarryCode>((a, b) => a.id == b.carry_id).InnerJoin<BasLocation>((a, b, c) => a.location_id == c.id)
|
||||
.Where(whereExp.ToExpression())
|
||||
|
||||
Reference in New Issue
Block a user