From bf2acefcf5ba801d3e4a4f507c5f064fc93625cc Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期四, 21 八月 2025 00:25:09 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/QianYunTong --- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java | 88 ++++++++++++++++++++++++++++++++------------ 1 files changed, 64 insertions(+), 24 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java index 10b334c..2c0128a 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java +++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java @@ -64,6 +64,10 @@ @Autowired private IOpenCityService openCityService; + @Autowired + private ICarService carService; + + @@ -257,6 +261,18 @@ if(null == driverWork1){ return ResultUtil.error("您已下班,无法接单"); } + + Driver driver = driverService.selectById(uid); + + //判断车辆是否正在使用中 + Car car = carService.selectById(driver.getCarId()); + if(car.getUseDriverId() != null && !car.getUseDriverId().equals(uid)){ + return ResultUtil.error("当前绑定车辆正在使用中,请更换车辆"); + }else if(car.getUseDriverId()==null){ + car.setUseDriverId(uid); + carService.updateById(car); + } + return orderService.grabOrder(orderId, orderType, uid); }catch (Exception e){ e.printStackTrace(); @@ -315,6 +331,9 @@ return ResultUtil.runErr(); } } + + + @ResponseBody @PostMapping("/api/order/queryOrderInfo1") @@ -421,7 +440,7 @@ @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,4=小件物流-同城,5=小件物流-跨城)", name = "orderType", required = true, dataType = "int"), @ApiImplicitParam(value = "改派支付方式(1=微信,2=支付宝,3=余额,4=云闪付)", name = "payType", required = false, dataType = "int"), - @ApiImplicitParam(value = "改派原因", name = "reason", required = true, dataType = "string"), + @ApiImplicitParam(value = "改派原因", name = "reason", required = false, dataType = "string"), @ApiImplicitParam(value = "备注", name = "remark", required = false, dataType = "string"), @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") }) @@ -439,6 +458,36 @@ return ResultUtil.runErr(); } } + + + + + @ResponseBody + @PostMapping("/api/order/reassignCancel") + @ApiOperation(value = "提交改派申请--取消", tags = {"司机端-服务中"}, notes = "") + @ApiImplicitParams({ + @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), + @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,4=小件物流-同城,5=小件物流-跨城)", name = "orderType", required = true, dataType = "int"), + @ApiImplicitParam(value = "改派支付方式(1=微信,2=支付宝,3=余额,4=云闪付)", name = "payType", required = false, dataType = "int"), + @ApiImplicitParam(value = "改派原因", name = "reason", required = false, dataType = "string"), + @ApiImplicitParam(value = "备注", name = "remark", required = false, dataType = "string"), + @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") + }) + public ResultUtil reassignCancel(Reassign reassign, HttpServletRequest request){ + try { + Integer uid = driverService.getUserIdFormRedis(request); + if(null == uid){ + return ResultUtil.tokenErr(); + } + return reassignService.saveDataCancel(reassign, uid, null); + }catch (SystemException s){ + return ResultUtil.error(s.getMsg()); + } catch (Exception e){ + e.printStackTrace(); + return ResultUtil.runErr(); + } + } + /** @@ -538,6 +587,10 @@ return ResultUtil.runErr(); } } + + + + @ResponseBody @PostMapping("/api/order/cancleOrder") @@ -555,6 +608,9 @@ return ResultUtil.runErr(); } } + + + @ResponseBody @PostMapping("/api/order/updatePeopleNum") @ApiOperation(value = "修改人数", tags = {"司机端-服务中"}, notes = "") @@ -572,6 +628,8 @@ return ResultUtil.runErr(); } } + + @ResponseBody @PostMapping("/api/order/confirmFees1") @@ -707,30 +765,7 @@ } - @ResponseBody - @PostMapping("/base/order/test") - public String test(String phoneA, String phoneB){ - try { - Map<String, String> map = chinaMobileUtil.midAxbBindSend(phoneA, phoneB, (System.currentTimeMillis() + 86400000)); - System.err.println(JSON.toJSONString(map)); - }catch (Exception e){ - e.printStackTrace(); - return ""; - } - return null; - } - @ResponseBody - @PostMapping("/base/order/test_") - public String test(String bindId){ - try { - Map<String, String> map = chinaMobileUtil.midAxbUnBindSend(bindId, null, null); - }catch (Exception e){ - e.printStackTrace(); - return ""; - } - return null; - } /** @@ -763,6 +798,9 @@ } + + + @ResponseBody @PostMapping("/api/order/queryVoiceBroadcast") @ApiOperation(value = "接单后获取语音播报内容", tags = {"司机端-首页"}, notes = "") @@ -809,6 +847,8 @@ } } + + @ResponseBody -- Gitblit v1.7.1