Compare commits

..

No commits in common. '9bee35a96574ab0f926cf69e5b84fd6e9202771b' and '144d0eb3be4966c30dc3ecaf2300b12ffa2a97c8' have entirely different histories.

  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,7 +18,6 @@ import com.hfkj.entity.BsGasOrder;
import com.hfkj.entity.SecUser; import com.hfkj.entity.SecUser;
import com.hfkj.model.GasClassGroupTaskDataCount; import com.hfkj.model.GasClassGroupTaskDataCount;
import com.hfkj.model.ResponseData; import com.hfkj.model.ResponseData;
import com.hfkj.service.BsDeviceService;
import com.hfkj.service.gas.BsGasClassGroupTaskService; import com.hfkj.service.gas.BsGasClassGroupTaskService;
import com.hfkj.service.gas.BsGasOrderService; import com.hfkj.service.gas.BsGasOrderService;
import com.hfkj.service.sec.SecUserLoginLogService; import com.hfkj.service.sec.SecUserLoginLogService;
@ -48,9 +47,6 @@ public class TestController {
@Resource @Resource
private SecUserLoginLogService secUserLoginLogService; private SecUserLoginLogService secUserLoginLogService;
@Resource
private BsDeviceService deviceService;
@RequestMapping(value="gasSyncPayment",method = RequestMethod.GET) @RequestMapping(value="gasSyncPayment",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "壳牌推送") @ApiOperation(value = "壳牌推送")
@ -79,26 +75,6 @@ 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 @Resource
private MqttProviderConfig mqttProviderConfig; private MqttProviderConfig mqttProviderConfig;
@Resource @Resource

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

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

Loading…
Cancel
Save