Compare commits

...

2 Commits

Author SHA1 Message Date
胡锐 9bee35a965 Merge branch 'pre' into dev 2 months ago
胡锐 7f293ba7bf 提交代码 2 months ago
  1. 24
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 12
      service/src/main/java/com/hfkj/device/sanmisen/PrinterTemplate.java
  3. 24
      service/src/main/java/com/hfkj/device/spyun/SpPrinterTemplate.java

@ -18,6 +18,7 @@ import com.hfkj.entity.BsGasOrder;
import com.hfkj.entity.SecUser;
import com.hfkj.model.GasClassGroupTaskDataCount;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsDeviceService;
import com.hfkj.service.gas.BsGasClassGroupTaskService;
import com.hfkj.service.gas.BsGasOrderService;
import com.hfkj.service.sec.SecUserLoginLogService;
@ -47,6 +48,9 @@ public class TestController {
@Resource
private SecUserLoginLogService secUserLoginLogService;
@Resource
private BsDeviceService deviceService;
@RequestMapping(value="gasSyncPayment",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "壳牌推送")
@ -75,6 +79,26 @@ public class TestController {
}
}
@RequestMapping(value="printOrder",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "壳牌推送")
public ResponseData printOrder(@RequestParam(name = "orderNo", required = true) String orderNo) {
try {
// 查询加油订单
BsGasOrder gasOrder = gasOrderService.getDetailByOrderNo(orderNo);
if (gasOrder == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的加油的订单");
}
deviceService.printGasOrder(gasOrder.getMerId(), gasOrder, true);
return ResponseMsgUtil.success("");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@Resource
private MqttProviderConfig mqttProviderConfig;
@Resource

@ -236,18 +236,21 @@ public class PrinterTemplate {
JSONObject gunNo = new JSONObject();
gunNo.put("cont", "油枪:" + gasOrder.getGasGunNo()+"号");
gunNo.put("type", "text");
gunNo.put("size", "11");
contents.add(gunNo);
// 油品
JSONObject oilNo = new JSONObject();
oilNo.put("cont", "油品:" + gasOrder.getGasOilNo()+"#");
oilNo.put("type", "text");
oilNo.put("size", "11");
contents.add(oilNo);
// 升数
JSONObject oilLiters = new JSONObject();
oilLiters.put("cont", "升数:" + gasOrder.getGasOilLiters()+"升");
oilLiters.put("type", "text");
oilLiters.put("size", "11");
contents.add(oilLiters);
// 升数描述
@ -264,14 +267,16 @@ public class PrinterTemplate {
// 加油金额
JSONObject refuelPrice = new JSONObject();
refuelPrice.put("cont", "加油金额:" + gasOrder.getGasRefuelPrice()+"元");
refuelPrice.put("cont", "加油金额:" + gasOrder.getGasRefuelPrice());
refuelPrice.put("type", "text");
refuelPrice.put("size", "11");
contents.add(refuelPrice);
// 优惠金额
JSONObject discountPrice = new JSONObject();
discountPrice.put("cont", "优惠金额:" + gasOrder.getTotalDeductionPrice()+"元");
discountPrice.put("cont", "优惠金额:" + gasOrder.getTotalDeductionPrice());
discountPrice.put("type", "text");
discountPrice.put("size", "11");
contents.add(discountPrice);
// 分割线
@ -282,8 +287,9 @@ public class PrinterTemplate {
// 实际支付
JSONObject actualPayment = new JSONObject();
actualPayment.put("cont", "实际支付:" + gasOrder.getActualPayPrice()+"元");
actualPayment.put("cont", "实际支付:" + gasOrder.getActualPayPrice());
actualPayment.put("type", "text");
actualPayment.put("size", "11");
contents.add(actualPayment);
/* // 加油金额标题

@ -81,15 +81,15 @@ public class SpPrinterTemplate {
"支付时间:" + payTime + "<BR>" +
"电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "<BR>" +
"来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨加油")+ "<BR>" +
"油枪:"+ gunNo + "号<BR>" +
"油品:" + oilNo + "#<BR>" +
"升数:" + oilLiters +"升<BR>" +
"<L1>油枪:"+ gunNo + "号</L1><BR>" +
"<L1>油品:" + oilNo + "#</L1><BR>" +
"<L1>升数:" + oilLiters +"升</L1><BR>" +
"实际加油升数以油站加油机为准!<BR>" +
"------------------------------<BR>" +
"加油金额:"+ orderPrice + "<BR>" +
"优惠金额:" + discountPrice + "<BR>" +
"<L1>加油金额:"+ orderPrice + "</L1><BR>" +
"<L1>优惠金额:" + discountPrice + "</L1><BR>" +
"------------------------------<BR>" +
"实际支付:" + actualPayment +"<BR>" +
"<L1>实际支付:" + actualPayment +"</L1><BR>" +
/* "<L1>加油金额</L1><BR>" +
"<L1>¥" + orderPrice + "元</L1><BR>" +*/
"------------------------------<BR>" +
@ -132,15 +132,15 @@ public class SpPrinterTemplate {
"支付时间:" + payTime + "<BR>" +
"电话:" + (StringUtils.isNotBlank(phone)?phone.substring(0, 3) + "****" + phone.substring(7):"") + "<BR>" +
"来源:" + (StringUtils.isNotBlank(MapUtils.getString(receiptMap, "receiptSource"))?MapUtils.getString(receiptMap, "receiptSource"):"嗨加油")+ "<BR>" +
"油枪:"+ gunNo + "号<BR>" +
"油品:" + oilNo + "#<BR>" +
"升数:" + oilLiters +"升<BR>" +
"<L1>油枪:"+ gunNo + "号</L1><BR>" +
"<L1>油品:" + oilNo + "#</L1><BR>" +
"<L1>升数:" + oilLiters +"升</L1><BR>" +
"实际加油升数以油站加油机为准!<BR>" +
"------------------------------<BR>" +
"加油金额:"+ orderPrice + "<BR>" +
"优惠金额:" + discountPrice + "<BR>" +
"<L1>加油金额:"+ orderPrice + "</L1><BR>" +
"<L1>优惠金额:" + discountPrice + "</L1><BR>" +
"------------------------------<BR>" +
"实际支付:" + actualPayment +"<BR>" +
"<L1>实际支付:" + actualPayment +"</L1><BR>" +
/* "<L1>加油金额</L1><BR>" +
"<L1>¥" + orderPrice + "元</L1><BR>" +*/
"------------------------------<BR>" +

Loading…
Cancel
Save