From 48effdca685a209c19dd2a0ccd456470a895784b Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 11 十月 2024 18:01:18 +0800 Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0 --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java | 33 ++++++++++++++++++++++++--------- 1 files changed, 24 insertions(+), 9 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java index bee5460..a75a4a0 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java +++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java @@ -104,6 +104,9 @@ @Autowired private FleetEngineUtil fleetEngineUtil; + + @Autowired + private IOrderCancelService orderCancelService; @@ -1283,6 +1286,7 @@ continue; } List<Income> incomes3 = incomeService.queryData(1, null, 2, orderLogistics.getId(), 4); + map1.put("travelMoney", orderLogistics != null ? orderLogistics.getOrderMoney() : 0);//行程费 map1.put("parkMoney", orderLogistics != null ? orderLogistics.getParkMoney() : 0);//停车费 map1.put("tipMoney", 0);//小费 map1.put("roadTollMoney", orderLogistics != null ? orderLogistics.getRoadTollMoney() : 0);//过路费 @@ -1295,9 +1299,9 @@ } List<Income> incomes4 = incomeService.queryData(1, null, 2, orderLogistics1.getId(), 5); map1.put("travelMoney", orderLogistics1 != null ? orderLogistics1.getOrderMoney() : 0);//行程费 - map1.put("parkMoney", 0);//停车费 + map1.put("parkMoney", orderLogistics1 != null ? orderLogistics1.getParkMoney() : 0);//停车费 map1.put("tipMoney", 0);//小费 - map1.put("roadTollMoney", 0);//过路费 + map1.put("roadTollMoney", orderLogistics1 != null ? orderLogistics1.getRoadTollMoney() : 0);//过路费 map1.put("rakeMoney", incomes4.size() > 0 ? incomes4.get(0).getMoney() : 0);//抽成 break; } @@ -1325,6 +1329,10 @@ baseWarpper.setName(language == 1 ? "取消订单费用" : language == 2 ? "Cancellation fee" : "Frais d'annulation"); List<Income> incomes = incomeService.queryData(1, 1, 3, Integer.valueOf(map.get("incomeId").toString()), Integer.valueOf(map.get("orderType").toString())); Map<String, Object> map1 = new HashMap<>(); + + OrderCancel orderCancel = orderCancelService.selectOne(new EntityWrapper<OrderCancel>().eq("orderType", map.get("orderType")) + .eq("orderId", map.get("incomeId")).eq("state", 2)); + map1.put("travelMoney", orderCancel.getMoney());//支付金额 map1.put("rakeMoney", incomes.size() > 0 ? incomes.get(0).getMoney() : 0);//抽成 baseWarpper.setData(map1); } @@ -1798,14 +1806,21 @@ new Timer().schedule(new TimerTask() { @Override public void run() { - Process process = null; try { - process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName + ".mp3"); - } catch (IOException e) { - throw new RuntimeException(e); - } - if (process != null) { - process.destroy(); + // 使用Runtime执行命令 + Process process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName + ".mp3"); + // 读取命令的输出 + BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); + String line; + while ((line = reader.readLine()) != null) { + System.out.println(line); + } + // 等待命令执行完成 + process.waitFor(); + // 关闭流 + reader.close(); + } catch (IOException | InterruptedException e) { + e.printStackTrace(); } } }, 30000); -- Gitblit v1.7.1