zhibing.pu
2024-08-02 77bca6b387f9349d072b8737e82b42fd7f723be0
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -574,8 +574,9 @@
        
                                }
                                String audioUrl = "";
                                String fileName = "pushOrder" + orderLogistics.getDriverId() + UUIDUtil.getRandomCode(5) + ".mp3";
                                try {
                                    audioUrl = TextToSpeechUtil.create(language1 == 1 ? "cmn-CN" : language1 == 2 ? "en-US" : "fr-FR", text, "pushOrder" + orderLogistics.getDriverId() + ".mp3");
                                    audioUrl = TextToSpeechUtil.create(language1 == 1 ? "cmn-CN" : language1 == 2 ? "en-US" : "fr-FR", text, fileName);
                                } catch (Exception e) {
                                    throw new RuntimeException(e);
                                }
@@ -585,7 +586,7 @@
                                    public void run() {
                                        Process process = null;
                                        try {
                                            process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/pushOrder" + orderLogistics.getDriverId() + ".mp3");
                                            process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName);
                                        } catch (IOException e) {
                                            throw new RuntimeException(e);
                                        }
@@ -643,12 +644,12 @@
         * 1.下了即时单就不能下预约单和即时单
         * 2.下了预约单和再下一张即时单不能再下预约单
         */
        List<OrderPrivateCar> orderPrivateCars = orderPrivateCarMapper.queryByState(uid, 1, 1, 1, 2, 3, 4, 5, 6,  11);
        List<OrderPrivateCar> orderPrivateCars = orderPrivateCarMapper.queryByState(uid, 1, 1, 1, 2, 3, 4, 5, 6, 7, 11, 12);
        if(orderPrivateCars.size() > 0){
            return ResultUtil.error(language == 1 ? "有未完成的订单" : language == 2 ? "Uncompleted order(s)" : "Commande(s) non complétée(s)");
        }
        int selectCount = this.selectCount(new EntityWrapper<OrderLogistics>().eq("userId", uid).eq("isDelete", 1)
                .in("state", Arrays.asList(1, 2, 3, 4, 5, 7, 11, 12)));
                .in("state", Arrays.asList(1, 2, 3, 4, 5, 6, 7, 11, 12)));
        if(0 < selectCount){
            return ResultUtil.error(language == 1 ? "有未完成的订单" : language == 2 ? "Uncompleted order(s)" : "Commande(s) non complétée(s)");
        }
@@ -744,6 +745,10 @@
        orderLogistics.setEstimatedMileage(new BigDecimal(distance1).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
        this.insert(orderLogistics);
    
        UserInfo userInfo = userInfoService.selectById(uid);
        userInfo.setLanguage(language);
        userInfoService.updateById(userInfo);
        new Thread(() -> {
            try {
                String vehicleId = null;
@@ -789,8 +794,9 @@
        
            }
            String audioUrl = "";
            String fileName = "pushOrder" + orderLogistics.getDriverId() + UUIDUtil.getRandomCode(5) + ".mp3";
            try {
                audioUrl = TextToSpeechUtil.create(language1 == 1 ? "cmn-CN" : language1 == 2 ? "en-US" : "fr-FR", text, "pushOrder" + orderLogistics.getDriverId() + ".mp3");
                audioUrl = TextToSpeechUtil.create(language1 == 1 ? "cmn-CN" : language1 == 2 ? "en-US" : "fr-FR", text, fileName);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
@@ -800,7 +806,7 @@
                public void run() {
                    Process process = null;
                    try {
                        process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/pushOrder" + orderLogistics.getDriverId() + ".mp3");
                        process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName);
                    } catch (IOException e) {
                        throw new RuntimeException(e);
                    }
@@ -901,8 +907,9 @@
        
                    }
                    String audioUrl = "";
                    String fileName = "pushOrder" + orderLogistics.getDriverId() + UUIDUtil.getRandomCode(5) + ".mp3";
                    try {
                        audioUrl = TextToSpeechUtil.create(language1 == 1 ? "cmn-CN" : language1 == 2 ? "en-US" : "fr-FR", text, "pushOrder" + orderLogistics.getDriverId() + ".mp3");
                        audioUrl = TextToSpeechUtil.create(language1 == 1 ? "cmn-CN" : language1 == 2 ? "en-US" : "fr-FR", text, fileName);
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
@@ -912,7 +919,7 @@
                        public void run() {
                            Process process = null;
                            try {
                                process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/pushOrder" + orderLogistics.getDriverId() + ".mp3");
                                process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName);
                            } catch (IOException e) {
                                throw new RuntimeException(e);
                            }
@@ -1270,8 +1277,43 @@
                    document.getElementsByTag("title").get(0).text("I-GO电子收据");
                    Element title_chinese = document.getElementById("title_chinese");
                    title_chinese.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney());
                    Element xcf_chinese = document.getElementById("xcf_chinese");
                    xcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_chinese = document.getElementById("qbj_chinese");
                    qbj_chinese.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_chinese = document.getElementById("scf_chinese");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_chinese.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_chinese_div = document.getElementById("scf_chinese_div");
                        scf_chinese_div.remove();
                    }
                    Element lcf_chinese = document.getElementById("lcf_chinese");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_chinese_div = document.getElementById("lcf_chinese_div");
                        lcf_chinese_div.remove();
                    }
                    Element ddf_chinese = document.getElementById("ddf_chinese");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_chinese.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_chinese_div = document.getElementById("ddf_chinese_div");
                        ddf_chinese_div.remove();
                    }
                    Element glf_chinese = document.getElementById("glf_chinese");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_chinese.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_chinese_div = document.getElementById("glf_chinese_div");
                        glf_chinese_div.remove();
                    }
                    Element tcf_chinese = document.getElementById("tcf_chinese");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_chinese_div = document.getElementById("tcf_chinese_div");
                        tcf_chinese_div.remove();
                    }
                    Element bcj_chinese = document.getElementById("bcj_chinese");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -1337,8 +1379,43 @@
                    document.getElementsByTag("title").get(0).text("Receipt");
                    Element title_english = document.getElementById("title_english");
                    title_english.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip ");
                    Element xcf_english = document.getElementById("xcf_english");
                    xcf_english.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_english = document.getElementById("qbj_english");
                    qbj_english.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_english = document.getElementById("scf_english");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_english.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_english_div = document.getElementById("scf_english_div");
                        scf_english_div.remove();
                    }
                    Element lcf_english = document.getElementById("lcf_english");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_english.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_english_div = document.getElementById("lcf_english_div");
                        lcf_english_div.remove();
                    }
                    Element ddf_english = document.getElementById("ddf_english");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_english.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_english_div = document.getElementById("ddf_english_div");
                        ddf_english_div.remove();
                    }
                    Element glf_english = document.getElementById("glf_english");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_english.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_english_div = document.getElementById("glf_english_div");
                        glf_english_div.remove();
                    }
                    Element tcf_english = document.getElementById("tcf_english");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_english.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_english_div = document.getElementById("tcf_english_div");
                        tcf_english_div.remove();
                    }
                    Element bcj_english = document.getElementById("bcj_english");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_english.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -1404,8 +1481,43 @@
                    document.getElementsByTag("title").get(0).text("Reçu");
                    Element title_french = document.getElementById("title_french");
                    title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le ");
                    Element xcf_french = document.getElementById("xcf_french");
                    xcf_french.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_french = document.getElementById("qbj_french");
                    qbj_french.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_french = document.getElementById("scf_french");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_french.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_french_div = document.getElementById("scf_french_div");
                        scf_french_div.remove();
                    }
                    Element lcf_french = document.getElementById("lcf_french");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_french.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_french_div = document.getElementById("lcf_french_div");
                        lcf_french_div.remove();
                    }
                    Element ddf_french = document.getElementById("ddf_french");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_french.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_french_div = document.getElementById("ddf_french_div");
                        ddf_french_div.remove();
                    }
                    Element glf_french = document.getElementById("glf_french");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_french.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_french_div = document.getElementById("glf_french_div");
                        glf_french_div.remove();
                    }
                    Element tcf_french = document.getElementById("tcf_french");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_french.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_french_div = document.getElementById("tcf_french_div");
                        tcf_french_div.remove();
                    }
                    Element bcj_french = document.getElementById("bcj_french");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_french.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -1647,7 +1759,7 @@
                public void run() {
                    pushUtil.pushOrderState(1, orderLogistics.getUserId(), orderLogistics.getId(), orderLogistics.getType(), orderLogistics.getState(), 0, "");
                    pushUtil.pushOrderState(2, orderLogistics.getDriverId(), orderLogistics.getId(), orderLogistics.getType(), orderLogistics.getState(), 0, "");
                    pushUtil.pushOfflinePayment(2, orderLogistics.getDriverId(), orderLogistics.getId(), 4);
                    pushUtil.pushOfflinePayment(2, orderLogistics.getDriverId(), orderLogistics.getId(), 4, orderLogistics.getPayMoney());
                }
            }).start();
@@ -1681,8 +1793,43 @@
                    document.getElementsByTag("title").get(0).text("I-GO电子收据");
                    Element title_chinese = document.getElementById("title_chinese");
                    title_chinese.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney());
                    Element xcf_chinese = document.getElementById("xcf_chinese");
                    xcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_chinese = document.getElementById("qbj_chinese");
                    qbj_chinese.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_chinese = document.getElementById("scf_chinese");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_chinese.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_chinese_div = document.getElementById("scf_chinese_div");
                        scf_chinese_div.remove();
                    }
                    Element lcf_chinese = document.getElementById("lcf_chinese");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_chinese_div = document.getElementById("lcf_chinese_div");
                        lcf_chinese_div.remove();
                    }
                    Element ddf_chinese = document.getElementById("ddf_chinese");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_chinese.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_chinese_div = document.getElementById("ddf_chinese_div");
                        ddf_chinese_div.remove();
                    }
                    Element glf_chinese = document.getElementById("glf_chinese");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_chinese.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_chinese_div = document.getElementById("glf_chinese_div");
                        glf_chinese_div.remove();
                    }
                    Element tcf_chinese = document.getElementById("tcf_chinese");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_chinese_div = document.getElementById("tcf_chinese_div");
                        tcf_chinese_div.remove();
                    }
                    Element bcj_chinese = document.getElementById("bcj_chinese");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -1748,8 +1895,43 @@
                    document.getElementsByTag("title").get(0).text("Receipt");
                    Element title_english = document.getElementById("title_english");
                    title_english.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip ");
                    Element xcf_english = document.getElementById("xcf_english");
                    xcf_english.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_english = document.getElementById("qbj_english");
                    qbj_english.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_english = document.getElementById("scf_english");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_english.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_english_div = document.getElementById("scf_english_div");
                        scf_english_div.remove();
                    }
                    Element lcf_english = document.getElementById("lcf_english");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_english.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_english_div = document.getElementById("lcf_english_div");
                        lcf_english_div.remove();
                    }
                    Element ddf_english = document.getElementById("ddf_english");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_english.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_english_div = document.getElementById("ddf_english_div");
                        ddf_english_div.remove();
                    }
                    Element glf_english = document.getElementById("glf_english");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_english.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_english_div = document.getElementById("glf_english_div");
                        glf_english_div.remove();
                    }
                    Element tcf_english = document.getElementById("tcf_english");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_english.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_english_div = document.getElementById("tcf_english_div");
                        tcf_english_div.remove();
                    }
                    Element bcj_english = document.getElementById("bcj_english");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_english.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -1815,8 +1997,43 @@
                    document.getElementsByTag("title").get(0).text("Reçu");
                    Element title_french = document.getElementById("title_french");
                    title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le ");
                    Element xcf_french = document.getElementById("xcf_french");
                    xcf_french.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_french = document.getElementById("qbj_french");
                    qbj_french.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_french = document.getElementById("scf_french");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_french.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_french_div = document.getElementById("scf_french_div");
                        scf_french_div.remove();
                    }
                    Element lcf_french = document.getElementById("lcf_french");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_french.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_french_div = document.getElementById("lcf_french_div");
                        lcf_french_div.remove();
                    }
                    Element ddf_french = document.getElementById("ddf_french");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_french.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_french_div = document.getElementById("ddf_french_div");
                        ddf_french_div.remove();
                    }
                    Element glf_french = document.getElementById("glf_french");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_french.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_french_div = document.getElementById("glf_french_div");
                        glf_french_div.remove();
                    }
                    Element tcf_french = document.getElementById("tcf_french");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_french.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_french_div = document.getElementById("tcf_french_div");
                        tcf_french_div.remove();
                    }
                    Element bcj_french = document.getElementById("bcj_french");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_french.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -2193,8 +2410,43 @@
                    document.getElementsByTag("title").get(0).text("I-GO电子收据");
                    Element title_chinese = document.getElementById("title_chinese");
                    title_chinese.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney());
                    Element xcf_chinese = document.getElementById("xcf_chinese");
                    xcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_chinese = document.getElementById("qbj_chinese");
                    qbj_chinese.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_chinese = document.getElementById("scf_chinese");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_chinese.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_chinese_div = document.getElementById("scf_chinese_div");
                        scf_chinese_div.remove();
                    }
                    Element lcf_chinese = document.getElementById("lcf_chinese");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_chinese_div = document.getElementById("lcf_chinese_div");
                        lcf_chinese_div.remove();
                    }
                    Element ddf_chinese = document.getElementById("ddf_chinese");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_chinese.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_chinese_div = document.getElementById("ddf_chinese_div");
                        ddf_chinese_div.remove();
                    }
                    Element glf_chinese = document.getElementById("glf_chinese");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_chinese.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_chinese_div = document.getElementById("glf_chinese_div");
                        glf_chinese_div.remove();
                    }
                    Element tcf_chinese = document.getElementById("tcf_chinese");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_chinese_div = document.getElementById("tcf_chinese_div");
                        tcf_chinese_div.remove();
                    }
                    Element bcj_chinese = document.getElementById("bcj_chinese");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -2260,8 +2512,43 @@
                    document.getElementsByTag("title").get(0).text("Receipt");
                    Element title_english = document.getElementById("title_english");
                    title_english.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip ");
                    Element xcf_english = document.getElementById("xcf_english");
                    xcf_english.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_english = document.getElementById("qbj_english");
                    qbj_english.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_english = document.getElementById("scf_english");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_english.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_english_div = document.getElementById("scf_english_div");
                        scf_english_div.remove();
                    }
                    Element lcf_english = document.getElementById("lcf_english");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_english.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_english_div = document.getElementById("lcf_english_div");
                        lcf_english_div.remove();
                    }
                    Element ddf_english = document.getElementById("ddf_english");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_english.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_english_div = document.getElementById("ddf_english_div");
                        ddf_english_div.remove();
                    }
                    Element glf_english = document.getElementById("glf_english");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_english.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_english_div = document.getElementById("glf_english_div");
                        glf_english_div.remove();
                    }
                    Element tcf_english = document.getElementById("tcf_english");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_english.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_english_div = document.getElementById("tcf_english_div");
                        tcf_english_div.remove();
                    }
                    Element bcj_english = document.getElementById("bcj_english");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_english.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -2327,8 +2614,43 @@
                    document.getElementsByTag("title").get(0).text("Reçu");
                    Element title_french = document.getElementById("title_french");
                    title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le ");
                    Element xcf_french = document.getElementById("xcf_french");
                    xcf_french.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element qbj_french = document.getElementById("qbj_french");
                    qbj_french.text("GHS " + new BigDecimal(orderLogistics.getStartMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element scf_french = document.getElementById("scf_french");
                    if(null != orderLogistics.getDurationMoney() && orderLogistics.getDurationMoney() > 0){
                        scf_french.text("GHS " + new BigDecimal(orderLogistics.getDurationMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element scf_french_div = document.getElementById("scf_french_div");
                        scf_french_div.remove();
                    }
                    Element lcf_french = document.getElementById("lcf_french");
                    if(null != orderLogistics.getMileageMoney() && orderLogistics.getMileageMoney() > 0){
                        lcf_french.text("GHS " + new BigDecimal(orderLogistics.getMileageMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element lcf_french_div = document.getElementById("lcf_french_div");
                        lcf_french_div.remove();
                    }
                    Element ddf_french = document.getElementById("ddf_french");
                    if(null != orderLogistics.getWaitMoney() && orderLogistics.getWaitMoney() > 0){
                        ddf_french.text("GHS " + new BigDecimal(orderLogistics.getWaitMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element ddf_french_div = document.getElementById("ddf_french_div");
                        ddf_french_div.remove();
                    }
                    Element glf_french = document.getElementById("glf_french");
                    if(null != orderLogistics.getRoadTollMoney() && orderLogistics.getRoadTollMoney() > 0){
                        glf_french.text("GHS " + new BigDecimal(orderLogistics.getRoadTollMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element glf_french_div = document.getElementById("glf_french_div");
                        glf_french_div.remove();
                    }
                    Element tcf_french = document.getElementById("tcf_french");
                    if(null != orderLogistics.getParkMoney() && orderLogistics.getParkMoney() > 0){
                        tcf_french.text("GHS " + new BigDecimal(orderLogistics.getParkMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    }else{
                        Element tcf_french_div = document.getElementById("tcf_french_div");
                        tcf_french_div.remove();
                    }
                    Element bcj_french = document.getElementById("bcj_french");
                    if(null != orderLogistics.getPriceDifference() && orderLogistics.getPriceDifference() > 0){
                        bcj_french.text("GHS " + new BigDecimal(orderLogistics.getPriceDifference()).setScale(2, RoundingMode.HALF_EVEN));
@@ -2584,12 +2906,15 @@
    
            OrderLogistics orderLogistics = this.selectById(orderId);
            long timeOutCancel = 0L;
            long driverTimeOut = 0L;
            if(null != orderLogistics.getEstimateArriveTime()){
                CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderLogistics.getCompanyId()));
                JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent());
                int driverTimeout = jsonObject.getIntValue("driverTimeout") * 60000;
                timeOutCancel = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout;
                driverTimeOut = orderLogistics.getEstimateArriveTime().getTime();
            }
            map.put("driverTimeOut", driverTimeOut);
            map.put("timeOutCancel", timeOutCancel);
        }
        return maps;
@@ -2648,7 +2973,7 @@
        if(null == orderLogistics){
            return ResultUtil.error(language == 1 ? "取消订单失败,订单信息有误" : language == 2 ? "Failed to cancel order, order-information error." : "Échec de l’annulation de la commande, erreur d’information de commande.");
        }
        if(orderLogistics.getState() > 5 && orderLogistics.getState() != 11){
        if(orderLogistics.getState() > 5 && orderLogistics.getState() != 12){
            return ResultUtil.error(language == 1 ? "取消订单失败,不合法的操作" : language == 2 ? "Failed to cancel order, illegal operation." : "Échec de l’annulation de la commande, opération illégale.");
        }
    
@@ -2699,13 +3024,13 @@
                    String audioUrl = "";
                    switch (language1){
                        case 1:
                            audioUrl = "http://182.160.16.251:81/files/audio/UserCancelledOrder-CN.mp3";
                            audioUrl = "http://182.160.16.251:81/files/audio/system/UserCancelledOrder-CN.mp3";
                            break;
                        case 2:
                            audioUrl = "http://182.160.16.251:81/files/audio/UserCancelledOrder-EN.mp3";
                            audioUrl = "http://182.160.16.251:81/files/audio/system/UserCancelledOrder-EN.mp3";
                            break;
                        case 3:
                            audioUrl = "http://182.160.16.251:81/files/audio/UserCancelledOrder-FR.mp3";
                            audioUrl = "http://182.160.16.251:81/files/audio/system/UserCancelledOrder-FR.mp3";
                            break;
                    }
                    pushUtil.pushOrderState(1, orderLogistics.getUserId(), orderLogistics.getId(), 4, orderLogistics.getState(), 0, "");
@@ -2812,6 +3137,11 @@
        if(state == 11){
            map.put("state", map.get("oldState"));
        }
        if(state == 12){
            OrderCancel query = orderCancelService.query(orderId, 4, null, null, 1);
            map.put("cancelPayMoney", null == query ? 0 : query.getMoney());
            map.put("cancelMoney", null == query ? 0 : query.getMoney());
        }
        if(Integer.valueOf(String.valueOf(map.get("state"))) != 8 && Integer.valueOf(String.valueOf(map.get("state"))) != 9){
            map.put("redPacketMoney", null);
            map.put("couponMoney", null);
@@ -2822,6 +3152,7 @@
                Integer orderNum=this.selectCount(new EntityWrapper<OrderLogistics>().eq("userId",orderLogistics.getUserId()).eq("activityId",query2.getId()).last(" and to_days(getoffTime) = to_days(now())"));
                if(query2.getDistance()*1000>orderLogistics.getMileage() && query2.getOrderNum()>orderNum){
                    Double special = query2.getLogistics();
                    map.put("discount", special);
                    orderLogistics.setDiscount(special);
                    Double orderMoney = orderLogistics.getOrderMoney();
                    double v = new BigDecimal(orderMoney).multiply(new BigDecimal(special / 10)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
@@ -2832,17 +3163,11 @@
            
            }
        }
//        Map<String, String> geocode = gdMapGeocodingUtil.geocode(map.get("startLon").toString(), map.get("startLat").toString());
//        map.put("startCity", geocode.get("city"));
//        geocode = gdMapGeocodingUtil.geocode(map.get("endLon").toString(), map.get("endLat").toString());
//        map.put("endCity", geocode.get("city"));
//        GoogleMapUtil.getReverseGeocode()
        String driverId = redisUtil.getValue("DEVICE_" + map.get("driverId"));
        map.put("device", ToolUtil.isNotEmpty(driverId) ? 2 : 1);
        map.put("orderType", orderLogistics.getType());
        if(state == 8){
        if(state == 8 || state == 9){
            map.put("receipt", "http://182.160.16.251:81/files/html/parcel_receipt_" + orderId + ".html");
        }else{
            map.put("receipt", "");
@@ -2852,12 +3177,14 @@
            companyId = Integer.valueOf(String.valueOf(map.get("companyId")));
        }
        map.put("timeOutCancel", 0);
        map.put("driverTimeOut", 0);
        if(null != orderLogistics.getEstimateArriveTime()){
            CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", companyId));
            JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent());
            int driverTimeout = jsonObject.getIntValue("driverTimeout");
            long timeOutCancel = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout;
            map.put("timeOutCancel", timeOutCancel);
            map.put("driverTimeOut", orderLogistics.getEstimateArriveTime().getTime());
        }
        return map;
    }
@@ -2980,7 +3307,7 @@
        if(null == orderLogistics){
            return ResultUtil.error(language == 1 ? "取消订单失败,订单信息有误" : language == 2 ? "Failed to cancel order, order-information error." : "Échec de l’annulation de la commande, erreur d’information de commande.", "");
        }
        if(orderLogistics.getState() != 13){
        if(orderLogistics.getState() != 12){
            return ResultUtil.error(language == 1 ? "取消订单失败,不合法的操作" : language == 2 ? "Failed to cancel order, illegal operation." : "Échec de l’annulation de la commande, opération illégale.", "");
        }
        OrderCancel orderCancel = null;
@@ -2990,7 +3317,7 @@
            orderCancel = orderCancelService.selectById(cancleId);
        }
        
        Double amount = queryCancleAmount(id, language).getData().getAmount();
        Double amount = orderCancel.getMoney();
        if(0 < amount){
            if(payType == 1){//手机支付
                orderCancel.setPayType(1);
@@ -3212,13 +3539,13 @@
            String audioUrl = "";
            switch (language1){
                case 1:
                    audioUrl = "http://182.160.16.251:81/files/audio/ChangeAddress-CN.mp3";
                    audioUrl = "http://182.160.16.251:81/files/audio/system/ChangeAddress-CN.mp3";
                    break;
                case 2:
                    audioUrl = "http://182.160.16.251:81/files/audio/ChangeAddress-EN.mp3";
                    audioUrl = "http://182.160.16.251:81/files/audio/system/ChangeAddress-EN.mp3";
                    break;
                case 3:
                    audioUrl = "http://182.160.16.251:81/files/audio/ChangeAddress-FR.mp3";
                    audioUrl = "http://182.160.16.251:81/files/audio/system/ChangeAddress-FR.mp3";
                    break;
            }
            pushUtil.pushModifyAddress(2, orderLogistics.getDriverId(), orderId, 4, 1, audioUrl);