| | |
| | | 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 |
| | |
| | | }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()!=null&&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(); |