| | |
| | | using AutoMapper; |
| | | using SqlSugar; |
| | | using System.Dynamic; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Basic; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | |
| | | private readonly IRepository<Dt_Task> _taskRepository; |
| | | |
| | | private IStockService _stockService; |
| | | |
| | | private readonly IMaterialUnitService _materialUnitService; |
| | | private readonly IInboundOrderDetailService _inboundOrderDetailService; |
| | | private readonly IRepository<Dt_InboundOrderDetail> _inboundOrderDetailRepository; |
| | | private readonly IRepository<Dt_StockInfoDetail> _stockDetailRepository; |
| | | private readonly IRepository<Dt_InboundOrder> _inboundOrderRepository; |
| | | private readonly IRepository<Dt_WarehouseArea> _warehouseAreaRepository; |
| | | private readonly IRepository<Dt_LocationType> _locationTypeRepository; |
| | | private readonly IRepository<Dt_StockInfo> _stockRepository; |
| | | public IRepository<Dt_InboundOrder> Repository => BaseDal; |
| | | |
| | | public InboundOrderService(IRepository<Dt_InboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_Task> taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService) : base(BaseDal) |
| | | public InboundOrderService(IRepository<Dt_InboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_Task> taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IMaterialUnitService materialUnitService, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_StockInfo> stockRepository, IRepository<Dt_LocationType> locationTypeRepository) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | |
| | | _taskRepository = taskRepository; |
| | | _stockService = stockService; |
| | | _inboundOrderDetailService = inboundOrderDetailService; |
| | | _materialUnitService = materialUnitService; |
| | | _stockDetailRepository = stockDetailRepository; |
| | | _inboundOrderRepository = inboundOrderRepository; |
| | | _warehouseAreaRepository = warehouseAreaRepository; |
| | | _stockRepository = stockRepository; |
| | | _locationTypeRepository = locationTypeRepository; |
| | | } |
| | | |
| | | public WebResponseContent ReceiveInboundOrder(List<Dt_InboundOrder> models, int operateType) |
| | | public async Task<WebResponseContent> ReceiveInboundOrder(List<Dt_InboundOrder> models, int operateType) |
| | | { |
| | | try |
| | | { |
| | | return operateType switch |
| | | { |
| | | 1 => AddInboundOrder(models), |
| | | 2 => UpdateInboundOrder(models), |
| | | 1 => await AddInboundOrder(models), |
| | | 2 => await UpdateInboundOrder(models), |
| | | 3 => DeleteInboundOrder(models), |
| | | |
| | | _ => WebResponseContent.Instance.OK(), |
| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent AddInboundOrder(List<Dt_InboundOrder> models) |
| | | public async Task<WebResponseContent> AddInboundOrder(List<Dt_InboundOrder> models) |
| | | { |
| | | try |
| | | { |
| | |
| | | |
| | | foreach (var model in models) |
| | | { |
| | | model.InboundOrderNo = CreateCodeByRule(nameof(RuleCodeEnum.InboundOrderRule)); |
| | | foreach (var item in model.Details) |
| | | { |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | item.Unit = purchaseToStockResult.Unit; |
| | | item.OrderQuantity = purchaseToStockResult.Quantity; |
| | | } |
| | | if (model.OrderType != InOrderTypeEnum.AllocatInbound.ObjToInt()) |
| | | { |
| | | model.InboundOrderNo = CreateCodeByRule(nameof(RuleCodeEnum.InboundOrderRule)); |
| | | } |
| | | |
| | | Db.InsertNav(model).Include(x => x.Details).ExecuteCommand(); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent UpdateInboundOrder(List<Dt_InboundOrder> models) |
| | | public async Task<WebResponseContent> UpdateInboundOrder(List<Dt_InboundOrder> models) |
| | | { |
| | | try |
| | | { |
| | |
| | | if (inboundOrder.Details == null || inboundOrder.Details.Count == 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåæç»ä¿¡æ¯"); |
| | | } |
| | | if (inboundOrder.OrderStatus != InOrderStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该订åç¶æä¸å
许修æ¹"); |
| | | } |
| | | List<Dt_InboundOrderDetail> inboundOrderDetails = new List<Dt_InboundOrderDetail>(); |
| | | List<Dt_InboundOrderDetail> updateInboundOrderDetails = new List<Dt_InboundOrderDetail>(); |
| | |
| | | BarcodeQty = item.BarcodeQty, |
| | | OrderQuantity = item.OrderQuantity |
| | | }; |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | inboundOrderDetail.Unit = purchaseToStockResult.Unit; |
| | | inboundOrderDetail.OrderQuantity = purchaseToStockResult.Quantity; |
| | | |
| | | inboundOrderDetails.Add(inboundOrderDetail); |
| | | } |
| | | else |
| | |
| | | inboundOrderDetail.BarcodeUnit = item.BarcodeUnit; |
| | | inboundOrderDetail.BarcodeQty = item.BarcodeQty; |
| | | inboundOrderDetail.OrderQuantity = item.OrderQuantity; |
| | | |
| | | var purchaseToStockResult = await _materialUnitService.ConvertPurchaseToStockAsync(item.MaterielCode, item.BarcodeQty); |
| | | inboundOrderDetail.Unit = purchaseToStockResult.Unit; |
| | | inboundOrderDetail.OrderQuantity = purchaseToStockResult.Quantity; |
| | | |
| | | updateInboundOrderDetails.Add(inboundOrderDetail); |
| | | detailIds.Add(inboundOrderDetail.Id); |
| | |
| | | _unitOfWorkManage.BeginTran(); |
| | | foreach (var item in deletePurchaseOrderDetails) |
| | | { |
| | | _inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.èªå¨å é¤); |
| | | _inboundOrderDetailRepository.DeleteData(item); |
| | | //_inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.èªå¨å é¤); |
| | | } |
| | | |
| | | _inboundOrderDetailRepository.UpdateData(updateInboundOrderDetails); |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°å
¥åºåæç»ä¿¡æ¯"); |
| | | } |
| | | if (inboundOrder.OrderStatus != InOrderStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该订åç¶æä¸å
许å é¤"); |
| | | } |
| | | //Db.DeleteNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.DeleteAndMoveIntoHty(inboundOrder, OperateTypeEnum.èªå¨å é¤); |
| | | //BaseDal.DeleteAndMoveIntoHty(inboundOrder, OperateTypeEnum.èªå¨å é¤); |
| | | foreach (var item in inboundOrder.Details) |
| | | { |
| | | _inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.èªå¨å é¤); |
| | | _inboundOrderDetailRepository.DeleteData(item); |
| | | //_inboundOrderDetailRepository.DeleteAndMoveIntoHty(item, OperateTypeEnum.èªå¨å é¤); |
| | | } |
| | | BaseDal.DeleteData(inboundOrder); |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(materielGroupDTO); |
| | | if (!result2.Item1) return content = WebResponseContent.Instance.Error(result2.Item2); |
| | | |
| | | // materielGroupDTO.WarehouseCode |
| | | var code = _warehouseAreaRepository.Db.Queryable<Dt_WarehouseArea>().Where(x => x.Code == materielGroupDTO.WarehouseType).Select(x => x.Code).First(); |
| | | if (string.IsNullOrEmpty(code)) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"ä»åºä¸æ²¡æè¯¥{materielGroupDTO.WarehouseType}ç¼å·ã"); |
| | | } |
| | | |
| | | |
| | | Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo); |
| | | |
| | | var dbinboundOrderDetails = _inboundOrderDetailService.GetByBarcode(materielGroupDTO.Barcodes); |
| | | |
| | | if (dbinboundOrderDetails != null && !dbinboundOrderDetails.Any()) { |
| | | if (dbinboundOrderDetails != null && !dbinboundOrderDetails.Any()) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"忮䏿²¡æè¯¥{materielGroupDTO.Barcodes}æ¡ç æ°æ®ã"); |
| | | } |
| | | |
| | |
| | | |
| | | if (stockInfo == null) |
| | | { |
| | | stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None }; |
| | | stockInfo = new Dt_StockInfo() { PalletType = (int)PalletTypeEnum.None, LocationType = materielGroupDTO.locationType.ObjToInt() }; |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | } |
| | | |
| | | |
| | | foreach (var item in dbinboundOrderDetails) |
| | | { |
| | |
| | | Barcode = item.Barcode, |
| | | MaterielCode = item.MaterielCode, |
| | | BatchNo = item.BatchNo, |
| | | Unit = item.BarcodeUnit, |
| | | Unit = item.Unit, |
| | | InboundOrderRowNo = item.lineNo, |
| | | SupplyCode = item.SupplyCode, |
| | | WarehouseCode = item.WarehouseCode, |
| | | StockQuantity = item.BarcodeQty, |
| | | WarehouseCode = materielGroupDTO.WarehouseType, |
| | | StockQuantity = item.OrderQuantity, |
| | | BarcodeQty = item.BarcodeQty, |
| | | BarcodeUnit = item.BarcodeUnit, |
| | | FactoryArea = inboundOrder.FactoryArea, |
| | | Status = 0, |
| | | OrderNo = inboundOrder.InboundOrderNo, |
| | | BusinessType=inboundOrder.BusinessType, |
| | | BusinessType = inboundOrder.BusinessType, |
| | | |
| | | }); |
| | | |
| | | item.ReceiptQuantity = item.BarcodeQty; |
| | | item.OrderDetailStatus = OrderDetailStatusEnum.Over.ObjToInt(); |
| | | item.WarehouseCode = materielGroupDTO.WarehouseType; |
| | | } |
| | | |
| | | if (stockInfo.Id == 0) |
| | |
| | | stockInfo.PalletCode = materielGroupDTO.PalletCode; |
| | | stockInfo.StockStatus = StockStatusEmun.ç»çæå.ObjToInt(); |
| | | } |
| | | |
| | | stockInfo.PalletType = (int)PalletTypeEnum.None; |
| | | |
| | | List<int> updateDetailIds = dbinboundOrderDetails.Select(x => x.Id).ToList(); |
| | | if (inboundOrder.OrderStatus == InOrderStatusEnum.æªå¼å§.ObjToInt()) |
| | | { |
| | | inboundOrder.OrderStatus = InOrderStatusEnum.å
¥åºä¸.ObjToInt(); |
| | | } |
| | | |
| | | inboundOrder.Operator = App.User.UserName; |
| | | content = MaterielGroupUpdateData(inboundOrder, dbinboundOrderDetails, stockInfo); |
| | | if (content.Status) |
| | | { |
| | |
| | | (bool, string, object?) result2 = ModelValidate.ValidateModelData(materielGroupDTO); |
| | | if (!result2.Item1) return content = WebResponseContent.Instance.Error(result2.Item2); |
| | | |
| | | |
| | | bool code = _locationTypeRepository.Db.Queryable<Dt_LocationType>().Where(x => x.LocationType == materielGroupDTO.WarehouseCode).Any(); |
| | | if (!code) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"åºå䏿²¡æè¯¥{materielGroupDTO.WarehouseCode}ç¼å·ã"); |
| | | } |
| | | |
| | | if (_stockRepository.QueryFirst(x => x.PalletCode == materielGroupDTO.PalletCode) != null) |
| | | { |
| | | return WebResponseContent.Instance.Error("该æçå·²ç»ç»è¿ç"); |
| | | } |
| | | |
| | | Dt_StockInfo? stockInfo = _stockService.StockInfoService.GetStockByPalletCode(materielGroupDTO.PalletCode); |
| | | if (stockInfo != null && !string.IsNullOrEmpty(stockInfo.LocationCode) && stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt()) |
| | | { |
| | |
| | | { |
| | | if (stockInfo == null) |
| | | { |
| | | stockInfo = new Dt_StockInfo() { PalletType = PalletTypeEnum.Empty.ObjToInt(), StockStatus = StockStatusEmun.ç»çæå.ObjToInt(), PalletCode = materielGroupDTO.PalletCode }; |
| | | stockInfo = new Dt_StockInfo() { PalletType = PalletTypeEnum.Empty.ObjToInt(), StockStatus = StockStatusEmun.ç»çæå.ObjToInt(), PalletCode = materielGroupDTO.PalletCode, LocationType = materielGroupDTO.WarehouseCode.ObjToInt() }; |
| | | stockInfo.Details = new List<Dt_StockInfoDetail>(); |
| | | } |
| | | else |
| | | { |
| | | stockInfo.PalletType = PalletTypeEnum.Empty.ObjToInt(); |
| | | stockInfo.StockStatus = StockStatusEmun.ç»çæå.ObjToInt(); |
| | | stockInfo.LocationType = materielGroupDTO.WarehouseCode.ObjToInt(); |
| | | } |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | _stockService.StockInfoService.AddMaterielGroup(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | public WebResponseContent UnPalletQuantity(string orderNo) |
| | | { |
| | | // åå§åè¿åDTOï¼é»è®¤å¼é½ä¸º0ï¼é¿å
nullï¼ |
| | | var resultDTO = new PalletSumQuantityDTO |
| | | { |
| | | StockSumQuantity = 0, |
| | | StockCount = 0, |
| | | UniqueUnit = "" |
| | | }; |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | if (string.IsNullOrWhiteSpace(orderNo)) |
| | | { |
| | | return content.Error("ä¼ å
¥ç订åå·orderNo为空æç©ºç½"); |
| | | } |
| | | var orderDetail = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>().Includes(x => x.Details).Where(s => s.InboundOrderNo == orderNo).First(); |
| | | if (orderDetail == null) |
| | | { |
| | | return content.Error("æªæ¾å°åæ®"); |
| | | } |
| | | var unitGroups = orderDetail.Details.GroupBy(d => d.Unit).ToList(); |
| | | if (unitGroups.Count == 1) |
| | | { |
| | | resultDTO.UniqueUnit = unitGroups.First().Key; |
| | | } |
| | | else |
| | | { |
| | | resultDTO.UniqueUnit = ""; |
| | | } |
| | | var validDetails = _stockDetailRepository.Db.Queryable<Dt_StockInfoDetail>().Where(s => s.OrderNo == orderNo).ToList(); |
| | | resultDTO.StockSumQuantity = orderDetail.Details.Sum(d => d.OrderQuantity); |
| | | resultDTO.StockCount = orderDetail.Details.Count; |
| | | if (validDetails.Any()) |
| | | { |
| | | resultDTO.StockSumQuantity -= validDetails.Sum(d => d.StockQuantity); |
| | | // æç»è®°å½æ°ï¼ç¬¦åæ¡ä»¶çææè®°å½æ¡æ° |
| | | resultDTO.StockCount -= validDetails.Count; |
| | | } |
| | | return content.OK("", resultDTO); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error("SumQuantity ç»è®¡åºåæ°é失败ï¼è®¢åå·ï¼{OrderNo}"); |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent UndoPalletGroup(string palletCode) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(palletCode)) |
| | | { |
| | | return WebResponseContent.Instance.Error("æçå·ä¸è½ä¸ºç©º"); |
| | | } |
| | | var stock = _stockRepository.Db.Queryable<Dt_StockInfo>().Includes(o => o.Details).First(x => x.PalletCode == palletCode && (x.StockStatus == (int)StockStatusEmun.ç»çæå|| x.StockStatus == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt())); |
| | | if (stock == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°æçå·{palletCode}对åºçåºåè®°å½"); |
| | | } |
| | | |
| | | if (stock.Details == null || !stock.Details.Any()) |
| | | { |
| | | _stockRepository.DeleteData(stock); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | // è·ååºå详æ
å
³èçææå
¥åºåå· |
| | | var relatedOrderNos = stock.Details.Select(d => d.OrderNo).First(); |
| | | // æ¥è¯¢ææå
³èçå
¥åºåï¼å«è¯¦æ
ï¼ |
| | | var inboundOrders = _inboundOrderRepository.Db.Queryable<Dt_InboundOrder>() |
| | | .Includes(x => x.Details) |
| | | .Where(x => relatedOrderNos == x.InboundOrderNo) |
| | | .First(); |
| | | |
| | | var barcodes = stock.Details.Select(d => d.Barcode).ToList(); |
| | | |
| | | // å¹é
åºåæ¡ç 对åºçå
¥åºåæç» |
| | | var matchedInboundDetails = inboundOrders.Details |
| | | ?.Where(d => barcodes.Contains(d.Barcode)) |
| | | .ToList(); |
| | | foreach (var detail in matchedInboundDetails) |
| | | { |
| | | detail.ReceiptQuantity = 0; |
| | | detail.OrderDetailStatus = 0; |
| | | _inboundOrderDetailRepository.UpdateData(detail); |
| | | } |
| | | _stockDetailRepository.DeleteData(stock.Details); |
| | | _stockRepository.DeleteData(stock); |
| | | |
| | | |
| | | return WebResponseContent.Instance.OK("æçæ¤éæå"); |
| | | } |
| | | |
| | | public override PageGridData<Dt_InboundOrder> GetPageData(PageDataOptions options) |
| | | { |
| | | string wheres = ValidatePageOptions(options); |
| | | //è·åæåºå段 |
| | | Dictionary<string, SqlSugar.OrderByType> orderbyDic = GetPageDataSort(options, TProperties); |
| | | List<OrderByModel> orderByModels = new List<OrderByModel>(); |
| | | foreach (var item in orderbyDic) |
| | | { |
| | | OrderByModel orderByModel = new() |
| | | { |
| | | FieldName = item.Key, |
| | | OrderByType = item.Value |
| | | }; |
| | | orderByModels.Add(orderByModel); |
| | | } |
| | | ISugarQueryable<Dt_InboundOrder> sugarQueryable1 = BaseDal.Db.Queryable<Dt_InboundOrder>(); |
| | | |
| | | int totalCount = 0; |
| | | List<SearchParameters> searchParametersList = new List<SearchParameters>(); |
| | | if (!string.IsNullOrEmpty(options.Wheres)) |
| | | { |
| | | try |
| | | { |
| | | searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>(); |
| | | if (searchParametersList.Count > 0) |
| | | { |
| | | |
| | | SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_InboundOrder.InboundOrderNo).FirstLetterToLower()); |
| | | if (searchParameters != null) |
| | | { |
| | | sugarQueryable1 = sugarQueryable1.Where(x => x.InboundOrderNo.Contains(searchParameters.Value.ToString()) |
| | | || x.UpperOrderNo.Contains(searchParameters.Value.ToString()) || |
| | | x.Details.Any(d => d.Barcode == searchParameters.Value.ToString())); |
| | | } |
| | | searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_InboundOrder.OrderType).FirstLetterToLower()); |
| | | if (searchParameters != null) |
| | | { |
| | | sugarQueryable1 = sugarQueryable1.Where(x => x.OrderType.Equals(searchParameters.Value.ToString())); |
| | | } |
| | | //var dataList = sugarQueryable1.ToPageList(options.Page, options.Rows, ref totalCount); |
| | | //return new PageGridData<Dt_InboundOrder>(totalCount, dataList); |
| | | } |
| | | options.Filter = searchParametersList; |
| | | } |
| | | catch { } |
| | | } |
| | | var data = sugarQueryable1 |
| | | .WhereIF(!wheres.IsNullOrEmpty(), wheres) |
| | | .Where(x => x.OrderType == 0) |
| | | .OrderBy(orderByModels).Includes(x => x.Details) |
| | | .ToPageList(options.Page, options.Rows, ref totalCount); |
| | | |
| | | return new PageGridData<Dt_InboundOrder>(totalCount, data); |
| | | } |
| | | |
| | | //public override PageGridData<Dt_InboundOrder> GetPageData(PageDataOptions options) |
| | | //{ |
| | | // //var pageGridData = base.GetPageData(options); |
| | | |
| | | // ISugarQueryable<Dt_InboundOrder> sugarQueryable1 = BaseDal.Db.Queryable<Dt_InboundOrder>(); |
| | | // if (!string.IsNullOrEmpty(options.Wheres)) |
| | | // { |
| | | |
| | | // List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>(); |
| | | // int totalCount = 0; |
| | | // if (searchParametersList.Count > 0) |
| | | // { |
| | | |
| | | // SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_InboundOrder.InboundOrderNo).FirstLetterToLower()); |
| | | // if (searchParameters != null) |
| | | // { |
| | | // sugarQueryable1 = sugarQueryable1.Where(x => x.InboundOrderNo.Contains(searchParameters.Value.ToString()) |
| | | // || x.UpperOrderNo.Contains(searchParameters.Value.ToString()) || |
| | | // x.Details.Any(d => d.Barcode == searchParameters.Value.ToString())); |
| | | // } |
| | | // searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_InboundOrder.OrderType).FirstLetterToLower()); |
| | | // if (searchParameters != null) |
| | | // { |
| | | // sugarQueryable1 = sugarQueryable1.Where(x => x.OrderType.Equals(searchParameters.Value.ToString())); |
| | | // } |
| | | // var dataList = sugarQueryable1.ToPageList(options.Page, options.Rows, ref totalCount); |
| | | // return new PageGridData<Dt_InboundOrder>(totalCount, dataList); |
| | | // } |
| | | // } |
| | | // return new PageGridData<Dt_InboundOrder>(); |
| | | //} |
| | | |
| | | } |
| | | } |