| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.smallLogistics.model.OrderLogisticsSpread; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; |
| | | import com.stylefeng.guns.modular.smallLogistics.server.impl.OrderLogisticsSpreadService; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.model.OrderPosition; |
| | | import com.stylefeng.guns.modular.system.model.Reassign; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private OrderLogisticsSpreadService spreadService; |
| | | /** |
| | | * 获取服务中页面订单详情 |
| | | * @param orderId |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/order/queryOrderInfo") |
| | | @ApiOperation(value = "获取服务中页面订单详情", tags = {"司机端-服务中"}, notes = "") |
| | | @ApiOperation(value = "获取服务中页面订单详情", tags = {"司机端-服务中"}, notes = "",response = OrderInfoWarpper.class) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,4=小件物流-同城)", name = "orderType", required = true, dataType = "int"), |
| | |
| | | }else{ |
| | | orderInfoWarpper.setOrderPositionList(""); |
| | | } |
| | | |
| | | List<OrderLogisticsSpread> orderLogisticsId = spreadService.selectList(new EntityWrapper<OrderLogisticsSpread>().eq("orderLogisticsId", orderId)); |
| | | if (!orderLogisticsId.isEmpty()){ |
| | | double sum = 0; |
| | | for (OrderLogisticsSpread orderLogisticsSpread : orderLogisticsId) { |
| | | if (orderLogisticsSpread.getPayType() == 4) { |
| | | Double payMoney = orderLogisticsSpread.getPayMoney(); |
| | | sum = sum + payMoney; |
| | | } |
| | | } |
| | | sum = sum+orderInfoWarpper.getPayMoney(); |
| | | orderInfoWarpper.setPayMoney(sum); |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success(orderInfoWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | @ApiImplicitParam(value = "当前纬度", name = "lat", required = true, dataType = "double"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Double lon, Double lat,String phone, Integer language, HttpServletRequest request){ |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Double lon, Double lat,String phone, String pickUpCode, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return orderService.process(orderId, orderType, state, uid, lon, lat, phone, language); |
| | | return orderService.process(orderId, orderType, state, uid, lon, lat, phone, pickUpCode, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @ApiImplicitParam(value = "过路费", name = "crossingFee", required = false, dataType = "double"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil confirmFees(Integer orderId, Integer orderType, Integer type, Double travelFee, Double parkingFee, Double crossingFee){ |
| | | public ResultUtil confirmFees(Integer language, Integer orderId, Integer orderType, Integer type, Double travelFee, Double parkingFee, Double crossingFee){ |
| | | try{ |
| | | return orderService.confirmFees(orderId, orderType, type, travelFee, parkingFee, crossingFee); |
| | | return orderService.confirmFees(language, orderId, orderType, type, travelFee, parkingFee, crossingFee); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |