From 2aac791fe69fb10034091945422161ca02393519 Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期三, 11 九月 2024 09:37:49 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java b/DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java index 7c0f802..a1abc83 100644 --- a/DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java +++ b/DriverZYTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java @@ -392,6 +392,7 @@ System.err.println("======服务里程======"+sum); if(counts < 5){ orderPrivateCar.setMileage(sum); + orderPrivateCar.setIsAbnormal(1); // 将数据存储到文件中 File file = new File(filePath + orderId + "_" + 1 + ".txt"); if(!file.exists()){ @@ -590,10 +591,10 @@ this.updateById(orderPrivateCar); return true;//第一条数据不作处理,直接存储 } - Map<String, String> distance = gdMapElectricFenceUtil.getDistance(now, old, 0);//直线距离 + Map<String, Double> distance = GeodesyUtil.getDistance(now, old);//直线距离 if(null != distance){ - String distance1 = distance.get("distance"); - if(Double.valueOf(distance1) > 50 && orderPrivateCar.getState()==5/* && orderPosition.getInsertTime().getTime()>=orderPrivateCar.getBoardingTime().getTime()*/){//大于50米表示在移动 + Double distance1 = distance.get("WGS84"); + if(distance1 > 50 && orderPrivateCar.getState()==5){//大于50米表示在移动 orderPrivateCar.setMileage(new BigDecimal(orderPrivateCar.getMileage()).add(new BigDecimal(distance1)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); this.updateById(orderPrivateCar); return true; -- Gitblit v1.7.1