From fec8ff844027d0645a73573caaffe4c170798a25 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 26 Aug 2025 15:48:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=B8=E5=BC=A0id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gaotao/modules/base/entity/LabelSettingData.java | 2 +- .../java/com/gaotao/modules/base/utils/ZplGenerator.java | 8 ++++---- src/main/resources/mapper/base/BaseMapper.xml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gaotao/modules/base/entity/LabelSettingData.java b/src/main/java/com/gaotao/modules/base/entity/LabelSettingData.java index 7b20df5..5e2286f 100644 --- a/src/main/java/com/gaotao/modules/base/entity/LabelSettingData.java +++ b/src/main/java/com/gaotao/modules/base/entity/LabelSettingData.java @@ -25,7 +25,7 @@ public class LabelSettingData { private Integer canvasHeight; // 画布高度(像素) private Double physicalWidthMm; // 物理宽度(毫米) private Double physicalHeightMm; // 物理高度(毫米) - + private String paperId; public LabelSettingData() { } diff --git a/src/main/java/com/gaotao/modules/base/utils/ZplGenerator.java b/src/main/java/com/gaotao/modules/base/utils/ZplGenerator.java index c0d1fda..cdc087f 100644 --- a/src/main/java/com/gaotao/modules/base/utils/ZplGenerator.java +++ b/src/main/java/com/gaotao/modules/base/utils/ZplGenerator.java @@ -228,12 +228,12 @@ public class ZplGenerator { fontCmd.append(" ^CWJ,E:").append(fontFile); } else { // 使用系统默认字体 - fontCmd.append(" ^CWJ,E:MSYH.TTF"); + fontCmd.append(" ^CWJ,E:ARIAL.TTF"); log.warn("未找到字体文件映射,使用默认字体: {}", fontFamily); } } else { - // 默认使用微软雅黑 - fontCmd.append(" ^CWJ,E:MSYH.TTF"); + // 默认使用ARIAL.TTF + fontCmd.append(" ^CWJ,E:ARIAL.TTF"); } // 设置字体大小 @@ -530,7 +530,7 @@ public class ZplGenerator { // 设置中文字体 Integer fontSize = element.getFontSize() != null ? element.getFontSize() : 30; - zpl.append("^CI28 ^CWJ,E:MSYH.TTF ^CFJ,").append(fontSize).append("\n"); + zpl.append("^CI28 ^CWJ,E:ARIAL.TTF ^CFJ,").append(fontSize).append("\n"); // 基础文本 String data = element.getData() != null ? element.getData() : "流水号"; diff --git a/src/main/resources/mapper/base/BaseMapper.xml b/src/main/resources/mapper/base/BaseMapper.xml index b105e2e..7bc5606 100644 --- a/src/main/resources/mapper/base/BaseMapper.xml +++ b/src/main/resources/mapper/base/BaseMapper.xml @@ -5,7 +5,7 @@ SELECT ReportID labelNo, ReportFamily labelType, Reportfile labelName, ReportType labelClass, Remark remark, - PrintDirection printDirection, ZplCode zplCode, PaperSize paperSize, PaperOrientation paperOrientation, + PrintDirection printDirection, ZplCode zplCode, PaperSize paperSize, paper_id paperId, PaperOrientation paperOrientation, Dpi dpi, CanvasWidth canvasWidth, CanvasHeight canvasHeight,rfidFlag, PhysicalWidthMm physicalWidthMm, PhysicalHeightMm physicalHeightMm FROM ReportFileList