From ad971e327c012eaf041a32ce95682619505fb64a Mon Sep 17 00:00:00 2001 From: zhibing.pu <393733352@qq.com> Date: 星期五, 12 四月 2024 22:38:32 +0800 Subject: [PATCH] 新增加功能 --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java | 64 +++++++++++++++++++++---------- 1 files changed, 43 insertions(+), 21 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java index e5503ee..a361f5e 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java +++ b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java @@ -10,6 +10,7 @@ import com.stylefeng.guns.modular.smallLogistics.model.OrderLogisticsSpread; import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsService; import com.stylefeng.guns.modular.smallLogistics.server.IOrderLogisticsSpreadService; +import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; import com.stylefeng.guns.modular.system.dao.CarMapper; import com.stylefeng.guns.modular.system.dao.RegionMapper; import com.stylefeng.guns.modular.system.dao.UserInfoMapper; @@ -488,34 +489,34 @@ Element title_chinese = document.getElementById("title_chinese"); title_chinese.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",您在I-GO此订单消费GHS " + orderLogistics.getPayMoney()); Element xcf_chinese = document.getElementById("xcf_chinese"); - xcf_chinese.text("GHS " + orderLogistics.getOrderMoney()); + xcf_chinese.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN)); if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ Element yhq_chinese = document.getElementById("yhq_chinese"); - yhq_chinese.text("GHS -" + orderLogistics.getCouponMoney()); + 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 -" + orderLogistics.getDiscountMoney()); + 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 -" + orderLogistics.getRedPacketMoney()); + 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 " + orderLogistics.getPayMoney()); + 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(payTypeChinese); Element pay_money_chinese = document.getElementById("pay_money_chinese"); - pay_money_chinese.text("GHS " + orderLogistics.getPayMoney()); + pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); Element pdf_chinese = document.getElementById("pdf_chinese"); pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); Element lost_item_chinese = document.getElementById("lost_item_chinese"); @@ -527,7 +528,7 @@ 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.text(" " + driver.getFirstName() + "." + driver.getLastName()); } Element cp_chinese = document.getElementById("cp_chinese"); cp_chinese.text("车牌:" + car.getCarLicensePlate()); @@ -548,34 +549,34 @@ Element title_english = document.getElementById("title_english"); title_english.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",You spent GHS " + orderLogistics.getPayMoney() + " on the trip "); Element xcf_english = document.getElementById("xcf_english"); - xcf_english.text("GHS " + orderLogistics.getOrderMoney()); + xcf_english.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN)); if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ Element yhq_english = document.getElementById("yhq_english"); - yhq_english.text("GHS -" + orderLogistics.getCouponMoney()); + 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 -" + orderLogistics.getDiscountMoney()); + 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 -" + orderLogistics.getRedPacketMoney()); + 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 " + orderLogistics.getPayMoney()); + 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(payTypeEnglish); Element pay_money_english = document.getElementById("pay_money_english"); - pay_money_english.text("GHS " + orderLogistics.getPayMoney()); + pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); Element pdf_english = document.getElementById("pdf_english"); pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); Element lost_item_english = document.getElementById("lost_item_english"); @@ -587,7 +588,7 @@ 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.text(" " + driver.getFirstName() + "." + driver.getLastName()); } Element cp_english = document.getElementById("cp_english"); cp_english.text("Number Plate:" + car.getCarLicensePlate()); @@ -608,34 +609,34 @@ Element title_french = document.getElementById("title_french"); title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); Element xcf_french = document.getElementById("xcf_french"); - xcf_french.text("GHS " + orderLogistics.getOrderMoney()); + xcf_french.text("GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN)); if(null != orderLogistics.getCouponMoney() && orderLogistics.getCouponMoney() > 0){ Element yhq_french = document.getElementById("yhq_french"); - yhq_french.text("GHS -" + orderLogistics.getCouponMoney()); + 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 -" + orderLogistics.getDiscountMoney()); + 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 -" + orderLogistics.getRedPacketMoney()); + 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 " + orderLogistics.getPayMoney()); + 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(payTypeFrench); Element pay_money_french = document.getElementById("pay_money_french"); - pay_money_french.text("GHS " + orderLogistics.getPayMoney()); + pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); Element pdf_french = document.getElementById("pdf_french"); pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); Element lost_item_french = document.getElementById("lost_item_french"); @@ -647,7 +648,7 @@ 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.text(" " + driver.getFirstName() + "." + driver.getLastName()); } Element cp_french = document.getElementById("cp_french"); cp_french.text("Plaque: GS " + car.getCarLicensePlate()); @@ -1025,4 +1026,25 @@ System.err.println("预支付数据异常(orderId = " + id + ")"); } } + + + /** + * 处理乘客修改终点 + * @param orderId + * @param status + */ + @Override + public void updateEndAddress(Integer orderId, Integer status) { + OrderLogistics orderLogistics = this.selectById(orderId); + if(2 == status){ + orderLogistics.setEndLon(Double.valueOf(orderLogistics.getDestinationLon())); + orderLogistics.setEndLat(Double.valueOf(orderLogistics.getDestinationLat())); + orderLogistics.setEndAddress(orderLogistics.getDestination()); + } + orderLogistics.setDestinationLon(""); + orderLogistics.setDestination(""); + orderLogistics.setDestinationLat(""); + this.updateById(orderLogistics); + pushUtil.pushModifyAddress(1, orderLogistics.getUserId(), orderId, 4, status); + } } -- Gitblit v1.7.1