| | |
| | | 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; |
| | |
| | | |
| | | 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>(); |
| | |
| | | { |
| | | OrderByModel orderByModel = new() |
| | | { |
| | | FieldName = "detail."+item.Key, |
| | | FieldName = "detail." + item.Key, |
| | | OrderByType = item.Value |
| | | }; |
| | | orderByModels.Add(orderByModel); |
| | |
| | | }; |
| | | orderByModels.Add(orderByModel); |
| | | } |
| | | |
| | | |
| | | } |
| | | int totalCount = 0; |
| | | List<SearchParameters> searchParametersList = new List<SearchParameters>(); |
| | |
| | | { |
| | | foreach (var param in searchParametersList) |
| | | { |
| | | // å¹é
æçç¼å·æ¥è¯¢æ¡ä»¶ï¼å°ååæ®µåï¼ |
| | | if (param.Name.Equals(nameof(Dt_StockInfo.PalletCode).FirstLetterToLower(), StringComparison.OrdinalIgnoreCase) |
| | | && !string.IsNullOrEmpty(param.Value?.ToString())) |
| | | { |
| | |
| | | catch (Exception ex) |
| | | { |
| | | } |
| | | } |
| | | |
| | | } |
| | | var data = sugarQueryable |
| | | .WhereIF(!wheres.IsNullOrEmpty(), wheres) |
| | | .OrderBy(orderByModels) |