列表导出-加公司ID参数
This commit is contained in:
@@ -59,7 +59,7 @@ namespace WMS.Web.Repositories
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<(List<BackRecordQueryResponse> list,int total)> GetPagedList(BackRecordQueryRequest dto)
|
||||
public async Task<(List<BackRecordQueryResponse> list,int total)> GetPagedList(BackRecordQueryRequest dto, int companyId)
|
||||
{
|
||||
//1.获取物料集合和组织集合和供应商的集合
|
||||
var materials = new List<ErpMaterialDto>();
|
||||
@@ -76,7 +76,7 @@ namespace WMS.Web.Repositories
|
||||
List<int> ids = new List<int>();
|
||||
if (!string.IsNullOrEmpty(dto.Creator))
|
||||
{
|
||||
var staffList = await _basicsRepositories.GetStaffListAsync(_loginRepositories.CompanyId);
|
||||
var staffList = await _basicsRepositories.GetStaffListAsync(companyId);
|
||||
ids = staffList.Where(w =>w.Name.Contains(dto.Creator)).Select(s => s.Id).ToList();
|
||||
}
|
||||
|
||||
@@ -109,15 +109,15 @@ namespace WMS.Web.Repositories
|
||||
BillNo=s.order.BillNo,
|
||||
BoxBillNo = s.box.BoxBillNo,
|
||||
Type = s.order.Type.GetRemark(),
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.CreatorId),
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
|
||||
CreateTime =s.order.CreateTime,
|
||||
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
|
||||
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.detail.MaterialId),
|
||||
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId),
|
||||
Qty = s.detail.Qty,
|
||||
Org= _erpBasicDataExtendService.GetOrgName(orgs, s.order.OrgCode),
|
||||
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode + s.order.OrgCode),
|
||||
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.order.SubStockId),
|
||||
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.order.StockCode + s.order.OrgCode),
|
||||
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.order.SubStockId),
|
||||
SerialNumbers = JsonConvert.SerializeObject(s.detail.SerialNumbers),
|
||||
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace WMS.Web.Repositories
|
||||
/// <returns></returns>
|
||||
public async Task<(object obj, int total)> GetListField(BackRecordQueryRequest dto, int companyId)
|
||||
{
|
||||
return await GetPagedList(dto);
|
||||
return await GetPagedList(dto,companyId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user