From 503ff3a73e98f7d01d347e397dff4e09eedc59f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=A4=B4=E4=BA=BA?= <3076767823@qq.com> Date: Wed, 26 Mar 2025 13:01:53 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/dpkj/common/exception/ControllerAdvice.java | 12 ++++++------ .../print/service/impl/RegisterServiceImpl.java | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/dpkj/common/exception/ControllerAdvice.java b/src/main/java/com/dpkj/common/exception/ControllerAdvice.java index 596c4c8..4298bbb 100644 --- a/src/main/java/com/dpkj/common/exception/ControllerAdvice.java +++ b/src/main/java/com/dpkj/common/exception/ControllerAdvice.java @@ -60,7 +60,7 @@ public class ControllerAdvice { */ @ExceptionHandler(value = NullPointerException.class) public Result nullPointException(NullPointerException nullPointerException) { - log.error("空指针异常类型: {},信息: {}", nullPointerException.getClass(),nullPointerException.getMessage()); + log.error("空指针异常类型: {},信息: {}", nullPointerException.getClass(), nullPointerException); return Result.error(ErrorEnum.NULL_POINTER_EXCEPTION); } @@ -86,7 +86,7 @@ public class ControllerAdvice { */ @ExceptionHandler(value = HttpMessageNotReadableException.class) public Result httpMessageNotReadAbleException(HttpMessageNotReadableException e){ - log.warn("异常类型: {} 无可读信息: {}", e.getClass(), e.getMessage()); + log.warn("异常类型: {} 无可读信息: ", e.getClass(), e); return Result.error(ErrorEnum.HTTP_MESSAGE_NOT_READABLE_EXCEPTION); } @@ -97,7 +97,7 @@ public class ControllerAdvice { */ @ExceptionHandler(value = RuntimeException.class) public Result runtimeException(RuntimeException e){ - log.error("运行时异常:{}", e.getMessage()); + log.error("运行时异常:", e); if (e instanceof RRException){ RRException rrException = (RRException) e; return Result.error(rrException.getCode(), rrException.getMsg()); @@ -111,7 +111,7 @@ public class ControllerAdvice { */ @ExceptionHandler(value = HttpRequestMethodNotSupportedException.class) public Result httpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e){ - log.warn("暂不支持该请求: {}", e.getMessage()); + log.warn("暂不支持该请求: ", e); return Result.error("暂不支持此请求方式"); } @@ -121,7 +121,7 @@ public class ControllerAdvice { */ @ExceptionHandler(MethodArgumentTypeMismatchException.class) public Result methodArgument(MethodArgumentTypeMismatchException e){ - log.warn("参数发生错误: {}", e.getMessage()); + log.warn("参数发生错误: ", e); return Result.error("参数发生错误"); } @@ -132,7 +132,7 @@ public class ControllerAdvice { */ @ExceptionHandler(MissingServletRequestParameterException.class) public Result exception(MissingServletRequestParameterException e){ - log.warn("缺少请求参数: {}", e.getMessage()); + log.warn("缺少请求参数: ", e); return Result.error("缺少请求参数"); } diff --git a/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java b/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java index c916997..25d01fa 100644 --- a/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java +++ b/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java @@ -51,6 +51,13 @@ public class RegisterServiceImpl implements PrintService { width = FIXED_WIDTH; } + if ( StringUtils.isEmpty(printerConfig.getTimeType())){ + throw new RRException("获取打印时间格式出错:" + printerConfig.getTimeType()); + } + if ( StringUtils.isEmpty(printerConfig.getTerminalNumber())){ + throw new RRException("获取终端号出错:" + printerConfig.getTerminalNumber()); + } + // 强行设置终端号 data.put("terminalNumber", printerConfig.getTerminalNumber()); From 20b25042b5cd02afdea19bb1d699ac1a1caff003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=A4=B4=E4=BA=BA?= <3076767823@qq.com> Date: Wed, 26 Mar 2025 13:09:25 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E5=88=86=E5=89=B2=E5=87=BA=E7=8E=B0=E9=BB=91=E8=BE=B9?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dpkj/modules/print/service/impl/RegisterServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java b/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java index 25d01fa..77a2143 100644 --- a/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java +++ b/src/main/java/com/dpkj/modules/print/service/impl/RegisterServiceImpl.java @@ -136,8 +136,8 @@ public class RegisterServiceImpl implements PrintService { int pieceHeight = Math.min(MAX_HEIGHT, height - startY); // 创建一个新的 BufferedImage 对象,用于存储切割的部分 - BufferedImage piece = new BufferedImage(FIXED_WIDTH, pieceHeight, BufferedImage.TYPE_INT_RGB); - piece.getGraphics().drawImage(originalImage, 0, 0, FIXED_WIDTH, pieceHeight, 0, startY, FIXED_WIDTH, startY + pieceHeight, null); + BufferedImage piece = new BufferedImage(width, pieceHeight, BufferedImage.TYPE_INT_RGB); + piece.getGraphics().drawImage(originalImage, 0, 0, width, pieceHeight, 0, startY, width, startY + pieceHeight, null); // 保存切割的图片块 File outputFile = new File(saveDir + "/output_" + (i + 1) + ".jpg"); From ffaa06f934090fb0747f1d5de65cb9559c9d90f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=A4=B4=E4=BA=BA?= <3076767823@qq.com> Date: Wed, 26 Mar 2025 13:10:41 +0800 Subject: [PATCH 3/8] =?UTF-8?q?fix=EF=BC=9A=E6=81=A2=E5=A4=8D=E5=8E=9F?= =?UTF-8?q?=E5=A7=8B=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/department.html | 202 ++++--------------- 1 file changed, 37 insertions(+), 165 deletions(-) diff --git a/src/main/resources/templates/department.html b/src/main/resources/templates/department.html index 82526a0..3f6537c 100644 --- a/src/main/resources/templates/department.html +++ b/src/main/resources/templates/department.html @@ -1,185 +1,57 @@ - + 门诊缴费凭证 - -
-
-
************
-
-
+
+
+
************
+
+
-
- ----------------------------------------------------------------------------- -
-
-
-
姓名:
-
性别:
-
年龄:
+
-----------------------------------------------------------------------------
+
+
+ 姓名:
+ 性别: + 年龄:
-
-
门诊号:
-
就诊医生:
-
-
就诊科室:
+
门诊号:
+
就诊医生:
+
就诊科室:
-
- ----------------------------------------------------------------------------- +
-----------------------------------------------------------------------------
+
+
费用总额: 个人支付:
+
实收金额:
+
实收金额:
-
-
-
费用总额:
-
个人支付:
-
-
实收金额:
-
实收金额:
-
-
- ----------------------------------------------------------------------------- -
-
- - - - - - +
-----------------------------------------------------------------------------
+
+
项目名称数量单价小计
+ + + + + - - - - - + + + + +
项目名称数量单价小计
-
- ----------------------------------------------------------------------------- -
-
+
-----------------------------------------------------------------------------
+
终端编号:
打印时间:
-
- 温馨提示
+
+ 温馨提示
1.请取走全部凭条、并妥善保管
2.如果对缴费结算存在疑问,请到人工窗口咨询
From 546f644ffd79fb1e3531b9f629f0c02ae12e9b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E5=A4=B4=E4=BA=BA?= <3076767823@qq.com> Date: Wed, 26 Mar 2025 13:11:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix=EF=BC=9Apom=E6=96=87=E4=BB=B6=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E7=A7=BB=E9=99=A4=E5=AF=B9resource=E7=9A=84=E6=8E=92?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 3edf6c6..0f590a7 100644 --- a/pom.xml +++ b/pom.xml @@ -191,13 +191,13 @@ - - *.yml - *.xml - templates/** - win32-x86-64/** - win32-x86/** - + + + + + + + ${project.build.directory}/output From 3938301b6635dcfa0b24a55a4d1ba23f8481498c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=96=87=E8=B4=A2?= Date: Wed, 26 Mar 2025 13:21:55 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E9=97=A8=E8=AF=8A=E5=B0=8F=E7=A5=A8T2?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E6=B7=BB=E5=8A=A0=E4=BB=A5class=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E7=9A=84=E6=96=87=E4=BB=B6=EF=BC=8C=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E4=B8=BA=E5=86=85=E8=81=94=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/department.html | 193 ++++-------------- src/main/resources/templates/department2.html | 188 +++++++++++++++++ 2 files changed, 227 insertions(+), 154 deletions(-) create mode 100644 src/main/resources/templates/department2.html diff --git a/src/main/resources/templates/department.html b/src/main/resources/templates/department.html index 82526a0..af0cc44 100644 --- a/src/main/resources/templates/department.html +++ b/src/main/resources/templates/department.html @@ -3,183 +3,68 @@ 门诊缴费凭证 - -
-
-
************
-
-
+
+
+
************
+
+
-
+
-----------------------------------------------------------------------------
-
-
-
姓名:
-
性别:
-
年龄:
+
+
+
姓名:
+
性别:
+
年龄:
-
-
门诊号:
-
就诊医生:
+
+
门诊号:
+
就诊医生:
-
就诊科室:
+
就诊科室:
-
+
-----------------------------------------------------------------------------
-
-
-
费用总额:
-
个人支付:
+
+
+
费用总额:
+
个人支付:
-
实收金额:
-
实收金额:
+
实收金额:
+
实收金额:
-
+
-----------------------------------------------------------------------------
-
- - - - - - +
+
项目名称数量单价小计
+ + + + + - - - - - + + + + +
项目名称数量单价小计
-
+
-----------------------------------------------------------------------------
-
+
终端编号:
打印时间:
-
- 温馨提示
+
+ 温馨提示
1.请取走全部凭条、并妥善保管
2.如果对缴费结算存在疑问,请到人工窗口咨询
diff --git a/src/main/resources/templates/department2.html b/src/main/resources/templates/department2.html new file mode 100644 index 0000000..82526a0 --- /dev/null +++ b/src/main/resources/templates/department2.html @@ -0,0 +1,188 @@ + + + + + 门诊缴费凭证 + + + +
+
+
************
+
+
+
+
+ ----------------------------------------------------------------------------- +
+
+
+
姓名:
+
性别:
+
年龄:
+
+
+
门诊号:
+
就诊医生:
+
+
就诊科室:
+
+
+ ----------------------------------------------------------------------------- +
+
+
+
费用总额:
+
个人支付:
+
+
实收金额:
+
实收金额:
+
+
+ ----------------------------------------------------------------------------- +
+
+ + + + + + + + + + + + + +
项目名称数量单价小计
+
+
+ ----------------------------------------------------------------------------- +
+
+
终端编号:
+
打印时间:
+
+
+ 温馨提示
+ 1.请取走全部凭条、并妥善保管
+ 2.如果对缴费结算存在疑问,请到人工窗口咨询 +
+
+ + From aa0dc128050cff04b4c6abd56b523f0d3a30d68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=96=87=E8=B4=A2?= Date: Wed, 26 Mar 2025 13:23:10 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/department.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/templates/department.html b/src/main/resources/templates/department.html index 3f6537c..fad3087 100644 --- a/src/main/resources/templates/department.html +++ b/src/main/resources/templates/department.html @@ -1,5 +1,5 @@ - + 门诊缴费凭证 From 12f2374ccfdf44e3f67318ee413b39bfa639398a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=96=87=E8=B4=A2?= Date: Wed, 26 Mar 2025 13:33:30 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/department.html | 73 ++++++++++++-------- 1 file changed, 43 insertions(+), 30 deletions(-) diff --git a/src/main/resources/templates/department.html b/src/main/resources/templates/department.html index fad3087..af0cc44 100644 --- a/src/main/resources/templates/department.html +++ b/src/main/resources/templates/department.html @@ -7,45 +7,58 @@
-
************
-
+
************
+
-
-----------------------------------------------------------------------------
-
-
- 姓名:
- 性别: - 年龄: +
+ ----------------------------------------------------------------------------- +
+
+
+
姓名:
+
性别:
+
年龄:
-
门诊号:
-
就诊医生:
-
就诊科室:
+
+
门诊号:
+
就诊医生:
+
+
就诊科室:
-
-----------------------------------------------------------------------------
-
-
费用总额: 个人支付:
-
实收金额:
-
实收金额:
+
+ -----------------------------------------------------------------------------
-
-----------------------------------------------------------------------------
-
- - - - - - +
+
+
费用总额:
+
个人支付:
+
+
实收金额:
+
实收金额:
+
+
+ ----------------------------------------------------------------------------- +
+
+
项目名称数量单价小计
+ + + + + - - - - - + + + + +
项目名称数量单价小计
-
-----------------------------------------------------------------------------
+
+ ----------------------------------------------------------------------------- +
终端编号:
打印时间:
From 3eb441d41c2283f29f04135ad9126d6b1e533d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=96=87=E8=B4=A2?= Date: Wed, 26 Mar 2025 14:01:23 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/templates/department.html | 27 ++++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/main/resources/templates/department.html b/src/main/resources/templates/department.html index af0cc44..6cfb6af 100644 --- a/src/main/resources/templates/department.html +++ b/src/main/resources/templates/department.html @@ -15,27 +15,32 @@ -----------------------------------------------------------------------------
-
-
姓名:
-
性别:
-
年龄:
+
+
+ 姓名: +
+
性别:
+
年龄:
-
门诊号:
-
就诊医生:
+
+ 门诊号:
+
+ 就诊医生: +
-
就诊科室:
+
就诊科室:
-----------------------------------------------------------------------------
-
费用总额:
-
个人支付:
+
费用总额:
+
个人支付:
-
实收金额:
-
实收金额:
+
实收金额:
+
实收金额:
-----------------------------------------------------------------------------