feat(库存管理): 添加隐藏零库存功能并优化查询排序

在库存DTO中添加IsHideZero属性用于过滤零库存
服务层增加对零库存的过滤条件及按批次号和位置码排序
This commit is contained in:
2026-03-07 17:44:06 +08:00
parent cd03b4d5dc
commit b4e1f470f5
2 changed files with 8 additions and 0 deletions

View File

@@ -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
{

View File

@@ -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;