| | |
| | | for (int i = 0; i < 5; i++) { |
| | | updateTrip = fleetEngineUtil.updateTrip("COMPLETE", car.getVehicleId(), null, orderPrivateCar.getTripId(), null, null, null, null); |
| | | if(updateTrip){ |
| | | orderPrivateCar.setIsover(1); |
| | | this.updateById(orderPrivateCar); |
| | | break; |
| | | } |
| | | try { |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | }else{ |
| | | orderPrivateCar.setIsover(1); |
| | | this.updateById(orderPrivateCar); |
| | | } |
| | | |
| | | //上报行程 |
| | |
| | | Date date = new Date(); |
| | | double d = (null == orderPrivateCar.getMileage() ? 0D : orderPrivateCar.getMileage()) / 1000;//实际公里 |
| | | double t = ((orderPrivateCar.getEndServiceTime().getTime() - orderPrivateCar.getStartServiceTime().getTime()) / 60000) + 1;//实际时间(不满一分钟按一分钟算) |
| | | double w = ((orderPrivateCar.getStartServiceTime().getTime() - orderPrivateCar.getArriveTime().getTime()) / 60000) + 1;//等待分钟(不满一分钟按一分钟算) |
| | | double w = ((orderPrivateCar.getStartServiceTime().getTime() - (null == orderPrivateCar.getArriveTime() ? orderPrivateCar.getStartServiceTime() : orderPrivateCar.getArriveTime()).getTime()) / 60000) + 1;//等待分钟(不满一分钟按一分钟算) |
| | | double d1 = (d - num2) < 0 ? 0 : d - num2;//超出起步里程的公里 |
| | | double t1 = (t - num3) < 0 ? 0 : new BigDecimal(t - num3).setScale(0, BigDecimal.ROUND_UP).doubleValue();//超过起步分钟数的时间 |
| | | double w1 = (w - num6) < 0 ? 0 : new BigDecimal(w - num6).setScale(0, BigDecimal.ROUND_UP).doubleValue();//超出等待时间的时间 |