|
@@ -12,40 +12,40 @@ import java.util.List;
|
|
|
@SpringBootTest
|
|
|
class YijiaApplicationTests {
|
|
|
|
|
|
- @Resource
|
|
|
- private PayOrderService payOrderService;
|
|
|
+// @Resource
|
|
|
+// private PayOrderService payOrderService;
|
|
|
@Test
|
|
|
public void contextLoads() {
|
|
|
- String ordNo = "2546627325194192730676";
|
|
|
- List<PayOrder> list = payOrderService.getPayOrderList(ordNo);
|
|
|
- //logger.info("根据订单号,查询订单"+gson.toJson(list));
|
|
|
- String sn = "921611605"; //测试打印机 sn:921611605 key:72338zma
|
|
|
- String content;
|
|
|
- if (list != null && list.size() == 1) {
|
|
|
- content = "<CB>支付小票--商户联</CB><BR>";
|
|
|
- //content += "--------------------------------<BR>";
|
|
|
- content += "订单号:" + list.get(0).getOrderNo() + " <BR>";
|
|
|
- content += "时间:" + list.get(0).getCreatedDate().toString() + "<BR>";
|
|
|
- content += "油站:" + list.get(0).getStationName() + " 元<BR>";
|
|
|
- content += "油品: " + list.get(0).getOilName() + " 元<BR>";
|
|
|
- content += "油量: " + list.get(0).getOrderLiters() + " 升<BR>";
|
|
|
- content += "单价: " + list.get(0).getOilPirce() + " L/元<BR>";
|
|
|
- content += "金额: " + list.get(0).getReceivableAmt().toString() + " 元<BR>";
|
|
|
- content += "优惠: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
- content += "支付: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
- content += "--------------------------------<BR>";
|
|
|
- content = "<CB>支付小票--顾客联</CB><BR>";
|
|
|
- //content += "--------------------------------<BR>";
|
|
|
- content += "订单号:" + list.get(0).getOrderNo() + " <BR>";
|
|
|
- content += "时间:" + list.get(0).getCreatedDate().toString() + "<BR>";
|
|
|
- content += "油站:" + list.get(0).getStationName() + " 元<BR>";
|
|
|
- content += "油品: " + list.get(0).getOilName() + " 元<BR>";
|
|
|
- content += "油量: " + list.get(0).getOrderLiters() + " 升<BR>";
|
|
|
- content += "单价: " + list.get(0).getOilPirce() + " L/元<BR>";
|
|
|
- content += "金额: " + list.get(0).getReceivableAmt().toString() + " 元<BR>";
|
|
|
- content += "优惠: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
- content += "支付: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
- FeiEPrinterUtil.printReceipt(sn, content);
|
|
|
- }
|
|
|
+// String ordNo = "2546627325194192730676";
|
|
|
+// List<PayOrder> list = payOrderService.getPayOrderList(ordNo);
|
|
|
+// //logger.info("根据订单号,查询订单"+gson.toJson(list));
|
|
|
+// String sn = "921611605"; //测试打印机 sn:921611605 key:72338zma
|
|
|
+// String content;
|
|
|
+// if (list != null && list.size() == 1) {
|
|
|
+// content = "<CB>支付小票--商户联</CB><BR>";
|
|
|
+// //content += "--------------------------------<BR>";
|
|
|
+// content += "订单号:" + list.get(0).getOrderNo() + " <BR>";
|
|
|
+// content += "时间:" + list.get(0).getCreatedDate().toString() + "<BR>";
|
|
|
+// content += "油站:" + list.get(0).getStationName() + " 元<BR>";
|
|
|
+// content += "油品: " + list.get(0).getOilName() + " 元<BR>";
|
|
|
+// content += "油量: " + list.get(0).getOrderLiters() + " 升<BR>";
|
|
|
+// content += "单价: " + list.get(0).getOilPirce() + " L/元<BR>";
|
|
|
+// content += "金额: " + list.get(0).getReceivableAmt().toString() + " 元<BR>";
|
|
|
+// content += "优惠: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
+// content += "支付: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
+// content += "--------------------------------<BR>";
|
|
|
+// content = "<CB>支付小票--顾客联</CB><BR>";
|
|
|
+// //content += "--------------------------------<BR>";
|
|
|
+// content += "订单号:" + list.get(0).getOrderNo() + " <BR>";
|
|
|
+// content += "时间:" + list.get(0).getCreatedDate().toString() + "<BR>";
|
|
|
+// content += "油站:" + list.get(0).getStationName() + " 元<BR>";
|
|
|
+// content += "油品: " + list.get(0).getOilName() + " 元<BR>";
|
|
|
+// content += "油量: " + list.get(0).getOrderLiters() + " 升<BR>";
|
|
|
+// content += "单价: " + list.get(0).getOilPirce() + " L/元<BR>";
|
|
|
+// content += "金额: " + list.get(0).getReceivableAmt().toString() + " 元<BR>";
|
|
|
+// content += "优惠: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
+// content += "支付: " + list.get(0).getDiscountAmt().toString() + " 元<BR>";
|
|
|
+// FeiEPrinterUtil.printReceipt(sn, content);
|
|
|
+ // }
|
|
|
}
|
|
|
}
|