修复bug
This commit is contained in:
@@ -5,6 +5,7 @@ using WMS.Web.Core.Dto.Erp;
|
|||||||
using WMS.Web.Core.Dto.Erp.Customer;
|
using WMS.Web.Core.Dto.Erp.Customer;
|
||||||
using WMS.Web.Core.Dto.Erp.Org;
|
using WMS.Web.Core.Dto.Erp.Org;
|
||||||
using WMS.Web.Core.Dto.Erp.Supplier;
|
using WMS.Web.Core.Dto.Erp.Supplier;
|
||||||
|
using WMS.Web.Core.Dto.SingleData;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.IService.Public
|
namespace WMS.Web.Domain.IService.Public
|
||||||
{
|
{
|
||||||
@@ -173,5 +174,12 @@ namespace WMS.Web.Domain.IService.Public
|
|||||||
/// <param name="code"></param>
|
/// <param name="code"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
string GetSubStockName(List<Erp_SubStockDto> erpStocks, string code);
|
string GetSubStockName(List<Erp_SubStockDto> erpStocks, string code);
|
||||||
|
/// <summary>
|
||||||
|
/// 成品即时库存仓库
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="list"></param>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
string GetProductInventoryStockName(List<UcStockHeadOfficeResponse> list, string code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using WMS.Web.Core.Dto.Erp;
|
|||||||
using WMS.Web.Core.Dto.Erp.Customer;
|
using WMS.Web.Core.Dto.Erp.Customer;
|
||||||
using WMS.Web.Core.Dto.Erp.Org;
|
using WMS.Web.Core.Dto.Erp.Org;
|
||||||
using WMS.Web.Core.Dto.Erp.Supplier;
|
using WMS.Web.Core.Dto.Erp.Supplier;
|
||||||
|
using WMS.Web.Core.Dto.SingleData;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Domain.IService.Public;
|
using WMS.Web.Domain.IService.Public;
|
||||||
|
|
||||||
@@ -407,6 +408,18 @@ namespace WMS.Web.Domain.Services.Public
|
|||||||
var stock = erpStocks.Where(x => x.Code == code).FirstOrDefault();
|
var stock = erpStocks.Where(x => x.Code == code).FirstOrDefault();
|
||||||
return stock == null ? "" : stock.Name;
|
return stock == null ? "" : stock.Name;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 成品即时库存仓库
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="list"></param>
|
||||||
|
/// <param name="code"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public string GetProductInventoryStockName(List<UcStockHeadOfficeResponse> list, string code)
|
||||||
|
{
|
||||||
|
if (list == null || list.Count == 0)
|
||||||
|
return "";
|
||||||
|
var stock = list.Where(x => x.Code == code).FirstOrDefault();
|
||||||
|
return stock == null ? "" : stock.Name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace WMS.Web.Repositories
|
|||||||
if (org_result.IsSuccess)
|
if (org_result.IsSuccess)
|
||||||
orgs = org_result.Data.ToList();
|
orgs = org_result.Data.ToList();
|
||||||
|
|
||||||
var r = await _basicsRepositories.GetUcStockByHeadOfficeAsync("", 1);
|
var p_stocks = await _basicsRepositories.GetUcStockByHeadOfficeAsync("", 1);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
var query = _context.ProductInventory
|
var query = _context.ProductInventory
|
||||||
@@ -161,7 +161,7 @@ namespace WMS.Web.Repositories
|
|||||||
#region dto组装
|
#region dto组装
|
||||||
Id = s.Id,
|
Id = s.Id,
|
||||||
Type = s.Type.GetRemark(),
|
Type = s.Type.GetRemark(),
|
||||||
Stock = GetStockName(r, s.StockCode),
|
Stock = _erpBasicDataExtendService.GetProductInventoryStockName(p_stocks, s.StockCode),
|
||||||
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.OrgCode),
|
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.OrgCode),
|
||||||
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.MaterialNumber),
|
MaterialName = _erpBasicDataExtendService.GetMaterialName(materials, s.MaterialNumber),
|
||||||
MaterialNumber = s.MaterialNumber,
|
MaterialNumber = s.MaterialNumber,
|
||||||
@@ -176,13 +176,6 @@ namespace WMS.Web.Repositories
|
|||||||
return (list, total, details);
|
return (list, total, details);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetStockName(List<UcStockHeadOfficeResponse> list, string code)
|
|
||||||
{
|
|
||||||
var stock = list.FirstOrDefault(f => f.Code.Equals(code));
|
|
||||||
if (stock == null) return "";
|
|
||||||
return stock.Name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<(object obj, int total)> GetListField(ProductInventoryQueryRequest dto, int companyId)
|
public async Task<(object obj, int total)> GetListField(ProductInventoryQueryRequest dto, int companyId)
|
||||||
{
|
{
|
||||||
var (list, count, qty) = await GetListAsync(dto, companyId);
|
var (list, count, qty) = await GetListAsync(dto, companyId);
|
||||||
|
|||||||
Reference in New Issue
Block a user