From 5228e24ff93fae148db40c44d9deb8e93110c6eb Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 14 二月 2025 17:16:21 +0800 Subject: [PATCH] 开发新增加功能 --- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java | 1634 ++++++++++++++++++++++++++------------------------- UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java | 18 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderEvaluateServiceImpl.java | 18 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SystemPriceMapper.xml | 3 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ServerCarModelServiceImpl.java | 5 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ProblemServiceImpl.java | 18 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java | 16 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java | 14 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/CharteredCar/server/impl/OrderCharteredCarServiceImpl.java | 19 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java | 14 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SystemPriceMapper.java | 2 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java | 14 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SystemPrice.java | 41 + UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/ServerCarModelWarpper.java | 11 UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java | 2 15 files changed, 1,002 insertions(+), 827 deletions(-) diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/CharteredCar/server/impl/OrderCharteredCarServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/CharteredCar/server/impl/OrderCharteredCarServiceImpl.java index 4691e6c..f87ad95 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/CharteredCar/server/impl/OrderCharteredCarServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/CharteredCar/server/impl/OrderCharteredCarServiceImpl.java @@ -19,10 +19,8 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; @Service @@ -115,9 +113,20 @@ if(ToolUtil.isNotEmpty(remark)){ if(ToolUtil.isNotEmpty(remark)){ List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(remark.split(" ")); for(SensitiveWords s : sensitiveWords){ - remark = remark.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + remark = list.stream().collect(Collectors.joining(" ")); } } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java index bb180e9..4f9cd6c 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/crossCity/server/impl/OrderCrossCityServiceImpl.java @@ -55,6 +55,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.util.*; +import java.util.stream.Collectors; import static com.stylefeng.guns.modular.taxi.service.impl.OrderTaxiServiceImpl.orderIds; @@ -1198,9 +1199,20 @@ if(ToolUtil.isNotEmpty(remark)){ if(ToolUtil.isNotEmpty(remark)){ List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(remark.split(" ")); for(SensitiveWords s : sensitiveWords){ - remark = remark.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + remark = list.stream().collect(Collectors.joining(" ")); } } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java index 31345c1..0985a8a 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java @@ -62,6 +62,7 @@ import java.math.RoundingMode; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; @Service @@ -418,47 +419,47 @@ * @return * @throws Exception */ - public ResultUtil<Map<String, Double>> getPrice(Integer uid, Integer type, String startLon, String startLat, String endLon, String endLat) throws Exception{ - Company query = companyCityService.query1(uid, startLon, startLat); - if(null == query){ - return ResultUtil.error("预约取货点暂无企业服务"); - } - Double price1 = 0D; - Double price2 = 0D; - if(type == 4){//同城 - Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); - Map<String, String> distance = gdMapElectricFenceUtil.getDistance(startLon + "," + startLat, endLon + "," + endLat, 1); - String content = String.valueOf(query1.get("content")); - JSONObject jsonObject = JSON.parseObject(content); - String distance1 = distance.get("distance"); - Double dist = Double.valueOf(distance1) / 1000; - if(dist.compareTo(0D) >= 0 && dist.compareTo(jsonObject.getDouble("num1")) < 0){ - price1 = jsonObject.getDouble("num2"); - } - - if(dist.compareTo(jsonObject.getDouble("num3")) >= 0 && dist.compareTo(jsonObject.getDouble("num4")) < 0){ - price1 = jsonObject.getDouble("num5"); - } - - if(dist.compareTo(jsonObject.getDouble("num6")) >= 0 && dist.compareTo(jsonObject.getDouble("num7")) < 0){ - price1 = jsonObject.getDouble("num8"); - } - - if(dist.compareTo(jsonObject.getDouble("num9")) >= 0 && dist.compareTo(jsonObject.getDouble("num10")) < 0){ - price1 = jsonObject.getDouble("num11"); - } - }else{ - Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); - String content = String.valueOf(query1.get("content")); - JSONObject jsonObject = JSON.parseObject(content); - price1 = jsonObject.getDouble("num1"); - price2 = jsonObject.getDouble("num2"); - } - Map<String, Double> map = new HashMap<>(); - map.put("ordinary", price1);//普通 - map.put("precious", price2);//贵重 - return ResultUtil.success(map); - } +// public ResultUtil<Map<String, Double>> getPrice(Integer uid, Integer type, String startLon, String startLat, String endLon, String endLat) throws Exception{ +// Company query = companyCityService.query1(uid, startLon, startLat); +// if(null == query){ +// return ResultUtil.error("预约取货点暂无企业服务"); +// } +// Double price1 = 0D; +// Double price2 = 0D; +// if(type == 4){//同城 +// Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); +// Map<String, String> distance = gdMapElectricFenceUtil.getDistance(startLon + "," + startLat, endLon + "," + endLat, 1); +// String content = String.valueOf(query1.get("content")); +// JSONObject jsonObject = JSON.parseObject(content); +// String distance1 = distance.get("distance"); +// Double dist = Double.valueOf(distance1) / 1000; +// if(dist.compareTo(0D) >= 0 && dist.compareTo(jsonObject.getDouble("num1")) < 0){ +// price1 = jsonObject.getDouble("num2"); +// } +// +// if(dist.compareTo(jsonObject.getDouble("num3")) >= 0 && dist.compareTo(jsonObject.getDouble("num4")) < 0){ +// price1 = jsonObject.getDouble("num5"); +// } +// +// if(dist.compareTo(jsonObject.getDouble("num6")) >= 0 && dist.compareTo(jsonObject.getDouble("num7")) < 0){ +// price1 = jsonObject.getDouble("num8"); +// } +// +// if(dist.compareTo(jsonObject.getDouble("num9")) >= 0 && dist.compareTo(jsonObject.getDouble("num10")) < 0){ +// price1 = jsonObject.getDouble("num11"); +// } +// }else{ +// Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); +// String content = String.valueOf(query1.get("content")); +// JSONObject jsonObject = JSON.parseObject(content); +// price1 = jsonObject.getDouble("num1"); +// price2 = jsonObject.getDouble("num2"); +// } +// Map<String, Double> map = new HashMap<>(); +// map.put("ordinary", price1);//普通 +// map.put("precious", price2);//贵重 +// return ResultUtil.success(map); +// } @@ -474,7 +475,7 @@ Double discountMoney = 0D; Integer activityId = null; if(type == 4){//同城 - Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); + Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, language); String tripId = redisUtil.getValue("trip" + uid); DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(startLat), Double.valueOf(startLon), Double.valueOf(endLat), Double.valueOf(endLon), tripId); if(null == distancematrix){ @@ -503,7 +504,7 @@ return ResultUtil.error(language == 1 ? "超出可服务范围" : language == 2 ? "Beyond service range" : "Au-delà de la portée de service"); } }else{ - Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); + Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, language); String content = String.valueOf(query1.get("content")); JSONObject jsonObject = JSON.parseObject(content); price1 = jsonObject.getDouble("num1"); @@ -1318,393 +1319,403 @@ language = userInfo.getLanguage(); - if(ToolUtil.isNotEmpty(userInfo.getEmail())){ - String path = templatePath + "user/receiptLogistics.html"; - Document document = Jsoup.parse(new File(path), "UTF-8"); - SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); - SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); - driver = driverService.selectById(orderLogistics.getDriverId()); - Car car = carMapper.selectById(orderLogistics.getCarId()); - Double aDouble = 0D; - if(null != orderLogistics.getDriverId()){ - aDouble = orderEvaluateService.queryDriverScore(orderLogistics.getDriverId()); - } - if(1 == language){ - document.getElementById("english").remove(); - document.getElementById("french").remove(); - document.getElementsByTag("title").get(0).text("包裹收据"); - Element title_chinese = document.getElementById("title_chinese"); - title_chinese.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney()); - 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)); - }else{ - Element bcj_chinese_div = document.getElementById("bcj_chinese_div"); - bcj_chinese_div.remove(); - } - if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ - Element yhq_chinese = document.getElementById("yhq_chinese"); - yhq_chinese.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element yhq_chinese_div = document.getElementById("yhq_chinese_div"); - yhq_chinese_div.remove(); - } - if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ - Element zk_chinese = document.getElementById("zk_chinese"); - zk_chinese.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element zk_chinese_div = document.getElementById("zk_chinese_div"); - zk_chinese_div.remove(); - } - if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ - Element hb_chinese = document.getElementById("hb_chinese"); - hb_chinese.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element hb_chinese_div = document.getElementById("hb_chinese_div"); - hb_chinese_div.remove(); - } - Element xj_chinese = document.getElementById("xj_chinese"); - xj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); - Element pay_type_chinese = document.getElementById("pay_type_chinese"); - pay_type_chinese.text("余额支付"); - 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); - }else{ - dispute_chinese.remove(); - } - Element pdf_chinese = document.getElementById("pdf_chinese"); - pdf_chinese.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); - Element lost_item_chinese = document.getElementById("lost_item_chinese"); - lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4"); + Integer finalLanguage1 = language; + new Thread(new Runnable() { + @Override + public void run() { + try { + if(ToolUtil.isNotEmpty(userInfo.getEmail())){ + String path = templatePath + "user/receiptLogistics.html"; + Document document = Jsoup.parse(new File(path), "UTF-8"); + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + Driver driver = driverService.selectById(orderLogistics.getDriverId()); + Car car = carMapper.selectById(orderLogistics.getCarId()); + Double aDouble = 0D; + if(null != orderLogistics.getDriverId()){ + aDouble = orderEvaluateService.queryDriverScore(orderLogistics.getDriverId()); + } + if(1 == finalLanguage1){ + document.getElementById("english").remove(); + document.getElementById("french").remove(); + document.getElementsByTag("title").get(0).text("包裹收据"); + Element title_chinese = document.getElementById("title_chinese"); + title_chinese.text(DateUtil.conversionFormat(finalLanguage1, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney()); + 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)); + }else{ + Element bcj_chinese_div = document.getElementById("bcj_chinese_div"); + bcj_chinese_div.remove(); + } + if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ + Element yhq_chinese = document.getElementById("yhq_chinese"); + yhq_chinese.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element yhq_chinese_div = document.getElementById("yhq_chinese_div"); + yhq_chinese_div.remove(); + } + if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ + Element zk_chinese = document.getElementById("zk_chinese"); + zk_chinese.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element zk_chinese_div = document.getElementById("zk_chinese_div"); + zk_chinese_div.remove(); + } + if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ + Element hb_chinese = document.getElementById("hb_chinese"); + hb_chinese.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element hb_chinese_div = document.getElementById("hb_chinese_div"); + hb_chinese_div.remove(); + } + Element xj_chinese = document.getElementById("xj_chinese"); + xj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); + Element pay_type_chinese = document.getElementById("pay_type_chinese"); + pay_type_chinese.text("余额支付"); + 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); + }else{ + dispute_chinese.remove(); + } + Element pdf_chinese = document.getElementById("pdf_chinese"); + pdf_chinese.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); + Element lost_item_chinese = document.getElementById("lost_item_chinese"); + lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + finalLanguage1 + "&orderId=" + orderId + "&orderType=4"); // Element track_chinese = document.getElementById("track_chinese"); // track_chinese.attr("href", "https://igo.i-go.group/mailbox/user/location.html"); - Element pay_time_chinese = document.getElementById("pay_time_chinese"); - pay_time_chinese.text(DateUtil.conversionFormat(language, sdf1.format(orderLogistics.getTravelTime()))); - Elements driver_chinese = document.getElementsByClass("driver_chinese"); - for (int i = 0; i < driver_chinese.size(); i++) { - Element element = driver_chinese.get(i); - element.text(" " + driver.getFirstName() + "." + driver.getLastName()); - } - Element cp_chinese = document.getElementById("cp_chinese"); - cp_chinese.text("车牌:" + car.getCarLicensePlate()); - Element pf_chinese = document.getElementById("pf_chinese"); - pf_chinese.text("司机评分:" + aDouble); - Element start_address_chinese = document.getElementById("start_address_chinese"); - start_address_chinese.text(orderLogistics.getStartAddress()); - Element end_address_chinese = document.getElementById("end_address_chinese"); - end_address_chinese.text(orderLogistics.getEndAddress()); - Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); - Element server_tel_chinese = document.getElementById("server_tel_chinese"); - server_tel_chinese.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); - } - if(2 == language){ - document.getElementById("chinese").remove(); - document.getElementById("french").remove(); - document.getElementsByTag("title").get(0).text("Delivery 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 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)); - }else{ - Element bcj_english_div = document.getElementById("bcj_english_div"); - bcj_english_div.remove(); - } - if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ - Element yhq_english = document.getElementById("yhq_english"); - yhq_english.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element yhq_english_div = document.getElementById("yhq_english_div"); - yhq_english_div.remove(); - } - if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ - Element zk_english = document.getElementById("zk_english"); - zk_english.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element zk_english_div = document.getElementById("zk_english_div"); - zk_english_div.remove(); - } - if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ - Element hb_english = document.getElementById("hb_english"); - hb_english.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element hb_english_div = document.getElementById("hb_english_div"); - hb_english_div.remove(); - } - Element xj_english = document.getElementById("xj_english"); - xj_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); - Element pay_type_english = document.getElementById("pay_type_english"); - pay_type_english.text("I-GO Wallet"); - 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); - }else{ - dispute_english.remove(); - } - Element pdf_english = document.getElementById("pdf_english"); - pdf_english.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); - Element lost_item_english = document.getElementById("lost_item_english"); - lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4"); + Element pay_time_chinese = document.getElementById("pay_time_chinese"); + pay_time_chinese.text(DateUtil.conversionFormat(finalLanguage1, sdf1.format(orderLogistics.getTravelTime()))); + Elements driver_chinese = document.getElementsByClass("driver_chinese"); + for (int i = 0; i < driver_chinese.size(); i++) { + Element element = driver_chinese.get(i); + element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + } + Element cp_chinese = document.getElementById("cp_chinese"); + cp_chinese.text("车牌:" + car.getCarLicensePlate()); + Element pf_chinese = document.getElementById("pf_chinese"); + pf_chinese.text("司机评分:" + aDouble); + Element start_address_chinese = document.getElementById("start_address_chinese"); + start_address_chinese.text(orderLogistics.getStartAddress()); + Element end_address_chinese = document.getElementById("end_address_chinese"); + end_address_chinese.text(orderLogistics.getEndAddress()); + Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); + Element server_tel_chinese = document.getElementById("server_tel_chinese"); + server_tel_chinese.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); + } + if(2 == finalLanguage1){ + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); + document.getElementsByTag("title").get(0).text("Delivery receipt"); + Element title_english = document.getElementById("title_english"); + title_english.text(DateUtil.conversionFormat(finalLanguage1, sdf2.format(orderLogistics.getTravelTime())) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip "); + 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)); + }else{ + Element bcj_english_div = document.getElementById("bcj_english_div"); + bcj_english_div.remove(); + } + if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ + Element yhq_english = document.getElementById("yhq_english"); + yhq_english.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element yhq_english_div = document.getElementById("yhq_english_div"); + yhq_english_div.remove(); + } + if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ + Element zk_english = document.getElementById("zk_english"); + zk_english.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element zk_english_div = document.getElementById("zk_english_div"); + zk_english_div.remove(); + } + if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ + Element hb_english = document.getElementById("hb_english"); + hb_english.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element hb_english_div = document.getElementById("hb_english_div"); + hb_english_div.remove(); + } + Element xj_english = document.getElementById("xj_english"); + xj_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); + Element pay_type_english = document.getElementById("pay_type_english"); + pay_type_english.text("I-GO Wallet"); + 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); + }else{ + dispute_english.remove(); + } + Element pdf_english = document.getElementById("pdf_english"); + pdf_english.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); + Element lost_item_english = document.getElementById("lost_item_english"); + lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + finalLanguage1 + "&orderId=" + orderId + "&orderType=4"); // Element track_english = document.getElementById("track_english"); // track_english.attr("href", "https://igo.i-go.group/mailbox/user/location.html"); - Element pay_time_english = document.getElementById("pay_time_english"); - pay_time_english.text(DateUtil.conversionFormat(language, sdf1.format(orderLogistics.getTravelTime()))); - Elements driver_english = document.getElementsByClass("driver_english"); - for (int i = 0; i < driver_english.size(); i++) { - Element element = driver_english.get(i); - element.text(" " + driver.getFirstName() + "." + driver.getLastName()); - } - Element cp_english = document.getElementById("cp_english"); - cp_english.text("Number Plate:" + car.getCarLicensePlate()); - Element pf_english = document.getElementById("pf_english"); - pf_english.text("Driver Rating:" + aDouble); - Element start_address_english = document.getElementById("start_address_english"); - start_address_english.text(orderLogistics.getStartAddress()); - Element end_address_english = document.getElementById("end_address_english"); - end_address_english.text(orderLogistics.getEndAddress()); - Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); - Element server_tel_english = document.getElementById("server_tel_english"); - server_tel_english.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); - } - if(3 == language){ - document.getElementById("chinese").remove(); - document.getElementById("english").remove(); - document.getElementsByTag("title").get(0).text("Reçu de livraison"); - 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-GO "); - 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)); - }else{ - Element bcj_french_div = document.getElementById("bcj_french_div"); - bcj_french_div.remove(); - } - if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ - Element yhq_french = document.getElementById("yhq_french"); - yhq_french.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element yhq_french_div = document.getElementById("yhq_french_div"); - yhq_french_div.remove(); - } - if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ - Element zk_french = document.getElementById("zk_french"); - zk_french.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element zk_french_div = document.getElementById("zk_french_div"); - zk_french_div.remove(); - } - if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ - Element hb_french = document.getElementById("hb_french"); - hb_french.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element hb_french_div = document.getElementById("hb_french_div"); - hb_french_div.remove(); - } - Element xj_french = document.getElementById("xj_french"); - xj_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); - Element pay_type_french = document.getElementById("pay_type_french"); - pay_type_french.text("Portefeuille I-GO"); - 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); - }else{ - dispute_french.remove(); - } - Element pdf_french = document.getElementById("pdf_french"); - pdf_french.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); - Element lost_item_french = document.getElementById("lost_item_french"); - lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4"); + Element pay_time_english = document.getElementById("pay_time_english"); + pay_time_english.text(DateUtil.conversionFormat(finalLanguage1, sdf1.format(orderLogistics.getTravelTime()))); + Elements driver_english = document.getElementsByClass("driver_english"); + for (int i = 0; i < driver_english.size(); i++) { + Element element = driver_english.get(i); + element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + } + Element cp_english = document.getElementById("cp_english"); + cp_english.text("Number Plate:" + car.getCarLicensePlate()); + Element pf_english = document.getElementById("pf_english"); + pf_english.text("Driver Rating:" + aDouble); + Element start_address_english = document.getElementById("start_address_english"); + start_address_english.text(orderLogistics.getStartAddress()); + Element end_address_english = document.getElementById("end_address_english"); + end_address_english.text(orderLogistics.getEndAddress()); + Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); + Element server_tel_english = document.getElementById("server_tel_english"); + server_tel_english.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); + } + if(3 == finalLanguage1){ + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); + document.getElementsByTag("title").get(0).text("Reçu de livraison"); + Element title_french = document.getElementById("title_french"); + title_french.text(DateUtil.conversionFormat(finalLanguage1, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO "); + 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)); + }else{ + Element bcj_french_div = document.getElementById("bcj_french_div"); + bcj_french_div.remove(); + } + if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ + Element yhq_french = document.getElementById("yhq_french"); + yhq_french.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element yhq_french_div = document.getElementById("yhq_french_div"); + yhq_french_div.remove(); + } + if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ + Element zk_french = document.getElementById("zk_french"); + zk_french.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element zk_french_div = document.getElementById("zk_french_div"); + zk_french_div.remove(); + } + if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ + Element hb_french = document.getElementById("hb_french"); + hb_french.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element hb_french_div = document.getElementById("hb_french_div"); + hb_french_div.remove(); + } + Element xj_french = document.getElementById("xj_french"); + xj_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); + Element pay_type_french = document.getElementById("pay_type_french"); + pay_type_french.text("Portefeuille I-GO"); + 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); + }else{ + dispute_french.remove(); + } + Element pdf_french = document.getElementById("pdf_french"); + pdf_french.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); + Element lost_item_french = document.getElementById("lost_item_french"); + lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + finalLanguage1 + "&orderId=" + orderId + "&orderType=4"); // Element track_french = document.getElementById("track_french"); // track_french.attr("href", "https://igo.i-go.group/mailbox/user/location.html"); - Element pay_time_french = document.getElementById("pay_time_french"); - pay_time_french.text(DateUtil.conversionFormat(language, sdf1.format(orderLogistics.getTravelTime()))); - Elements driver_french = document.getElementsByClass("driver_french"); - for (int i = 0; i < driver_french.size(); i++) { - Element element = driver_french.get(i); - element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + Element pay_time_french = document.getElementById("pay_time_french"); + pay_time_french.text(DateUtil.conversionFormat(finalLanguage1, sdf1.format(orderLogistics.getTravelTime()))); + Elements driver_french = document.getElementsByClass("driver_french"); + for (int i = 0; i < driver_french.size(); i++) { + Element element = driver_french.get(i); + element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + } + Element cp_french = document.getElementById("cp_french"); + cp_french.text("Plaque: GS " + car.getCarLicensePlate()); + Element pf_french = document.getElementById("pf_french"); + pf_french.text("Note du chauffeur: " + aDouble); + Element start_address_french = document.getElementById("start_address_french"); + start_address_french.text(orderLogistics.getStartAddress()); + Element end_address_french = document.getElementById("end_address_french"); + end_address_french.text(orderLogistics.getEndAddress()); + Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); + Element server_tel_french = document.getElementById("server_tel_french"); + server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); + } + + EmailUtil.send(userInfo.getEmail(), finalLanguage1 == 1 ? "包裹收据" : finalLanguage1 == 2 ? "Delivery receipt" : "Reçu de livraison", document.html()); + + //开始生成pdf收据和html收据 + File file = new File("/home/igotechgh/nginx/html/files/html/"); + if(!file.exists()){ + file.mkdirs(); + } + file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html"); + if(!file.exists()){ + file.createNewFile(); + } + FileWriter fileWriter = new FileWriter(file); + fileWriter.write(document.html()); + fileWriter.flush(); + fileWriter.close(); + + File file1 = new File("/home/igotechgh/nginx/html/files/pdf/"); + if(!file1.exists()){ + file1.mkdirs(); + } + file1 = new File("/home/igotechgh/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf"); + if(!file1.exists()){ + file1.createNewFile(); + } + try{ + FileOutputStream fileOutputStream = new FileOutputStream(file1); + HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html", "I-GO", fileOutputStream); + }catch (Exception e){ + e.printStackTrace(); + System.out.println("html转pdf异常"); + } + + String link ="https://igo.i-go.group/files/html/parcel_receipt_" + orderId + ".html"; + TEmail tEmail = new TEmail(); + tEmail.setLink(link); + tEmail.setUserId(userInfo.getId()); + tEmail.setType(1); + tEmail.setName(finalLanguage1 == 1 ? "包裹收据" : finalLanguage1 == 2 ? "Delivery receipt" : "Reçu de livraison"); + tEmail.setOrderId(orderId); + tEmail.setCreateTime(new Date()); + int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1; + String week = EmailUtil.getWeek(finalLanguage1, i); + tEmail.setWeek(week); + boolean am = cn.hutool.core.date.DateUtil.isAM(new Date()); + if(am){ + tEmail.setAmOrPm(finalLanguage1 ==1?"上午": finalLanguage1 ==2?"morning":"matin"); + }else { + tEmail.setAmOrPm(finalLanguage1 ==1?"下午": finalLanguage1 ==2?"afternoon":"après-midi"); + } + emailService.insert(tEmail); + } + }catch (Exception e){ + e.printStackTrace(); } - Element cp_french = document.getElementById("cp_french"); - cp_french.text("Plaque: GS " + car.getCarLicensePlate()); - Element pf_french = document.getElementById("pf_french"); - pf_french.text("Note du chauffeur: " + aDouble); - Element start_address_french = document.getElementById("start_address_french"); - start_address_french.text(orderLogistics.getStartAddress()); - Element end_address_french = document.getElementById("end_address_french"); - end_address_french.text(orderLogistics.getEndAddress()); - Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); - Element server_tel_french = document.getElementById("server_tel_french"); - server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); } - - EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison", document.html()); - - //开始生成pdf收据和html收据 - File file = new File("/home/igotechgh/nginx/html/files/html/"); - if(!file.exists()){ - file.mkdirs(); - } - file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html"); - if(!file.exists()){ - file.createNewFile(); - } - FileWriter fileWriter = new FileWriter(file); - fileWriter.write(document.html()); - fileWriter.flush(); - fileWriter.close(); - - File file1 = new File("/home/igotechgh/nginx/html/files/pdf/"); - if(!file1.exists()){ - file1.mkdirs(); - } - file1 = new File("/home/igotechgh/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf"); - if(!file1.exists()){ - file1.createNewFile(); - } - try{ - FileOutputStream fileOutputStream = new FileOutputStream(file1); - HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html", "I-GO", fileOutputStream); - }catch (Exception e){ - e.printStackTrace(); - System.out.println("html转pdf异常"); - } - - String link ="https://igo.i-go.group/files/html/parcel_receipt_" + orderId + ".html"; - TEmail tEmail = new TEmail(); - tEmail.setLink(link); - tEmail.setUserId(userInfo.getId()); - tEmail.setType(1); - tEmail.setName(language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison"); - tEmail.setOrderId(orderId); - tEmail.setCreateTime(new Date()); - int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1; - String week = EmailUtil.getWeek(language, i); - tEmail.setWeek(week); - boolean am = cn.hutool.core.date.DateUtil.isAM(new Date()); - if(am){ - tEmail.setAmOrPm(language==1?"上午":language==2?"morning":"matin"); - }else { - tEmail.setAmOrPm(language==1?"下午":language==2?"afternoon":"après-midi"); - } - emailService.insert(tEmail); - } + }).start(); } @@ -1946,392 +1957,402 @@ "Vous avez payé la commande de livraison avec succès, merci d’utiliser I-GO", uid, 1); language = userInfo.getLanguage(); - if(ToolUtil.isNotEmpty(userInfo.getEmail())){ - String path = templatePath + "user/receiptLogistics.html"; - Document document = Jsoup.parse(new File(path), "UTF-8"); - SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); - SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); - Car car = carMapper.selectById(orderLogistics.getCarId()); - Double aDouble = 0D; - if(null != orderLogistics.getDriverId()){ - aDouble = orderEvaluateService.queryDriverScore(orderLogistics.getDriverId()); - } - if(1 == language){ - document.getElementById("english").remove(); - document.getElementById("french").remove(); - document.getElementsByTag("title").get(0).text("包裹收据"); - Element title_chinese = document.getElementById("title_chinese"); - title_chinese.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney()); - 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)); - }else{ - Element bcj_chinese_div = document.getElementById("bcj_chinese_div"); - bcj_chinese_div.remove(); - } - if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ - Element yhq_chinese = document.getElementById("yhq_chinese"); - yhq_chinese.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element yhq_chinese_div = document.getElementById("yhq_chinese_div"); - yhq_chinese_div.remove(); - } - if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ - Element zk_chinese = document.getElementById("zk_chinese"); - zk_chinese.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element zk_chinese_div = document.getElementById("zk_chinese_div"); - zk_chinese_div.remove(); - } - if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ - Element hb_chinese = document.getElementById("hb_chinese"); - hb_chinese.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element hb_chinese_div = document.getElementById("hb_chinese_div"); - hb_chinese_div.remove(); - } - Element xj_chinese = document.getElementById("xj_chinese"); - xj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); - Element pay_type_chinese = document.getElementById("pay_type_chinese"); - pay_type_chinese.text("现金"); - 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); - }else{ - dispute_chinese.remove(); - } - Element pdf_chinese = document.getElementById("pdf_chinese"); - pdf_chinese.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); - Element lost_item_chinese = document.getElementById("lost_item_chinese"); - lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4"); + Integer finalLanguage = language; + new Thread(new Runnable() { + @Override + public void run() { + try { + if(ToolUtil.isNotEmpty(userInfo.getEmail())){ + String path = templatePath + "user/receiptLogistics.html"; + Document document = Jsoup.parse(new File(path), "UTF-8"); + SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd"); + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); + Car car = carMapper.selectById(orderLogistics.getCarId()); + Double aDouble = 0D; + if(null != orderLogistics.getDriverId()){ + aDouble = orderEvaluateService.queryDriverScore(orderLogistics.getDriverId()); + } + if(1 == finalLanguage){ + document.getElementById("english").remove(); + document.getElementById("french").remove(); + document.getElementsByTag("title").get(0).text("包裹收据"); + Element title_chinese = document.getElementById("title_chinese"); + title_chinese.text(DateUtil.conversionFormat(finalLanguage, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney()); + 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)); + }else{ + Element bcj_chinese_div = document.getElementById("bcj_chinese_div"); + bcj_chinese_div.remove(); + } + if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ + Element yhq_chinese = document.getElementById("yhq_chinese"); + yhq_chinese.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element yhq_chinese_div = document.getElementById("yhq_chinese_div"); + yhq_chinese_div.remove(); + } + if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ + Element zk_chinese = document.getElementById("zk_chinese"); + zk_chinese.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element zk_chinese_div = document.getElementById("zk_chinese_div"); + zk_chinese_div.remove(); + } + if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ + Element hb_chinese = document.getElementById("hb_chinese"); + hb_chinese.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element hb_chinese_div = document.getElementById("hb_chinese_div"); + hb_chinese_div.remove(); + } + Element xj_chinese = document.getElementById("xj_chinese"); + xj_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); + Element pay_type_chinese = document.getElementById("pay_type_chinese"); + pay_type_chinese.text("现金"); + 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); + }else{ + dispute_chinese.remove(); + } + Element pdf_chinese = document.getElementById("pdf_chinese"); + pdf_chinese.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); + Element lost_item_chinese = document.getElementById("lost_item_chinese"); + lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + finalLanguage + "&orderId=" + orderId + "&orderType=4"); // Element track_chinese = document.getElementById("track_chinese"); // track_chinese.attr("href", "https://igo.i-go.group/mailbox/user/location.html"); - Element pay_time_chinese = document.getElementById("pay_time_chinese"); - pay_time_chinese.text(DateUtil.conversionFormat(language, sdf1.format(orderLogistics.getTravelTime()))); - Elements driver_chinese = document.getElementsByClass("driver_chinese"); - for (int i = 0; i < driver_chinese.size(); i++) { - Element element = driver_chinese.get(i); - element.text(" " + driver.getFirstName() + "." + driver.getLastName()); - } - Element cp_chinese = document.getElementById("cp_chinese"); - cp_chinese.text("车牌:" + car.getCarLicensePlate()); - Element pf_chinese = document.getElementById("pf_chinese"); - pf_chinese.text("司机评分:" + aDouble); - Element start_address_chinese = document.getElementById("start_address_chinese"); - start_address_chinese.text(orderLogistics.getStartAddress()); - Element end_address_chinese = document.getElementById("end_address_chinese"); - end_address_chinese.text(orderLogistics.getEndAddress()); - Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); - Element server_tel_chinese = document.getElementById("server_tel_chinese"); - server_tel_chinese.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); - } - if(2 == language){ - document.getElementById("chinese").remove(); - document.getElementById("french").remove(); - document.getElementsByTag("title").get(0).text("Delivery 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 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)); - }else{ - Element bcj_english_div = document.getElementById("bcj_english_div"); - bcj_english_div.remove(); - } - if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ - Element yhq_english = document.getElementById("yhq_english"); - yhq_english.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element yhq_english_div = document.getElementById("yhq_english_div"); - yhq_english_div.remove(); - } - if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ - Element zk_english = document.getElementById("zk_english"); - zk_english.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element zk_english_div = document.getElementById("zk_english_div"); - zk_english_div.remove(); - } - if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ - Element hb_english = document.getElementById("hb_english"); - hb_english.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element hb_english_div = document.getElementById("hb_english_div"); - hb_english_div.remove(); - } - Element xj_english = document.getElementById("xj_english"); - xj_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); - Element pay_type_english = document.getElementById("pay_type_english"); - pay_type_english.text("Cash"); - 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); - }else{ - dispute_english.remove(); - } - Element pdf_english = document.getElementById("pdf_english"); - pdf_english.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); - Element lost_item_english = document.getElementById("lost_item_english"); - lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4"); + Element pay_time_chinese = document.getElementById("pay_time_chinese"); + pay_time_chinese.text(DateUtil.conversionFormat(finalLanguage, sdf1.format(orderLogistics.getTravelTime()))); + Elements driver_chinese = document.getElementsByClass("driver_chinese"); + for (int i = 0; i < driver_chinese.size(); i++) { + Element element = driver_chinese.get(i); + element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + } + Element cp_chinese = document.getElementById("cp_chinese"); + cp_chinese.text("车牌:" + car.getCarLicensePlate()); + Element pf_chinese = document.getElementById("pf_chinese"); + pf_chinese.text("司机评分:" + aDouble); + Element start_address_chinese = document.getElementById("start_address_chinese"); + start_address_chinese.text(orderLogistics.getStartAddress()); + Element end_address_chinese = document.getElementById("end_address_chinese"); + end_address_chinese.text(orderLogistics.getEndAddress()); + Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); + Element server_tel_chinese = document.getElementById("server_tel_chinese"); + server_tel_chinese.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); + } + if(2 == finalLanguage){ + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); + document.getElementsByTag("title").get(0).text("Delivery receipt"); + Element title_english = document.getElementById("title_english"); + title_english.text(DateUtil.conversionFormat(finalLanguage, sdf2.format(orderLogistics.getTravelTime())) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip "); + 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)); + }else{ + Element bcj_english_div = document.getElementById("bcj_english_div"); + bcj_english_div.remove(); + } + if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ + Element yhq_english = document.getElementById("yhq_english"); + yhq_english.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element yhq_english_div = document.getElementById("yhq_english_div"); + yhq_english_div.remove(); + } + if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ + Element zk_english = document.getElementById("zk_english"); + zk_english.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element zk_english_div = document.getElementById("zk_english_div"); + zk_english_div.remove(); + } + if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ + Element hb_english = document.getElementById("hb_english"); + hb_english.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element hb_english_div = document.getElementById("hb_english_div"); + hb_english_div.remove(); + } + Element xj_english = document.getElementById("xj_english"); + xj_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); + Element pay_type_english = document.getElementById("pay_type_english"); + pay_type_english.text("Cash"); + 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); + }else{ + dispute_english.remove(); + } + Element pdf_english = document.getElementById("pdf_english"); + pdf_english.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); + Element lost_item_english = document.getElementById("lost_item_english"); + lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + finalLanguage + "&orderId=" + orderId + "&orderType=4"); // Element track_english = document.getElementById("track_english"); // track_english.attr("href", "https://igo.i-go.group/mailbox/user/location.html"); - Element pay_time_english = document.getElementById("pay_time_english"); - pay_time_english.text(DateUtil.conversionFormat(language, sdf1.format(orderLogistics.getTravelTime()))); - Elements driver_english = document.getElementsByClass("driver_english"); - for (int i = 0; i < driver_english.size(); i++) { - Element element = driver_english.get(i); - element.text(" " + driver.getFirstName() + "." + driver.getLastName()); - } - Element cp_english = document.getElementById("cp_english"); - cp_english.text("Number Plate:" + car.getCarLicensePlate()); - Element pf_english = document.getElementById("pf_english"); - pf_english.text("Driver Rating:" + aDouble); - Element start_address_english = document.getElementById("start_address_english"); - start_address_english.text(orderLogistics.getStartAddress()); - Element end_address_english = document.getElementById("end_address_english"); - end_address_english.text(orderLogistics.getEndAddress()); - Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); - Element server_tel_english = document.getElementById("server_tel_english"); - server_tel_english.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); - } - if(3 == language){ - document.getElementById("chinese").remove(); - document.getElementById("english").remove(); - document.getElementsByTag("title").get(0).text("Reçu de livraison"); - 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-GO "); - 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)); - }else{ - Element bcj_french_div = document.getElementById("bcj_french_div"); - bcj_french_div.remove(); - } - if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ - Element yhq_french = document.getElementById("yhq_french"); - yhq_french.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element yhq_french_div = document.getElementById("yhq_french_div"); - yhq_french_div.remove(); - } - if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ - Element zk_french = document.getElementById("zk_french"); - zk_french.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element zk_french_div = document.getElementById("zk_french_div"); - zk_french_div.remove(); - } - if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ - Element hb_french = document.getElementById("hb_french"); - hb_french.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); - }else{ - Element hb_french_div = document.getElementById("hb_french_div"); - hb_french_div.remove(); - } - Element xj_french = document.getElementById("xj_french"); - xj_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); - Element pay_type_french = document.getElementById("pay_type_french"); - pay_type_french.text("En espèces"); - 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); - }else{ - dispute_french.remove(); - } - Element pdf_french = document.getElementById("pdf_french"); - pdf_french.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); - Element lost_item_french = document.getElementById("lost_item_french"); - lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4"); + Element pay_time_english = document.getElementById("pay_time_english"); + pay_time_english.text(DateUtil.conversionFormat(finalLanguage, sdf1.format(orderLogistics.getTravelTime()))); + Elements driver_english = document.getElementsByClass("driver_english"); + for (int i = 0; i < driver_english.size(); i++) { + Element element = driver_english.get(i); + element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + } + Element cp_english = document.getElementById("cp_english"); + cp_english.text("Number Plate:" + car.getCarLicensePlate()); + Element pf_english = document.getElementById("pf_english"); + pf_english.text("Driver Rating:" + aDouble); + Element start_address_english = document.getElementById("start_address_english"); + start_address_english.text(orderLogistics.getStartAddress()); + Element end_address_english = document.getElementById("end_address_english"); + end_address_english.text(orderLogistics.getEndAddress()); + Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); + Element server_tel_english = document.getElementById("server_tel_english"); + server_tel_english.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); + } + if(3 == finalLanguage){ + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); + document.getElementsByTag("title").get(0).text("Reçu de livraison"); + Element title_french = document.getElementById("title_french"); + title_french.text(DateUtil.conversionFormat(finalLanguage, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO "); + 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)); + }else{ + Element bcj_french_div = document.getElementById("bcj_french_div"); + bcj_french_div.remove(); + } + if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ + Element yhq_french = document.getElementById("yhq_french"); + yhq_french.text("GHS -" + new BigDecimal(orderLogistics.getCouponMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element yhq_french_div = document.getElementById("yhq_french_div"); + yhq_french_div.remove(); + } + if(null != orderLogistics.getDiscountMoney() && orderLogistics.getDiscountMoney() > 0){ + Element zk_french = document.getElementById("zk_french"); + zk_french.text("GHS -" + new BigDecimal(orderLogistics.getDiscountMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element zk_french_div = document.getElementById("zk_french_div"); + zk_french_div.remove(); + } + if(null != orderLogistics.getRedPacketMoney() && orderLogistics.getRedPacketMoney() > 0){ + Element hb_french = document.getElementById("hb_french"); + hb_french.text("GHS -" + new BigDecimal(orderLogistics.getRedPacketMoney()).setScale(2, RoundingMode.HALF_EVEN)); + }else{ + Element hb_french_div = document.getElementById("hb_french_div"); + hb_french_div.remove(); + } + Element xj_french = document.getElementById("xj_french"); + xj_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); + Element pay_type_french = document.getElementById("pay_type_french"); + pay_type_french.text("En espèces"); + 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.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); + }else{ + dispute_french.remove(); + } + Element pdf_french = document.getElementById("pdf_french"); + pdf_french.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); + Element lost_item_french = document.getElementById("lost_item_french"); + lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + finalLanguage + "&orderId=" + orderId + "&orderType=4"); // Element track_french = document.getElementById("track_french"); // track_french.attr("href", "https://igo.i-go.group/mailbox/user/location.html"); - Element pay_time_french = document.getElementById("pay_time_french"); - pay_time_french.text(DateUtil.conversionFormat(language, sdf1.format(orderLogistics.getTravelTime()))); - Elements driver_french = document.getElementsByClass("driver_french"); - for (int i = 0; i < driver_french.size(); i++) { - Element element = driver_french.get(i); - element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + Element pay_time_french = document.getElementById("pay_time_french"); + pay_time_french.text(DateUtil.conversionFormat(finalLanguage, sdf1.format(orderLogistics.getTravelTime()))); + Elements driver_french = document.getElementsByClass("driver_french"); + for (int i = 0; i < driver_french.size(); i++) { + Element element = driver_french.get(i); + element.text(" " + driver.getFirstName() + "." + driver.getLastName()); + } + Element cp_french = document.getElementById("cp_french"); + cp_french.text("Plaque: GS " + car.getCarLicensePlate()); + Element pf_french = document.getElementById("pf_french"); + pf_french.text("Note du chauffeur: " + aDouble); + Element start_address_french = document.getElementById("start_address_french"); + start_address_french.text(orderLogistics.getStartAddress()); + Element end_address_french = document.getElementById("end_address_french"); + end_address_french.text(orderLogistics.getEndAddress()); + Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); + Element server_tel_french = document.getElementById("server_tel_french"); + server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); + } + + EmailUtil.send(userInfo.getEmail(), finalLanguage == 1 ? "包裹收据" : finalLanguage == 2 ? "Delivery receipt" : "Reçu de livraison", document.html()); + + //开始生成pdf收据和html收据 + File file = new File("/home/igotechgh/nginx/html/files/html/"); + if(!file.exists()){ + file.mkdirs(); + } + file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html"); + if(!file.exists()){ + file.createNewFile(); + } + FileWriter fileWriter = new FileWriter(file); + fileWriter.write(document.html()); + fileWriter.flush(); + fileWriter.close(); + + File file1 = new File("/home/igotechgh/nginx/html/files/pdf/"); + if(!file1.exists()){ + file1.mkdirs(); + } + file1 = new File("/home/igotechgh/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf"); + if(!file1.exists()){ + file1.createNewFile(); + } + try{ + FileOutputStream fileOutputStream = new FileOutputStream(file1); + HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html", "I-GO", fileOutputStream); + }catch (Exception e){ + e.printStackTrace(); + System.out.println("html转pdf异常"); + } + + String link ="https://igo.i-go.group/files/html/parcel_receipt_" + orderId + ".html"; + TEmail tEmail = new TEmail(); + tEmail.setLink(link); + tEmail.setUserId(userInfo.getId()); + tEmail.setType(1); + tEmail.setName(finalLanguage == 1 ? "包裹收据" : finalLanguage == 2 ? "Delivery receipt" : "Reçu de livraison"); + tEmail.setOrderId(orderId); + tEmail.setCreateTime(new Date()); + int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1; + String week = EmailUtil.getWeek(finalLanguage, i); + tEmail.setWeek(week); + boolean am = cn.hutool.core.date.DateUtil.isAM(new Date()); + if(am){ + tEmail.setAmOrPm(finalLanguage ==1?"上午": finalLanguage ==2?"morning":"matin"); + }else { + tEmail.setAmOrPm(finalLanguage ==1?"下午": finalLanguage ==2?"afternoon":"après-midi"); + } + emailService.insert(tEmail); + } + }catch (Exception e){ + e.printStackTrace(); } - Element cp_french = document.getElementById("cp_french"); - cp_french.text("Plaque: GS " + car.getCarLicensePlate()); - Element pf_french = document.getElementById("pf_french"); - pf_french.text("Note du chauffeur: " + aDouble); - Element start_address_french = document.getElementById("start_address_french"); - start_address_french.text(orderLogistics.getStartAddress()); - Element end_address_french = document.getElementById("end_address_french"); - end_address_french.text(orderLogistics.getEndAddress()); - Phone phone = phoneService.selectOne(new EntityWrapper<Phone>().eq("type", 2).eq("companyId", driver.getCompanyId())); - Element server_tel_french = document.getElementById("server_tel_french"); - server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : "")); } - - EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison", document.html()); - - //开始生成pdf收据和html收据 - File file = new File("/home/igotechgh/nginx/html/files/html/"); - if(!file.exists()){ - file.mkdirs(); - } - file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html"); - if(!file.exists()){ - file.createNewFile(); - } - FileWriter fileWriter = new FileWriter(file); - fileWriter.write(document.html()); - fileWriter.flush(); - fileWriter.close(); - - File file1 = new File("/home/igotechgh/nginx/html/files/pdf/"); - if(!file1.exists()){ - file1.mkdirs(); - } - file1 = new File("/home/igotechgh/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf"); - if(!file1.exists()){ - file1.createNewFile(); - } - try{ - FileOutputStream fileOutputStream = new FileOutputStream(file1); - HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html", "I-GO", fileOutputStream); - }catch (Exception e){ - e.printStackTrace(); - System.out.println("html转pdf异常"); - } - - String link ="https://igo.i-go.group/files/html/parcel_receipt_" + orderId + ".html"; - TEmail tEmail = new TEmail(); - tEmail.setLink(link); - tEmail.setUserId(userInfo.getId()); - tEmail.setType(1); - tEmail.setName(language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison"); - tEmail.setOrderId(orderId); - tEmail.setCreateTime(new Date()); - int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1; - String week = EmailUtil.getWeek(language, i); - tEmail.setWeek(week); - boolean am = cn.hutool.core.date.DateUtil.isAM(new Date()); - if(am){ - tEmail.setAmOrPm(language==1?"上午":language==2?"morning":"matin"); - }else { - tEmail.setAmOrPm(language==1?"下午":language==2?"afternoon":"après-midi"); - } - emailService.insert(tEmail); - } + }).start(); } this.updateAllColumnById(orderLogistics); @@ -3177,9 +3198,20 @@ if(ToolUtil.isNotEmpty(remark)){ if(ToolUtil.isNotEmpty(remark)){ List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(remark.split(" ")); for(SensitiveWords s : sensitiveWords){ - remark = remark.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + remark = list.stream().collect(Collectors.joining(" ")); } } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java index 18709e5..77dae76 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/server/impl/OrderPrivateCarServiceImpl.java @@ -59,6 +59,7 @@ import java.math.RoundingMode; import java.text.SimpleDateFormat; import java.util.*; +import java.util.stream.Collectors; @Service @@ -789,9 +790,20 @@ if(ToolUtil.isNotEmpty(remark)){ if(ToolUtil.isNotEmpty(remark)){ List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(remark.split(" ")); for(SensitiveWords s : sensitiveWords){ - remark = remark.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + remark = list.stream().collect(Collectors.joining(" ")); } } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SystemPriceMapper.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SystemPriceMapper.java index ef37769..555c37e 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SystemPriceMapper.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SystemPriceMapper.java @@ -16,5 +16,5 @@ * @return */ Map<String, Object> query(@Param("companyId") Integer companyId, @Param("type") Integer type, - @Param("serverCarModelId") Integer serverCarModelId); + @Param("serverCarModelId") Integer serverCarModelId, @Param("language") Integer language); } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SystemPriceMapper.xml b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SystemPriceMapper.xml index 70268ae..8b4c116 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SystemPriceMapper.xml +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SystemPriceMapper.xml @@ -14,7 +14,8 @@ <select id="query" resultType="map"> select id as id, - content as content + content as content, + if(#{language} = 1, fareTypeNoteChinese, if(#{language} = 2, fareTypeNoteEnglish, fareTypeNoteFrench)) as fareTypeNote from t_system_price where companyId = #{companyId} and state = 1 <if test="null != type"> and `type` = #{type} diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SystemPrice.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SystemPrice.java index 5a88fa9..69d40fd 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SystemPrice.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SystemPrice.java @@ -32,6 +32,21 @@ @TableField("serverCarModelId") private Integer serverCarModelId; /** + * 运价类型说明 + */ + @TableField("fareTypeNoteChinese") + private String fareTypeNoteChinese; + /** + * 运价类型说明 + */ + @TableField("fareTypeNoteEnglish") + private String fareTypeNoteEnglish; + /** + * 运价类型说明 + */ + @TableField("fareTypeNoteFrench") + private String fareTypeNoteFrench; + /** * 价格规则,每个输入框为一个参数{"num1":1,"num2":2.3} */ @TableField("content") @@ -76,7 +91,31 @@ public void setServerCarModelId(Integer serverCarModelId) { this.serverCarModelId = serverCarModelId; } - + + public String getFareTypeNoteChinese() { + return fareTypeNoteChinese; + } + + public void setFareTypeNoteChinese(String fareTypeNoteChinese) { + this.fareTypeNoteChinese = fareTypeNoteChinese; + } + + public String getFareTypeNoteEnglish() { + return fareTypeNoteEnglish; + } + + public void setFareTypeNoteEnglish(String fareTypeNoteEnglish) { + this.fareTypeNoteEnglish = fareTypeNoteEnglish; + } + + public String getFareTypeNoteFrench() { + return fareTypeNoteFrench; + } + + public void setFareTypeNoteFrench(String fareTypeNoteFrench) { + this.fareTypeNoteFrench = fareTypeNoteFrench; + } + @Override public String toString() { return "SystemPrice{" + diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java index 3a269c8..daed891 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ComplaintServiceImpl.java @@ -26,9 +26,8 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; -import java.util.Date; -import java.util.List; -import java.util.UUID; +import java.util.*; +import java.util.stream.Collectors; @Service @@ -63,9 +62,20 @@ public void saveData(Integer orderId, Integer orderType, Integer driverId, String reason, String description, Integer uid, Integer language) throws Exception { if(ToolUtil.isNotEmpty(description)){ List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(description.split(" ")); for(SensitiveWords s : sensitiveWords){ - description = description.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + description = list.stream().collect(Collectors.joining(" ")); } Complaint complaint = new Complaint(); complaint.setInsertTime(new Date()); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java index d5b50ab..91b6c5f 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/FeedbackServiceImpl.java @@ -27,8 +27,11 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; @Service @@ -66,9 +69,20 @@ return ResultUtil.error(language == 1 ? "反馈内容过长" : language == 2 ? "Feedback-content is overlong." : "Le contenu de l’avis est trop long."); } List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(content.split(" ")); for(SensitiveWords s : sensitiveWords){ - content = content.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + content = list.stream().collect(Collectors.joining(" ")); } Feedback feedback = new Feedback(); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderEvaluateServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderEvaluateServiceImpl.java index 35d7266..4b042ef 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderEvaluateServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OrderEvaluateServiceImpl.java @@ -22,9 +22,8 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; @Service @@ -70,9 +69,20 @@ return ResultUtil.error(language == 1 ? "评价内容过长" : language == 2 ? "Rating-content is overlong." : "Le contenu de l’évaluation est trop long."); } List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(content.split(" ")); for(SensitiveWords s : sensitiveWords){ - content = content.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + content = list.stream().collect(Collectors.joining(" ")); } OrderEvaluate orderEvaluate = new OrderEvaluate(); Integer driverId = null; diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ProblemServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ProblemServiceImpl.java index 79d84d6..bbacb35 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ProblemServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ProblemServiceImpl.java @@ -14,9 +14,8 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; @Service @@ -48,9 +47,20 @@ return ResultUtil.error(language == 1 ? "留言内容过长" : language == 2 ? "Message-content is overlong." : "Le contenu du message est trop long."); } List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(content.split(" ")); for(SensitiveWords s : sensitiveWords){ - content = content.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + content = list.stream().collect(Collectors.joining(" ")); } Problem problem = new Problem(); diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ServerCarModelServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ServerCarModelServiceImpl.java index 7339b5f..c1fb2af 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ServerCarModelServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/ServerCarModelServiceImpl.java @@ -141,7 +141,7 @@ if(3 == language){ map.put("name", map.get("frenchName")); } - Map<String, Object> query1 = systemPriceMapper.query(companyId, type, Integer.valueOf(map.get("id").toString())); + Map<String, Object> query1 = systemPriceMapper.query(companyId, type, Integer.valueOf(map.get("id").toString()), language); if(null == query1){//排除没有设置价格的车型 continue; } @@ -149,6 +149,7 @@ double amount = 0; if(type == 1 || type == 4){//专车 JSONObject jsonObject = JSON.parseObject(query1.get("content").toString()); + String fareTypeNote = query1.get("fareTypeNote").toString(); Double num1 = jsonObject.getDouble("num1");//起步价(元) Double num2 = jsonObject.getDouble("num2");//起步公里(公里) Double num3 = jsonObject.getDouble("num3");//起步时间(分钟) @@ -258,6 +259,7 @@ serverCarModelWarpper.setAmount(new BigDecimal(amount).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); serverCarModelWarpper.setMileage(d); serverCarModelWarpper.setDuration(t); + serverCarModelWarpper.setFareTypeNote(fareTypeNote); data.add(serverCarModelWarpper); continue; } @@ -277,6 +279,7 @@ serverCarModelWarpper.setAmount(new BigDecimal(amount).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); serverCarModelWarpper.setMileage(d); serverCarModelWarpper.setDuration(t); + serverCarModelWarpper.setFareTypeNote(fareTypeNote); data.add(serverCarModelWarpper); continue; } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java index e168063..afea0c1 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/EmailUtil.java @@ -52,7 +52,7 @@ gmailssl(props); final String username = "i-gotech@i-go.group";// gmail 邮箱 - final String password = "rvbmuovvpocmhast";// Google应用专用密码 + final String password = "mbhyptngnvlewdxo";// Google应用专用密码 Session session = Session.getInstance(props, new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/ServerCarModelWarpper.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/ServerCarModelWarpper.java index 66ff9f4..6011d10 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/ServerCarModelWarpper.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/ServerCarModelWarpper.java @@ -24,6 +24,8 @@ private Double mileage; @ApiModelProperty("预估时间(分钟)") private Double duration; + @ApiModelProperty("运价说明") + private String fareTypeNote; public Integer getId() { return id; @@ -118,4 +120,13 @@ } return data; } + + + public String getFareTypeNote() { + return fareTypeNote; + } + + public void setFareTypeNote(String fareTypeNote) { + this.fareTypeNote = fareTypeNote; + } } diff --git a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java index e39b984..5d49b66 100644 --- a/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java +++ b/UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/taxi/service/impl/OrderTaxiServiceImpl.java @@ -43,6 +43,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.util.*; +import java.util.stream.Collectors; @Service @Transactional(isolation = Isolation.READ_UNCOMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Exception.class) @@ -402,9 +403,20 @@ if(ToolUtil.isNotEmpty(remark)){ if(ToolUtil.isNotEmpty(remark)){ List<SensitiveWords> sensitiveWords = sensitiveWordsMapper.selectList(null); + List<String> list = Arrays.asList(remark.split(" ")); for(SensitiveWords s : sensitiveWords){ - remark = remark.replaceAll(s.getContent(), "***"); + List<String> str = new ArrayList<>(); + String lowerCase = s.getContent().toLowerCase(); + for (String s1 : list) { + if(lowerCase.equals(s1.toLowerCase())){ + str.add("***"); + }else{ + str.add(s1); + } + } + list = str; } + remark = list.stream().collect(Collectors.joining(" ")); } } -- Gitblit v1.7.1