This commit is contained in:
tongfei
2023-12-27 10:27:33 +08:00
4 changed files with 33 additions and 10 deletions

View File

@@ -9,6 +9,7 @@ using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.ChangeBoxRecord;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Help;
using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.Infrastructure;
@@ -130,7 +131,9 @@ namespace WMS.Web.Repositories
}
var materials_result = await _erpService.BillQueryForMaterial();
var materials = materials_result.Data.ToList();
List<ErpMaterialDto> materials = new List<ErpMaterialDto>();
if (materials_result.IsSuccess)
materials = materials_result.Data.ToList();
var query = _context.ChangeBoxRecord
.GroupJoin(_context.Box, changeBox => changeBox.SrcBoxId, srcBox => srcBox.Id, (changeBox, srcBox) => new { changeBox, srcBox })

View File

@@ -9,6 +9,8 @@ using System.Threading.Tasks;
using WMS.Web.Core;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Dto.Erp.Customer;
using WMS.Web.Core.Dto.Erp.Org;
using WMS.Web.Core.Dto.OutStock;
using WMS.Web.Core.Help;
using WMS.Web.Domain.Entitys;
@@ -97,7 +99,9 @@ namespace WMS.Web.Repositories
#region erp基础资料
List<int> mIds = new List<int>();
var materials_result = await _erpService.BillQueryForMaterial();
var materials = materials_result.Data.ToList();
List<ErpMaterialDto> materials = new List<ErpMaterialDto>();
if (materials_result.IsSuccess)
materials = materials_result.Data.ToList();
//物料集合;模糊查询后的物料集合
if (!string.IsNullOrEmpty(dto.MaterialNumber))
{
@@ -107,11 +111,15 @@ namespace WMS.Web.Repositories
//取组织
var org_result = await _erpService.BillQueryForOrg();
var orgs = org_result.Data.ToList();
List<ErpOrgDto> orgs = new List<ErpOrgDto>();
if (org_result.IsSuccess)
orgs = org_result.Data.ToList();
//取客户
var customer_result = await _erpService.BillQueryForCustomer();
var customers = customer_result.Data.ToList();
List<ErpCustomerDto> customers = new List<ErpCustomerDto>();
if (customer_result.IsSuccess)
customers = customer_result.Data.ToList();
#endregion

View File

@@ -8,6 +8,8 @@ using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Dto.Erp.Customer;
using WMS.Web.Core.Dto.Erp.Org;
using WMS.Web.Core.Dto.OutStockTask;
using WMS.Web.Core.Help;
using WMS.Web.Domain.Entitys;
@@ -222,8 +224,9 @@ namespace WMS.Web.Repositories
#region erp基础资料
List<int> mIds = new List<int>();
var materials_result = await _erpService.BillQueryForMaterial();
var materials = materials_result.Data.ToList();
//var materials =new List<ErpMaterialDto>();
List<ErpMaterialDto> materials = new List<ErpMaterialDto>();
if (materials_result.IsSuccess)
materials = materials_result.Data.ToList();
//物料集合;模糊查询后的物料集合
if (!string.IsNullOrEmpty(dto.MaterialNumber))
{
@@ -233,11 +236,15 @@ namespace WMS.Web.Repositories
//取组织
var org_result = await _erpService.BillQueryForOrg();
var orgs = org_result.Data.ToList();
List<ErpOrgDto> orgs = new List<ErpOrgDto>();
if (org_result.IsSuccess)
orgs = org_result.Data.ToList();
//取客户
var customer_result = await _erpService.BillQueryForCustomer();
var customers = customer_result.Data.ToList();
List<ErpCustomerDto> customers = new List<ErpCustomerDto>();
if (customer_result.IsSuccess)
customers = customer_result.Data.ToList();
#endregion

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Dto.TakeStock;
using WMS.Web.Core.Help;
using WMS.Web.Domain.Entitys;
@@ -196,10 +197,14 @@ namespace WMS.Web.Repositories
companyId = _loginRepositories.CompanyId;
//1.获取物料集合
var materials_result = await _erpService.BillQueryForMaterial();
var materials = materials_result.Data.ToList();
List<ErpMaterialDto> materials = new List<ErpMaterialDto>();
if (materials_result.IsSuccess)
materials = materials_result.Data.ToList();
//金蝶子仓库
var subStock_result = await _erpService.BillQueryForSubStock();
var subStocks = subStock_result.Data.ToList();
List<Erp_SubStockDto> subStocks = new List<Erp_SubStockDto>();
if (subStock_result.IsSuccess)
subStocks = subStock_result.Data.ToList();
var query = _context.TakeStockDetails
.GroupJoin(_context.TakeStock, detail => detail.Fid, order => order.Id, (detail, orders) => new { detail, orders })