bug修复

This commit is contained in:
tongfei
2023-12-06 15:55:46 +08:00
parent acb90e8202
commit 95bc5d7ced
6 changed files with 21 additions and 3 deletions

View File

@@ -64,6 +64,12 @@ namespace WMS.Web.Repositories
if (!string.IsNullOrEmpty(dto.MaterialNumber))
materials = materials.Where(w => w.MaterialNumber.Contains(dto.MaterialNumber)).ToList();
//组织集合
var orgs_result = await _erpService.BillQueryForOrg();
if (!orgs_result.IsSuccess)
return (new List<BoxInventoryQueryResponse>(), 0);
var orgs = orgs_result.Data.ToList();
var query = _context.BoxInventoryDetails
.GroupJoin(_context.BoxInventory, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })
.SelectMany(x => x.orders.DefaultIfEmpty(), (p, order) => new { p.detail, order })
@@ -99,6 +105,8 @@ namespace WMS.Web.Repositories
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode+s.order.OrgCode),
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.order.SubStockId),
SerialNumbers=(string.Join(",",s.detail.SerialNumbers)).TrimEnd(','),
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.order.OrgCode),
Qty = s.detail.Qty,
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
return (list,total);

View File

@@ -106,7 +106,7 @@ namespace WMS.Web.Repositories
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.StockCode+s.OrgCode),
Qty = s.Qty,
SurplusQty=s.SurplusQty,
CreateTime = s.CreateTime
CreateTime = s.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
return (list,total);