From f58cca364b731eac2d60a440ffaa804be3cd43fd Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 30 六月 2023 10:32:28 +0800 Subject: [PATCH] 修改bug --- user/guns-admin/src/main/java/com/agentdriving/user/modular/system/service/impl/SystemConfigServiceImpl.java | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/user/guns-admin/src/main/java/com/agentdriving/user/modular/system/service/impl/SystemConfigServiceImpl.java b/user/guns-admin/src/main/java/com/agentdriving/user/modular/system/service/impl/SystemConfigServiceImpl.java index 2a303ca..bbda7c2 100644 --- a/user/guns-admin/src/main/java/com/agentdriving/user/modular/system/service/impl/SystemConfigServiceImpl.java +++ b/user/guns-admin/src/main/java/com/agentdriving/user/modular/system/service/impl/SystemConfigServiceImpl.java @@ -71,7 +71,12 @@ map2.put("time", ToolUtil.isEmpty(num1) ? "其他时段" : num1 + "-" + num2); map2.put("startingMileage", num4 + "-" + num5 + "公里"); map2.put("startingPrice", num6 + "元"); - map2.put("exceedStartingPrice", num7 + "元/" + num8 + "公里"); + if(num6 == 0){ + JSONObject jsonObject2 = num3.getJSONObject(num3.size() - 1); + Double num3_1 = jsonObject2.getDouble("num3"); + map2.put("startingPrice", num3_1 + "元"); + } + map2.put("exceedStartingPrice", num7 + "公里/" + num8 + "元"); longDistanceCharges.add(map2); } priceRulesWarpper.setBasePrice(JSON.toJSONString(basePrice)); @@ -90,7 +95,13 @@ Map<String, Object> map = new HashMap<>(); map.put("waitTime", num1 + "分钟/" + num2 + "元"); map.put("exceedWaitTime", "超出" + num3 + "分钟,收取" + num4 + "元/分钟"); - map.put("badWeather", num5 + "公里内加收" + num6 + "元,超过" + num7 + "公里按照订单单价的" + num8 + "倍计费,最高收取" + num9 + "元"); + map.put("badWeather", ""); + systemConfig = this.selectOne(new EntityWrapper<SystemConfig>().eq("type", 8)); + JSONObject jsonObject1 = JSON.parseObject(systemConfig.getContent()); + Integer num11 = jsonObject1.getInteger("num1");//开启恶劣天气计价 + if(1 == num11){ + map.put("badWeather", num5 + "公里内加收" + num6 + "元,超过" + num7 + "公里按照订单单价的" + num8 + "倍计费,最高收取" + num9 + "元"); + } priceRulesWarpper.setAdditionalFee(JSON.toJSONString(map)); } return priceRulesWarpper; -- Gitblit v1.7.1