536d25c4
李曜臣
打印预览,产品分类接口实现
|
1
2
|
using System;
using System.Collections.Generic;
|
a001da6d
杨鑫
APP 预览打印
|
3
|
using System.Text.Json;
|
536d25c4
李曜臣
打印预览,产品分类接口实现
|
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
namespace FoodLabeling.Application.Contracts.Dtos.UsAppLabeling;
/// <summary>
/// App 打印入参
/// </summary>
public class UsAppLabelPrintInputVo
{
/// <summary>
/// 门店Id(fl_label.LocationId)
/// </summary>
public string LocationId { get; set; } = string.Empty;
/// <summary>
/// 标签编码(fl_label.LabelCode)
/// </summary>
public string LabelCode { get; set; } = string.Empty;
/// <summary>
/// 选择用于打印的产品Id(fl_product.Id)
/// 不传则默认取该标签绑定的第一个产品
/// </summary>
public string? ProductId { get; set; }
/// <summary>
/// 打印份数(<=0 则按 1 处理)
/// </summary>
public int PrintQuantity { get; set; } = 1;
/// <summary>
|
c304e27c
李曜臣
打印日志优化
|
34
35
36
37
38
39
|
/// 客户端幂等请求Id(可选)。
/// 同一个 clientRequestId 重复调用 print 接口时,后端会直接返回首次创建的 batchId/taskIds,不会重复写库。
/// </summary>
public string? ClientRequestId { get; set; }
/// <summary>
|
536d25c4
李曜臣
打印预览,产品分类接口实现
|
40
41
42
43
44
|
/// 业务基准时间(用于 DATE/TIME 等元素的计算)
/// </summary>
public DateTime? BaseTime { get; set; }
/// <summary>
|
43d16ca6
杨鑫
打印日志
|
45
46
47
|
/// 打印数据(对齐《标签模块接口对接说明(10)》):
/// - App 推荐传:与平台导出 label-template-*.json 同构的<strong>合并后模板</strong>(含 elements[].config),便于落库后直接重打;
/// - 兼容旧客户端:扁平字典(key 对齐元素 inputKey),由服务端 PreviewAsync 解析生成 RenderDataJson。
|
536d25c4
李曜臣
打印预览,产品分类接口实现
|
48
|
/// </summary>
|
43d16ca6
杨鑫
打印日志
|
49
|
public JsonElement? PrintInputJson { get; set; }
|
536d25c4
李曜臣
打印预览,产品分类接口实现
|
50
51
|
/// <summary>
|
536d25c4
李曜臣
打印预览,产品分类接口实现
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/// 打印机Id(可选,若业务需要追踪)
/// </summary>
public string? PrinterId { get; set; }
/// <summary>
/// 打印机蓝牙 MAC(可选)
/// </summary>
public string? PrinterMac { get; set; }
/// <summary>
/// 打印机地址(可选)
/// </summary>
public string? PrinterAddress { get; set; }
}
|