修复bug

This commit is contained in:
18942506660
2023-12-06 14:18:29 +08:00
parent 17f1c0a3f3
commit dcbf27c519
2 changed files with 33 additions and 28 deletions

View File

@@ -7,6 +7,8 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMS.Web.Core.Dto;
using WMS.Web.Core.Dto.Erp;
using WMS.Web.Core.Dto.Erp.Customer;
using WMS.Web.Core.Dto.SerialNumbers;
using WMS.Web.Core.Help;
using WMS.Web.Domain.Entitys;
@@ -99,15 +101,15 @@ namespace WMS.Web.Repositories
/// <returns></returns>
public async Task<SerialNumbersResponse> Get(string serialNumber)
{
List<ErpMaterialDto> materials = new List<ErpMaterialDto>();
var materials_result = await _erpService.BillQueryForMaterial();
if (!materials_result.IsSuccess)
return null;
var materials = materials_result.Data.ToList();
if (materials_result.IsSuccess)
materials = materials_result.Data.ToList();
List<ErpCustomerDto> customers = new List<ErpCustomerDto>();
var customer_result = await _erpService.BillQueryForCustomer();
if (!customer_result.IsSuccess)
return null;
var customers = customer_result.Data.ToList();
if (customer_result.IsSuccess)
customers = customer_result.Data.ToList();
var s = await _context.SerialNumbers
.FirstOrDefaultAsync(f => serialNumber.Equals(f.SerialNumber));