| | |
| | | } |
| | | } |
| | | }).start(); |
| | | // OrderPosition orderPosition = new OrderPosition(); |
| | | // orderPosition.setOrderId(orderId); |
| | | // orderPosition.setOrderType(1); |
| | | // orderPosition.setDriverId(orderPrivateCar.getDriverId()); |
| | | // orderPosition.setLat(lat.toString()); |
| | | // orderPosition.setLon(lon.toString()); |
| | | // orderPosition.setAltitude("0"); |
| | | // orderPosition.setDirectionAngle("0"); |
| | | // //先计算里程,在存储最新位置 |
| | | // orderPosition.setInsertTime(new Date()); |
| | | // //将数据存储到文件中 |
| | | // List<OrderPosition> orderPositions = orderPositionService.queryPosition(orderPosition.getOrderId(), orderPosition.getOrderType()); |
| | | // File file = new File(filePath + orderPosition.getOrderId() + "_" + orderPosition.getOrderType() + ".txt"); |
| | | // if(!file.exists()){ |
| | | // file.getParentFile().mkdirs(); |
| | | // file.createNewFile(); |
| | | // } |
| | | // //写入相应的文件 |
| | | // PrintWriter out = new PrintWriter(new FileWriter(file)); |
| | | // orderPositions.add(orderPosition); |
| | | // out.write(JSON.toJSONString(orderPositions)); |
| | | // out.flush(); |
| | | // out.close(); |
| | | break; |
| | | case 6://结束服务(专车可以返回继续服务)不修改状态 |
| | | orderPrivateCar.setGetoffLon(lon); |
| | |
| | | @Override |
| | | public ResultUtil confirmFees(Integer orderId, Integer type, Double parkingFee, Double crossingFee) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | if(orderPrivateCar.getState() != 5){ |
| | | return ResultUtil.error("异常操作,请刷新订单"); |
| | | } |
| | | if(orderPrivateCar.getArriveTime()==null){ |
| | | orderPrivateCar.setArriveTime(orderPrivateCar.getStartServiceTime()); |
| | | } |