1
huangxiaoqiang
2025-11-10 8f7e6826d51a25c7b368c210dbb321d423d24a85
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs
@@ -98,6 +98,7 @@
        Expression<Func<DtStockInfo, bool>> floor = null;
        Expression<Func<DtStockInfo, bool>> areaId = null;
        Expression<Func<DtStockInfo, bool>> materielCode = null;
        Expression<Func<DtStockInfo, bool>> materielName = null;
        foreach (var item in searchParametersList)
        {
            if (item.Name.Contains("locationStatus"))
@@ -116,6 +117,10 @@
            {
                materielCode = x => x.StockInfoDetails.Any(d => d.MaterielCode == item.Value);
            }
            else if (item.Name.Contains("materielName"))
            {
                materielName = x => x.StockInfoDetails.Any(d => d.MaterielName == item.Value);
            }
        }
        //.IncludesAllFirstLayer()
        var data = BaseDal.Db.Queryable<DtStockInfo>()
@@ -126,6 +131,7 @@
            .WhereIF(floor != null, floor)
            .WhereIF(areaId != null, areaId)
            .WhereIF(materielCode != null, materielCode)
            .WhereIF(materielName != null, materielName)
            .OrderBy(orderByModels)
            .ToPageList(options.Page, options.Rows, ref totalCount);
        new PageGridData<DtStockInfo>(totalCount, data);