| | |
| | | out.flush(); |
| | | out.close(); |
| | | |
| | | orderPrivateCar.setMileage(sum); |
| | | orderPrivateCar.setIsAbnormal(0); |
| | | |
| | | //获取预估里程,使用预估里程作为行驶里程计算金额 |
| | | String origins = orderPrivateCar.getStartLon() + "," + orderPrivateCar.getStartLat(); |
| | | String destination = orderPrivateCar.getGetoffLon() + "," + orderPrivateCar.getGetoffLat(); |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(origins, destination, 1); |
| | | Double distance1 = Double.valueOf(distance.get("distance")); |
| | | if(distance1 - sum > 1000){ |
| | | orderPrivateCar.setMileage(distance1); |
| | | orderPrivateCar.setIsAbnormal(1); |
| | | }else{ |
| | | orderPrivateCar.setMileage(sum); |
| | | orderPrivateCar.setIsAbnormal(0); |
| | | } |
| | | // String origins = orderPrivateCar.getStartLon() + "," + orderPrivateCar.getStartLat(); |
| | | // String destination = orderPrivateCar.getGetoffLon() + "," + orderPrivateCar.getGetoffLat(); |
| | | // Map<String, String> distance = gdMapElectricFenceUtil.getDistance(origins, destination, 1); |
| | | // Double distance1 = Double.valueOf(distance.get("distance")); |
| | | // if(distance1 - sum > 1000){ |
| | | // orderPrivateCar.setMileage(distance1); |
| | | // orderPrivateCar.setIsAbnormal(1); |
| | | // }else{ |
| | | // orderPrivateCar.setMileage(sum); |
| | | // orderPrivateCar.setIsAbnormal(0); |
| | | // } |
| | | break; |
| | | } |
| | | this.updateById(orderPrivateCar); |