From 0bdbf6122587d7e4bc2d8d10ad75a8da9addf823 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 18 Jul 2022 17:59:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hai/config/SpPrinterTemplate.java | 6 ++--- .../com/hai/config/ZkcPrinterTemplate.java | 4 +-- .../dao/HighGasClassGroupTaskMapperExt.java | 27 ++++++++++--------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java b/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java index 7dbce50a..b7e578e1 100644 --- a/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java +++ b/hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java @@ -30,14 +30,14 @@ public class SpPrinterTemplate { "退款升数汇总:" + dataCount.getRefundLiters() + "升
" + "
" + "--------------收款-------------
" + - "油号 金额 升数 笔数
"; + "油号 金额(元) 升数 笔数
"; String oilCountStr = ""; for (GasClassGroupTaskOilCount oilCount : dataCount.getGroupTaskOilCountList()) { - oilCountStr += oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + "元 " + oilCount.getRefuelLiters() + "升 " + oilCount.getRefuelNum() + "笔
"; + oilCountStr += oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + " " + oilCount.getRefuelLiters() + " " + oilCount.getRefuelNum() + "
"; } str += oilCountStr + - "==============================
" + + "================================
" + "" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") +"
"; return str; } diff --git a/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java b/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java index 2124a31c..e08f798f 100644 --- a/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java +++ b/hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java @@ -59,11 +59,11 @@ public class ZkcPrinterTemplate { stream.write("--------------收款--------------".getBytes("UTF-8")); stream.write(0x0A); - stream.write("油号 金额 升数 笔数".getBytes("UTF-8")); + stream.write("油号 金额(元) 升数 笔数".getBytes("UTF-8")); stream.write(0x0A); for (GasClassGroupTaskOilCount oilCount : dataCount.getGroupTaskOilCountList()) { - stream.write((oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + "元 " + oilCount.getRefuelNum() + "升 " + oilCount.getRefuelLiters() + "笔").getBytes("UTF-8")); + stream.write((oilCount.getOilNo() + "# " + oilCount.getRefuelPrice() + " " + oilCount.getRefuelLiters() + " " + oilCount.getRefuelNum()).getBytes("UTF-8")); stream.write(0x0A); } stream.write("================================".getBytes("UTF-8")); diff --git a/hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java index 7c711a09..82bba05d 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasClassGroupTaskMapperExt.java @@ -17,21 +17,23 @@ public interface HighGasClassGroupTaskMapperExt { " COUNT(1) refuelNum," + " case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" + " from high_child_order a" + - " where goods_type = 3 " + - " and gas_class_group_task_id = #{gasClassGroupTaskId} " + - " and child_orde_status in (2,3)" + + " LEFT JOIN high_order b on b.id = a.order_id" + + " where a.goods_type = 3 " + + " and a.gas_class_group_task_id = #{gasClassGroupTaskId} " + + " and b.order_status in (2,3)" + "") Map countRefuelData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId); @Select("") Map countRefundData(@Param("gasClassGroupTaskId") Long gasClassGroupTaskId); @@ -48,7 +50,8 @@ public interface HighGasClassGroupTaskMapperExt { " COUNT(1) refuelNum," + " case when SUM(a.gas_oil_liters) is not null then SUM(a.gas_oil_liters) else 0 end refuelLiters" + " from high_child_order a" + - " where gas_class_group_task_id = #{gasClassGroupTaskId} and goods_type = 3 and child_orde_status in (2,3)" + + " LEFT JOIN high_order b on b.id = a.order_id" + + " where a.gas_class_group_task_id = #{gasClassGroupTaskId} and a.goods_type = 3 and b.order_status in (2,3)" + " GROUP BY a.gas_oil_no) b on b.gas_oil_no = a.oil_no" + " WHERE a.merchant_store_id = #{gasId} and 0 ]]> " + "")