wangxinhui
5 天以前 661370ec981cb639e1345b007ad7e908f1cd36db
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockViewService.cs
@@ -130,7 +130,7 @@
                EntityProperties.ValidatePageOptions(options, ref sugarQueryable);
                ISugarQueryable<ProStockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a)
                ISugarQueryable<ProStockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).OrderByDescending(b => b.CreateDate).Select((b, a)
                    => new ProStockViewDTO
                    {
                        ProStockAttribute=b.ProStockAttribute,
@@ -254,6 +254,14 @@
                            }
                            {
                                SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.LotNumber).FirstLetterToLower());
                                if (searchParameters != null)
                                {
                                    sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.LotNumber.Contains(searchParameters.Value)));
                                }
                            }
                            {
                                SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.ProductVersion).FirstLetterToLower());
                                if (searchParameters != null)
                                {
@@ -274,7 +282,6 @@
                ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>().Where(whereLo);
                EntityProperties.ValidatePageOptions(options, ref sugarQueryable);
                ISugarQueryable<ProStockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).Select((b, a)
                    => new ProStockViewDTO
                    {
@@ -327,7 +334,11 @@
                //stockViewDTOs.AddRange(pklist.ToList());
                stockViewDTOs.ForEach(x =>
                {
                    x.ProductCode = string.Join(",", x.Details.Select(x => x.ProductCode).Distinct());
                    x.ProductCode = string.Join(",",
                        x.Details
                            .GroupBy(d => d.ProductCode)
                            .Select(g => $"(型号{g.Key},数量{g.Sum(s=>s.StockPcsQty)})")
                    );
                    x.ProductVersion = string.Join(",", x.Details.Select(x => x.ProductVersion).Distinct());
                    x.SpecifyVer = string.Join(",", x.Details.Select(x => x.SpecifyVer).Distinct());
                    x.DateCode = x.Details.FirstOrDefault()?.DateCode ?? "";