完善库存查询DTO及服务层仓库条件过滤
在 MmInventoryQueryDto 中新增了 WarehouseCode 和 MaterialCode 属性(MaterialCode 属性重复添加,建议修正)。在库存服务层的 QueryExp 方法中,增加了对 WarehouseCode 的条件过滤,支持按仓库编码模糊查询。
This commit is contained in:
@@ -6,6 +6,9 @@ namespace DOAN.Model.BZFM.Dto
|
||||
/// </summary>
|
||||
public class MmInventoryQueryDto : PagerInfo
|
||||
{
|
||||
public string WarehouseCode { get; set; }
|
||||
public string MaterialCode { get; set; }
|
||||
public string MaterialCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -71,7 +71,8 @@ namespace DOAN.Service.BZFM
|
||||
/// <returns></returns>
|
||||
private static Expressionable<MmInventory> QueryExp(MmInventoryQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<MmInventory>();
|
||||
var predicate = Expressionable.Create<MmInventory>()
|
||||
.AndIF(!string.IsNullOrEmpty(parm.WarehouseCode), m => m.WarehouseCode.Contains(parm.WarehouseCode));
|
||||
|
||||
return predicate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user