zhibing.pu
2024-08-15 519aede1f3056cd87835ab9fa1c98328830fc462
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java
@@ -1355,6 +1355,12 @@
                    pay_type_chinese.text(payTypeChinese);
                    Element pay_money_chinese = document.getElementById("pay_money_chinese");
                    pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_chinese = document.getElementById("dispute_chinese");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_chinese.remove();
                    }
                    Element pdf_chinese = document.getElementById("pdf_chinese");
                    pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
                    Element lost_item_chinese = document.getElementById("lost_item_chinese");
@@ -1457,6 +1463,12 @@
                    pay_type_english.text(payTypeEnglish);
                    Element pay_money_english = document.getElementById("pay_money_english");
                    pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_english = document.getElementById("dispute_english");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_english.remove();
                    }
                    Element pdf_english = document.getElementById("pdf_english");
                    pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
                    Element lost_item_english = document.getElementById("lost_item_english");
@@ -1487,7 +1499,7 @@
                    document.getElementById("english").remove();
                    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 ");
                    title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO 1 le ");
                    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");
@@ -1559,6 +1571,12 @@
                    pay_type_french.text(payTypeFrench);
                    Element pay_money_french = document.getElementById("pay_money_french");
                    pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_french = document.getElementById("dispute_french");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_french.text("(Remarque: Il s’agit d’une commande contestée, et après des négociations entre trois parties, la plateforme l’a finalement tarifée à GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_french.remove();
                    }
                    Element pdf_french = document.getElementById("pdf_french");
                    pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
                    Element lost_item_french = document.getElementById("lost_item_french");
@@ -1872,6 +1890,12 @@
                    pay_type_chinese.text(payTypeChinese);
                    Element pay_money_chinese = document.getElementById("pay_money_chinese");
                    pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_chinese = document.getElementById("dispute_chinese");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_chinese.remove();
                    }
                    Element pdf_chinese = document.getElementById("pdf_chinese");
                    pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
                    Element lost_item_chinese = document.getElementById("lost_item_chinese");
@@ -1974,6 +1998,12 @@
                    pay_type_english.text(payTypeEnglish);
                    Element pay_money_english = document.getElementById("pay_money_english");
                    pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_english = document.getElementById("dispute_english");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_english.remove();
                    }
                    Element pdf_english = document.getElementById("pdf_english");
                    pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
                    Element lost_item_english = document.getElementById("lost_item_english");
@@ -2004,7 +2034,7 @@
                    document.getElementById("english").remove();
                    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 ");
                    title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO 1 le ");
                    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");
@@ -2076,6 +2106,12 @@
                    pay_type_french.text(payTypeFrench);
                    Element pay_money_french = document.getElementById("pay_money_french");
                    pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_french = document.getElementById("dispute_french");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_french.text("(Remarque: Il s’agit d’une commande contestée, et après des négociations entre trois parties, la plateforme l’a finalement tarifée à GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_french.remove();
                    }
                    Element pdf_french = document.getElementById("pdf_french");
                    pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
                    Element lost_item_french = document.getElementById("lost_item_french");
@@ -2489,6 +2525,12 @@
                    pay_type_chinese.text(payTypeChinese);
                    Element pay_money_chinese = document.getElementById("pay_money_chinese");
                    pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_chinese = document.getElementById("dispute_chinese");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_chinese.remove();
                    }
                    Element pdf_chinese = document.getElementById("pdf_chinese");
                    pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
                    Element lost_item_chinese = document.getElementById("lost_item_chinese");
@@ -2591,6 +2633,12 @@
                    pay_type_english.text(payTypeEnglish);
                    Element pay_money_english = document.getElementById("pay_money_english");
                    pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_english = document.getElementById("dispute_english");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_english.remove();
                    }
                    Element pdf_english = document.getElementById("pdf_english");
                    pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
                    Element lost_item_english = document.getElementById("lost_item_english");
@@ -2621,7 +2669,7 @@
                    document.getElementById("english").remove();
                    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 ");
                    title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO 1 le ");
                    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");
@@ -2693,6 +2741,12 @@
                    pay_type_french.text(payTypeFrench);
                    Element pay_money_french = document.getElementById("pay_money_french");
                    pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN));
                    Element dispute_french = document.getElementById("dispute_french");
                    if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){
                        dispute_french.text("(Remarque: Il s’agit d’une commande contestée, et après des négociations entre trois parties, la plateforme l’a finalement tarifée à GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")");
                    }else{
                        dispute_french.remove();
                    }
                    Element pdf_french = document.getElementById("pdf_french");
                    pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
                    Element lost_item_french = document.getElementById("lost_item_french");
@@ -3184,16 +3238,21 @@
        if(null != map.get("driverId")){
            companyId = Integer.valueOf(String.valueOf(map.get("companyId")));
        }
        map.put("timeOutCancel", 0);
        map.put("driverTimeOutTime", 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());
            int driverTimeout1 = jsonObject.getIntValue("driverTimeout");
            long time = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout1 * 60000;
            if(System.currentTimeMillis() > time){
                Integer driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue();
                driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime;
                map.put("driverTimeOutTime", driverTimeOutTime);
                map.put("driverTimeOut", 1);
            }
        }
        map.put("isDispute", orderLogistics.getIsDispute());
        return map;
    }
@@ -3308,10 +3367,7 @@
    @Override
    public ResultUtil cancleOrderPrivateCar(Integer id, Integer payType, Integer bankCardId, Integer cancleId, Integer type, Integer language) throws Exception {
        OrderLogistics orderLogistics = this.selectById(id);
        Integer uid = orderLogistics.getUserId();
        UserInfo userInfo = userInfoService.selectById(uid);
        ResultUtil resultUtil = ResultUtil.success("");
        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.", "");
        }
@@ -3324,7 +3380,9 @@
        }else{
            orderCancel = orderCancelService.selectById(cancleId);
        }
        Integer uid = orderLogistics.getUserId();
        UserInfo userInfo = userInfoService.selectById(uid);
        Double amount = orderCancel.getMoney();
        if(0 < amount){
            if(payType == 1){//手机支付
@@ -3668,7 +3726,7 @@
                    Element user_french = document.getElementById("user_french");
                    user_french.text("Bonjour " + userInfo.getNickName() + ",");
                    Element time_french = document.getElementById("time_french");
                    time_french.text("Cette promotion est valable du " + DateUtil.conversionFormat(language, sdf.format(id.getStartTime())) + " au " + DateUtil.conversionFormat(language, sdf.format(id.getEndTime())) + ". Veuillez consulter la plateforme i-go pour plus de détails.");
                    time_french.text("Cette promotion est valable du " + DateUtil.conversionFormat(language, sdf.format(id.getStartTime())) + " au " + DateUtil.conversionFormat(language, sdf.format(id.getEndTime())) + ". Veuillez consulter la plateforme I-GO pour plus de détails.");
                }
                
                EmailUtil.send(userInfo.getEmail(), language == 1 ? "红包活动" : language == 2 ? "Lucky-promo activities" : "Activités bonus",  document.html());