You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.5 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity;
using Microsoft.Extensions.Hosting;
namespace DS.WMS.Core.Application.Interface
{
/// <summary>
/// 发票模板服务定义
/// </summary>
public interface IInvoiceTemplateService
{
/// <summary>
/// 获取模板字段
/// </summary>
/// <param name="environment">宿主环境</param>
/// <returns></returns>
DataResult<List<TemplateField>> GetFields(IHostEnvironment environment);
/// <summary>
/// 获取列表
/// </summary>
/// <param name="userId">模板所有人</param>
/// <param name="createIfEmpty">如果为空则创建</param>
/// <returns></returns>
DataResult<List<InvoiceTemplate>> GetList(long userId, bool createIfEmpty);
/// <summary>
/// 保存模板
/// </summary>
/// <param name="templates">发票模板</param>
/// <returns></returns>
DataResult<List<InvoiceTemplate>> Save(params InvoiceTemplate[] templates);
/// <summary>
/// 渲染模板
/// </summary>
/// <param name="id">发票申请ID</param>
/// <param name="templateText">模板文本</param>
/// <param name="environment"></param>
/// <returns></returns>
Task<DataResult<string>> RenderTemplateAsync(long id, string templateText, IHostEnvironment environment);
}
}