列表导出-加公司ID参数

This commit is contained in:
tongfei
2023-12-18 16:01:44 +08:00
parent de14aa8965
commit cf0de6997f
17 changed files with 57 additions and 46 deletions

View File

@@ -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);
}
}
}

View File

@@ -53,8 +53,9 @@ namespace WMS.Web.Repositories
/// 列表-分页
/// </summary>
/// <param name="dto"></param>
/// <param name="companyId"></param>
/// <returns></returns>
public async Task<(List<BoxInventoryQueryResponse> list, int total)> GetPagedList(BoxInventoryQueryRequest dto)
public async Task<(List<BoxInventoryQueryResponse> list, int total)> GetPagedList(BoxInventoryQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合
var materials = new List<ErpMaterialDto>();
@@ -108,8 +109,8 @@ namespace WMS.Web.Repositories
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.detail.MaterialId),
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),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.order.StockCode+s.order.OrgCode),
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.order.SubStockId),
SerialNumbers=(string.Join(",",s.detail.SerialNumbers)).TrimEnd(','),
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.order.OrgCode),
Qty = s.detail.Qty,
@@ -271,7 +272,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<(object obj, int total)> GetListField(BoxInventoryQueryRequest dto, int companyId)
{
return await GetPagedList(dto);
return await GetPagedList(dto,companyId);
}
}
}

View File

@@ -109,7 +109,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<(object obj, int total)> GetListField(InStockQueryRequest dto, int companyId)
{
return await GetPagedList(dto);
return await GetPagedList(dto, companyId);
}
/// <summary>
@@ -217,7 +217,7 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<InStockQueryResponse> list, int total)> GetPagedList(InStockQueryRequest dto)
public async Task<(List<InStockQueryResponse> list, int total)> GetPagedList(InStockQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合和供应商的集合
var materials = new List<ErpMaterialDto>();
@@ -291,9 +291,9 @@ namespace WMS.Web.Repositories
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.detail.MaterialId),
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.detail.MaterialId),
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.order.StockCode + s.order.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.order.StockCode + s.order.OrgCode),
Qty = s.detail.Qty,
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.CreatorId),
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
SuccessSync = s.order.SuccessSync == SyncStatus.Success ? "成功" : "失败",
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();

View File

@@ -419,7 +419,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<(object obj, int total)> GetListField(InStockTaskQueryRequest dto, int companyId)
{
return await GetPagedList(dto);
return await GetPagedList(dto, companyId);
}
/// <summary>
@@ -427,7 +427,7 @@ namespace WMS.Web.Repositories
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public async Task<(List<InStockTaskQueryResponse> list, int total)> GetPagedList(InStockTaskQueryRequest dto)
public async Task<(List<InStockTaskQueryResponse> list, int total)> GetPagedList(InStockTaskQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合和供应商的集合
var materials = new List<ErpMaterialDto>();
@@ -520,13 +520,13 @@ namespace WMS.Web.Repositories
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.detail.MaterialId),
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialId),
FactoryPrice = s.detail.FactoryPrice,
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.detail.StockCode + s.detail.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.detail.StockCode + s.detail.OrgCode),
AccruedQty = s.detail.AccruedQty,
ReceiveQty = s.detail.ReceiveQty,
RealityQty = s.detail.RealityQty,
Receiver = s.order.ReceiverId.HasValue ? _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.ReceiverId.Value) : "",
Receiver = s.order.ReceiverId.HasValue ? _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.ReceiverId.Value) : "",
ReceiveTime = s.order.ReceiveTime.HasValue ? s.order.ReceiveTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
Shelfer = s.order.ShelferId.HasValue ? _singleDataService.GetSingleData(SingleAction.Staffs, _loginRepositories.CompanyId, s.order.ShelferId.Value) : "",
Shelfer = s.order.ShelferId.HasValue ? _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.ShelferId.Value) : "",
ShelfTime = s.order.ShelfTime.HasValue ? s.order.ShelfTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
Remark = s.detail.Remark,

View File

@@ -52,8 +52,9 @@ namespace WMS.Web.Repositories
/// 列表-分页
/// </summary>
/// <param name="dto"></param>
/// <param name="companyId"></param>
/// <returns></returns>
public async Task<(List<InventoryDetailsQueryResponse> list,int total)> GetPagedList(InventoryDetailsQueryRequest dto)
public async Task<(List<InventoryDetailsQueryResponse> list,int total)> GetPagedList(InventoryDetailsQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合
var materials = new List<ErpMaterialDto>();
@@ -100,9 +101,9 @@ namespace WMS.Web.Repositories
MaterialNumber = _erpBasicDataExtendService.GetMaterialNumber(materials, s.MaterialId),
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.MaterialId),
Org= _erpBasicDataExtendService.GetOrgName(orgs, s.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.StockCode + s.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.StockCode + s.OrgCode),
Qty = s.Qty,
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, _loginRepositories.CompanyId, s.SubStockId),
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocks, companyId, s.SubStockId),
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.MaterialId),
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
@@ -177,7 +178,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<(object obj, int total)> GetListField(InventoryDetailsQueryRequest dto, int companyId)
{
return await GetPagedList(dto);
return await GetPagedList(dto, companyId);
}
/// <summary>

View File

@@ -53,8 +53,9 @@ namespace WMS.Web.Repositories
/// 列表-分页
/// </summary>
/// <param name="dto"></param>
/// <param name="companyId"></param>
/// <returns></returns>
public async Task<(List<InventoryInOutDetailsQueryResponse> list, int total)> GetPagedList(InventoryInOutDetailsQueryRequest dto)
public async Task<(List<InventoryInOutDetailsQueryResponse> list, int total)> GetPagedList(InventoryInOutDetailsQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合
var materials = new List<ErpMaterialDto>();
@@ -108,7 +109,7 @@ namespace WMS.Web.Repositories
OrderType=s.OrderType.GetRemark(),
OrderBillNo=s.OrderBillNo,
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, _loginRepositories.CompanyId, s.StockCode+s.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.StockCode+s.OrgCode),
Qty = s.Qty,
SurplusQty=s.SurplusQty,
CreateTime = s.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
@@ -155,7 +156,7 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<(object obj, int total)> GetListField(InventoryInOutDetailsQueryRequest dto, int companyId)
{
return await GetPagedList(dto);
return await GetPagedList(dto,companyId);
}
}
}