完善采购订单供应商下拉列表

This commit is contained in:
陈淳
2023-01-06 15:40:46 +08:00
parent f4280298af
commit fd018555fa
13 changed files with 85 additions and 15 deletions

View File

@@ -283,6 +283,12 @@
<param name="ids"></param>
<returns></returns>
</member>
<member name="M:Yi.Framework.ApiMicroservice.Controllers.ERP.SupplierController.GetList">
<summary>
全查
</summary>
<returns></returns>
</member>
<member name="M:Yi.Framework.ApiMicroservice.Controllers.ERP.SupplierController.PageList(Yi.Framework.DtoModel.ERP.Supplier.SupplierGetListInput,Yi.Framework.Common.Models.PageParModel)">
<summary>
分页查

View File

@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Org.BouncyCastle.Asn1.IsisMtt.X509;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Mvc;
using Yi.Framework.Common.Models;
using Yi.Framework.DtoModel.ERP.Supplier;
using Yi.Framework.Interface.ERP;
using Yi.Framework.Service.ERP;
namespace Yi.Framework.ApiMicroservice.Controllers.ERP
{
@@ -17,6 +18,18 @@ namespace Yi.Framework.ApiMicroservice.Controllers.ERP
_supplierService = supplierService;
}
/// <summary>
/// 全查
/// </summary>
/// <returns></returns>
[HttpGet]
public async Task<Result> GetList()
{
var result = await _supplierService.GetListAsync();
return Result.Success().SetData(result);
}
/// <summary>
/// 分页查
/// </summary>

View File

@@ -15,6 +15,8 @@ namespace Yi.Framework.DtoModel.ERP.Purchase
public string Buyer { get; set; } = string.Empty;
public long TotalMoney { get; set; }
public long PaidMoney { get; set; }
public string SupplierName { get; set; } = string.Empty;
public PurchaseStateEnum PurchaseState { get; set; }
}
}

View File

@@ -16,6 +16,8 @@ namespace Yi.Framework.DtoModel.ERP.Purchase
public DateTime? NeedTime { get; set; }
public string Buyer { get; set; } = string.Empty;
public long SupplierId { get; set; }
public List<PurchaseDetailsCreateUpdateInput>? PurchaseDetails { get; set; }
}
}

View File

@@ -8,7 +8,7 @@ namespace Yi.Framework.Model.Base
{
public class Entity<Key> : IEntity<Key>
{
public Key Id { get; set; }=default(Key)!;
public Key Id { get; set; }
public object[] GetKeys()
{

View File

@@ -27,6 +27,11 @@ namespace Yi.Framework.Model.ERP.Entitys
/// </summary>
public Guid? TenantId { get; set; }
/// <summary>
/// 供应商id
/// </summary>
public long SupplierId { get; set; }
/// <summary>
/// 采购单号
/// </summary>

View File

@@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="NEST" Version="7.16.0" />
<PackageReference Include="SqlSugarCore" Version="5.1.3.30" />
<PackageReference Include="SqlSugarCore" Version="5.1.3.43-preview03" />
</ItemGroup>
<ItemGroup>

View File

@@ -30,10 +30,11 @@ namespace Yi.Framework.Service.ERP
{
RefAsync<int> totalNumber = 0;
var data = await Repository._DbQueryable
//.WhereIF(input.Code is not null,u=>u.Code.Contains(input.Code))
//.WhereIF(input.Name is not null, u => u.Name.Contains(input.Name))
.LeftJoin<SupplierEntity>((p, s) => p.SupplierId == s.Id)
.WhereIF(input.Code is not null, u => u.Code.Contains(input.Code))
.Select((p, s) => new PurchaseGetListOutput { SupplierName = s.Name },true)
.ToPageListAsync(page.PageNum, page.PageSize, totalNumber);
return new PageModel<List<PurchaseGetListOutput>> { Total = totalNumber.Value, Data = await MapToGetListOutputDtosAsync(data) };
return new PageModel<List<PurchaseGetListOutput>> { Total = totalNumber.Value, Data = data };
}
public override async Task<PurchaseGetListOutput> CreateAsync(PurchaseCreateInput input)

View File

@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using System;
using Ubiety.Dns.Core.Common;
namespace Yi.Framework.WebCore.CommonExtend
{