Pu Zhibing
2024-10-21 f08b7e95bc941a72d4a7b7bc64c2086ed53f1565
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverServiceImpl.java
@@ -156,6 +156,9 @@
    
    @Resource
    private CarModelMapper carModelMapper;
    @Autowired
    private ISettlementRecordService settlementRecordService;
    @Override
@@ -203,10 +206,11 @@
        redisUtil.setStrValue(phone, authCode, 5 * 60);//设置五分钟过期
        switch (language){
            case 1:
                sms = "您的验证码为:" + authCode + ",该验证码5分钟内有效,请勿泄漏于他人!";
//                sms = "您的验证码为:" + authCode + ",该验证码5分钟内有效,请勿泄漏于他人!";
                sms = "Your verification code is " + authCode + ", it is valid within 5 minutes, please do not reveal it to others.";
                break;
            case 2:
                sms = "Your verification code is " + authCode + ",it is valid within 5 minutes, please do not reveal it to others.";
                sms = "Your verification code is " + authCode + ", it is valid within 5 minutes, please do not reveal it to others.";
                break;
            case 3:
                sms = "Votre code de validation est " + authCode + " et il est valide pendant 5 minutes. Veuillez ne pas le révéler à d’autres personnes.";
@@ -411,11 +415,11 @@
                    EmailUtil.send(driver.getEmail(), language == 1 ? "司机奖励通知" : language == 2 ? "Reward-driver notice" : "Avis de chauffeur de récompense",  document.html());
                    String randomString = ToolUtil.getRandomString(10);
                    //开始生成pdf收据和html收据
                    File file = new File("/usr/local/nginx/html/files/html/");
                    File file = new File("/home/igotechgh/nginx/html/files/html/");
                    if(!file.exists()){
                        file.mkdirs();
                    }
                    file = new File("/usr/local/nginx/html/files/html/invitation_" + randomString + ".html");
                    file = new File("/home/igotechgh/nginx/html/files/html/invitation_" + randomString + ".html");
                    if(!file.exists()){
                        file.createNewFile();
                    }
@@ -424,7 +428,7 @@
                    fileWriter.flush();
                    fileWriter.close();
                    String link ="http://182.160.16.251:81/files/html/invitation_" + randomString + ".html";
                    String link ="https://igo.i-go.group/files/html/invitation_" + randomString + ".html";
                    TEmail tEmail = new TEmail();
                    tEmail.setLink(link);
                    tEmail.setUserId(driver.getId());
@@ -607,11 +611,11 @@
                    EmailUtil.send(driver.getEmail(), language == 1 ? "司机奖励通知" : language == 2 ? "Reward-driver notice" : "Avis de chauffeur de récompense",  document.html());
                    String randomString = ToolUtil.getRandomString(10);
                    //开始生成pdf收据和html收据
                    File file = new File("/usr/local/nginx/html/files/html/");
                    File file = new File("/home/igotechgh/nginx/html/files/html/");
                    if(!file.exists()){
                        file.mkdirs();
                    }
                    file = new File("/usr/local/nginx/html/files/html/invitation_" + randomString + ".html");
                    file = new File("/home/igotechgh/nginx/html/files/html/invitation_" + randomString + ".html");
                    if(!file.exists()){
                        file.createNewFile();
                    }
@@ -620,7 +624,7 @@
                    fileWriter.flush();
                    fileWriter.close();
                    String link ="http://182.160.16.251:81/files/html/invitation_" + randomString + ".html";
                    String link ="https://igo.i-go.group/files/html/invitation_" + randomString + ".html";
                    TEmail tEmail = new TEmail();
                    tEmail.setLink(link);
                    tEmail.setUserId(driver.getId());
@@ -874,11 +878,11 @@
            EmailUtil.send(driver.getEmail(), language == 1 ? "成功注册" : language == 2 ? "Registered successfully" : "Enregistré avec succès",  document1.html());
            String randomString = ToolUtil.getRandomString(10);
            //开始生成pdf收据和html收据
            File file = new File("/usr/local/nginx/html/files/html/");
            File file = new File("/home/igotechgh/nginx/html/files/html/");
            if(!file.exists()){
                file.mkdirs();
            }
            file = new File("/usr/local/nginx/html/files/html/registration_" + randomString + ".html");
            file = new File("/home/igotechgh/nginx/html/files/html/registration_" + randomString + ".html");
            if(!file.exists()){
                file.createNewFile();
            }
@@ -887,7 +891,7 @@
            fileWriter.flush();
            fileWriter.close();
            String link ="http://182.160.16.251:81/files/html/registration_" + randomString + ".html";
            String link ="https://igo.i-go.group/files/html/registration_" + randomString + ".html";
            TEmail tEmail = new TEmail();
            tEmail.setLink(link);
            tEmail.setUserId(driver.getId());
@@ -988,11 +992,11 @@
            EmailUtil.send(driver.getEmail(), language == 1 ? "密码重置" : language == 2 ? "Reset password" : "Réinitialiser le mot de passe",  document1.html());
            String randomString = ToolUtil.getRandomString(10);
            //开始生成pdf收据和html收据
            File file = new File("/usr/local/nginx/html/files/html/");
            File file = new File("/home/igotechgh/nginx/html/files/html/");
            if(!file.exists()){
                file.mkdirs();
            }
            file = new File("/usr/local/nginx/html/files/html/reset_" + randomString + ".html");
            file = new File("/home/igotechgh/nginx/html/files/html/reset_" + randomString + ".html");
            if(!file.exists()){
                file.createNewFile();
            }
@@ -1001,7 +1005,7 @@
            fileWriter.flush();
            fileWriter.close();
            String link ="http://182.160.16.251:81/files/html/reset_" + randomString + ".html";
            String link ="https://igo.i-go.group/files/html/reset_" + randomString + ".html";
            TEmail tEmail = new TEmail();
            tEmail.setLink(link);
            tEmail.setUserId(driver.getId());
@@ -1107,7 +1111,20 @@
                    CarModel carModel = carModelMapper.selectById(car.getCarModelId());
                    String vehicles = fleetEngineUtil.getVehicles(car.getVehicleId());
                    if(ToolUtil.isEmpty(vehicles)) {
                        fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        boolean createVehicles = fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        if(!createVehicles){
                            for (int i = 0; i < 5; i++) {
                                createVehicles = fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                if(createVehicles){
                                    break;
                                }
                                try {
                                    Thread.sleep(5000L);
                                } catch (InterruptedException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }
                    }
                }catch (Exception e){
                    e.printStackTrace();
@@ -1217,10 +1234,50 @@
                    CarModel carModel = carModelMapper.selectById(car.getCarModelId());
                    String vehicles = fleetEngineUtil.getVehicles(car.getVehicleId());
                    if(ToolUtil.isEmpty(vehicles)){
                        fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        fleetEngineUtil.updateVehicles("OFFLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        boolean createVehicles = fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        if(!createVehicles){
                            for (int i = 0; i < 5; i++) {
                                createVehicles = fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                if(createVehicles){
                                    break;
                                }
                                try {
                                    Thread.sleep(5000L);
                                } catch (InterruptedException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }
                        boolean updateVehicles = fleetEngineUtil.updateVehicles("OFFLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        if(!updateVehicles){
                            for (int i = 0; i < 5; i++) {
                                updateVehicles = fleetEngineUtil.updateVehicles("OFFLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                if(updateVehicles){
                                    break;
                                }
                                try {
                                    Thread.sleep(5000L);
                                } catch (InterruptedException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }
                    }else{
                        fleetEngineUtil.updateVehicles("OFFLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        boolean updateVehicles = fleetEngineUtil.updateVehicles("OFFLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                        if(!updateVehicles){
                            for (int i = 0; i < 5; i++) {
                                updateVehicles = fleetEngineUtil.updateVehicles("OFFLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                if(updateVehicles){
                                    break;
                                }
                                try {
                                    Thread.sleep(5000L);
                                } catch (InterruptedException e) {
                                    throw new RuntimeException(e);
                                }
                            }
                        }
                    }
                }catch (Exception e){
                    e.printStackTrace();
@@ -1228,13 +1285,13 @@
            }).start();
            switch (language){
                case 1:
                    audioUrl = "http://182.160.16.251:81/files/audio/system/AfterWork-CN.mp3";
                    audioUrl = "https://igo.i-go.group/files/audio/system/AfterWork-CN.mp3";
                    break;
                case 2:
                    audioUrl = "http://182.160.16.251:81/files/audio/system/AfterWork-EN.mp3";
                    audioUrl = "https://igo.i-go.group/files/audio/system/AfterWork-EN.mp3";
                    break;
                case 3:
                    audioUrl = "http://182.160.16.251:81/files/audio/system/AfterWork-FR.mp3";
                    audioUrl = "https://igo.i-go.group/files/audio/system/AfterWork-FR.mp3";
                    break;
            }
        }else{
@@ -1264,7 +1321,6 @@
                return ResultUtil.error(language == 1 ? "请完善资料后再出车" : language == 2 ? "Please complete data before driving." : "Veuillez compléter les données avant de conduire.");
            }
    
            driverWork = new DriverWork();
            driverWork.setState(1);
            driverWork.setDriverId(uid);
@@ -1286,10 +1342,50 @@
                        CarModel carModel = carModelMapper.selectById(car.getCarModelId());
                        String vehicles = fleetEngineUtil.getVehicles(car.getVehicleId());
                        if(ToolUtil.isEmpty(vehicles)){
                            fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                            fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                            boolean createVehicles = fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                            if(!createVehicles){
                                for (int i = 0; i < 5; i++) {
                                    createVehicles = fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                    if(createVehicles){
                                        break;
                                    }
                                    try {
                                        Thread.sleep(5000L);
                                    } catch (InterruptedException e) {
                                        throw new RuntimeException(e);
                                    }
                                }
                            }
                            boolean updateVehicles = fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                            if(!updateVehicles){
                                for (int i = 0; i < 5; i++) {
                                    updateVehicles = fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                    if(updateVehicles){
                                        break;
                                    }
                                    try {
                                        Thread.sleep(5000L);
                                    } catch (InterruptedException e) {
                                        throw new RuntimeException(e);
                                    }
                                }
                            }
                        }else{
                            fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                            boolean updateVehicles = fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                            if(!updateVehicles){
                                for (int i = 0; i < 5; i++) {
                                    updateVehicles = fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), car.getVehicleId());
                                    if(updateVehicles){
                                        break;
                                    }
                                    try {
                                        Thread.sleep(5000L);
                                    } catch (InterruptedException e) {
                                        throw new RuntimeException(e);
                                    }
                                }
                            }
                        }
                    }catch (Exception e){
                        e.printStackTrace();
@@ -1299,13 +1395,13 @@
    
            switch (language){
                case 1:
                    audioUrl = "http://182.160.16.251:81/files/audio/system/AtWork-CN.mp3";
                    audioUrl = "https://igo.i-go.group/files/audio/system/AtWork-CN.mp3";
                    break;
                case 2:
                    audioUrl = "http://182.160.16.251:81/files/audio/system/AtWork-EN.mp3";
                    audioUrl = "https://igo.i-go.group/files/audio/system/AtWork-EN.mp3";
                    break;
                case 3:
                    audioUrl = "http://182.160.16.251:81/files/audio/system/AtWork-FR.mp3";
                    audioUrl = "https://igo.i-go.group/files/audio/system/AtWork-FR.mp3";
                    break;
            }
        }
@@ -1587,11 +1683,11 @@
            EmailUtil.send(driver.getEmail(), language == 1 ? "密码重置" : language == 2 ? "Reset password" : "Réinitialiser le mot de passe",  document1.html());
            String randomString = ToolUtil.getRandomString(10);
            //开始生成pdf收据和html收据
            File file = new File("/usr/local/nginx/html/files/html/");
            File file = new File("/home/igotechgh/nginx/html/files/html/");
            if(!file.exists()){
                file.mkdirs();
            }
            file = new File("/usr/local/nginx/html/files/html/reset_" + randomString + ".html");
            file = new File("/home/igotechgh/nginx/html/files/html/reset_" + randomString + ".html");
            if(!file.exists()){
                file.createNewFile();
            }
@@ -1600,7 +1696,7 @@
            fileWriter.flush();
            fileWriter.close();
            String link ="http://182.160.16.251:81/files/html/reset_" + randomString + ".html";
            String link ="https://igo.i-go.group/files/html/reset_" + randomString + ".html";
            TEmail tEmail = new TEmail();
            tEmail.setLink(link);
            tEmail.setUserId(driver.getId());
@@ -1986,7 +2082,7 @@
                                    Element rewardToday_award = document1.getElementById("rewardToday_award");
                                    rewardToday_award.text("奖金 GHS" + driverActivityHistory.getMoney());
                                    Element rewardToday_content = document1.getElementById("rewardToday_content");
                                    rewardToday_content.text("邀请司机注册即可获得奖励。\n注意此活动是有时间限制的,详情请查看I-GO平台。");
                                    rewardToday_content.html("邀请司机注册即可获得奖励。<br/>注意此活动是有时间限制的,详情请查看I-GO平台。");
                                }
                                if (2 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2007,7 +2103,7 @@
                                    Element rewardToday1_award = document1.getElementById("rewardToday1_award");
                                    rewardToday1_award.text("GHS " + driverActivityHistory.getMoney() + " BONUS");
                                    Element rewardToday1_content = document1.getElementById("rewardToday1_content");
                                    rewardToday1_content.text("Get a bonus on I-GO today.\nInvite drivers to register to get the bonus.\nNote that this is a limited-time offer. Check your app for more details.");
                                    rewardToday1_content.html("Invite drivers to register to get the bonus.<br/>Note that this is a limited-time offer. Check your app for more details.");
                                }
                                if (3 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2028,16 +2124,16 @@
                                    Element rewardToday2_award = document1.getElementById("rewardToday2_award");
                                    rewardToday2_award.text("Bonus GHS " + driverActivityHistory.getMoney());
                                    Element rewardToday2_content = document1.getElementById("rewardToday2_content");
                                    rewardToday2_content.text("Obtenez un bonus sur I-GO dès aujourd’hui.\nInvitez les chauffeurs à s’inscrire pour obtenir le bonus.\nNotez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                    rewardToday2_content.html("Invitez les chauffeurs à s’inscrire pour obtenir le bonus.<br/>Notez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                }
                                EmailUtil.send(driver.getEmail(), language == 1 ? "邀请司机奖励(活动)" : language == 2 ? "Invite drivers and earn" : "Invitez des chauffeurs et gagnez de l’argent", document1.html());
                                String randomString = ToolUtil.getRandomString(10);
                                //开始生成pdf收据和html收据
                                File file = new File("/usr/local/nginx/html/files/html/");
                                File file = new File("/home/igotechgh/nginx/html/files/html/");
                                if(!file.exists()){
                                    file.mkdirs();
                                }
                                file = new File("/usr/local/nginx/html/files/html/activity_" + randomString + ".html");
                                file = new File("/home/igotechgh/nginx/html/files/html/activity_" + randomString + ".html");
                                if(!file.exists()){
                                    file.createNewFile();
                                }
@@ -2046,7 +2142,7 @@
                                fileWriter.flush();
                                fileWriter.close();
    
                                String link ="http://182.160.16.251:81/files/html/activity_" + randomString + ".html";
                                String link ="https://igo.i-go.group/files/html/activity_" + randomString + ".html";
                                TEmail tEmail = new TEmail();
                                tEmail.setLink(link);
                                tEmail.setUserId(driver.getId());
@@ -2109,7 +2205,7 @@
                                    Element rewardToday_award = document1.getElementById("rewardToday_award");
                                    rewardToday_award.text("奖金 GHS" + driverActivityHistory.getMoney());
                                    Element rewardToday_content = document1.getElementById("rewardToday_content");
                                    rewardToday_content.text("邀请用户注册即可获得奖励。\n 注意此活动是有时间限制的,详情请查看I-GO平台。");
                                    rewardToday_content.html("邀请用户注册即可获得奖励。<br/> 注意此活动是有时间限制的,详情请查看I-GO平台。");
                                }
                                if (2 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2130,7 +2226,7 @@
                                    Element rewardToday1_award = document1.getElementById("rewardToday1_award");
                                    rewardToday1_award.text("GHS " + driverActivityHistory.getMoney() + " BONUS");
                                    Element rewardToday1_content = document1.getElementById("rewardToday1_content");
                                    rewardToday1_content.text("Get a bonus on I-GO today.\nInvite users to register to get the bonus.\nNote that this is a limited-time offer. Check your app for more details.");
                                    rewardToday1_content.html("Invite users to register to get the bonus.<br/>Note that this is a limited-time offer. Check your app for more details.");
                                }
                                if (3 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2151,16 +2247,16 @@
                                    Element rewardToday2_award = document1.getElementById("rewardToday2_award");
                                    rewardToday2_award.text("Bonus GHS " + driverActivityHistory.getMoney());
                                    Element rewardToday2_content = document1.getElementById("rewardToday2_content");
                                    rewardToday2_content.text("Obtenez un bonus sur I-GO dès aujourd’hui.\nInvitez les utilisateurs à s’inscrire pour obtenir le bonus.\nNotez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                    rewardToday2_content.html("Invitez les utilisateurs à s’inscrire pour obtenir le bonus.<br/>Notez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                }
                                EmailUtil.send(driver.getEmail(), language == 1 ? "邀请用户奖励(活动)" : language == 2 ? "Invite users and earn" : "Invitez des utilisateurs et gagnez de l’argent", document1.html());
                                String randomString = ToolUtil.getRandomString(10);
                                //开始生成pdf收据和html收据
                                File file = new File("/usr/local/nginx/html/files/html/");
                                File file = new File("/home/igotechgh/nginx/html/files/html/");
                                if(!file.exists()){
                                    file.mkdirs();
                                }
                                file = new File("/usr/local/nginx/html/files/html/activity_" + randomString + ".html");
                                file = new File("/home/igotechgh/nginx/html/files/html/activity_" + randomString + ".html");
                                if(!file.exists()){
                                    file.createNewFile();
                                }
@@ -2169,7 +2265,7 @@
                                fileWriter.flush();
                                fileWriter.close();
    
                                String link ="http://182.160.16.251:81/files/html/activity_" + randomString + ".html";
                                String link ="https://igo.i-go.group/files/html/activity_" + randomString + ".html";
                                TEmail tEmail = new TEmail();
                                tEmail.setLink(link);
                                tEmail.setUserId(driver.getId());
@@ -2233,7 +2329,7 @@
                                    Element rewardToday_award = document1.getElementById("rewardToday_award");
                                    rewardToday_award.text("奖金 GHS" + driverActivityHistory.getMoney());
                                    Element rewardToday_content = document1.getElementById("rewardToday_content");
                                    rewardToday_content.text("今日累计在线" + driverActivityOnline.getOnline() + "小时即可活动奖励。\n 注意此活动是有时间限制的,详情请查看I-GO平台。");
                                    rewardToday_content.html("今日累计在线" + driverActivityOnline.getOnline() + "小时即可活动奖励。<br/> 注意此活动是有时间限制的,详情请查看I-GO平台。");
                                }
                                if (2 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2254,7 +2350,7 @@
                                    Element rewardToday1_award = document1.getElementById("rewardToday1_award");
                                    rewardToday1_award.text("GHS " + driverActivityHistory.getMoney() + " BONUS");
                                    Element rewardToday1_content = document1.getElementById("rewardToday1_content");
                                    rewardToday1_content.text("Get a bonus for driving on I-GO today.\nStay online for " + driverActivityOnline.getOnline() + " hours to get the bonus.\nNote that this is a limited-time offer. Check your app for more details.");
                                    rewardToday1_content.html("Stay online for " + driverActivityOnline.getOnline() + " hours to get the bonus.<br/>Note that this is a limited-time offer. Check your app for more details.");
                                }
                                if (3 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2275,16 +2371,16 @@
                                    Element rewardToday2_award = document1.getElementById("rewardToday2_award");
                                    rewardToday2_award.text("Bonus GHS " + driverActivityHistory.getMoney());
                                    Element rewardToday2_content = document1.getElementById("rewardToday2_content");
                                    rewardToday2_content.text("Obtenez un bonus pour conduire sur I-GO dès aujourd’hui.\nRestez en ligne pendant " + driverActivityOnline.getOnline() + " heures pour obtenir le bonus.\nNotez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                    rewardToday2_content.html("Restez en ligne pendant " + driverActivityOnline.getOnline() + " heures pour obtenir le bonus.<br/>Notez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                }
                                EmailUtil.send(driver.getEmail(), language == 1 ? "在线时长奖励(活动)" : language == 2 ? "Online-duration reward activity" : "Activité de récompense en ligne", document1.html());
                                String randomString = ToolUtil.getRandomString(10);
                                //开始生成pdf收据和html收据
                                File file = new File("/usr/local/nginx/html/files/html/");
                                File file = new File("/home/igotechgh/nginx/html/files/html/");
                                if(!file.exists()){
                                    file.mkdirs();
                                }
                                file = new File("/usr/local/nginx/html/files/html/activity_" + randomString + ".html");
                                file = new File("/home/igotechgh/nginx/html/files/html/activity_" + randomString + ".html");
                                if(!file.exists()){
                                    file.createNewFile();
                                }
@@ -2293,7 +2389,7 @@
                                fileWriter.flush();
                                fileWriter.close();
    
                                String link ="http://182.160.16.251:81/files/html/activity_" + randomString + ".html";
                                String link ="https://igo.i-go.group/files/html/activity_" + randomString + ".html";
                                TEmail tEmail = new TEmail();
                                tEmail.setLink(link);
                                tEmail.setUserId(driver.getId());
@@ -2357,7 +2453,7 @@
                                    Element rewardToday_award = document1.getElementById("rewardToday_award");
                                    rewardToday_award.text("奖金 GHS" + driverActivityHistory.getMoney());
                                    Element rewardToday_content = document1.getElementById("rewardToday_content");
                                    rewardToday_content.text("今日累计完成" + driverActivityOrder.getOrderNum() + "单即可活动奖励。\n 注意此活动是有时间限制的,详情请查看I-GO平台。");
                                    rewardToday_content.html("今日累计完成" + driverActivityOrder.getOrderNum() + "单即可活动奖励。<br/> 注意此活动是有时间限制的,详情请查看I-GO平台。");
                                }
                                if (2 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2378,7 +2474,7 @@
                                    Element rewardToday1_award = document1.getElementById("rewardToday1_award");
                                    rewardToday1_award.text("GHS " + driverActivityHistory.getMoney() + " BONUS");
                                    Element rewardToday1_content = document1.getElementById("rewardToday1_content");
                                    rewardToday1_content.text("Get a bonus for driving on I-GO today.\nStay online and complete " + driverActivityOrder.getOrderNum() + " trips to get the bonus.\nNote that this is a limited-time offer. Check your app for more details.");
                                    rewardToday1_content.html("Stay online and complete " + driverActivityOrder.getOrderNum() + " trips to get the bonus.<br/>Note that this is a limited-time offer. Check your app for more details.");
                                }
                                if (3 == language) {
                                    document1.getElementById("chinese").remove();
@@ -2399,16 +2495,16 @@
                                    Element rewardToday2_award = document1.getElementById("rewardToday2_award");
                                    rewardToday2_award.text("Bonus GHS " + driverActivityHistory.getMoney());
                                    Element rewardToday2_content = document1.getElementById("rewardToday2_content");
                                    rewardToday2_content.text("Obtenez un bonus pour conduire sur I-GO dès aujourd’hui.\nRestez en ligne et effectuez " + driverActivityOrder.getOrderNum() + " trajets pour obtenir le bonus.\nNotez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                    rewardToday2_content.html("Restez en ligne et effectuez " + driverActivityOrder.getOrderNum() + " trajets pour obtenir le bonus.<br/>Notez qu’il s’agit d’une offre d’une durée limitée. Consultez votre application pour plus de détails.");
                                }
                                EmailUtil.send(driver.getEmail(), language == 1 ? "累计接单奖励(活动)" : language == 2 ? "Cumulative order activity" : "Activité cumulée des commandes", document1.html());
                                String randomString = ToolUtil.getRandomString(10);
                                //开始生成pdf收据和html收据
                                File file = new File("/usr/local/nginx/html/files/html/");
                                File file = new File("/home/igotechgh/nginx/html/files/html/");
                                if(!file.exists()){
                                    file.mkdirs();
                                }
                                file = new File("/usr/local/nginx/html/files/html/activity_" + randomString + ".html");
                                file = new File("/home/igotechgh/nginx/html/files/html/activity_" + randomString + ".html");
                                if(!file.exists()){
                                    file.createNewFile();
                                }
@@ -2417,7 +2513,7 @@
                                fileWriter.flush();
                                fileWriter.close();
    
                                String link ="http://182.160.16.251:81/files/html/activity_" + randomString + ".html";
                                String link ="https://igo.i-go.group/files/html/activity_" + randomString + ".html";
                                TEmail tEmail = new TEmail();
                                tEmail.setLink(link);
                                tEmail.setUserId(driver.getId());
@@ -2502,7 +2598,7 @@
                        Element reward_user = document1.getElementById("reward_user");
                        reward_user.text("您好 " + driver.getFirstName() + "" + driver.getLastName() + ",");
                        Element reward_content = document1.getElementById("reward_content");
                        reward_content.text("今日累计在线" + dao.getOnline() + "小时,获得奖励GHS" + dah.getMoney() + ",请查收。\n详情请查看I-GO平台。");
                        reward_content.html("今日累计在线" + dao.getOnline() + "小时,获得奖励GHS" + dah.getMoney() + ",请查收。<br/>详情请查看I-GO平台。");
                    }
                    if (2 == language) {
                        document1.getElementById("chinese").remove();
@@ -2521,7 +2617,7 @@
                        Element reward1_user = document1.getElementById("reward1_user");
                        reward1_user.text("Hello " + driver.getFirstName() + "" + driver.getLastName() + ",");
                        Element reward1_content = document1.getElementById("reward1_content");
                        reward1_content.text("You stayed online for " + dao.getOnline() + " hours today, and got a bonus of GHS" + dah.getMoney() + ", please check.\nCheck your app for more details.");
                        reward1_content.html("You stayed online for " + dao.getOnline() + " hours today, and got a bonus of GHS" + dah.getMoney() + ", please check.<br/>Check your app for more details.");
                    }
                    if (3 == language) {
                        document1.getElementById("chinese").remove();
@@ -2540,16 +2636,16 @@
                        Element reward2_user = document1.getElementById("reward2_user");
                        reward2_user.text("Cher(ère) " + driver.getFirstName() + "" + driver.getLastName() + ",");
                        Element reward2_content = document1.getElementById("reward2_content");
                        reward2_content.text("Vous êtes resté en ligne pendant " + dao.getOnline() + " heures aujourd’hui et avez obtenu un bonus de GHS" + dah.getMoney() + ", veuillez vérifier.\nConsultez votre application pour plus de détails.");
                        reward2_content.html("Vous êtes resté en ligne pendant " + dao.getOnline() + " heures aujourd’hui et avez obtenu un bonus de GHS" + dah.getMoney() + ", veuillez vérifier.<br/>Consultez votre application pour plus de détails.");
                    }
                    EmailUtil.send(driver.getEmail(), language == 1 ? "司机奖励通知" : language == 2 ? "Reward-driver notice" : "Avis de chauffeur de récompense", document1.html());
                    String randomString = ToolUtil.getRandomString(10);
                    //开始生成pdf收据和html收据
                    File file = new File("/usr/local/nginx/html/files/html/");
                    File file = new File("/home/igotechgh/nginx/html/files/html/");
                    if(!file.exists()){
                        file.mkdirs();
                    }
                    file = new File("/usr/local/nginx/html/files/html/rewards_" + randomString + ".html");
                    file = new File("/home/igotechgh/nginx/html/files/html/rewards_" + randomString + ".html");
                    if(!file.exists()){
                        file.createNewFile();
                    }
@@ -2558,7 +2654,7 @@
                    fileWriter.flush();
                    fileWriter.close();
        
                    String link ="http://182.160.16.251:81/files/html/rewards_" + randomString + ".html";
                    String link ="https://igo.i-go.group/files/html/rewards_" + randomString + ".html";
                    TEmail tEmail = new TEmail();
                    tEmail.setLink(link);
                    tEmail.setUserId(driver.getId());
@@ -2621,7 +2717,7 @@
                        Element reward_user = document1.getElementById("reward_user");
                        reward_user.text("您好 " + driver.getFirstName() + "" + driver.getLastName() + ",");
                        Element reward_content = document1.getElementById("reward_content");
                        reward_content.text("今日累计接单" + dao.getOrderNum() + "单,获得奖励GHS" + dah.getMoney() + ",请查收。\n详情请查看I-GO平台。");
                        reward_content.html("今日累计接单" + dao.getOrderNum() + "单,获得奖励GHS" + dah.getMoney() + ",请查收。<br/>详情请查看I-GO平台。");
                    }
                    if (2 == language) {
                        document1.getElementById("chinese").remove();
@@ -2640,7 +2736,7 @@
                        Element reward1_user = document1.getElementById("reward1_user");
                        reward1_user.text("Hello " + driver.getFirstName() + "" + driver.getLastName() + ",");
                        Element reward1_content = document1.getElementById("reward1_content");
                        reward1_content.text("You completed " + dao.getOrderNum() + " trips today, and got a bonus of GHS" + dah.getMoney() + ", please check.\nCheck your app for more details.");
                        reward1_content.html("You completed " + dao.getOrderNum() + " trips today, and got a bonus of GHS" + dah.getMoney() + ", please check.<br/>Check your app for more details.");
                    }
                    if (3 == language) {
                        document1.getElementById("chinese").remove();
@@ -2659,17 +2755,17 @@
                        Element reward2_user = document1.getElementById("reward2_user");
                        reward2_user.text("Cher(ère) " + driver.getFirstName() + "" + driver.getLastName() + ",");
                        Element reward2_content = document1.getElementById("reward2_content");
                        reward2_content.text("Vous avez effectué " + dao.getOrderNum() + " trajets aujourd’hui et avez reçu un bonus de GHS" + dah.getMoney() + ", veuillez vérifier.\nConsultez votre application pour plus de détails.");
                        reward2_content.html("Vous avez effectué " + dao.getOrderNum() + " trajets aujourd’hui et avez reçu un bonus de GHS" + dah.getMoney() + ", veuillez vérifier.<br/>Consultez votre application pour plus de détails.");
                    }
                    EmailUtil.send(driver.getEmail(), language == 1 ? "司机奖励通知" : language == 2 ? "Reward-driver notice" : "Avis de chauffeur de récompense", document1.html());
                    String randomString = ToolUtil.getRandomString(10);
                    //开始生成pdf收据和html收据
                    File file = new File("/usr/local/nginx/html/files/html/");
                    File file = new File("/home/igotechgh/nginx/html/files/html/");
                    if(!file.exists()){
                        file.mkdirs();
                    }
                    file = new File("/usr/local/nginx/html/files/html/rewards_" + randomString + ".html");
                    file = new File("/home/igotechgh/nginx/html/files/html/rewards_" + randomString + ".html");
                    if(!file.exists()){
                        file.createNewFile();
                    }
@@ -2678,7 +2774,7 @@
                    fileWriter.flush();
                    fileWriter.close();
                    String link ="http://182.160.16.251:81/files/html/rewards_" + randomString + ".html";
                    String link ="https://igo.i-go.group/files/html/rewards_" + randomString + ".html";
                    TEmail tEmail = new TEmail();
                    tEmail.setLink(link);
                    tEmail.setUserId(driver.getId());