From 6a90f2d1feaf583c211d5f9fe95dff7f7c748ed3 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期五, 06 九月 2024 17:42:20 +0800
Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0
---
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/smallLogistics/server/impl/OrderLogisticsServiceImpl.java | 268 ++++++++++++++++++++++++++---------------------------
1 files changed, 131 insertions(+), 137 deletions(-)
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 6146c4a..2c2ce0b 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
@@ -254,7 +254,7 @@
String[] split = endLonLat.split(",");
Double lng = Double.valueOf(split[0]);
Double lat = Double.valueOf(split[1]);
- ResultUtil<Map<String, Object>> price = this.getPrice1(type, startLonLat.split(",")[0], startLonLat.split(",")[1], lng.toString(), lat.toString(), language);
+ ResultUtil<Map<String, Object>> price = this.getPrice1(uid, type, startLonLat.split(",")[0], startLonLat.split(",")[1], lng.toString(), lat.toString(), language);
if(price.getCode() != 200){
return price;
}
@@ -273,11 +273,11 @@
* @return
* @throws Exception
*/
- public ResultUtil queryPayMoney(Integer number, Integer type, String startLonLat, String endLonLat, String endAddress, Integer language) throws Exception{
+ public ResultUtil queryPayMoney(Integer uid, Integer number, Integer type, String startLonLat, String endLonLat, String endAddress, Integer language) throws Exception{
String[] split = endLonLat.split(",");
Double lng = Double.valueOf(split[0]);
Double lat = Double.valueOf(split[1]);
- ResultUtil<Map<String, Object>> price = this.getPrice1(type, startLonLat.split(",")[0], startLonLat.split(",")[1], lng.toString(), lat.toString(), language);
+ ResultUtil<Map<String, Object>> price = this.getPrice1(uid, type, startLonLat.split(",")[0], startLonLat.split(",")[1], lng.toString(), lat.toString(), language);
if(price.getCode() == 200 && type == 5){
Map<String, Object> data = price.getData();
Double ordinary = Double.valueOf(data.get("ordinary").toString());
@@ -327,7 +327,7 @@
endAddress = endAddress.replaceAll("& #40;", "(");
endAddress = endAddress.replaceAll("& #41;", ")");
OrderLogistics orderLogistics = new OrderLogistics();
- Company query = companyCityService.query1(placementLon, placementLat);
+ Company query = companyCityService.query1(uid, placementLon, placementLat);
if(null == query){
return ResultUtil.error(language == 1 ? "该地点暂无企业服务" : language == 2 ? "No service yet at this area" : "Pas encore de service dans cette zone");
}
@@ -340,7 +340,8 @@
orderLogistics.setRemark(remark);
orderLogistics.setPlacementLon(Double.valueOf(placementLon));
orderLogistics.setPlacementLat(Double.valueOf(placementLat));
- ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(Double.valueOf(placementLat), Double.valueOf(placementLon));
+ String tripId = redisUtil.getValue("trip" + uid);
+ ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(Double.valueOf(placementLat), Double.valueOf(placementLon), tripId);
if(null == reverseGeocode){
return ResultUtil.error(language == 1 ? "解析地址出错" : language == 2 ? "Address resolution error" : "Erreur de résolution d’adresse");
}
@@ -363,7 +364,7 @@
orderLogistics.setMileage(0D);
orderLogistics.setIsReassign(1);
orderLogistics.setReassignNotice(0);
- ResultUtil<Map<String, Object>> price = this.getPrice1(type, String.valueOf(startLon), String.valueOf(startLat), lng.toString(), lat.toString(), language);
+ ResultUtil<Map<String, Object>> price = this.getPrice1(uid, type, String.valueOf(startLon), String.valueOf(startLat), lng.toString(), lat.toString(), language);
if(price.getCode() != 200){
return price;
}
@@ -412,8 +413,8 @@
* @return
* @throws Exception
*/
- public ResultUtil<Map<String, Double>> getPrice(Integer type, String startLon, String startLat, String endLon, String endLat) throws Exception{
- Company query = companyCityService.query1(startLon, startLat);
+ 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("预约取货点暂无企业服务");
}
@@ -456,8 +457,8 @@
- public ResultUtil<Map<String, Object>> getPrice1(Integer type, String startLon, String startLat, String endLon, String endLat, Integer language) throws Exception{
- Company query = companyCityService.query1(startLon, startLat);
+ public ResultUtil<Map<String, Object>> getPrice1(Integer uid, Integer type, String startLon, String startLat, String endLon, String endLat, Integer language) throws Exception{
+ Company query = companyCityService.query1(uid, startLon, startLat);
if(null == query){
return ResultUtil.error(language == 1 ? "预约取货点暂无企业服务" : language == 2 ?
"No service yet at the reserved pickup point." : "Les points de ramassage prévus ne sont pas disponibles pour le moment.");
@@ -469,7 +470,8 @@
Integer activityId = null;
if(type == 4){//同城
Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null);
- DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(startLat), Double.valueOf(startLon), Double.valueOf(endLat), Double.valueOf(endLon));
+ 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){
return ResultUtil.error(language == 1 ? "计算距离出错" : language == 2 ? "Errors in computing distance" : "Erreurs dans le calcul de la distance");
}
@@ -540,12 +542,12 @@
if(ToolUtil.isNotEmpty(vehicle)){
integers = JSON.parseArray(vehicle).toJavaList(Integer.class);
}
- Company query = companyCityService.query1(String.valueOf(orderLogistics.getStartLon()), String.valueOf(orderLogistics.getStartLat()));//获取起点所属分公司
+ Company query = companyCityService.query1(orderLogistics.getUserId(), String.valueOf(orderLogistics.getStartLon()), String.valueOf(orderLogistics.getStartLat()));//获取起点所属分公司
List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//用专车的推单配置
for(int i = 1; i <= querys.size(); i++){
PushOrder pushOrder = pushOrderService.querys(i, 1, query.getId()).get(0);
//获取空闲司机
- List<Driver> list = driverService.queryIdleDriver(orderLogistics.getType(), orderLogistics.getServerCarModelId(), orderLogistics.getStartLon(), orderLogistics.getStartLat(), pushOrder.getPushDistance(), null);//所有附近空闲司机
+ List<Driver> list = driverService.queryIdleDriver(orderLogistics.getUserId(), orderLogistics.getType(), orderLogistics.getServerCarModelId(), orderLogistics.getStartLon(), orderLogistics.getStartLat(), pushOrder.getPushDistance(), null);//所有附近空闲司机
System.err.println("【" + orderLogistics.getId() + "】空闲司机:" + JSON.toJSONString(list));
if(list.size() > 0){
double driverProportion = pushOrder.getDriverProportion() / 100;//推送占比计算成小数
@@ -596,7 +598,7 @@
public void run() {
Process process = null;
try {
- process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName);
+ process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -682,7 +684,8 @@
orderLogistics.setUrgent(1);
orderLogistics.setCargoNumber(1);
- ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(Double.valueOf(placementLat), Double.valueOf(placementLon));
+ String tripId = redisUtil.getValue("trip" + uid);
+ ReverseGeocodeVo reverseGeocode = GoogleMapUtil.getReverseGeocode(Double.valueOf(placementLat), Double.valueOf(placementLon), tripId);
orderLogistics.setPlacementAddress(reverseGeocode.getAddress());
orderLogistics.setStartLon(Double.valueOf(startLon));
orderLogistics.setStartLat(Double.valueOf(startLat));
@@ -737,7 +740,7 @@
String value = redisUtil.getValue("DRIVER" + driver.getId());
if(ToolUtil.isNotEmpty(value)) {
String[] split = value.split(",");
- DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(split[1]), Double.valueOf(split[0]));
+ DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(split[1]), Double.valueOf(split[0]), tripId);
//超时时间
long timeOut = System.currentTimeMillis() + (distancematrix.getDuration() * 1000);
orderLogistics.setEstimateArriveTime(new Date(timeOut));
@@ -749,8 +752,8 @@
orderLogistics.setIsReassign(1);
orderLogistics.setIsDelete(1);
- orderLogistics.setTripId(UUIDUtil.getRandomCode());
- DistancematrixVo distancematrix1 = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), orderLogistics.getEndLat(), orderLogistics.getEndLon());
+ orderLogistics.setTripId(tripId);
+ DistancematrixVo distancematrix1 = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), orderLogistics.getEndLat(), orderLogistics.getEndLon(), tripId);
Long distance1 = distancematrix1.getDistance();
orderLogistics.setEstimatedMileage(new BigDecimal(distance1).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
this.insert(orderLogistics);
@@ -816,7 +819,7 @@
public void run() {
Process process = null;
try {
- process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName);
+ process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -838,14 +841,14 @@
// TODO: 2021/5/11 修改,根据后台设定的派单范围查询范围内有无司机,将单子指派给距离最近的司机(距离相同随机取),范围内没有司机再进行推单流程
if(orderLogistics.getState() == 1){
- Company query = companyCityService.query1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString());
+ Company query = companyCityService.query1(uid, orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString());
if(null == query){
return ResultUtil.error(language == 1 ? "起点暂未企业提供服务" : language == 2 ? "Starting point no enterprise to provide services" : "Point de départ pas encore disponible pour les entreprises");
}
AssignOrder assignOrder = assignOrderService.selectOne(new EntityWrapper<AssignOrder>().eq("companyId", query.getId()).eq("type", 1));
if(null != assignOrder && assignOrder.getPeople() > 0){//配置了指派规则才处理
//获取空闲司机
- List<Driver> drivers = driverService.queryIdleDriver(4, orderLogistics.getServerCarModelId(), orderLogistics.getStartLon(), orderLogistics.getStartLat(), assignOrder.getDistance(), null);//获取范围内空闲司机
+ List<Driver> drivers = driverService.queryIdleDriver(uid, 4, orderLogistics.getServerCarModelId(), orderLogistics.getStartLon(), orderLogistics.getStartLat(), assignOrder.getDistance(), null);//获取范围内空闲司机
if(drivers.size() > 0){//有司机,直接指派给司机
Driver dr = null;
if(drivers.size() > 1){
@@ -858,7 +861,7 @@
String value = redisUtil.getValue("DRIVER" + drivers.get(j).getId());
if(null != value){
String[] split = value.split(",");
- DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(split[1]), Double.valueOf(split[0]));
+ DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(split[1]), Double.valueOf(split[0]), tripId);
Long distance = distancematrix.getDistance();
if((0 == m && null == driver) || (distance < m)){
driver = drivers.get(j);
@@ -877,7 +880,7 @@
String value = redisUtil.getValue("DRIVER" + driver.getId());
if(null != value){
String[] split = value.split(",");
- DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(split[1]), Double.valueOf(split[0]));
+ DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(split[1]), Double.valueOf(split[0]), tripId);
Long d = distancematrix.getDistance();
if((0 == m && null == dr) || (d.intValue() < m.intValue())){
dr = driver;
@@ -933,7 +936,7 @@
public void run() {
Process process = null;
try {
- process = Runtime.getRuntime().exec("rm -rf /usr/local/nginx/html/files/audio/" + fileName);
+ process = Runtime.getRuntime().exec("sudo rm -rf /home/igotechgh/nginx/html/files/audio/" + fileName);
} catch (IOException e) {
throw new RuntimeException(e);
}
@@ -1042,13 +1045,13 @@
}
//计算红包
- if(null != redDeduction && 1 == redDeduction){
+ if(null != redDeduction && 1 == redDeduction && null == orderLogistics.getRedPacketId()){
RedEnvelopePaymentSettings redEnvelopePaymentSettings = redEnvelopePaymentSettingsService.getRedEnvelopePaymentSettings();
if(null != redEnvelopePaymentSettings){
Double total = userRedPacketRecordService.queryRemainingAmount(uid);
List<UserRedPacketRecord> userRedPacketRecords = userRedPacketRecordService.selectList(new EntityWrapper<UserRedPacketRecord>().eq("userId", uid)
.eq("state", 1).eq("companyId", orderLogistics.getCompanyId()).gt("remainingAmount", 0).orderBy("insertTime", false));
-
+
BigDecimal deductionRatio = redEnvelopePaymentSettings.getDeductionRatio();
BigDecimal multiply1 = orderMoney.multiply(deductionRatio.divide(new BigDecimal(100))).setScale(2, RoundingMode.HALF_EVEN);
if(total > 0 && multiply1.doubleValue() > 0 && total.compareTo(multiply1.doubleValue()) >= 0){
@@ -1058,12 +1061,12 @@
//获取红包id
JSONArray jsonArray = new JSONArray();
for (UserRedPacketRecord userRedPacketRecord : userRedPacketRecords) {
- JSONObject jsonObject = new JSONObject();
- jsonObject.put("id", userRedPacketRecord.getId());
- BigDecimal remainingAmount = new BigDecimal(userRedPacketRecord.getRemainingAmount());
if(multiply1.compareTo(BigDecimal.ZERO) == 0){
break;
}
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("id", userRedPacketRecord.getId());
+ BigDecimal remainingAmount = new BigDecimal(userRedPacketRecord.getRemainingAmount());
if(multiply1.compareTo(remainingAmount) >= 0){
userRedPacketRecord.setRemainingAmount(0D);
userRedPacketRecord.setEndTime(new Date());
@@ -1071,14 +1074,15 @@
multiply1 = multiply1.subtract(remainingAmount).setScale(2, RoundingMode.HALF_EVEN);
jsonObject.put("money", remainingAmount);
jsonArray.add(jsonObject);
- userRedPacketRecordService.updateById(userRedPacketRecord);
}else if(remainingAmount.compareTo(multiply1) > 0){
userRedPacketRecord.setRemainingAmount(remainingAmount.subtract(multiply1).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
jsonObject.put("money", multiply1);
jsonArray.add(jsonObject);
- userRedPacketRecordService.updateById(userRedPacketRecord);
multiply1 = BigDecimal.ZERO;
}
+ }
+ if(userRedPacketRecords.size() > 0){
+ userRedPacketRecordService.updateBatchById(userRedPacketRecords);
}
orderLogistics.setRedPacketId(jsonArray.toJSONString());
}
@@ -1087,29 +1091,18 @@
orderMoney = orderMoney.subtract(new BigDecimal(total)).setScale(2, RoundingMode.HALF_EVEN);
//获取红包id
JSONArray jsonArray = new JSONArray();
- BigDecimal multiply = new BigDecimal(total);
for (UserRedPacketRecord userRedPacketRecord : userRedPacketRecords) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", userRedPacketRecord.getId());
- BigDecimal remainingAmount = new BigDecimal(userRedPacketRecord.getRemainingAmount());
- if(multiply.compareTo(BigDecimal.ZERO) == 0){
- break;
- }
- if(multiply.compareTo(remainingAmount) >= 0){
- userRedPacketRecord.setRemainingAmount(0D);
- userRedPacketRecord.setEndTime(new Date());
- userRedPacketRecord.setState(2);
- multiply = multiply.subtract(remainingAmount).setScale(2, RoundingMode.HALF_EVEN);
- jsonObject.put("money", remainingAmount);
- jsonArray.add(jsonObject);
- userRedPacketRecordService.updateById(userRedPacketRecord);
- }else if(remainingAmount.compareTo(multiply) > 0){
- userRedPacketRecord.setRemainingAmount(remainingAmount.subtract(multiply).setScale(2, RoundingMode.HALF_EVEN).doubleValue());
- jsonObject.put("money", multiply);
- jsonArray.add(jsonObject);
- userRedPacketRecordService.updateById(userRedPacketRecord);
- multiply = BigDecimal.ZERO;
- }
+ jsonObject.put("money", userRedPacketRecord.getRemainingAmount());
+ jsonArray.add(jsonObject);
+
+ userRedPacketRecord.setRemainingAmount(0D);
+ userRedPacketRecord.setEndTime(new Date());
+ userRedPacketRecord.setState(2);
+ }
+ if(userRedPacketRecords.size() > 0){
+ userRedPacketRecordService.updateBatchById(userRedPacketRecords);
}
orderLogistics.setRedPacketId(jsonArray.toJSONString());
}
@@ -1130,8 +1123,8 @@
checkoutRequest.setRequestDescription("Travel completion payment");
checkoutRequest.setCallbackUrl(callbackPath + "/base/wxPayOrderTaxi");
checkoutRequest.setPendingRedirectUrl("");
- checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html");
- checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html");
+ checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html");
+ checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html");
resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest);
if(resultUtil.getCode()==200){
paymentRecordService.saveData(1, null, null, orderId, 4, 1,
@@ -1157,8 +1150,8 @@
checkoutRequest.setRequestDescription("Travel completion payment");
checkoutRequest.setCallbackUrl(callbackPath + "/base/wxPayOrderTaxi");
checkoutRequest.setPendingRedirectUrl("");
- checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html");
- checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html");
+ checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html");
+ checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html");
resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest);
if(resultUtil.getCode()==200){
@@ -1281,7 +1274,7 @@
if(1 == language){
document.getElementById("english").remove();
document.getElementById("french").remove();
- document.getElementsByTag("title").get(0).text("I-GO电子收据");
+ 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");
@@ -1362,11 +1355,11 @@
dispute_chinese.remove();
}
Element pdf_chinese = document.getElementById("pdf_chinese");
- pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
+ 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", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
+ lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
// Element track_chinese = document.getElementById("track_chinese");
-// track_chinese.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -1389,7 +1382,7 @@
if(2 == language){
document.getElementById("chinese").remove();
document.getElementById("french").remove();
- document.getElementsByTag("title").get(0).text("Receipt");
+ 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");
@@ -1470,11 +1463,11 @@
dispute_english.remove();
}
Element pdf_english = document.getElementById("pdf_english");
- pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
+ 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", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
+ lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
// Element track_english = document.getElementById("track_english");
-// track_english.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -1497,7 +1490,7 @@
if(3 == language){
document.getElementById("chinese").remove();
document.getElementById("english").remove();
- document.getElementsByTag("title").get(0).text("Reçu");
+ 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");
@@ -1578,11 +1571,11 @@
dispute_french.remove();
}
Element pdf_french = document.getElementById("pdf_french");
- pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
+ 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", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
+ lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
// Element track_french = document.getElementById("track_french");
-// track_french.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -1603,14 +1596,14 @@
server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : ""));
}
- EmailUtil.send(userInfo.getEmail(), language == 1 ? "I-GO电子收据" : language == 2 ? "Receipt" : "Reçu", document.html());
+ EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison", document.html());
//开始生成pdf收据和html收据
- File file = new File("/usr/local/nginx/html/files/html/");
+ File file = new File("/home/igotechgh/nginx/html/files/html/");
if(!file.exists()){
file.mkdirs();
}
- file = new File("/usr/local/nginx/html/files/html/parcel_receipt_" + orderId + ".html");
+ file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html");
if(!file.exists()){
file.createNewFile();
}
@@ -1619,28 +1612,28 @@
fileWriter.flush();
fileWriter.close();
- File file1 = new File("/usr/local/nginx/html/files/pdf/");
+ File file1 = new File("/home/igotechgh/nginx/html/files/pdf/");
if(!file1.exists()){
file1.mkdirs();
}
- file1 = new File("/usr/local/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf");
+ 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("/usr/local/nginx/html/files/html/parcel_receipt_" + orderId + ".html", "I-GO", fileOutputStream);
+ 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 ="http://182.160.16.251:81/files/html/parcel_receipt_" + orderId + ".html";
+ 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 ? "I-GO电子收据" : language == 2 ? "Receipt" : "Reçu");
+ 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;
@@ -1817,7 +1810,7 @@
if(1 == language){
document.getElementById("english").remove();
document.getElementById("french").remove();
- document.getElementsByTag("title").get(0).text("I-GO电子收据");
+ 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");
@@ -1898,11 +1891,11 @@
dispute_chinese.remove();
}
Element pdf_chinese = document.getElementById("pdf_chinese");
- pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
+ 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", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
+ lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
// Element track_chinese = document.getElementById("track_chinese");
-// track_chinese.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -1925,7 +1918,7 @@
if(2 == language){
document.getElementById("chinese").remove();
document.getElementById("french").remove();
- document.getElementsByTag("title").get(0).text("Receipt");
+ 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");
@@ -2006,11 +1999,11 @@
dispute_english.remove();
}
Element pdf_english = document.getElementById("pdf_english");
- pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
+ 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", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
+ lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
// Element track_english = document.getElementById("track_english");
-// track_english.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -2033,7 +2026,7 @@
if(3 == language){
document.getElementById("chinese").remove();
document.getElementById("english").remove();
- document.getElementsByTag("title").get(0).text("Reçu");
+ 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");
@@ -2114,11 +2107,11 @@
dispute_french.remove();
}
Element pdf_french = document.getElementById("pdf_french");
- pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4");
+ 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", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
+ lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + orderId + "&orderType=4");
// Element track_french = document.getElementById("track_french");
-// track_french.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -2139,14 +2132,14 @@
server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : ""));
}
- EmailUtil.send(userInfo.getEmail(), language == 1 ? "I-GO电子收据" : language == 2 ? "Receipt" : "Reçu", document.html());
+ EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison", document.html());
//开始生成pdf收据和html收据
- File file = new File("/usr/local/nginx/html/files/html/");
+ File file = new File("/home/igotechgh/nginx/html/files/html/");
if(!file.exists()){
file.mkdirs();
}
- file = new File("/usr/local/nginx/html/files/html/parcel_receipt_" + orderId + ".html");
+ file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + orderId + ".html");
if(!file.exists()){
file.createNewFile();
}
@@ -2155,28 +2148,28 @@
fileWriter.flush();
fileWriter.close();
- File file1 = new File("/usr/local/nginx/html/files/pdf/");
+ File file1 = new File("/home/igotechgh/nginx/html/files/pdf/");
if(!file1.exists()){
file1.mkdirs();
}
- file1 = new File("/usr/local/nginx/html/files/pdf/parcel_receipt_" + orderId + ".pdf");
+ 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("/usr/local/nginx/html/files/html/parcel_receipt_" + orderId + ".html", "I-GO", fileOutputStream);
+ 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 ="http://182.160.16.251:81/files/html/parcel_receipt_" + orderId + ".html";
+ 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 ? "I-GO电子收据" : language == 2 ? "Receipt" : "Reçu");
+ 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;
@@ -2229,8 +2222,8 @@
checkoutRequest.setRequestDescription("Travel completion payment");
checkoutRequest.setCallbackUrl(callbackPath + "/base/wxPayOrderLogisticsSpread");
checkoutRequest.setPendingRedirectUrl("");
- checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html");
- checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html");
+ checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html");
+ checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html");
return TinggPayUtil.checkoutRequest(checkoutRequest);
}
if(payType == 2){//银行卡支付
@@ -2248,8 +2241,8 @@
checkoutRequest.setRequestDescription("Travel completion payment");
checkoutRequest.setCallbackUrl(callbackPath + "/base/wxPayOrderLogisticsSpread");
checkoutRequest.setPendingRedirectUrl("");
- checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html");
- checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html");
+ checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html");
+ checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html");
return TinggPayUtil.checkoutRequest(checkoutRequest);
}
@@ -2452,7 +2445,7 @@
if(1 == language){
document.getElementById("english").remove();
document.getElementById("french").remove();
- document.getElementsByTag("title").get(0).text("I-GO电子收据");
+ 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");
@@ -2533,11 +2526,11 @@
dispute_chinese.remove();
}
Element pdf_chinese = document.getElementById("pdf_chinese");
- pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
+ pdf_chinese.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
Element lost_item_chinese = document.getElementById("lost_item_chinese");
- lost_item_chinese.attr("href", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + id + "&orderType=4");
+ lost_item_chinese.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + id + "&orderType=4");
// Element track_chinese = document.getElementById("track_chinese");
-// track_chinese.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -2560,7 +2553,7 @@
if(2 == language){
document.getElementById("chinese").remove();
document.getElementById("french").remove();
- document.getElementsByTag("title").get(0).text("Receipt");
+ 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");
@@ -2641,11 +2634,11 @@
dispute_english.remove();
}
Element pdf_english = document.getElementById("pdf_english");
- pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
+ pdf_english.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
Element lost_item_english = document.getElementById("lost_item_english");
- lost_item_english.attr("href", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + id + "&orderType=4");
+ lost_item_english.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + id + "&orderType=4");
// Element track_english = document.getElementById("track_english");
-// track_english.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -2668,7 +2661,7 @@
if(3 == language){
document.getElementById("chinese").remove();
document.getElementById("english").remove();
- document.getElementsByTag("title").get(0).text("Reçu");
+ 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");
@@ -2749,11 +2742,11 @@
dispute_french.remove();
}
Element pdf_french = document.getElementById("pdf_french");
- pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
+ pdf_french.attr("href", "https://igo.i-go.group/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4");
Element lost_item_french = document.getElementById("lost_item_french");
- lost_item_french.attr("href", "http://182.160.16.251:81/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + id + "&orderType=4");
+ lost_item_french.attr("href", "https://igo.i-go.group/mailbox/user/lossGoods.html?language=" + language + "&orderId=" + id + "&orderType=4");
// Element track_french = document.getElementById("track_french");
-// track_french.attr("href", "http://182.160.16.251:81/mailbox/user/location.html");
+// 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");
@@ -2774,14 +2767,14 @@
server_tel_french.attr("href", "tel:" + (null != phone ? phone.getPhone() : ""));
}
- EmailUtil.send(userInfo.getEmail(), language == 1 ? "I-GO电子收据" : language == 2 ? "Receipt" : "Reçu", document.html());
+ EmailUtil.send(userInfo.getEmail(), language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison", document.html());
//开始生成pdf收据和html收据
- File file = new File("/usr/local/nginx/html/files/html/");
+ File file = new File("/home/igotechgh/nginx/html/files/html/");
if(!file.exists()){
file.mkdirs();
}
- file = new File("/usr/local/nginx/html/files/html/parcel_receipt_" + id + ".html");
+ file = new File("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + id + ".html");
if(!file.exists()){
file.createNewFile();
}
@@ -2790,28 +2783,28 @@
fileWriter.flush();
fileWriter.close();
- File file1 = new File("/usr/local/nginx/html/files/pdf/");
+ File file1 = new File("/home/igotechgh/nginx/html/files/pdf/");
if(!file1.exists()){
file1.mkdirs();
}
- file1 = new File("/usr/local/nginx/html/files/pdf/parcel_receipt_" + id + ".pdf");
+ file1 = new File("/home/igotechgh/nginx/html/files/pdf/parcel_receipt_" + id + ".pdf");
if(!file1.exists()){
file1.createNewFile();
}
try{
FileOutputStream fileOutputStream = new FileOutputStream(file1);
- HtmlToPdfUtils.convertToPdf("/usr/local/nginx/html/files/html/parcel_receipt_" + id + ".html", "I-GO", fileOutputStream);
+ HtmlToPdfUtils.convertToPdf("/home/igotechgh/nginx/html/files/html/parcel_receipt_" + id + ".html", "I-GO", fileOutputStream);
}catch (Exception e){
e.printStackTrace();
System.out.println("html转pdf异常");
}
- String link ="http://182.160.16.251:81/files/html/parcel_receipt_" + id + ".html";
+ String link ="https://igo.i-go.group/files/html/parcel_receipt_" + id + ".html";
TEmail tEmail = new TEmail();
tEmail.setLink(link);
tEmail.setUserId(userInfo.getId());
tEmail.setType(1);
- tEmail.setName(language == 1 ? "I-GO电子收据" : language == 2 ? "Receipt" : "Reçu");
+ tEmail.setName(language == 1 ? "包裹收据" : language == 2 ? "Delivery receipt" : "Reçu de livraison");
tEmail.setOrderId(id);
tEmail.setCreateTime(new Date());
int i = cn.hutool.core.date.DateUtil.dayOfWeek(new Date())-1;
@@ -2943,7 +2936,7 @@
Integer orderId = Integer.valueOf(String.valueOf(map.get("orderId")));
Integer state = Integer.valueOf(String.valueOf(map.get("state")));
if(state == 6){
- map.put("receipt", "http://182.160.16.251:81/files/html/parcel_receipt_" + orderId + ".html");
+ map.put("receipt", "https://igo.i-go.group/files/html/parcel_receipt_" + orderId + ".html");
}else{
map.put("receipt", "");
}
@@ -3090,13 +3083,13 @@
String audioUrl = "";
switch (language1){
case 1:
- audioUrl = "http://182.160.16.251:81/files/audio/system/UserCancelledOrder-CN.mp3";
+ audioUrl = "https://igo.i-go.group/files/audio/system/UserCancelledOrder-CN.mp3";
break;
case 2:
- audioUrl = "http://182.160.16.251:81/files/audio/system/UserCancelledOrder-EN.mp3";
+ audioUrl = "https://igo.i-go.group/files/audio/system/UserCancelledOrder-EN.mp3";
break;
case 3:
- audioUrl = "http://182.160.16.251:81/files/audio/system/UserCancelledOrder-FR.mp3";
+ audioUrl = "https://igo.i-go.group/files/audio/system/UserCancelledOrder-FR.mp3";
break;
}
pushUtil.pushOrderState(1, orderLogistics.getUserId(), orderLogistics.getId(), 4, orderLogistics.getState(), 0, "");
@@ -3234,7 +3227,7 @@
map.put("device", ToolUtil.isNotEmpty(driverId) ? 2 : 1);
map.put("orderType", orderLogistics.getType());
if(state == 8 || state == 9){
- map.put("receipt", "http://182.160.16.251:81/files/html/parcel_receipt_" + orderId + ".html");
+ map.put("receipt", "https://igo.i-go.group/files/html/parcel_receipt_" + orderId + ".html");
}else{
map.put("receipt", "");
}
@@ -3405,8 +3398,8 @@
checkoutRequest.setRequestDescription("Cancel a trip");
checkoutRequest.setCallbackUrl(callbackPath + "/base/wxCancelOrderTaxi");
checkoutRequest.setPendingRedirectUrl("");
- checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html");
- checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html");
+ checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html");
+ checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html");
resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest);
if(resultUtil.getCode()==200){
paymentRecordService.saveData(1, null, null, id, 4, 1, amount, null, 1);//添加预支付数据
@@ -3430,8 +3423,8 @@
checkoutRequest.setRequestDescription("Cancel a trip");
checkoutRequest.setCallbackUrl(callbackPath + "/base/wxCancelOrderTaxi");
checkoutRequest.setPendingRedirectUrl("");
- checkoutRequest.setSuccessRedirectUrl("http://182.160.16.251:81/payMoney/pages/success.html");
- checkoutRequest.setFailRedirectUrl("http://182.160.16.251:81/payMoney/pages/fail.html");
+ checkoutRequest.setSuccessRedirectUrl("https://igo.i-go.group/payMoney/pages/success.html");
+ checkoutRequest.setFailRedirectUrl("https://igo.i-go.group/payMoney/pages/fail.html");
resultUtil = TinggPayUtil.checkoutRequest(checkoutRequest);
if(resultUtil.getCode()==200){
paymentRecordService.saveData(1, null, null, id, 4, 2, amount, null, 1);//添加预支付数据
@@ -3609,13 +3602,13 @@
String audioUrl = "";
switch (language1){
case 1:
- audioUrl = "http://182.160.16.251:81/files/audio/system/ChangeAddress-CN.mp3";
+ audioUrl = "https://igo.i-go.group/files/audio/system/ChangeAddress-CN.mp3";
break;
case 2:
- audioUrl = "http://182.160.16.251:81/files/audio/system/ChangeAddress-EN.mp3";
+ audioUrl = "https://igo.i-go.group/files/audio/system/ChangeAddress-EN.mp3";
break;
case 3:
- audioUrl = "http://182.160.16.251:81/files/audio/system/ChangeAddress-FR.mp3";
+ audioUrl = "https://igo.i-go.group/files/audio/system/ChangeAddress-FR.mp3";
break;
}
pushUtil.pushModifyAddress(2, orderLogistics.getDriverId(), orderId, 4, 1, audioUrl);
@@ -3735,11 +3728,11 @@
EmailUtil.send(userInfo.getEmail(), language == 1 ? "红包活动" : language == 2 ? "Lucky-promo activities" : "Activités bonus", document.html());
//开始生成pdf收据和html收据
- File file = new File("/usr/local/nginx/html/files/html/");
+ File file = new File("/home/igotechgh/nginx/html/files/html/");
if(!file.exists()){
file.mkdirs();
}
- file = new File("/usr/local/nginx/html/files/html/redpacket_" + orderId + ".html");
+ file = new File("/home/igotechgh/nginx/html/files/html/redpacket_" + orderId + ".html");
if(!file.exists()){
file.createNewFile();
}
@@ -3748,7 +3741,7 @@
fileWriter.flush();
fileWriter.close();
- String link ="http://182.160.16.251:81/files/html/redpacket_" + orderId + ".html";
+ String link ="https://igo.i-go.group/files/html/redpacket_" + orderId + ".html";
TEmail tEmail = new TEmail();
tEmail.setLink(link);
tEmail.setUserId(userInfo.getId());
@@ -3828,13 +3821,14 @@
}
}
}
-
+
+ String tripId = redisUtil.getValue("trip" + uid);
String lnt = "0";
String lat = "0";
if(ToolUtil.isNotEmpty(value)){
lnt = value.split(",")[0];
lat = value.split(",")[1];
- DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(lat), Double.valueOf(lnt));
+ DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), Double.valueOf(lat), Double.valueOf(lnt), tripId);
if(null == distancematrix){
System.err.println("查询距离出错了");
@@ -3862,7 +3856,7 @@
orderServerWarpper.setLaveTime("0");
}
if(orderLogistics.getState() == 5 || orderLogistics.getState() == 6){//服务中
- DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(lat), Double.valueOf(lnt), orderLogistics.getEndLat(), orderLogistics.getEndLon());
+ DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(Double.valueOf(lat), Double.valueOf(lnt), orderLogistics.getEndLat(), orderLogistics.getEndLon(), tripId);
if(null == distancematrix){
System.err.println("查询距离出错了");
}else if(distancematrix.getDistance() == 0){
--
Gitblit v1.7.1