1
yangpeixing
9 小时以前 bf95c0628ffd05e5e26ca796102f1e453821936d
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Stock/StockInfoService.cs
@@ -109,6 +109,7 @@
        Expression<Func<DtStockInfo, bool>> areaId = null;
        Expression<Func<DtStockInfo, bool>> materielCode = null;
        Expression<Func<DtStockInfo, bool>> materielName = null;
        Expression<Func<DtStockInfo, bool>> demandClassification = null;
        foreach (var item in searchParametersList)
        {
            if (item.Name.Contains("locationStatus"))
@@ -131,6 +132,10 @@
            {
                materielName = x => x.StockInfoDetails.Any(d => d.MaterielName.Contains(item.Value));
            }
            else if (item.Name.Contains("demandClassification"))
            {
                demandClassification = x => x.StockInfoDetails.Any(d => d.DemandClassification.Contains(item.Value));
            }
        }
        //.IncludesAllFirstLayer()
        var data = BaseDal.Db.Queryable<DtStockInfo>()
@@ -142,6 +147,7 @@
            .WhereIF(areaId != null, areaId)
            .WhereIF(materielCode != null, materielCode)
            .WhereIF(materielName != null, materielName)
            .WhereIF(demandClassification != null, demandClassification)
            .OrderBy(orderByModels)
            .ToPageList(options.Page, options.Rows, ref totalCount);
        new PageGridData<DtStockInfo>(totalCount, data);