feat(库存管理): 添加隐藏零库存功能并优化查询排序
在库存DTO中添加IsHideZero属性用于过滤零库存 服务层增加对零库存的过滤条件及按批次号和位置码排序
This commit is contained in:
@@ -15,6 +15,8 @@ namespace DOAN.Model.BZFM.Dto
|
||||
|
||||
public string SupplierName { get; set; }
|
||||
public string BatchNo { get; set; }
|
||||
|
||||
public bool IsHideZero { get; set; }
|
||||
}
|
||||
public class MmInventoryRevokeDto
|
||||
{
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace DOAN.Service.BZFM
|
||||
.Where(sub=>sub.BatchNo == it.BatchNo)
|
||||
.Select(sub => sub.StoveCode)
|
||||
},true)
|
||||
.OrderBy(it => it.BatchNo)
|
||||
.OrderBy(it => it.LocationCode)
|
||||
.ToPage(parm);
|
||||
|
||||
return response;
|
||||
@@ -109,6 +111,10 @@ namespace DOAN.Service.BZFM
|
||||
!string.IsNullOrEmpty(parm.SupplierName),
|
||||
m => m.SupplierName.Contains(parm.SupplierName)
|
||||
)
|
||||
.AndIF(
|
||||
parm.IsHideZero,
|
||||
m => m.CurrentQty > 0
|
||||
)
|
||||
.AndIF(!string.IsNullOrEmpty(parm.BatchNo), m => m.BatchNo.Contains(parm.BatchNo));
|
||||
|
||||
return predicate;
|
||||
|
||||
Reference in New Issue
Block a user