From 18dcf4b5eb16caca67919af7a9ca69d330f8fcec Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Sat, 15 Jun 2024 14:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/BsGasOrderController.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java index 65538eb..22961b5 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java @@ -12,6 +12,7 @@ import com.hfkj.entity.BsOrderSettle; import com.hfkj.model.ResponseData; import com.hfkj.model.SecUserSessionObject; import com.hfkj.model.UserSessionObject; +import com.hfkj.service.BsDeviceService; import com.hfkj.service.gas.BsGasOrderService; import com.hfkj.service.order.BsOrderService; import com.hfkj.sysenum.SecUserObjectTypeEnum; @@ -40,6 +41,8 @@ public class BsGasOrderController { private BsGasOrderService gasOrderService; @Resource private BsOrderService orderService; + @Resource + private BsDeviceService deviceService; @RequestMapping(value="/queryUserOilOrder",method = RequestMethod.GET) @ResponseBody @@ -110,5 +113,25 @@ public class BsGasOrderController { } + @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); + } + } + + }