|
|
@ -262,25 +262,49 @@ public class PrinterTemplate { |
|
|
|
divLine3.put("type", "div_star"); |
|
|
|
divLine3.put("type", "div_star"); |
|
|
|
contents.add(divLine3); |
|
|
|
contents.add(divLine3); |
|
|
|
|
|
|
|
|
|
|
|
// 加油金额标题
|
|
|
|
|
|
|
|
JSONObject refuelPriceTitle = new JSONObject(); |
|
|
|
|
|
|
|
refuelPriceTitle.put("cont", "加油金额"); |
|
|
|
|
|
|
|
refuelPriceTitle.put("type", "text"); |
|
|
|
|
|
|
|
refuelPriceTitle.put("size", "11"); |
|
|
|
|
|
|
|
contents.add(refuelPriceTitle); |
|
|
|
|
|
|
|
// 加油金额
|
|
|
|
// 加油金额
|
|
|
|
JSONObject refuelPrice = new JSONObject(); |
|
|
|
JSONObject refuelPrice = new JSONObject(); |
|
|
|
refuelPrice.put("cont", "¥" + gasOrder.getGasRefuelPrice() + "元"); |
|
|
|
refuelPrice.put("cont", "加油金额:" + gasOrder.getGasRefuelPrice()+"元"); |
|
|
|
refuelPrice.put("type", "text"); |
|
|
|
refuelPrice.put("type", "text"); |
|
|
|
refuelPrice.put("size", "11"); |
|
|
|
|
|
|
|
contents.add(refuelPrice); |
|
|
|
contents.add(refuelPrice); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 优惠金额
|
|
|
|
|
|
|
|
JSONObject discountPrice = new JSONObject(); |
|
|
|
|
|
|
|
discountPrice.put("cont", "优惠金额:" + gasOrder.getTotalDeductionPrice()+"元"); |
|
|
|
|
|
|
|
discountPrice.put("type", "text"); |
|
|
|
|
|
|
|
contents.add(discountPrice); |
|
|
|
|
|
|
|
|
|
|
|
// 分割线
|
|
|
|
// 分割线
|
|
|
|
JSONObject divLine4 = new JSONObject(); |
|
|
|
JSONObject divLine4 = new JSONObject(); |
|
|
|
divLine4.put("cont", ""); |
|
|
|
divLine4.put("cont", ""); |
|
|
|
divLine4.put("type", "div_star"); |
|
|
|
divLine4.put("type", "div_star"); |
|
|
|
contents.add(divLine4); |
|
|
|
contents.add(divLine4); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 实际支付
|
|
|
|
|
|
|
|
JSONObject actualPayment = new JSONObject(); |
|
|
|
|
|
|
|
actualPayment.put("cont", "实际支付:" + gasOrder.getActualPayPrice()+"元"); |
|
|
|
|
|
|
|
actualPayment.put("type", "text"); |
|
|
|
|
|
|
|
contents.add(actualPayment); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* // 加油金额标题
|
|
|
|
|
|
|
|
JSONObject refuelPriceTitle = new JSONObject(); |
|
|
|
|
|
|
|
refuelPriceTitle.put("cont", "加油金额"); |
|
|
|
|
|
|
|
refuelPriceTitle.put("type", "text"); |
|
|
|
|
|
|
|
refuelPriceTitle.put("size", "11"); |
|
|
|
|
|
|
|
contents.add(refuelPriceTitle); |
|
|
|
|
|
|
|
// 加油金额
|
|
|
|
|
|
|
|
JSONObject refuelPrice = new JSONObject(); |
|
|
|
|
|
|
|
refuelPrice.put("cont", "¥" + gasOrder.getGasRefuelPrice() + "元"); |
|
|
|
|
|
|
|
refuelPrice.put("type", "text"); |
|
|
|
|
|
|
|
refuelPrice.put("size", "11"); |
|
|
|
|
|
|
|
contents.add(refuelPrice);*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 分割线
|
|
|
|
|
|
|
|
JSONObject divLine5 = new JSONObject(); |
|
|
|
|
|
|
|
divLine5.put("cont", ""); |
|
|
|
|
|
|
|
divLine5.put("type", "div_star"); |
|
|
|
|
|
|
|
contents.add(divLine5); |
|
|
|
|
|
|
|
|
|
|
|
// 小票底部
|
|
|
|
// 小票底部
|
|
|
|
JSONObject receiptBottom = new JSONObject(); |
|
|
|
JSONObject receiptBottom = new JSONObject(); |
|
|
|
receiptBottom.put("cont", (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptBottom"))?MapUtils.getString(receiptMap, "receiptBottom"):"开心又省钱; 来"嗨加油"")); |
|
|
|
receiptBottom.put("cont", (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptBottom"))?MapUtils.getString(receiptMap, "receiptBottom"):"开心又省钱; 来"嗨加油"")); |
|
|
|