Merge remote-tracking branch 'origin/2.0-dev' into 2.0-dev

new-dev
袁野 1 year ago
commit f271c9de11
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  2. 4
      hai-service/src/main/java/com/hai/config/SpPrinterTemplate.java
  3. 4
      hai-service/src/main/java/com/hai/config/ZkcPrinterTemplate.java

@ -73,11 +73,11 @@ public class HighOrderController {
@RequestMapping(value = "/print", method = RequestMethod.GET) @RequestMapping(value = "/print", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "打印") @ApiOperation(value = "打印")
public ResponseData print(@RequestParam(name = "orderId", required = true) Long orderId, public ResponseData print(@RequestParam(name = "orderNo", required = true) String orderNo,
@RequestParam(name = "printType", required = true) Integer printType) { @RequestParam(name = "printType", required = true) Integer printType) {
try { try {
HighOrder order = highOrderService.getOrderById(orderId); HighOrder order = highOrderService.getOrderByOrderNo(orderNo);
if (order == null) { if (order == null) {
log.error("HighCouponController -> getCouponList() error!","权限不足"); log.error("HighCouponController -> getCouponList() error!","权限不足");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");

@ -77,7 +77,7 @@ public class SpPrinterTemplate {
"------------------------------<BR>" + "------------------------------<BR>" +
"打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" + "打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" +
"支付时间:" + payTime + "<BR>" + "支付时间:" + payTime + "<BR>" +
"电话:" + phone.substring(0, 3) + "****" + phone.substring(7) + "<BR>" + "电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "<BR>" +
"来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" + "来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" +
"油枪:"+ gunNo + "号<BR>" + "油枪:"+ gunNo + "号<BR>" +
"油品:" + oilNo + "#<BR>" + "油品:" + oilNo + "#<BR>" +
@ -122,7 +122,7 @@ public class SpPrinterTemplate {
"------------------------------<BR>" + "------------------------------<BR>" +
"打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" + "打印时间:" + DateUtil.date2String(new Date(), "yyyy-MM-dd HH:mm:ss") + "<BR>" +
"支付时间:" + payTime + "<BR>" + "支付时间:" + payTime + "<BR>" +
"电话:" + phone.substring(0, 3) + "****" + phone.substring(7) + "<BR>" + "电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "<BR>" +
"来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" + "来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")+ "<BR>" +
"油枪:"+ gunNo + "号<BR>" + "油枪:"+ gunNo + "号<BR>" +
"油品:" + oilNo + "#<BR>" + "油品:" + oilNo + "#<BR>" +

@ -153,7 +153,7 @@ public class ZkcPrinterTemplate {
stream.write(("支付时间:" + payTime).getBytes("UTF-8")); stream.write(("支付时间:" + payTime).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write(("电话:" + phone.substring(0, 3) + "****" + phone.substring(7)).getBytes("UTF-8")); stream.write(("电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"")).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write(("来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")).getBytes("UTF-8")); stream.write(("来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨森逛")).getBytes("UTF-8"));
@ -257,7 +257,7 @@ public class ZkcPrinterTemplate {
stream.write(("支付时间:" + payTime).getBytes("UTF-8")); stream.write(("支付时间:" + payTime).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write(("电话:" + phone.substring(0, 3) + "****" + phone.substring(7)).getBytes("UTF-8")); stream.write(("电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"")).getBytes("UTF-8"));
stream.write(0x0A); stream.write(0x0A);
stream.write("来源:嗨森逛".getBytes("UTF-8")); stream.write("来源:嗨森逛".getBytes("UTF-8"));

Loading…
Cancel
Save