IUsAppLabelingAppService.cs 2.17 KB
using FoodLabeling.Application.Contracts.Dtos.Common;
using FoodLabeling.Application.Contracts.Dtos.Reports;
using FoodLabeling.Application.Contracts.Dtos.UsAppLabeling;
using Volo.Abp.Application.Services;

namespace FoodLabeling.Application.Contracts.IServices;

/// <summary>
/// App Labeling:四级列表(标签分类 → 产品分类 → 产品卡片「按模板拆分」→ 标签种类)
/// </summary>
public interface IUsAppLabelingAppService : IApplicationService
{
    /// <summary>
    /// 获取当前门店下四级嵌套树,供移动端 Labeling 首页使用
    /// </summary>
    Task<List<UsAppLabelCategoryTreeNodeDto>> GetLabelingTreeAsync(UsAppLabelingTreeInputVo input);

    /// <summary>
    /// App 打印预览:按标签编码解析模板并返回顶部展示字段 + 预览模板结构。
    /// 出参 <c>labelId</c> 为门店当日**下一个**打印序号(<c>yyyyMMdd-n</c>),非 <c>fl_label.Id</c>。
    /// </summary>
    Task<UsAppLabelPreviewDto> PreviewAsync(UsAppLabelPreviewInputVo input);

    /// <summary>
    /// App 打印:创建打印任务并落库打印明细(fl_label_print_task / fl_label_print_data)
    /// </summary>
    Task<UsAppLabelPrintOutputDto> PrintAsync(UsAppLabelPrintInputVo input);

    /// <summary>
    /// App 重新打印:根据历史任务Id重打(创建新任务与明细)
    /// </summary>
    Task<UsAppLabelPrintOutputDto> ReprintAsync(UsAppLabelReprintInputVo input);

    /// <summary>
    /// App 打印日志:当前门店打印记录(分页)。管理员 / Partner 角色可见门店内全部;其它角色仅本人。
    /// 支持 <c>printDate</c> 按自然日筛选;出参 <c>labelId</c> 为门店当日打印序号(<c>yyyyMMdd-n</c>)。
    /// </summary>
    Task<PagedResultWithPageDto<PrintLogItemDto>> GetPrintLogListAsync(PrintLogGetListInputVo input);

    /// <summary>
    /// App Label Report:当前门店统计;支持 <c>period</c> 为 7d / 30d / 90d / custom(自定义须传 startDate、endDate)。
    /// 权限规则与 <see cref="GetPrintLogListAsync"/> 一致。
    /// </summary>
    Task<ReportsLabelReportOutputDto> GetLabelReportAsync(UsAppLabelReportQueryInputVo input);
}