pan
2 天以前 075c5319285ab9896a74655c82cec7c1ae0e0196
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs
@@ -1,11 +1,13 @@
using SqlSugar;
using WIDESEA_Common.StockEnum;
using System.Collections.Generic;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
using WIDESEA_Core.HttpContextUser;
using WIDESEA_Core.Utilities;
using WIDESEA_DTO.Stock;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
@@ -34,10 +36,11 @@
        public PageGridData<StockInfoDetailWithPalletDto> GetPageData2(PageDataOptions options)
        {
            string wheres = ValidatePageOptions(options);
            var sugarQueryable = Db.Queryable<Dt_StockInfoDetail>().InnerJoin<Dt_StockInfo>((detail, item) => detail.StockId == item.Id)
                .Where((detail, item) =>item.StockStatus==StockStatusEmun.入库完成.ObjToInt());
                .Where((detail, item) => item.StockStatus == StockStatusEmun.入库完成.ObjToInt());
            Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
            List<OrderByModel> orderByModels = new List<OrderByModel>();
@@ -47,7 +50,7 @@
                {
                    OrderByModel orderByModel = new()
                    {
                        FieldName = "detail."+item.Key,
                        FieldName = "detail." + item.Key,
                        OrderByType = item.Value
                    };
                    orderByModels.Add(orderByModel);
@@ -61,7 +64,7 @@
                    };
                    orderByModels.Add(orderByModel);
                }
            }
            int totalCount = 0;
            List<SearchParameters> searchParametersList = new List<SearchParameters>();
@@ -76,7 +79,6 @@
                    {
                        foreach (var param in searchParametersList)
                        {
                            // åŒ¹é…æ‰˜ç›˜ç¼–号查询条件(小写字段名)
                            if (param.Name.Equals(nameof(Dt_StockInfo.PalletCode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase)
                                && !string.IsNullOrEmpty(param.Value?.ToString()))
                            {
@@ -88,8 +90,7 @@
                catch (Exception ex)
                {
                }
            }
            }
            var data = sugarQueryable
             .WhereIF(!wheres.IsNullOrEmpty(), wheres)
             .OrderBy(orderByModels)