feat:增加挂号打印模块

This commit is contained in:
2025-02-08 15:41:29 +08:00
parent f966dd9387
commit fc1e02264d
3 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
package com.dpkj.modules.print.service;
import com.alibaba.fastjson.JSONObject;
/**
* 打印服务接口
*
* @author <a href="https://gitee.com/shi-chongli">石头人</a>
* @version 1.0
* @since 2025-02-08 10:35:27
*/
public interface PrintService {
/**
* 生成小票图片
*
* @param data json数据用来填充模板
* @param template 模板html字符串或者模板名称
* @param width 图片宽度
* @param height 图片高度
* @param saveDir 图片的保存路径,如果为空,那么不进行图片的保存
*/
Object printImage(JSONObject data, String template, int width, int height, String saveDir);
/**
* 默认实现,给定一个默认可用的图片保存路径
*/
default Object printImage(JSONObject data, String template, int width, int height) {
return printImage(data, template, width, height, "D:\\images");
}
}