新增打印模板管理功能,包含免密接口和实时通知机制,支持桌面端打印模板的查询和列表展示。更新相关控制器、服务和视图,优化用户体验并增强系统的实时数据同步能力。
This commit is contained in:
@@ -198,6 +198,36 @@ public class PrintTemplateController extends JeecgController<PrintTemplate, IPri
|
||||
return Result.OK(t);
|
||||
}
|
||||
|
||||
// ═══════════════════════════ 桌面端免密接口 ═══════════════════════════
|
||||
|
||||
/**
|
||||
* 免密-通过编码查询(供 WPF 桌面端匿名调用)
|
||||
*/
|
||||
@Operation(summary = "打印模板-免密通过编码查询(桌面端)")
|
||||
@GetMapping(value = "/anon/queryByCode")
|
||||
public Result<PrintTemplate> anonQueryByCode(@RequestParam(name = "code") String code) {
|
||||
PrintTemplate t = service.getByCode(code);
|
||||
if (t == null) {
|
||||
return Result.error("未找到模板: " + code);
|
||||
}
|
||||
return Result.OK(t);
|
||||
}
|
||||
|
||||
/**
|
||||
* 免密-分页列表(供 WPF 桌面端匿名调用,用于打印设置页选择模板)
|
||||
*/
|
||||
@Operation(summary = "打印模板-免密分页列表(桌面端)")
|
||||
@GetMapping(value = "/anon/list")
|
||||
public Result<IPage<PrintTemplate>> anonList(PrintTemplate query,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "100") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PrintTemplate> qw = QueryGenerator.initQueryWrapper(query, req.getParameterMap());
|
||||
qw.orderByAsc("template_code");
|
||||
Page<PrintTemplate> page = new Page<>(pageNo, pageSize);
|
||||
return Result.OK(service.page(page, qw));
|
||||
}
|
||||
|
||||
@AutoLog(value = "打印模板-图片分析生成原生JSON")
|
||||
@Operation(summary = "打印模板-上传图片分析为原生模板JSON(前端传 imageBase64;可接 OpenAI 兼容视觉模型)")
|
||||
@PostMapping(value = "/analyzeImageForNative")
|
||||
|
||||
Reference in New Issue
Block a user