mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-18 23:46:37 +08:00
采购单详情界面
This commit is contained in:
@@ -16,6 +16,12 @@ namespace Yi.Framework.Service.ERP
|
||||
{
|
||||
public class PurchaseDetailsService : CrudAppService<PurchaseDetailsEntity, PurchaseDetailsGetListOutput, long, PurchaseDetailsCreateUpdateInput>, IPurchaseDetailsService
|
||||
{
|
||||
public async Task<List<PurchaseDetailsGetListOutput>> GetListByPurchaseIdAsync(long purchaseId)
|
||||
{
|
||||
var data= await Repository._DbQueryable.Where(u => u.PurchaseId == purchaseId).ToListAsync();
|
||||
return await MapToGetListOutputDtos(data);
|
||||
}
|
||||
|
||||
public async Task<PageModel<List<PurchaseDetailsGetListOutput>>> PageListAsync(PurchaseDetailsGetListInput input, PageParModel page)
|
||||
{
|
||||
RefAsync<int> totalNumber = 0;
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Attribute;
|
||||
using Yi.Framework.Common.Models;
|
||||
using Yi.Framework.DtoModel.ERP.Purchase;
|
||||
using Yi.Framework.DtoModel.ERP.PurchaseDetails;
|
||||
using Yi.Framework.Interface.ERP;
|
||||
using Yi.Framework.Model.Base;
|
||||
using Yi.Framework.Model.ERP.Entitys;
|
||||
@@ -49,7 +50,9 @@ namespace Yi.Framework.Service.ERP
|
||||
TryToSetTenantId(entity);
|
||||
var purchaseId = await Repository.InsertReturnSnowflakeIdAsync(entity);
|
||||
entity.Id = purchaseId;
|
||||
await _purchaseDetailsService.CreateAsync(input.PurchaseDetails);
|
||||
|
||||
|
||||
await _purchaseDetailsService.CreateAsync(input.PurchaseDetails.SetPurchaseId(purchaseId));
|
||||
uow.Commit();
|
||||
}
|
||||
return await MapToGetListOutputDtoAsync(entity); ;
|
||||
|
||||
Reference in New Issue
Block a user