From a3990d3644885c51f4ea0fc7a27c1097f4808bfb Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期四, 30 五月 2024 11:05:42 +0800 Subject: [PATCH] 5.30 --- DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java | 70 +++++++++++++++++++++++++++++++++-- 1 files changed, 66 insertions(+), 4 deletions(-) diff --git a/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java b/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java index 240f769..868fdd1 100644 --- a/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java +++ b/DriverNTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderServiceImpl.java @@ -205,6 +205,10 @@ List<Map<String, Object>> list3 = orderLogisticsService.queryMyAllOrder(state, uid); datas.addAll(list3); + //接送机 + List<Map<String, Object>> list4 = orderTransferService.queryOrderList(state,uid); + datas.addAll(list4); + List<OrderListWarpper> orderListWarpper = OrderListWarpper.getOrderListWarpper(datas); //分页 @@ -280,10 +284,15 @@ String distance = gdMapElectricFenceUtil.getDistance(lon + "," + lat, order, 1).get("distance"); map.put("startDistance", ToolUtil.isNotEmpty(distance) ? Double.valueOf(distance) / 1000 : 0); - //总距离 - String end = String.valueOf(map.get("endLon")) + "," + String.valueOf(map.get("endLat")); - distance = gdMapElectricFenceUtil.getDistance(end, order, 1).get("distance"); - map.put("totalDistance", ToolUtil.isNotEmpty(distance) ? Double.valueOf(distance) / 1000 : 0); + try { + //总距离 + String end = String.valueOf(map.get("endLon")) + "," + String.valueOf(map.get("endLat")); + distance = gdMapElectricFenceUtil.getDistance(end, order, 1).get("distance"); + map.put("totalDistance", ToolUtil.isNotEmpty(distance) ? Double.valueOf(distance) / 1000 : 0); + }catch (Exception e){ + e.printStackTrace(); + } + Integer orderSource = Integer.valueOf(String.valueOf(map.get("orderSource"))); if(orderSource == 1 || orderSource == 2 || orderSource == 3){ @@ -457,6 +466,53 @@ break; case 6: break; + + case 7://专车 + map = orderTransferService.queryPushOrder(orderId); + String order7 = String.valueOf(map.get("startLon")) + "," + String.valueOf(map.get("startLat")); + String distance7 = gdMapElectricFenceUtil.getDistance(lon + "," + lat, order7, 1).get("distance"); + map.put("startDistance", ToolUtil.isNotEmpty(distance7) ? Double.valueOf(distance7) / 1000 : 0); + + try { + //总距离 + String end = String.valueOf(map.get("endLon")) + "," + String.valueOf(map.get("endLat")); + distance = gdMapElectricFenceUtil.getDistance(end, order7, 1).get("distance"); + map.put("totalDistance", ToolUtil.isNotEmpty(distance) ? Double.valueOf(distance) / 1000 : 0); + }catch (Exception e){ + e.printStackTrace(); + } + + + Integer orderSource7 = Integer.valueOf(String.valueOf(map.get("orderSource"))); + if(orderSource7 == 1 || orderSource7 == 2 || orderSource7 == 3){ + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 1 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 1){ + map.put("type", "乘客下单"); + } + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 1 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 2){ + map.put("type", "改派"); + } + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 2 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 1){ + map.put("type", "预约"); + } + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 2 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 2){ + map.put("type", "改派"); + } + } + if(orderSource7 == 5){ + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 1 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 1){ + map.put("type", "调度下单"); + } + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 1 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 2){ + map.put("type", "改派"); + } + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 2 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 1){ + map.put("type", "预约"); + } + if(Integer.valueOf(String.valueOf(map.get("orderType"))) == 2 && Integer.valueOf(String.valueOf(map.get("isReassign"))) == 2){ + map.put("type", "改派"); + } + } + break; } return map; } @@ -485,6 +541,8 @@ return orderLogisticsService.grabOrder(orderId, uid); case 6: break; + case 7://接送机 + return orderTransferService.grabOrder(orderId, uid); } return null; } @@ -616,6 +674,10 @@ } return null; } + @Override + public ResultUtil specail(Integer orderId, Integer uid, Double lon, Double lat,String endAddress) throws Exception { + return orderPrivateCarService.specail(orderId, lon, lat, endAddress); + } /** -- Gitblit v1.7.1