| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | |
| | | @Override |
| | | public ResultUtil process(Integer orderId, Integer state, Double lon, Double lat, String address) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | System.err.println("==========="+orderId); |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | | orderPrivateCar.setState(3); |
| | |
| | | orderPrivateCar.setGetoffAddress(address); |
| | | orderPrivateCar.setGetoffTime(new Date()); |
| | | orderPrivateCar.setEndServiceTime(new Date()); |
| | | |
| | | // //设置结束的时候的经纬度 |
| | | // if (orderPrivateCar.getEndLat()!=null){ |
| | | // orderPrivateCar.setEndLon(lon); |
| | | // orderPrivateCar.setEndLat(lat); |
| | | // orderPrivateCar.setEndAddress(address); |
| | | // } |
| | | |
| | | |
| | | break; |
| | | } |
| | | this.updateById(orderPrivateCar); |
| | |
| | | }).start(); |
| | | return ResultUtil.success(); |
| | | } |
| | | @Override |
| | | public ResultUtil specail(Integer orderId, Double lon, Double lat, String endAddress) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | orderPrivateCar.setEndLon(lon); |
| | | orderPrivateCar.setEndLat(lat); |
| | | orderPrivateCar.setEndAddress(endAddress); |
| | | |
| | | |
| | | this.updateById(orderPrivateCar); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | |