修改 盘点任务代码
This commit is contained in:
@@ -129,7 +129,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
}
|
||||
break;
|
||||
case EnumCheckType.批次盘点:
|
||||
case EnumCheckType.区域盘点:
|
||||
{
|
||||
if (areaIds?.Length > 0)
|
||||
{
|
||||
@@ -341,6 +341,11 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
Expression<Func<BasLocation, WmsCarryCode, WmsCarryH, bool>> filterExp = (a, b, c) => false;
|
||||
|
||||
Expression<Func<BasLocation, WmsCarryCode, WmsCarryH, bool>> defaultFilterExp = (a, b, c) => a.wh_id == input.warehouse_id
|
||||
&& a.is_type == ((int)EnumLocationType.存储库位).ToString()
|
||||
&& c.is_lock == 0;
|
||||
|
||||
switch (input.CheckType)
|
||||
{
|
||||
case EnumCheckType.全库盘点:
|
||||
@@ -354,10 +359,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
if (!input.material_id.IsNullOrWhiteSpace())
|
||||
{
|
||||
filterExp = (a, b, c) => a.wh_id == input.warehouse_id
|
||||
&& b.material_id == input.material_id
|
||||
&& a.is_type == ((int)EnumLocationType.存储库位).ToString()
|
||||
&& c.is_lock == 0;
|
||||
filterExp = defaultFilterExp.And((a, b, c) => b.material_id == input.material_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -365,10 +367,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
if (input.regionIds?.Count > 0)
|
||||
{
|
||||
filterExp = (a, b, c) => a.wh_id == input.warehouse_id
|
||||
&& input.regionIds.Contains(a.region_id)
|
||||
&& a.is_type == ((int)EnumLocationType.存储库位).ToString()
|
||||
&& c.is_lock == 0;
|
||||
filterExp = defaultFilterExp.And((a, b, c) => input.regionIds.Contains(a.region_id));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user