采购订单添加物料功能

This commit is contained in:
陈淳
2023-01-05 19:21:48 +08:00
parent 7d578ce363
commit efbf799218
49 changed files with 518 additions and 191 deletions

View File

@@ -17,6 +17,7 @@ foreach (var entityName in entityNames)
option.Add(new IServceTemplateProvider(modelName, entityName));
option.Add(new CreateUpdateInputTemplateProvider(modelName, entityName));
option.Add(new GetListOutputTemplateProvider(modelName, entityName));
option.Add(new GetListInputTemplateProvider(modelName, entityName));
option.Add(new ConstTemplateProvider(modelName, entityName));
option.Add(new ProfileTemplateProvider(modelName, entityName));
option.Add(new ControllerTemplateProvider(modelName, entityName));

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Template.Abstract;
using Yi.Framework.Template.Const;
namespace Yi.Framework.Template.Provider.Server
{
public class GetListInputTemplateProvider : ModelTemplateProvider
{
public GetListInputTemplateProvider(string modelName, string entityName) : base(modelName, entityName)
{
BuildPath = $@"..\..\..\..\Yi.Framework.DtoModel\{TemplateConst.ModelName}\{TemplateConst.EntityName}\{TemplateConst.EntityName}GetListInput.cs";
TemplatePath = $@"..\..\..\Template\Server\GetListInputTemplate.txt";
EntityPath = $@"..\..\..\..\Yi.Framework.Model\{TemplateConst.ModelName}\Entitys\{TemplateConst.EntityName}Entity.cs";
}
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yi.Framework.Model.Base;
namespace Yi.Framework.DtoModel.#ModelName#.#EntityName#
{
public class #EntityName#GetListInput
{
#EntityField#
}
}

View File

@@ -16,9 +16,6 @@ namespace Yi.Framework.Service.#ModelName#
{
public class #EntityName#Service : CrudAppService<#EntityName#Entity, #EntityName#GetListOutput, long, #EntityName#CreateUpdateInput>, I#EntityName#Service
{
public #EntityName#Service(IRepository<#EntityName#Entity> repository, IMapper mapper) : base(repository, mapper)
{
}
public async Task<PageModel<List<#EntityName#GetListOutput>>> PageListAsync(#EntityName#CreateUpdateInput input, PageParModel page)
{
RefAsync<int> totalNumber = 0;

View File

@@ -20,6 +20,9 @@
<None Update="Template\Server\ControllerTemplate.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\Server\GetListInputTemplate.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Template\Server\ProfileTemplate.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>