Pu Zhibing
7 小时以前 821fc2f632f8b974a2c0fc37630e13c5fbe6086c
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java
@@ -482,7 +482,7 @@
                public void run() {
                    try {
                        // 使用Runtime执行命令
                        Process process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
                        Process process = Runtime.getRuntime().exec("sudo rm -rf /data/nginx/html/files/audio/" + fileName);
                        // 读取命令的输出
                        BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                        String line;
@@ -615,7 +615,7 @@
                            public void run() {
                                try {
                                    // 使用Runtime执行命令
                                    Process process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
                                    Process process = Runtime.getRuntime().exec("sudo rm -rf /data/nginx/html/files/audio/" + fileName);
                                    // 读取命令的输出
                                    BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                                    String line;
@@ -819,7 +819,9 @@
                }
            }
        }
        if(null == lon || null == lat){
            return ResultUtil.error(language == 1 ? "无效的经纬度" : language == 2 ? "Invalid longitude and latitude" : "Longitude et latitude non valides");
        }
        language = userInfoService.queryLanguage(uid, language);
        OrderPrivateCar orderPrivateCar = this.selectById(id);
        Integer integer = null;
@@ -1171,7 +1173,7 @@
                                    public void run() {
                                        try {
                                            // 使用Runtime执行命令
                                            Process process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
                                            Process process = Runtime.getRuntime().exec("sudo rm -rf /data/nginx/html/files/audio/" + fileName);
                                            // 读取命令的输出
                                            BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                                            String line;
@@ -1307,7 +1309,7 @@
        if(null != query2){
            Integer orderNum=this.selectCount(new EntityWrapper<OrderPrivateCar>().eq("userId",orderPrivateCar.getUserId())
                    .eq("activityId",query2.getId()).last(" and to_days(getoffTime) = to_days(now())"));
            if(query2.getDistance()*1000>orderPrivateCar.getMileage() && query2.getOrderNum()>orderNum){
            if(query2.getDistance() * 1000 > orderPrivateCar.getMileage() && query2.getOrderNum().compareTo(orderNum) > 0){
                Double special = query2.getSpecial();
                if(null != special){
                    orderPrivateCar.setDiscount(special);
@@ -1853,11 +1855,11 @@
                            EmailUtil.send(userInfo.getEmail(), language == 1 ? "打车收据" : language == 2 ? "Ride receipt" : "Reçu de course",  document.html());
                        
                            //开始生成pdf收据和html收据
                            File file = new File("/home/igotechgh/nginx/html/files/html/");
                            File file = new File("/data/nginx/html/files/html/");
                            if(!file.exists()){
                                file.mkdirs();
                            }
                            file = new File("/home/igotechgh/nginx/html/files/html/ride_receipt_" + orderId + ".html");
                            file = new File("/data/nginx/html/files/html/ride_receipt_" + orderId + ".html");
                            if(!file.exists()){
                                file.createNewFile();
                            }
@@ -1866,17 +1868,17 @@
                            fileWriter.flush();
                            fileWriter.close();
                        
                            File file1 = new File("/home/igotechgh/nginx/html/files/pdf/");
                            File file1 = new File("/data/nginx/html/files/pdf/");
                            if(!file1.exists()){
                                file1.mkdirs();
                            }
                            file1 = new File("/home/igotechgh/nginx/html/files/pdf/ride_receipt_" + orderId + ".pdf");
                            file1 = new File("/data/nginx/html/files/pdf/ride_receipt_" + orderId + ".pdf");
                            if(!file1.exists()){
                                file1.createNewFile();
                            }
                            try {
                                FileOutputStream fileOutputStream = new FileOutputStream(file1);
                                HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/ride_receipt_" + orderId + ".html", "I-GO", fileOutputStream);
                                HtmlToPdfUtils.convertToPdf("/data/nginx/html/files/html/ride_receipt_" + orderId + ".html", "I-GO", fileOutputStream);
                            }catch (Exception e){
                                e.printStackTrace();
                                System.out.println("html转pdf异常");
@@ -2446,11 +2448,11 @@
                            EmailUtil.send(userInfo.getEmail(), language == 1 ? "打车收据" : language == 2 ? "Ride receipt" : "Reçu de course",  document.html());
                        
                            //开始生成pdf收据和html收据
                            File file = new File("/home/igotechgh/nginx/html/files/html/");
                            File file = new File("/data/nginx/html/files/html/");
                            if(!file.exists()){
                                file.mkdirs();
                            }
                            file = new File("/home/igotechgh/nginx/html/files/html/ride_receipt_" + orderId + ".html");
                            file = new File("/data/nginx/html/files/html/ride_receipt_" + orderId + ".html");
                            if(!file.exists()){
                                file.createNewFile();
                            }
@@ -2459,17 +2461,17 @@
                            fileWriter.flush();
                            fileWriter.close();
                        
                            File file1 = new File("/home/igotechgh/nginx/html/files/pdf/");
                            File file1 = new File("/data/nginx/html/files/pdf/");
                            if(!file1.exists()){
                                file1.mkdirs();
                            }
                            file1 = new File("/home/igotechgh/nginx/html/files/pdf/ride_receipt_" + orderId + ".pdf");
                            file1 = new File("/data/nginx/html/files/pdf/ride_receipt_" + orderId + ".pdf");
                            if(!file1.exists()){
                                file1.createNewFile();
                            }
                            try {
                                FileOutputStream fileOutputStream = new FileOutputStream(file1);
                                HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/ride_receipt_" + orderId + ".html", "I-GO", fileOutputStream);
                                HtmlToPdfUtils.convertToPdf("/data/nginx/html/files/html/ride_receipt_" + orderId + ".html", "I-GO", fileOutputStream);
                            }catch (Exception e){
                                e.printStackTrace();
                                System.out.println("html转pdf异常");
@@ -2535,7 +2537,7 @@
                        public void run() {
                            try {
                                // 使用Runtime执行命令
                                Process process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
                                Process process = Runtime.getRuntime().exec("sudo rm -rf /data/nginx/html/files/audio/" + fileName);
                                // 读取命令的输出
                                BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                                String line;
@@ -2672,11 +2674,11 @@
                EmailUtil.send(userInfo.getEmail(), language == 1 ? "红包活动" : language == 2 ? "Lucky-promo activities" : "Activités bonus",  document.html());
                //开始生成pdf收据和html收据
                File file = new File("/home/igotechgh/nginx/html/files/html/");
                File file = new File("/data/nginx/html/files/html/");
                if(!file.exists()){
                    file.mkdirs();
                }
                file = new File("/home/igotechgh/nginx/html/files/html/redpacket_" + orderId + ".html");
                file = new File("/data/nginx/html/files/html/redpacket_" + orderId + ".html");
                if(!file.exists()){
                    file.createNewFile();
                }
@@ -3178,11 +3180,11 @@
                            EmailUtil.send(userInfo.getEmail(), language == 1 ? "打车收据" : language == 2 ? "Ride receipt" : "Reçu de course",  document.html());
                            //开始生成pdf收据和html收据
                            File file = new File("/home/igotechgh/nginx/html/files/html/");
                            File file = new File("/data/nginx/html/files/html/");
                            if(!file.exists()){
                                file.mkdirs();
                            }
                            file = new File("/home/igotechgh/nginx/html/files/html/ride_receipt_" + id + ".html");
                            file = new File("/data/nginx/html/files/html/ride_receipt_" + id + ".html");
                            if(!file.exists()){
                                file.createNewFile();
                            }
@@ -3191,17 +3193,17 @@
                            fileWriter.flush();
                            fileWriter.close();
                            File file1 = new File("/home/igotechgh/nginx/html/files/pdf/");
                            File file1 = new File("/data/nginx/html/files/pdf/");
                            if(!file1.exists()){
                                file1.mkdirs();
                            }
                            file1 = new File("/home/igotechgh/nginx/html/files/pdf/ride_receipt_" + id + ".pdf");
                            file1 = new File("/data/nginx/html/files/pdf/ride_receipt_" + id + ".pdf");
                            if(!file1.exists()){
                                file1.createNewFile();
                            }
                            try {
                                FileOutputStream fileOutputStream = new FileOutputStream(file1);
                                HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/ride_receipt_" + id + ".html", "I-GO", fileOutputStream);
                                HtmlToPdfUtils.convertToPdf("/data/nginx/html/files/html/ride_receipt_" + id + ".html", "I-GO", fileOutputStream);
                            }catch (Exception e){
                                e.printStackTrace();
                                System.out.println("html转pdf异常");