From 79a2f6ba6f64369b8ce5af01a4ad4451c518b2de Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 08 八月 2025 09:58:41 +0800 Subject: [PATCH] 修改bug --- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java index b5f8ad0..a8c056e 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java +++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java @@ -15,6 +15,7 @@ import com.stylefeng.guns.modular.system.dao.UserInfoMapper; import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.*; +import com.stylefeng.guns.modular.system.service.impl.OpenCityServiceImpl; import com.stylefeng.guns.modular.system.util.*; import com.stylefeng.guns.modular.system.util.qianyuntong.OrderUtil; import com.stylefeng.guns.modular.system.util.qianyuntong.model.CreateTravelItineraryRequest; @@ -39,6 +40,9 @@ @Resource private SystemPriceMapper systemPriceMapper; + + @Autowired + private ISystemPriceCityService systemPriceCityService; @Autowired private IDriverService driverService; @@ -103,8 +107,13 @@ @Resource private RedisTemplate<String, Object> redisTemplate; - - + + + + @Resource + private IOpenCityService openCityService; + + /** * 获取司机端首页订单列表 * @@ -469,7 +478,9 @@ map.put("emergencyCall", "110"); map.put("orders", JSON.toJSONString(orders)); return map;*/ - Map<String,Object> map = orderPrivateCarMapper.queryOrderInfo2(orderId); + OrderPrivateCar orderPrivateCar1 = orderPrivateCarMapper.selectById(orderId); + OpenCity openCity = openCityService.openCity1(orderPrivateCar1.getStartLon().toString(), orderPrivateCar1.getStartLat().toString()); + Map<String,Object> map = orderPrivateCarMapper.queryOrderInfo2(orderId, openCity.getId()); OrderPrivateCar orderPrivateCar = this.baseMapper.selectById(orderId); Integer canOperation=1; if(orderPrivateCar.getState()<5){ @@ -1043,7 +1054,9 @@ * @throws Exception */ public OrderPrivateCar setMoney(OrderPrivateCar orderPrivateCar, Double parkingFee, Double crossingFee) throws Exception { - Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); + Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()); + SystemPriceCity systemPriceCity = systemPriceCityService.queryOne(geocode.get("provinceCode"), geocode.get("cityCode"), geocode.get("districtCode")); + Map<String, Object> query1 = systemPriceMapper.query(systemPriceCity.getId(), 1, orderPrivateCar.getServerCarModelId()); //开始根据不同的方式计算金额 double amount = 0; JSONObject jsonObject = JSON.parseObject(String.valueOf(query1.get("content"))); -- Gitblit v1.7.1