| | |
| | | |
| | | if(date.getTime() > s.getTimeInMillis() && date.getTime() < e.getTimeInMillis()){ |
| | | if(d > rule.getDouble("num6") && d < rule.getDouble("num7")){ |
| | | yt1 = rule.getDouble("num18") * d; |
| | | yt1 = rule.getDouble("num18") * (d-rule.getDouble("num6")); |
| | | } |
| | | if(d > rule.getDouble("num9") && d < rule.getDouble("num10")){ |
| | | yt1 = rule.getDouble("num18") * rule.getDouble("num7"); |
| | |
| | | //高峰时段处理逻辑 |
| | | if((date.getTime() > s1.getTimeInMillis() && date.getTime() < e1.getTimeInMillis()) || (date.getTime() > s2.getTimeInMillis() && date.getTime() < e2.getTimeInMillis())){ |
| | | if(d > rule.getDouble("num6") && d < rule.getDouble("num7")){ |
| | | yt1 = rule.getDouble("num26") * d; |
| | | yt1 = rule.getDouble("num26") * (d-rule.getDouble("num6")); |
| | | } |
| | | if(d > rule.getDouble("num9") && d < rule.getDouble("num10")){ |
| | | yt1 = rule.getDouble("num26") * rule.getDouble("num7"); |
| | |
| | | }else{ |
| | | //其他时间段的计算 |
| | | if(d > rule.getDouble("num6") && d < rule.getDouble("num7")){ |
| | | yt1 = rule.getDouble("num8") * d; |
| | | yt1 = rule.getDouble("num8") * (d-rule.getDouble("num6")); |
| | | } |
| | | if(d > rule.getDouble("num9") && d < rule.getDouble("num10")){ |
| | | yt1 = rule.getDouble("num8") * rule.getDouble("num7"); |
| | |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | Integer companyId = driver.getCompanyId(); |
| | | List<CompanyCity> companyCityList = companyCityService.selectList(new EntityWrapper<CompanyCity>().eq("companyId", companyId)); |
| | | List<Map<String, Integer>> cityCode = new ArrayList<>(); |
| | | List<Map<String, Object>> cityCode = new ArrayList<>(); |
| | | List<Region> regions = regionMapper.selectList(null); |
| | | for (CompanyCity companyCity : companyCityList) { |
| | | Map<String, Integer> city = new HashMap<>(); |
| | | Map<String, Object> city = new HashMap<>(); |
| | | if(ToolUtil.isNotEmpty(companyCity.getAreaCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getAreaCode())); |
| | | city.put("name", regions.stream().filter(s->s.getCode().equals(companyCity.getAreaCode())).findFirst().get().getName()); |
| | | }else if(ToolUtil.isEmpty(companyCity.getAreaCode()) && ToolUtil.isNotEmpty(companyCity.getCityCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getCityCode())); |
| | | city.put("name", regions.stream().filter(s->s.getCode().equals(companyCity.getCityCode())).findFirst().get().getName()); |
| | | }else if(ToolUtil.isEmpty(companyCity.getCityCode()) && ToolUtil.isNotEmpty(companyCity.getProvinceCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getProvinceCode())); |
| | | city.put("name", regions.stream().filter(s->s.getCode().equals(companyCity.getProvinceCode())).findFirst().get().getName()); |
| | | } |
| | | cityCode.add(city); |
| | | } |
| | |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | Integer companyId = driver.getCompanyId(); |
| | | List<CompanyCity> companyCityList = companyCityService.selectList(new EntityWrapper<CompanyCity>().eq("companyId", companyId)); |
| | | List<Map<String, Integer>> cityCode = new ArrayList<>(); |
| | | List<Map<String, Object>> cityCode = new ArrayList<>(); |
| | | List<Region> regions = regionMapper.selectList(null); |
| | | for (CompanyCity companyCity : companyCityList) { |
| | | Map<String, Integer> city = new HashMap<>(); |
| | | Map<String, Object> city = new HashMap<>(); |
| | | if(ToolUtil.isNotEmpty(companyCity.getAreaCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getAreaCode())); |
| | | city.put("name", regions.stream().filter(s->s.getCode().equals(companyCity.getAreaCode())).findFirst().get().getName()); |
| | | }else if(ToolUtil.isEmpty(companyCity.getAreaCode()) && ToolUtil.isNotEmpty(companyCity.getCityCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getCityCode())); |
| | | city.put("name", regions.stream().filter(s->s.getCode().equals(companyCity.getCityCode())).findFirst().get().getName()); |
| | | }else if(ToolUtil.isEmpty(companyCity.getCityCode()) && ToolUtil.isNotEmpty(companyCity.getProvinceCode())){ |
| | | city.put("code", Integer.valueOf(companyCity.getProvinceCode())); |
| | | city.put("name", regions.stream().filter(s->s.getCode().equals(companyCity.getProvinceCode())).findFirst().get().getName()); |
| | | } |
| | | cityCode.add(city); |
| | | } |