| | |
| | | long duration = distancematrix.getDuration();//时间(秒) |
| | | long duration_ = Long.valueOf(duration).longValue(); |
| | | |
| | | List<ServerCarModelWarpper> price = this.getPrice(query.getId(), distance1_, duration_, 0, 1); |
| | | List<ServerCarModelWarpper> price = this.getPrice(query.getId(), distance1_, duration_, 0, type); |
| | | if(price.size() == 0){ |
| | | return ResultUtil.error(language == 1 ? "未获取到可服务的车型" : language == 2 ? "Not obtaining available vehicle-type" : "Ne pas obtenir le type de véhicule disponible", new ArrayList<>()); |
| | | } |
| | |
| | | } |
| | | //开始根据不同的方式计算金额 |
| | | double amount = 0; |
| | | if(type == 1){//专车 |
| | | if(type == 1 || type == 4){//专车 |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString()); |
| | | Double num1 = jsonObject.getDouble("num1");//起步价(元) |
| | | Double num2 = jsonObject.getDouble("num2");//起步公里(公里) |