Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0
| | |
| | | */ |
| | | @TableField("estimatedMileage") |
| | | private Double estimatedMileage; |
| | | /** |
| | | * 争议订单(0=否,1=是) |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | } |
| | |
| | | pushUtil.pushOrderState(2, orderLogistics.getDriverId(), orderLogistics.getId(), orderLogistics.getType(), orderLogistics.getState(), 0, ""); |
| | | } |
| | | }).start(); |
| | | |
| | | Integer language1 = userInfoMapper.selectById(orderLogistics.getUserId()).getLanguage(); |
| | | systemNoticeService.addSystemNotice(2, language == 1 ? "您已成功抢得包裹订单,请及时联系客户!" : |
| | | language == 2 ? "You have grabbed the delivery order, please contact the client timely." |
| | | : "Vous avez saisi la commande du livraison. Veuillez contacter le client en temps opportun.", orderLogistics.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language == 2 ? "Your order has been assigned to the driver- " + driver.getFirstName() + ", please keep your line on." |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language1 == 2 ? "Your order has been assigned to the driver- " + driver.getFirstName() + ", please keep your line on." |
| | | : "Votre commande a été attribuée au chauffeur- " + driver.getFirstName() + ", S'il vous plaît, restez en ligne.", orderLogistics.getUserId()); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | long timeOutCancel = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout; |
| | | map.put("timeOutCancel", timeOutCancel); |
| | | } |
| | | map.put("isDispute", orderLogistics.getIsDispute()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | List<OrderLogisticsSpread> orderLogisticsId = spreadService.selectList(new EntityWrapper<OrderLogisticsSpread>().eq("orderLogisticsId", orderLogistics.getId()).eq("payType",4)); |
| | | |
| | | Integer language1 = userInfoMapper.selectById(orderLogistics.getUserId()).getLanguage(); |
| | | |
| | | String tripStatus = "UNKNOWN_TRIP_STATUS"; |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | | orderLogistics.setState(3); |
| | | orderLogistics.setSetOutTime(new Date()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "司机已出发,请耐心等待" : language == 2 ? "The driver is on the way, please wait." : "Le chauffeur est en route. Veuillez patienter.", orderLogistics.getUserId()); |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "司机已出发,请耐心等待" : language1 == 2 ? "The driver is on the way, please wait." : "Le chauffeur est en route. Veuillez patienter.", orderLogistics.getUserId()); |
| | | pushUtil.pushDriverPosition(orderId, 4); |
| | | tripStatus = "ENROUTE_TO_PICKUP"; |
| | | break; |
| | | case 4://到达预约点,等待客户上车 |
| | | orderLogistics.setState(4); |
| | | orderLogistics.setArriveTime(new Date()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "司机已到达您设置的预约地点。" : language == 2 ? "The driver has arrived at the reserved location." : "Le chauffeur est arrivé à l'endroit prévu.", orderLogistics.getUserId()); |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "司机已到达您设置的预约地点。" : language1 == 2 ? "The driver has arrived at the reserved location." : "Le chauffeur est arrivé à l'endroit prévu.", orderLogistics.getUserId()); |
| | | tripStatus = "ARRIVED_AT_PICKUP"; |
| | | break; |
| | | case 5://开始服务 |
| | |
| | | pushUtil.pushOrderState(2, orderLogistics.getDriverId(), orderLogistics.getId(), orderLogistics.getType(), orderLogistics.getState(), 0, ""); |
| | | } |
| | | }).start(); |
| | | |
| | | Integer language1 = userInfoMapper.selectById(orderLogistics.getUserId()).getLanguage(); |
| | | systemNoticeService.addSystemNotice(2, language == 1 ? "您已成功抢得包裹订单,请及时联系客户!" : |
| | | language == 2 ? "You have grabbed the delivery order, please contact the client timely." |
| | | : "Vous avez saisi la commande du livraison. Veuillez contacter le client en temps opportun.", orderLogistics.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language == 2 ? "Your order has been assigned to the driver- " + driver.getFirstName() + ", please keep your line on." |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language1 == 2 ? "Your order has been assigned to the driver- " + driver.getFirstName() + ", please keep your line on." |
| | | : "Votre commande a été attribuée au chauffeur- " + driver.getFirstName() + ", S'il vous plaît, restez en ligne.", orderLogistics.getUserId()); |
| | | |
| | | return ResultUtil.success(); |
| | |
| | | Element email2_user = document.getElementById("email2_user"); |
| | | email2_user.text("Bonjour " + userInfo.getFirstName() + " " + userInfo.getLastName()); |
| | | Element email2_content = document.getElementById("email2_content"); |
| | | email2_content.text("Le code de ramassage de votre colis est " + random + ", veuillez effectuer la verification dans les 5minutes."); |
| | | email2_content.text("Le code de ramassage de votre colis est " + random + ", veuillez effectuer la verification dans les 5 minutes."); |
| | | } |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "取件码邮件" : language == 2 ? "Pickup code" : "Code de ramassage", document.html()); |
| | | //开始生成pdf收据和html收据 |
| | |
| | | map.put("discountMoney", orderLogistics.getDiscountMoney());//折扣抵扣金额 |
| | | map.put("discount", orderLogistics.getDiscount());//折扣 |
| | | map.put("priceDifference", orderLogistics.getPriceDifference());//补差价 |
| | | map.put("isDispute", orderLogistics.getIsDispute()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | a.bindId as bindId, |
| | | ( |
| | | (select count(id) from t_order_private_car where userId = b.id and state in (8, 9)) + |
| | | (select count(id) from t_order_taxi where userId = b.id and state in (8, 9)) + |
| | | (select count(id) from t_order_cross_city where userId = b.id and state in (8, 9)) |
| | | (select count(id) from t_order_logistics where userId = b.id and state in (8, 9)) |
| | | ) as historyNum, |
| | | (select phone from t_phone where companyId = a.companyId and `type` = 1) as emergencyCall, |
| | | c.reason as cancelReason, |
| | |
| | | */ |
| | | @TableField("estimatedMileage") |
| | | private Double estimatedMileage; |
| | | /** |
| | | * 争议订单(0=否,1=是) |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | } |
| | |
| | | } |
| | | } |
| | | }).start(); |
| | | |
| | | |
| | | |
| | | Integer language1 = userInfoMapper.selectById(orderPrivateCar.getUserId()).getLanguage(); |
| | | systemNoticeService.addSystemNotice(2, language == 1 ? "您已成功抢得打车订单,请及时联系客户!" : |
| | | language == 2 ? "You have grabbed the ride order, please contact the client timely." |
| | | : "Vous avez saisi la commande de course, veuillez contacter le client en temps opportun.", orderPrivateCar.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language == 2 ? "Your order has been assigned to the driver- " + driver.getFirstName() + ", please keep your line on." |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "您的订单已指派给" + driver.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language1 == 2 ? "Your order has been assigned to the driver- " + driver.getFirstName() + ", please keep your line on." |
| | | : "Votre commande a été attribuée au chauffeur- " + driver.getFirstName() + ", S'il vous plaît, restez en ligne.", orderPrivateCar.getUserId()); |
| | | return ResultUtil.success(); |
| | | } |
| | |
| | | timeOutCancel = orderPrivateCar.getTravelTime().getTime(); |
| | | } |
| | | map.put("timeOutCancel", timeOutCancel); |
| | | map.put("isDispute", orderPrivateCar.getIsDispute()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | if(state==4 && orderPrivateCar.getState()!=3){ |
| | | return ResultUtil.error(language == 1 ? "当前订单不能到达预约地点" : language == 2 ? "The current order cannot arrive at the reservation" : "La commande en cours ne peut pas atteindre le rendez-vous"); |
| | | } |
| | | Integer language1 = userInfoMapper.selectById(orderPrivateCar.getUserId()).getLanguage(); |
| | | |
| | | String tripStatus = "UNKNOWN_TRIP_STATUS"; |
| | | String audioUrl = ""; |
| | | switch (state){ |
| | | case 3://出发前往预约点 |
| | | orderPrivateCar.setState(3); |
| | | orderPrivateCar.setSetOutTime(new Date()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "司机已出发,请耐心等待" : language == 2 ? "The driver is on the way, please wait." : "Le chauffeur est en route. Veuillez patienter.", orderPrivateCar.getUserId()); |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "司机已出发,请耐心等待" : language1 == 2 ? "The driver is on the way, please wait." : "Le chauffeur est en route. Veuillez patienter.", orderPrivateCar.getUserId()); |
| | | pushUtil.pushDriverPosition(orderPrivateCar.getId(), 1);//主动推送司机定位 |
| | | tripStatus = "ENROUTE_TO_PICKUP"; |
| | | break; |
| | | case 4://到达预约点,等待客户上车 |
| | | orderPrivateCar.setState(4); |
| | | orderPrivateCar.setArriveTime(new Date()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "司机已到达您设置的预约地点,请及时上车" : language == 2 ? |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "司机已到达您设置的预约地点,请及时上车" : language1 == 2 ? |
| | | "The driver has arrived at the reserved location, please get in timely." : |
| | | "Le chauffeur est arrivé à l'endroit prévu, veuillez monter dans la voiture à temps.", orderPrivateCar.getUserId()); |
| | | tripStatus = "ARRIVED_AT_PICKUP"; |
| | |
| | | map.put("couponMoney", orderPrivateCar.getCouponMoney());//优惠券抵扣金额 |
| | | map.put("discountMoney", orderPrivateCar.getDiscountMoney());//折扣抵扣金额 |
| | | map.put("discount", orderPrivateCar.getDiscount());//折扣 |
| | | map.put("isDispute", orderPrivateCar.getIsDispute()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | <select id="queryHomeData" resultType="map"> |
| | | select |
| | | b.carLicensePlate as licensePlate, |
| | | CONCAT(d.`name`, c.`name`, ' . ', b.carColor) as brand, |
| | | CONCAT(d.`name`, ' ', c.`name`, ' . ', b.carColor) as brand, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) + |
| | | (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9) and to_days(insertTime) = to_days(now())) + |
| | |
| | | b.vehicleId, |
| | | CONCAT(d.`name`, ' ', c.`name`) as brand, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.id and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_taxi where driverId = a.id and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_cross_city where driverId = a.id and state in (6, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.id and state in (6, 9)) |
| | | (select count(id) from t_order_private_car where driverId = a.id and state in (6, 7, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.id and state in (6, 7, 8, 9)) |
| | | ) as orderNum, |
| | | ((select sum(fraction) from t_order_evaluate where driverId = a.id) / (select count(fraction) from t_order_evaluate where driverId = a.id)) as score |
| | | from t_driver a |
| | |
| | | pushUtil.pushOrderReassign(orderPrivateCar.getDriverId(), 2, orderPrivateCar.getId(), 1, finalAudioUrl); |
| | | } |
| | | }).start(); |
| | | |
| | | |
| | | |
| | | Integer language2 = userInfoMapper.selectById(orderPrivateCar.getUserId()).getLanguage(); |
| | | systemNoticeService.addSystemNotice(2, language1 == 1 ? "您已成功抢得打车订单,请及时联系客户!" : |
| | | language1 == 2 ? "You have grabbed the ride order, please contact the client timely." |
| | | : "Vous avez saisi la commande de course, veuillez contacter le client en temps opportun.", orderPrivateCar.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "您的订单已指派给" + driver1.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language1 == 2 ? "Your order has been assigned to the driver- " + driver1.getFirstName() + ", please keep your line on." |
| | | systemNoticeService.addSystemNotice(1, language2 == 1 ? "您的订单已指派给" + driver1.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language2 == 2 ? "Your order has been assigned to the driver- " + driver1.getFirstName() + ", please keep your line on." |
| | | : "Votre commande a été attribuée au chauffeur- " + driver1.getFirstName() + ", S'il vous plaît, restez en ligne.", orderPrivateCar.getUserId()); |
| | | |
| | | } |
| | |
| | | pushUtil.pushOrderReassign(orderLogistics.getDriverId(), 2, orderLogistics.getId(), 4, finalAudioUrl); |
| | | } |
| | | }).start(); |
| | | |
| | | Integer language2 = userInfoMapper.selectById(orderLogistics.getUserId()).getLanguage(); |
| | | systemNoticeService.addSystemNotice(2, language1 == 1 ? "您已成功抢得包裹订单,请及时联系客户!" : |
| | | language1 == 2 ? "You have grabbed the delivery order, please contact the client timely." |
| | | : "Vous avez saisi la commande du livraison. Veuillez contacter le client en temps opportun.", orderLogistics.getDriverId()); |
| | | systemNoticeService.addSystemNotice(1, language1 == 1 ? "您的订单已指派给" + driver1.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language1 == 2 ? "Your order has been assigned to the driver- " + driver1.getFirstName() + ", please keep your line on." |
| | | systemNoticeService.addSystemNotice(1, language2 == 1 ? "您的订单已指派给" + driver1.getFirstName() + "师傅,请保持电话畅通!" : |
| | | language2 == 2 ? "Your order has been assigned to the driver- " + driver1.getFirstName() + ", please keep your line on." |
| | | : "Votre commande a été attribuée au chauffeur- " + driver1.getFirstName() + ", S'il vous plaît, restez en ligne.", orderLogistics.getUserId()); |
| | | |
| | | } |
| | |
| | | Integer language = driver.getLanguage(); |
| | | if(1 == timeOutType){ |
| | | if(orderType == 1){ |
| | | describe = language == 1 ? "您已超时" + driverTimeout + "分钟,用户可免费取消订单" : language == 2 ? "Reminder You are overdue for " + driverTimeout + " minutes The subscriber could cancel the order for free Confirm" : "Rappel Vous êtes en retard de " + driverTimeout + " minutes L’abonné peut annuler la commande gratuitement Confirmer"; |
| | | describe = language == 1 ? "您已超时" + driverTimeout + "分钟,\n用户可免费取消订单" : language == 2 ? "You are overdue for " + driverTimeout + " minutes,\nThe subscriber could cancel the order for free" : "Vous êtes en retard de " + driverTimeout + " minutes,\nL'abonné peut annuler la commande gratuitement"; |
| | | } |
| | | if(orderType == 4){ |
| | | describe = language == 1 ? "您已超时" + driverTimeout + "分钟,用户可免费取消订单" : language == 2 ? "Reminder You are overdue for " + driverTimeout + " minutes The subscriber could cancel the order for free Confirm" : "Rappel Vous êtes en retard de " + driverTimeout + " minutes L’abonné peut annuler la commande gratuitement Confirmer"; |
| | | describe = language == 1 ? "您已超时" + driverTimeout + "分钟,\n用户可免费取消订单" : language == 2 ? "You are overdue for " + driverTimeout + " minutes,\nThe subscriber could cancel the order for free" : "Vous êtes en retard de " + driverTimeout + " minutes,\nL'abonné peut annuler la commande gratuitement"; |
| | | } |
| | | } |
| | | if(2 == timeOutType){ |
| | |
| | | private Double discount; |
| | | @ApiModelProperty("补差价") |
| | | private Double priceDifference; |
| | | @ApiModelProperty("争议订单(0=否,1=是)") |
| | | private Integer isDispute; |
| | | |
| | | public static MoneyInfoWarpper getMoneyInfoWarpper(Map<String, Object> map){ |
| | | MoneyInfoWarpper moneyInfoWarpper = new MoneyInfoWarpper(); |
| | |
| | | moneyInfoWarpper.setDiscountMoney(null != map.get("discountMoney") ? Double.valueOf(map.get("discountMoney").toString()) : 0D); |
| | | moneyInfoWarpper.setDiscount(null != map.get("discount") ? Double.valueOf(map.get("discount").toString()) : 0D); |
| | | moneyInfoWarpper.setPriceDifference(null != map.get("priceDifference") ? Double.valueOf(map.get("priceDifference").toString()) : 0D); |
| | | moneyInfoWarpper.setIsDispute(null != map.get("isDispute") ? Integer.valueOf(map.get("isDispute").toString()) : 0); |
| | | } |
| | | return moneyInfoWarpper; |
| | | } |
| | |
| | | private String tripId; |
| | | @ApiModelProperty("中途取消(0=否,1=是)") |
| | | private Integer cancelMidway; |
| | | @ApiModelProperty("争议订单(0=否,1=是)") |
| | | private Integer isDispute; |
| | | |
| | | public Integer getStartDuration() { |
| | | return startDuration; |
| | |
| | | this.priceDifference = priceDifference; |
| | | } |
| | | |
| | | public Integer getIsDispute() { |
| | | return isDispute; |
| | | } |
| | | |
| | | public void setIsDispute(Integer isDispute) { |
| | | this.isDispute = isDispute; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "OrderInfoWarpper{" + |
| | |
| | | orderInfoWarpper.setCancelMidway(null != map.get("cancelMidway") ? Integer.valueOf(map.get("cancelMidway").toString()) : 0); |
| | | orderInfoWarpper.setAudioUrl(null != map.get("audioUrl") ? map.get("audioUrl").toString() : ""); |
| | | orderInfoWarpper.setPriceDifference(null != map.get("priceDifference") ? Double.valueOf(map.get("priceDifference").toString()) : 0); |
| | | orderInfoWarpper.setIsDispute(null != map.get("isDispute") ? Integer.valueOf(map.get("isDispute").toString()) : 0); |
| | | } |
| | | return orderInfoWarpper; |
| | | } |
| | |
| | | tIntegralOrderService.updateById(tIntegralOrder); |
| | | TIntegralOrder tIntegralOrder1 = tIntegralOrderService.selectById(tIntegralOrder.getId()); |
| | | TUser tUser = userService.selectById(tIntegralOrder1.getUserId()); |
| | | TIntegralGoods tIntegralGoods = integralGoodsService.selectById(tIntegralOrder.getGoodsId()); |
| | | TIntegralGoods tIntegralGoods = integralGoodsService.selectById(tIntegralOrder1.getGoodsId()); |
| | | try { |
| | | Integer language = tUser.getLanguage(); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您使用" + tIntegralOrder.getIntegral() + "积分成功兑换" + tIntegralGoods.getName() : |
| | | language == 2 ? "You redeemed " + tIntegralOrder.getIntegral() + " points for the " + tIntegralGoods.getName() + " successfully" : |
| | | "Vous avez échangé " + tIntegralOrder.getIntegral() + " points avec succès contre le " + tIntegralGoods.getName() + "", tIntegralOrder.getUserId()); |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您使用" + tIntegralOrder1.getIntegral() + "积分成功兑换" + tIntegralGoods.getName() : |
| | | language == 2 ? "You redeemed " + tIntegralOrder1.getIntegral() + " points for the " + tIntegralGoods.getName() + " successfully" : |
| | | "Vous avez échangé " + tIntegralOrder1.getIntegral() + " points avec succès contre le " + tIntegralGoods.getName() + "", tIntegralOrder1.getUserId()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | |
| | | TOrderPrivateCar orderPrivateCar = tOrderPrivateCarService.selectById(id); |
| | | orderPrivateCar.setAbnormalMoney(orderPrivateCar.getOrderMoney()); |
| | | orderPrivateCar.setOrderMoney(money); |
| | | orderPrivateCar.setPayMoney(money); |
| | | orderPrivateCar.setState(7); |
| | | orderPrivateCar.setIsDispute(1); |
| | | orderPrivateCar.updateById(); |
| | | return SUCCESS_TIP; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | |
| | | private String bindId; |
| | | |
| | | private String tripId; |
| | | /** |
| | | * 争议订单(0=否,1=是) |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | |
| | | public Integer getOldState() { |
| | | return oldState; |
| | |
| | | this.tripId = tripId; |
| | | } |
| | | |
| | | public String getRedPacketId() { |
| | | return redPacketId; |
| | | } |
| | | |
| | | public void setRedPacketId(String redPacketId) { |
| | | this.redPacketId = redPacketId; |
| | | } |
| | | |
| | | public Integer getIsDispute() { |
| | | return isDispute; |
| | | } |
| | | |
| | | public void setIsDispute(Integer isDispute) { |
| | | this.isDispute = isDispute; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | private Integer isFrozen; |
| | | |
| | | private String tripId; |
| | | /** |
| | | * 争议订单(0=否,1=是) |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | |
| | | public Integer getIsFrozen() { |
| | | return isFrozen; |
| | |
| | | this.tripId = tripId; |
| | | } |
| | | |
| | | public Double getStartMileage() { |
| | | return startMileage; |
| | | } |
| | | |
| | | public void setStartMileage(Double startMileage) { |
| | | this.startMileage = startMileage; |
| | | } |
| | | |
| | | public Integer getStartDuration() { |
| | | return startDuration; |
| | | } |
| | | |
| | | public void setStartDuration(Integer startDuration) { |
| | | this.startDuration = startDuration; |
| | | } |
| | | |
| | | public Double getDuration() { |
| | | return duration; |
| | | } |
| | | |
| | | public void setDuration(Double duration) { |
| | | this.duration = duration; |
| | | } |
| | | |
| | | public Double getWait() { |
| | | return wait; |
| | | } |
| | | |
| | | public void setWait(Double wait) { |
| | | this.wait = wait; |
| | | } |
| | | |
| | | public Double getLongDistance() { |
| | | return longDistance; |
| | | } |
| | | |
| | | public void setLongDistance(Double longDistance) { |
| | | this.longDistance = longDistance; |
| | | } |
| | | |
| | | public Double getMileageKilometers() { |
| | | return mileageKilometers; |
| | | } |
| | | |
| | | public void setMileageKilometers(Double mileageKilometers) { |
| | | this.mileageKilometers = mileageKilometers; |
| | | } |
| | | |
| | | public Integer getMoneyType() { |
| | | return moneyType; |
| | | } |
| | | |
| | | public void setMoneyType(Integer moneyType) { |
| | | this.moneyType = moneyType; |
| | | } |
| | | |
| | | public String getMoneyTime() { |
| | | return moneyTime; |
| | | } |
| | | |
| | | public void setMoneyTime(String moneyTime) { |
| | | this.moneyTime = moneyTime; |
| | | } |
| | | |
| | | public String getRedPacketId() { |
| | | return redPacketId; |
| | | } |
| | | |
| | | public void setRedPacketId(String redPacketId) { |
| | | this.redPacketId = redPacketId; |
| | | } |
| | | |
| | | public Integer getIsDispute() { |
| | | return isDispute; |
| | | } |
| | | |
| | | public void setIsDispute(Integer isDispute) { |
| | | this.isDispute = isDispute; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | import java.io.FileInputStream; |
| | | import java.io.FileOutputStream; |
| | | import java.io.FileWriter; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | |
| | | Element english_ride = document1.getElementById("english_ride"); |
| | | english_ride.text("Discount for I-GO " + key); |
| | | Element english_discount = document1.getElementById("english_discount"); |
| | | english_discount.text(" Enjoy " + aDouble + "% off your trip fare."); |
| | | english_discount.text(" Enjoy " + new BigDecimal((100 - aDouble)).setScale(2, RoundingMode.HALF_EVEN).doubleValue() + "% off your trip fare."); |
| | | |
| | | EmailUtil.send(user.getEmail(), "Discount activities", document1.html()); |
| | | //开始生成pdf收据和html收据 |
| | | File file = new File("/usr/local/nginx/html/files/html/"); |
| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.model.City; |
| | | import com.stylefeng.guns.modular.system.model.CityCopy; |
| | | import com.stylefeng.guns.modular.system.service.ICityCopyService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityBusinessService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private IUserInfoService userInfoService; |
| | | |
| | | @Resource |
| | | private ICityCopyService cityCopyService; |
| | | |
| | | |
| | | |
| | |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getCity") |
| | | @ApiOperation(value = "获取省市联动【1.0】", tags = {"用户端-首页"}) |
| | | public ResultUtil<List<CityCopy>> getCity(Integer pid){ |
| | | List<CityCopy> pid1 = cityCopyService.selectList(new EntityWrapper<CityCopy>().eq("pid", pid)); |
| | | return ResultUtil.success(pid1); |
| | | } |
| | | } |
| | |
| | | for (Map<String, Object> map : maps) { |
| | | Integer orderType = Integer.valueOf(map.get("orderType").toString()); |
| | | if(1 == orderType){ |
| | | map.put("name", language == 1 ? "打车订单取消" : language == 2 ? "Ride order cancelled" : "Commande de trajet annulée"); |
| | | map.put("name", language == 1 ? "打车订单取消" : language == 2 ? "Ride order cancelled" : "Commande de course annulée"); |
| | | } |
| | | if(4 == orderType){ |
| | | map.put("name", language == 1 ? "包裹订单取消" : language == 2 ? "Parcel order cancellation" : "Annulation de commande de livraison"); |
| | | map.put("name", language == 1 ? "包裹订单取消" : language == 2 ? "Delivery order cancelled" : "Commande de livraison annulée"); |
| | | } |
| | | } |
| | | List<Map<String, Object>> list = orderPrivateCarService.queryMyTravelRecord(language, uid);//专车 |
| | |
| | | case 1: |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Double orderMoney = orderPrivateCar.getOrderMoney(); |
| | | if(null == orderMoney){ |
| | | orderMoney = 0D; |
| | | } |
| | | UserActivityDiscount1 query2 = userActivityDiscount1Mapper.query(orderPrivateCar.getCompanyId()); |
| | | if(null != query2){ |
| | | Integer orderNum=orderPrivateCarService.selectCount(new EntityWrapper<OrderPrivateCar>().eq("userId", uid).eq("activityId",query2.getId()).last(" and to_days(getoffTime) = to_days(now())")); |
| | |
| | | case 4: |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | Double orderMoney1 = orderLogistics.getOrderMoney(); |
| | | if(null == orderMoney1){ |
| | | orderMoney1 = 0D; |
| | | } |
| | | UserActivityDiscount1 query1 = userActivityDiscount1Mapper.query(orderLogistics.getCompanyId()); |
| | | if(null != query1){ |
| | | Integer orderNum=orderLogisticsService.selectCount(new EntityWrapper<OrderLogistics>().eq("userId", uid).eq("activityId",query1.getId()).last(" and to_days(getoffTime) = to_days(now())")); |
| | |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverServiceService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.DistancematrixVo; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.GoogleMapUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.TextToSpeechUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderTimeInfo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | OrderTimeInfo orderTimeInfo = new OrderTimeInfo(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if(null != orderLogistics.getSnatchOrderTime()){ |
| | | orderTimeInfo.setSnatchOrderTime(sdf.format(orderLogistics.getSnatchOrderTime())); |
| | | orderTimeInfo.setSnatchOrderTime(DateUtil.conversionFormat(language, sdf.format(orderLogistics.getSnatchOrderTime()))); |
| | | } |
| | | if(null != orderLogistics.getStartServiceTime()){ |
| | | orderTimeInfo.setStartServiceTime(sdf.format(orderLogistics.getStartServiceTime())); |
| | | orderTimeInfo.setStartServiceTime(DateUtil.conversionFormat(language, sdf.format(orderLogistics.getStartServiceTime()))); |
| | | } |
| | | //分钟 |
| | | long time = (System.currentTimeMillis() - orderLogistics.getSnatchOrderTime().getTime()) / 60000; |
| | |
| | | long m = time % 60; |
| | | String usedTime = ""; |
| | | if(0 == h){ |
| | | usedTime = language == 1 ? m + "分钟" : language == 2 ? m + "-minute" : m + "-minute"; |
| | | usedTime = language == 1 ? m + "分钟" : language == 2 ? m + "-minute(s)" : m + "-minute"; |
| | | }else{ |
| | | usedTime = language == 1 ? h + "小时" + m + "分钟" : language == 2 ? h + "-hour" + m + "-minute" : h + "-hour" + m + "-minute"; |
| | | } |
| | | orderTimeInfo.setUsedTime(usedTime); |
| | | if(null != orderLogistics.getEndServiceTime()){ |
| | | orderTimeInfo.setEndServiceTime(sdf.format(orderLogistics.getEndServiceTime())); |
| | | orderTimeInfo.setEndServiceTime(DateUtil.conversionFormat(language, sdf.format(orderLogistics.getEndServiceTime()))); |
| | | }else{ |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), orderLogistics.getEndLat(), orderLogistics.getEndLon()); |
| | | Long duration = distancematrix.getDuration(); |
| | | orderTimeInfo.setEndServiceTime(DateUtil.conversionFormat(language, sdf.format(new Date(System.currentTimeMillis() + duration * 1000)))); |
| | | } |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), orderLogistics.getEndLat(), orderLogistics.getEndLon()); |
| | | Long distance = distancematrix.getDistance(); |
| | |
| | | c.carColor as carColor, |
| | | CONCAT(f.`name`, d.`name`) as brand, |
| | | ((select sum(fraction) from t_order_evaluate where driverId = a.driverId) / (select count(id) from t_order_evaluate where driverId = a.driverId)) as score, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.driverId and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_taxi where driverId = a.driverId and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_cross_city where driverId = a.driverId and state in (6, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 9)) |
| | | ) as orderNum, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.driverId and state in (6, 7, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 7, 8, 9)) |
| | | ) as orderNum, |
| | | b.phone as driverPhone, |
| | | if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = a.type and state = 1 order by insertTime desc limit 0, 1), if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = a.type and state = 2 order by insertTime desc limit 0, 1), 0)) as cancelPayMoney, |
| | | if(a.state = 10, (select id from t_order_cancel where orderId = a.id and orderType = a.type and state = 1 order by insertTime desc limit 0, 1), 0) as cancelId, |
| | |
| | | */ |
| | | @TableField("startDuration") |
| | | private Integer startDuration; |
| | | /** |
| | | * 是否冻结(1=否,2=是) |
| | | */ |
| | | @TableField("isFrozen") |
| | | private Integer isFrozen; |
| | | /** |
| | | * 争议订单(0=否,1=是) |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | } |
| | |
| | | pay_type_chinese.text(payTypeChinese); |
| | | Element pay_money_chinese = document.getElementById("pay_money_chinese"); |
| | | pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_chinese = document.getElementById("dispute_chinese"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_chinese.remove(); |
| | | } |
| | | Element pdf_chinese = document.getElementById("pdf_chinese"); |
| | | pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); |
| | | Element lost_item_chinese = document.getElementById("lost_item_chinese"); |
| | |
| | | pay_type_english.text(payTypeEnglish); |
| | | Element pay_money_english = document.getElementById("pay_money_english"); |
| | | pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_english = document.getElementById("dispute_english"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_english.remove(); |
| | | } |
| | | Element pdf_english = document.getElementById("pdf_english"); |
| | | pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); |
| | | Element lost_item_english = document.getElementById("lost_item_english"); |
| | |
| | | document.getElementById("english").remove(); |
| | | document.getElementsByTag("title").get(0).text("Reçu"); |
| | | Element title_french = document.getElementById("title_french"); |
| | | title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); |
| | | title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO "); |
| | | 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"); |
| | |
| | | pay_type_french.text(payTypeFrench); |
| | | Element pay_money_french = document.getElementById("pay_money_french"); |
| | | pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_french = document.getElementById("dispute_french"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_french.text("(Remarque: Il s’agit d’une commande contestée, et après des négociations entre trois parties, la plateforme l’a finalement tarifée à GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_french.remove(); |
| | | } |
| | | Element pdf_french = document.getElementById("pdf_french"); |
| | | pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); |
| | | Element lost_item_french = document.getElementById("lost_item_french"); |
| | |
| | | if(null != settlementAllocation){ |
| | | JSONObject jsonObject = JSON.parseObject(settlementAllocation.getContent()); |
| | | Double maxPrice = jsonObject.getDouble("maxPrice"); |
| | | Integer type1 = jsonObject.getInteger("type"); |
| | | if(1 == type1){ |
| | | List<SettlementDetail> settlementDetailList = settlementDetailService.selectList(new EntityWrapper<SettlementDetail>().eq("driverId", driver.getId()).isNull("settlementRecordId").last(" and DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(createTime, '%Y-%m-%d')")); |
| | | if(null != maxPrice){ |
| | | List<SettlementDetail> settlementDetailList = settlementDetailService.selectList(new EntityWrapper<SettlementDetail>().eq("driverId", driver.getId()) |
| | | .isNull("settlementRecordId").last(" and DATE_FORMAT(now(), '%Y-%m-%d') = DATE_FORMAT(createTime, '%Y-%m-%d')")); |
| | | BigDecimal total = new BigDecimal(0); |
| | | for (SettlementDetail detail : settlementDetailList) { |
| | | total = total.add(new BigDecimal(detail.getPrice())); |
| | | } |
| | | //日结算 |
| | | if(maxPrice.compareTo(total.doubleValue()) <= 0){ |
| | | SettlementRecord settlementRecord = settlementRecordService.selectOne(new EntityWrapper<SettlementRecord>().eq("driverId", orderLogistics.getDriverId()) |
| | | .eq("type", type1).eq("paymentStatus", 1).last(" and day = DATE_FORMAT(now(), '%Y-%m-%d')")); |
| | | .eq("type", 1).eq("paymentStatus", 1).last(" and day = DATE_FORMAT(now(), '%Y-%m-%d')")); |
| | | if(null == settlementRecord){ |
| | | settlementRecord = new SettlementRecord(); |
| | | settlementRecord.setDay(new Date()); |
| | | settlementRecord.setDriverId(orderLogistics.getDriverId()); |
| | | settlementRecord.setType(type1); |
| | | settlementRecord.setType(1); |
| | | settlementRecord.setPaymentStatus(1); |
| | | settlementRecord.setPayMoney(total.doubleValue()); |
| | | settlementRecord.setInsertTime(new Date()); |
| | |
| | | pay_type_chinese.text(payTypeChinese); |
| | | Element pay_money_chinese = document.getElementById("pay_money_chinese"); |
| | | pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_chinese = document.getElementById("dispute_chinese"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_chinese.remove(); |
| | | } |
| | | Element pdf_chinese = document.getElementById("pdf_chinese"); |
| | | pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); |
| | | Element lost_item_chinese = document.getElementById("lost_item_chinese"); |
| | |
| | | pay_type_english.text(payTypeEnglish); |
| | | Element pay_money_english = document.getElementById("pay_money_english"); |
| | | pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_english = document.getElementById("dispute_english"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_english.remove(); |
| | | } |
| | | Element pdf_english = document.getElementById("pdf_english"); |
| | | pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); |
| | | Element lost_item_english = document.getElementById("lost_item_english"); |
| | |
| | | document.getElementById("english").remove(); |
| | | document.getElementsByTag("title").get(0).text("Reçu"); |
| | | Element title_french = document.getElementById("title_french"); |
| | | title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); |
| | | title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO "); |
| | | 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"); |
| | |
| | | pay_type_french.text(payTypeFrench); |
| | | Element pay_money_french = document.getElementById("pay_money_french"); |
| | | pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_french = document.getElementById("dispute_french"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_french.text("(Remarque: Il s’agit d’une commande contestée, et après des négociations entre trois parties, la plateforme l’a finalement tarifée à GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_french.remove(); |
| | | } |
| | | Element pdf_french = document.getElementById("pdf_french"); |
| | | pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=4"); |
| | | Element lost_item_french = document.getElementById("lost_item_french"); |
| | |
| | | pay_type_chinese.text(payTypeChinese); |
| | | Element pay_money_chinese = document.getElementById("pay_money_chinese"); |
| | | pay_money_chinese.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_chinese = document.getElementById("dispute_chinese"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_chinese.remove(); |
| | | } |
| | | Element pdf_chinese = document.getElementById("pdf_chinese"); |
| | | pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4"); |
| | | Element lost_item_chinese = document.getElementById("lost_item_chinese"); |
| | |
| | | pay_type_english.text(payTypeEnglish); |
| | | Element pay_money_english = document.getElementById("pay_money_english"); |
| | | pay_money_english.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_english = document.getElementById("dispute_english"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_english.remove(); |
| | | } |
| | | Element pdf_english = document.getElementById("pdf_english"); |
| | | pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4"); |
| | | Element lost_item_english = document.getElementById("lost_item_english"); |
| | |
| | | document.getElementById("english").remove(); |
| | | document.getElementsByTag("title").get(0).text("Reçu"); |
| | | Element title_french = document.getElementById("title_french"); |
| | | title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande i-go1 le "); |
| | | title_french.text(DateUtil.conversionFormat(language, sdf2.format(orderLogistics.getTravelTime())) + ",Vous consommez GHS " + orderLogistics.getPayMoney() + " sur votre commande I-GO "); |
| | | 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"); |
| | |
| | | pay_type_french.text(payTypeFrench); |
| | | Element pay_money_french = document.getElementById("pay_money_french"); |
| | | pay_money_french.text("GHS " + new BigDecimal(orderLogistics.getPayMoney()).setScale(2, RoundingMode.HALF_EVEN)); |
| | | Element dispute_french = document.getElementById("dispute_french"); |
| | | if(null != orderLogistics.getIsDispute() && orderLogistics.getIsDispute() == 1){ |
| | | dispute_french.text("(Remarque: Il s’agit d’une commande contestée, et après des négociations entre trois parties, la plateforme l’a finalement tarifée à GHS " + new BigDecimal(orderLogistics.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_french.remove(); |
| | | } |
| | | Element pdf_french = document.getElementById("pdf_french"); |
| | | pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=4"); |
| | | Element lost_item_french = document.getElementById("lost_item_french"); |
| | |
| | | } |
| | | |
| | | OrderLogistics orderLogistics = this.selectById(orderId); |
| | | long timeOutCancel = 0L; |
| | | long driverTimeOut = 0L; |
| | | map.put("driverTimeOutTime", 0); |
| | | map.put("driverTimeOut", 0); |
| | | if(null != orderLogistics.getEstimateArriveTime()){ |
| | | CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderLogistics.getCompanyId())); |
| | | JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent()); |
| | | int driverTimeout = jsonObject.getIntValue("driverTimeout") * 60000; |
| | | timeOutCancel = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout; |
| | | driverTimeOut = orderLogistics.getEstimateArriveTime().getTime(); |
| | | int driverTimeout1 = jsonObject.getIntValue("driverTimeout"); |
| | | long time = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout1 * 60000; |
| | | if(System.currentTimeMillis() > time){ |
| | | Integer driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue(); |
| | | driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime; |
| | | map.put("driverTimeOutTime", driverTimeOutTime); |
| | | map.put("driverTimeOut", 1); |
| | | } |
| | | } |
| | | map.put("driverTimeOut", driverTimeOut); |
| | | map.put("timeOutCancel", timeOutCancel); |
| | | } |
| | | return maps; |
| | | } |
| | |
| | | if(null != map.get("driverId")){ |
| | | companyId = Integer.valueOf(String.valueOf(map.get("companyId"))); |
| | | } |
| | | map.put("timeOutCancel", 0); |
| | | map.put("driverTimeOutTime", 0); |
| | | map.put("driverTimeOut", 0); |
| | | if(null != orderLogistics.getEstimateArriveTime()){ |
| | | CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", companyId)); |
| | | JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent()); |
| | | int driverTimeout = jsonObject.getIntValue("driverTimeout"); |
| | | long timeOutCancel = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout; |
| | | map.put("timeOutCancel", timeOutCancel); |
| | | map.put("driverTimeOut", orderLogistics.getEstimateArriveTime().getTime()); |
| | | int driverTimeout1 = jsonObject.getIntValue("driverTimeout"); |
| | | long time = orderLogistics.getEstimateArriveTime().getTime() + driverTimeout1 * 60000; |
| | | if(System.currentTimeMillis() > time){ |
| | | Integer driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue(); |
| | | driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime; |
| | | map.put("driverTimeOutTime", driverTimeOutTime); |
| | | map.put("driverTimeOut", 1); |
| | | } |
| | | } |
| | | map.put("isDispute", orderLogistics.getIsDispute()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public ResultUtil cancleOrderPrivateCar(Integer id, Integer payType, Integer bankCardId, Integer cancleId, Integer type, Integer language) throws Exception { |
| | | OrderLogistics orderLogistics = this.selectById(id); |
| | | Integer uid = orderLogistics.getUserId(); |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | ResultUtil resultUtil = ResultUtil.success(""); |
| | | |
| | | if(null == orderLogistics){ |
| | | return ResultUtil.error(language == 1 ? "取消订单失败,订单信息有误" : language == 2 ? "Failed to cancel order, order-information error." : "Échec de l’annulation de la commande, erreur d’information de commande.", ""); |
| | | } |
| | |
| | | }else{ |
| | | orderCancel = orderCancelService.selectById(cancleId); |
| | | } |
| | | |
| | | |
| | | Integer uid = orderLogistics.getUserId(); |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | Double amount = orderCancel.getMoney(); |
| | | if(0 < amount){ |
| | | if(payType == 1){//手机支付 |
| | |
| | | Element user_french = document.getElementById("user_french"); |
| | | user_french.text("Bonjour " + userInfo.getNickName() + ","); |
| | | Element time_french = document.getElementById("time_french"); |
| | | time_french.text("Cette promotion est valable du " + DateUtil.conversionFormat(language, sdf.format(id.getStartTime())) + " au " + DateUtil.conversionFormat(language, sdf.format(id.getEndTime())) + ". Veuillez consulter la plateforme i-go pour plus de détails."); |
| | | time_french.text("Cette promotion est valable du " + DateUtil.conversionFormat(language, sdf.format(id.getStartTime())) + " au " + DateUtil.conversionFormat(language, sdf.format(id.getEndTime())) + ". Veuillez consulter la plateforme I-GO pour plus de détails."); |
| | | } |
| | | |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "红包活动" : language == 2 ? "Lucky-promo activities" : "Activités bonus", document.html()); |
| | |
| | | startAddress as startAddress, |
| | | endAddress as endAddress, |
| | | payMoney as payMoney, |
| | | ('打车订单') as orderName, |
| | | ('打车') as orderName, |
| | | if(invoiceId is null, 1, 2) as invoice, |
| | | unix_timestamp(insertTime) as insertTime, |
| | | (1) as orderType |
| | |
| | | c.carColor as carColor, |
| | | CONCAT(f.`name`, " ", d.`name`) as brand, |
| | | ((select sum(fraction) from t_order_evaluate where driverId = a.driverId) / (select count(id) from t_order_evaluate where driverId = a.driverId)) as score, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.driverId and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_taxi where driverId = a.driverId and state in (7, 8, 9)) + |
| | | (select count(id) from t_order_cross_city where driverId = a.driverId and state in (6, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 9)) |
| | | ) as orderNum, |
| | | ( |
| | | (select count(id) from t_order_private_car where driverId = a.driverId and state in (6, 7, 8, 9)) + |
| | | (select count(id) from t_order_logistics where driverId = a.driverId and state in (6, 7, 8, 9)) |
| | | ) as orderNum, |
| | | b.phone as driverPhone, |
| | | if(a.state = 12, (select money from t_order_cancel where orderId = a.id and orderType = 1 and state = 1 order by insertTime desc limit 0, 1), if(a.state = 10, (select money from t_order_cancel where orderId = a.id and orderType = 1 and state = 2 order by insertTime desc limit 0, 1), 0)) as cancelPayMoney, |
| | | if(a.state = 12, (select id from t_order_cancel where orderId = a.id and orderType = 1 and state = 1 order by insertTime desc limit 0, 1), 0) as cancelId, |
| | |
| | | select |
| | | (payMoney * -1) as money, |
| | | DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, |
| | | ('打车订单') as name, |
| | | ('打车') as name, |
| | | UNIX_TIMESTAMP(insertTime) as insertTime |
| | | from t_order_private_car where payMoney != 0 and userId = #{uid} and state in (8, 9, 10, 11, 12) and payType = 3 |
| | | </select> |
| | |
| | | select |
| | | redPacketMoney as money, |
| | | DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as time, |
| | | ('打车订单') as name, |
| | | ('打车') as name, |
| | | UNIX_TIMESTAMP(insertTime) as insertTime |
| | | from t_order_private_car where userId = #{uid} and state in (8, 9) and redPacketId is not null |
| | | </select> |
| | |
| | | */ |
| | | @TableField("estimateArriveMileage") |
| | | private Long estimateArriveMileage; |
| | | /** |
| | | * 是否冻结(1=否,2=是) |
| | | */ |
| | | @TableField("isFrozen") |
| | | private Integer isFrozen; |
| | | /** |
| | | * 争议订单(0=否,1=是) |
| | | */ |
| | | @TableField("isDispute") |
| | | private Integer isDispute; |
| | | } |
| | |
| | | if(null != orderPrivateCar.getDriverId()){ |
| | | aDouble = orderEvaluateService.queryDriverScore(orderPrivateCar.getDriverId()); |
| | | } |
| | | Double aDouble1 = Double.valueOf(orderPrivateCar.getMileage() / 1000); |
| | | Double aDouble1 = new BigDecimal(orderPrivateCar.getMileage()).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | if(1 == language){ |
| | | document.getElementById("english").remove(); |
| | | document.getElementById("french").remove(); |
| | |
| | | pay_type_chinese.text("余额支付"); |
| | | Element pay_money_chinese = document.getElementById("pay_money_chinese"); |
| | | pay_money_chinese.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_chinese = document.getElementById("dispute_chinese"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.getIsDispute() == 1){ |
| | | dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_chinese.remove(); |
| | | } |
| | | Element pdf_chinese = document.getElementById("pdf_chinese"); |
| | | pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=1"); |
| | | Element lost_item_chinese = document.getElementById("lost_item_chinese"); |
| | |
| | | pay_type_english.text("I-GO Wallet"); |
| | | Element pay_money_english = document.getElementById("pay_money_english"); |
| | | pay_money_english.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_english = document.getElementById("dispute_english"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.getIsDispute() == 1){ |
| | | dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_english.remove(); |
| | | } |
| | | Element pdf_english = document.getElementById("pdf_english"); |
| | | pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=1"); |
| | | Element lost_item_english = document.getElementById("lost_item_english"); |
| | |
| | | pay_type_french.text("Portefeuille I-GO"); |
| | | Element pay_money_french = document.getElementById("pay_money_french"); |
| | | pay_money_french.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_french = document.getElementById("dispute_french"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.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(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_french.remove(); |
| | | } |
| | | Element pdf_french = document.getElementById("pdf_french"); |
| | | pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=1"); |
| | | Element lost_item_french = document.getElementById("lost_item_french"); |
| | |
| | | if(null != orderPrivateCar.getDriverId()){ |
| | | aDouble = orderEvaluateService.queryDriverScore(orderPrivateCar.getDriverId()); |
| | | } |
| | | Double aDouble1 = Double.valueOf(orderPrivateCar.getMileage() / 1000); |
| | | Double aDouble1 = new BigDecimal(orderPrivateCar.getMileage()).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | if(1 == language){ |
| | | document.getElementById("english").remove(); |
| | |
| | | pay_type_chinese.text("现金"); |
| | | Element pay_money_chinese = document.getElementById("pay_money_chinese"); |
| | | pay_money_chinese.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_chinese = document.getElementById("dispute_chinese"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.getIsDispute() == 1){ |
| | | dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_chinese.remove(); |
| | | } |
| | | Element pdf_chinese = document.getElementById("pdf_chinese"); |
| | | pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=1"); |
| | | Element lost_item_chinese = document.getElementById("lost_item_chinese"); |
| | |
| | | pay_type_english.text("Cash"); |
| | | Element pay_money_english = document.getElementById("pay_money_english"); |
| | | pay_money_english.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_english = document.getElementById("dispute_english"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.getIsDispute() == 1){ |
| | | dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_english.remove(); |
| | | } |
| | | Element pdf_english = document.getElementById("pdf_english"); |
| | | pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=1"); |
| | | Element lost_item_english = document.getElementById("lost_item_english"); |
| | |
| | | pay_type_french.text("En espèces"); |
| | | Element pay_money_french = document.getElementById("pay_money_french"); |
| | | pay_money_french.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_french = document.getElementById("dispute_french"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.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(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_french.remove(); |
| | | } |
| | | Element pdf_french = document.getElementById("pdf_french"); |
| | | pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + orderId + "&orderType=1"); |
| | | Element lost_item_french = document.getElementById("lost_item_french"); |
| | |
| | | Element user_french = document.getElementById("user_french"); |
| | | user_french.text("Bonjour " + userInfo.getNickName() + ","); |
| | | Element time_french = document.getElementById("time_french"); |
| | | time_french.text("Cette promotion est valable du " + DateUtil.conversionFormat(language, sdf.format(id.getStartTime())) + " au " + DateUtil.conversionFormat(language, sdf.format(id.getEndTime())) + ". Veuillez consulter la plateforme i-go pour plus de détails."); |
| | | time_french.text("Cette promotion est valable du " + DateUtil.conversionFormat(language, sdf.format(id.getStartTime())) + " au " + DateUtil.conversionFormat(language, sdf.format(id.getEndTime())) + ". Veuillez consulter la plateforme I-GO pour plus de détails."); |
| | | } |
| | | |
| | | EmailUtil.send(userInfo.getEmail(), language == 1 ? "红包活动" : language == 2 ? "Lucky-promo activities" : "Activités bonus", document.html()); |
| | |
| | | if(null != orderPrivateCar.getDriverId()){ |
| | | aDouble = orderEvaluateService.queryDriverScore(orderPrivateCar.getDriverId()); |
| | | } |
| | | Double aDouble1 = Double.valueOf(orderPrivateCar.getMileage() / 1000); |
| | | Double aDouble1 = new BigDecimal(orderPrivateCar.getMileage()).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | if(1 == language){ |
| | | document.getElementById("english").remove(); |
| | | document.getElementById("french").remove(); |
| | |
| | | pay_type_chinese.text(orderPrivateCar.getPayType() == 1 ? "手机支付" : (orderPrivateCar.getPayType() == 2?"银行卡支付":(orderPrivateCar.getPayType() == 3?"余额支付":"现金支付"))); |
| | | Element pay_money_chinese = document.getElementById("pay_money_chinese"); |
| | | pay_money_chinese.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_chinese = document.getElementById("dispute_chinese"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.getIsDispute() == 1){ |
| | | dispute_chinese.text("(注意: 争议订单,经过三方协商,平台最终定价为 GHS" + new BigDecimal(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_chinese.remove(); |
| | | } |
| | | Element pdf_chinese = document.getElementById("pdf_chinese"); |
| | | pdf_chinese.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=1"); |
| | | Element lost_item_chinese = document.getElementById("lost_item_chinese"); |
| | |
| | | pay_type_english.text(orderPrivateCar.getPayType() == 1 ? "Mobile money" :(orderPrivateCar.getPayType() == 2?"Bank card":(orderPrivateCar.getPayType() == 3?"I-GO Wallet":"Cash"))); |
| | | Element pay_money_english = document.getElementById("pay_money_english"); |
| | | pay_money_english.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_english = document.getElementById("dispute_english"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.getIsDispute() == 1){ |
| | | dispute_english.text("(Note: Disputed order, after tripartite negotiation, the final pricing of the platform is GHS " + new BigDecimal(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_english.remove(); |
| | | } |
| | | Element pdf_english = document.getElementById("pdf_english"); |
| | | pdf_english.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=1"); |
| | | Element lost_item_english = document.getElementById("lost_item_english"); |
| | |
| | | pay_type_french.text(orderPrivateCar.getPayType() == 1 ? "Argent mobile" : (orderPrivateCar.getPayType() == 2?"Carte bancaire":(orderPrivateCar.getPayType() == 3?"Portefeuille I-GO":"En espèces"))); |
| | | Element pay_money_french = document.getElementById("pay_money_french"); |
| | | pay_money_french.text("GHS " + new BigDecimal(orderPrivateCar.getPayMoney()).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Element dispute_french = document.getElementById("dispute_french"); |
| | | if(null != orderPrivateCar.getIsDispute() && orderPrivateCar.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(orderPrivateCar.getOrderMoney()).setScale(2, RoundingMode.HALF_EVEN) + ")"); |
| | | }else{ |
| | | dispute_french.remove(); |
| | | } |
| | | Element pdf_french = document.getElementById("pdf_french"); |
| | | pdf_french.attr("href", "http://182.160.16.251:80/user/base/order/uploadReceiptPdf?orderId=" + id + "&orderType=1"); |
| | | Element lost_item_french = document.getElementById("lost_item_french"); |
| | |
| | | } |
| | | |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarMapper.selectById(orderId); |
| | | long timeOutCancel = 0L; |
| | | if(null != orderPrivateCar.getEstimateArriveTime()){ |
| | | CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderPrivateCar.getCompanyId())); |
| | | JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent()); |
| | | int driverTimeout = jsonObject.getIntValue("driverTimeout") * 60000; |
| | | if(orderPrivateCar.getOrderType() == 1){ |
| | | timeOutCancel = orderPrivateCar.getEstimateArriveTime().getTime() + driverTimeout; |
| | | }else{ |
| | | timeOutCancel = orderPrivateCar.getTravelTime().getTime() + driverTimeout; |
| | | Integer driverTimeOutTime = 0; |
| | | Integer driverTimeOut = 0; |
| | | CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", orderPrivateCar.getCompanyId())); |
| | | JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent()); |
| | | int driverTimeout1 = jsonObject.getIntValue("driverTimeout"); |
| | | if(orderPrivateCar.getOrderType() == 1 && null != orderPrivateCar.getEstimateArriveTime()){ |
| | | long time = orderPrivateCar.getEstimateArriveTime().getTime() + driverTimeout1 * 60000L; |
| | | if(System.currentTimeMillis() > time){ |
| | | driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue(); |
| | | driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime; |
| | | driverTimeOut = 1; |
| | | } |
| | | }else{ |
| | | long time = orderPrivateCar.getTravelTime().getTime() + driverTimeout1 * 60000L; |
| | | if(System.currentTimeMillis() >= time){ |
| | | driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue(); |
| | | driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime; |
| | | driverTimeOut = 1; |
| | | } |
| | | } |
| | | map.put("timeOutCancel", timeOutCancel); |
| | | |
| | | map.put("driverTimeOutTime", driverTimeOutTime); |
| | | map.put("driverTimeOut", driverTimeOut); |
| | | } |
| | | return maps; |
| | | } |
| | |
| | | endTime = dateUtil.getStartOrEndDate(endTime, "end"); |
| | | List<Map<String, Object>> list = orderPrivateCarMapper.queryInvoiceOrder(type, startTime, endTime, startMoney, endMoney, uid); |
| | | for (Map<String, Object> map : list) { |
| | | map.put("orderName", language == 1 ? "打车订单" : language == 2 ? "Ride" : "Course"); |
| | | map.put("orderName", language == 1 ? "打车" : language == 2 ? "Ride" : "Course"); |
| | | if(null != map.get("time")){ |
| | | String time = map.get("time").toString(); |
| | | map.put("time", DateUtil.conversionFormat(language, time)); |
| | |
| | | companyId = Integer.valueOf(String.valueOf(map.get("companyId"))); |
| | | } |
| | | |
| | | long timeOutCancel = 0L; |
| | | long driverTimeOut = 0L; |
| | | Integer driverTimeOutTime = 0; |
| | | Integer driverTimeOut = 0; |
| | | CancleOrder cancleOrder = cancleOrderService.selectOne(new EntityWrapper<CancleOrder>().eq("companyId", companyId)); |
| | | JSONObject jsonObject = JSON.parseObject(cancleOrder.getContent()); |
| | | int driverTimeout = jsonObject.getIntValue("driverTimeout") * 60000; |
| | | int driverTimeout1 = jsonObject.getIntValue("driverTimeout"); |
| | | if(orderPrivateCar.getOrderType() == 1 && null != orderPrivateCar.getEstimateArriveTime()){ |
| | | timeOutCancel = orderPrivateCar.getEstimateArriveTime().getTime() + driverTimeout; |
| | | driverTimeOut = orderPrivateCar.getEstimateArriveTime().getTime(); |
| | | long time = orderPrivateCar.getEstimateArriveTime().getTime() + driverTimeout1 * 60000L; |
| | | if(System.currentTimeMillis() > time){ |
| | | driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue(); |
| | | driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime; |
| | | driverTimeOut = 1; |
| | | } |
| | | }else{ |
| | | timeOutCancel = orderPrivateCar.getTravelTime().getTime() + driverTimeout; |
| | | driverTimeOut = orderPrivateCar.getTravelTime().getTime(); |
| | | long time = orderPrivateCar.getTravelTime().getTime() + driverTimeout1 * 60000L; |
| | | if(System.currentTimeMillis() >= time){ |
| | | driverTimeOutTime = Double.valueOf((System.currentTimeMillis() - time) / 60000).intValue(); |
| | | driverTimeOutTime = driverTimeOutTime == 0 ? 1 : driverTimeOutTime; |
| | | driverTimeOut = 1; |
| | | } |
| | | } |
| | | |
| | | map.put("timeOutCancel", timeOutCancel); |
| | | map.put("driverTimeOutTime", driverTimeOutTime); |
| | | map.put("driverTimeOut", driverTimeOut); |
| | | map.put("isDispute", orderPrivateCar.getIsDispute()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | public List<Map<String, Object>> queryRedEnvelope(Integer language, Integer uid) throws Exception { |
| | | List<Map<String, Object>> list = orderPrivateCarMapper.queryRedEnvelope(uid); |
| | | for (Map<String, Object> map : list) { |
| | | map.put("name", language == 1 ? "打车订单" : language == 2 ? "Ride" : "Course"); |
| | | map.put("name", language == 1 ? "打车" : language == 2 ? "Ride" : "Course"); |
| | | if(null != map.get("time")){ |
| | | String time = map.get("time").toString(); |
| | | map.put("time", DateUtil.conversionFormat(language, time)); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.CityCopy; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/19 11:59 |
| | | */ |
| | | public interface CityCopyMapper extends BaseMapper<CityCopy> { |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.CityCopyMapper"> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | select driverId from t_driver_work where startTime < now() and state = 1 and `type` like CONCAT('%', #{type}, '%') |
| | | ) |
| | | and id in (select driverId from t_driver_orders where `type` = #{type}) |
| | | and id not in (select driverId from t_settlement_record where paymentStatus = 1) |
| | | and carId in (select carId from t_car_service where `type` = #{type} |
| | | |
| | | <if test="null != serverCarModelId"> |
| | | and serverCarModelId = #{serverCarModelId} |
| | | </if> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 城市 |
| | | */ |
| | | @Data |
| | | @TableName("t_city_copy") |
| | | public class CityCopy { |
| | | //主键 |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | @TableField("pid") |
| | | private Integer pid; |
| | | //中文名称 |
| | | @TableField("chineseName") |
| | | private String chineseName; |
| | | //英文名称 |
| | | @TableField("englishName") |
| | | private String englishName; |
| | | //法文名称 |
| | | @TableField("frenchName") |
| | | private String frenchName; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.CityCopy; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/19 11:58 |
| | | */ |
| | | public interface ICityCopyService extends IService<CityCopy> { |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.CityCopyMapper; |
| | | import com.stylefeng.guns.modular.system.model.CityCopy; |
| | | import com.stylefeng.guns.modular.system.service.ICityCopyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/19 11:59 |
| | | */ |
| | | @Service |
| | | public class CityCopyServiceImpl extends ServiceImpl<CityCopyMapper, CityCopy> implements ICityCopyService { |
| | | } |
| | |
| | | @Override |
| | | public List<Map<String, Object>> queryWithdrawal(Integer uid, Integer pageNum, Integer size, Integer state, Integer language) throws Exception { |
| | | pageNum = (pageNum - 1) * size; |
| | | String name = language == 1 ? "手机号:" : language == 2 ? "Phone number:" : "Numéro de portable:"; |
| | | String name = language == 1 ? "手机号" : language == 2 ? "Mobile Money" : "Argent mobile"; |
| | | List<Map<String, Object>> list = withdrawalMapper.queryWithdrawal(uid, 1, state, pageNum, size); |
| | | for (Map<String, Object> map : list) { |
| | | map.put("name", name + map.get("code")); |
| | | map.put("name", name + "(" + map.get("code") + ")"); |
| | | if(null != map.get("insertTime")){ |
| | | String insertTime = map.get("insertTime").toString(); |
| | | map.put("insertTime", DateUtil.conversionFormat(language, insertTime)); |
| | |
| | | @ApiModelProperty("司机接单时间") |
| | | private String snatchOrderTime; |
| | | @ApiModelProperty("司机超时时间") |
| | | private Long driverTimeOut; |
| | | @ApiModelProperty("超时取消时间") |
| | | private Long timeOutCancel; |
| | | private Integer driverTimeOutTime; |
| | | @ApiModelProperty("司机是否超时(0=否,1=是)") |
| | | private Integer driverTimeOut; |
| | | private String tripId; |
| | | private List<OrderPosition> orderPositionList; |
| | | @ApiModelProperty("争议订单(0=否,1=是)") |
| | | private Integer isDispute; |
| | | |
| | | public static OrderInfoWarpper getOrderInfoWarpper(Map<String, Object> map){ |
| | | OrderInfoWarpper orderInfoWarpper = new OrderInfoWarpper(); |
| | |
| | | orderInfoWarpper.setPayType(null != map.get("payType") ? Integer.valueOf(map.get("payType").toString()) : 4); |
| | | orderInfoWarpper.setReceipt(null != map.get("receipt") ? map.get("receipt").toString() : ""); |
| | | orderInfoWarpper.setIsFrozen(null != map.get("isFrozen") ? Integer.valueOf(map.get("isFrozen").toString()) : 1); |
| | | orderInfoWarpper.setTimeOutCancel(null != map.get("timeOutCancel") ? Long.valueOf(map.get("timeOutCancel").toString()) : 0L); |
| | | orderInfoWarpper.setDriverTimeOut(null != map.get("driverTimeOut") ? Long.valueOf(map.get("driverTimeOut").toString()) : 0L); |
| | | orderInfoWarpper.setDriverTimeOutTime(null != map.get("driverTimeOutTime") ? Integer.valueOf(map.get("driverTimeOutTime").toString()) : 0); |
| | | orderInfoWarpper.setDriverTimeOut(null != map.get("driverTimeOut") ? Integer.valueOf(map.get("driverTimeOut").toString()) : 0); |
| | | orderInfoWarpper.setSnatchOrderTime(null != map.get("snatchOrderTime") ? map.get("snatchOrderTime").toString() : ""); |
| | | orderInfoWarpper.setPriceDifference(null != map.get("priceDifference") ? Double.valueOf(map.get("priceDifference").toString()) : 0); |
| | | orderInfoWarpper.setTripId(null != map.get("tripId") ? map.get("tripId").toString() : ""); |
| | | orderInfoWarpper.setIsDispute(null != map.get("isDispute") ? Integer.valueOf(map.get("isDispute").toString()) : 0); |
| | | } |
| | | if(orderInfoWarpper.getState()==7){ |
| | | orderInfoWarpper.setOrderMoney(orderInfoWarpper.getOrderMoney()-orderInfoWarpper.getDiscountMoney()); |
| | |
| | | private Integer cancelMidway; |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | @ApiModelProperty("超时取消时间") |
| | | private Long timeOutCancel; |
| | | @ApiModelProperty("司机超时时间") |
| | | private Long driverTimeOut; |
| | | private Integer driverTimeOutTime; |
| | | |
| | | @ApiModelProperty("司机是否超时(0=否,1=是)") |
| | | private Integer driverTimeOut; |
| | | |
| | | private String tripId; |
| | | |
| | |
| | | this.receipt = receipt; |
| | | } |
| | | |
| | | public Long getTimeOutCancel() { |
| | | return timeOutCancel; |
| | | public Integer getDriverTimeOutTime() { |
| | | return driverTimeOutTime; |
| | | } |
| | | |
| | | public void setTimeOutCancel(Long timeOutCancel) { |
| | | this.timeOutCancel = timeOutCancel; |
| | | public void setDriverTimeOutTime(Integer driverTimeOutTime) { |
| | | this.driverTimeOutTime = driverTimeOutTime; |
| | | } |
| | | |
| | | public Long getDriverTimeOut() { |
| | | public Integer getDriverTimeOut() { |
| | | return driverTimeOut; |
| | | } |
| | | |
| | | public void setDriverTimeOut(Long driverTimeOut) { |
| | | public void setDriverTimeOut(Integer driverTimeOut) { |
| | | this.driverTimeOut = driverTimeOut; |
| | | } |
| | | |
| | |
| | | orderWarpper.setCancelMidway(null != map.get("cancelMidway") ? Integer.valueOf(String.valueOf(map.get("cancelMidway"))) : 0); |
| | | orderWarpper.setTripId(null != map.get("tripId") ? String.valueOf(map.get("tripId")) : ""); |
| | | orderWarpper.setRemark(null != map.get("remark") ? String.valueOf(map.get("remark")) : ""); |
| | | orderWarpper.setTimeOutCancel(null != map.get("timeOutCancel") ? Long.valueOf(String.valueOf(map.get("timeOutCancel"))) : 0); |
| | | orderWarpper.setDriverTimeOut(null != map.get("driverTimeOut") ? Long.valueOf(String.valueOf(map.get("driverTimeOut"))) : 0); |
| | | orderWarpper.setDriverTimeOutTime(null != map.get("driverTimeOutTime") ? Integer.valueOf(String.valueOf(map.get("driverTimeOutTime"))) : 0); |
| | | orderWarpper.setDriverTimeOut(null != map.get("driverTimeOut") ? Integer.valueOf(String.valueOf(map.get("driverTimeOut"))) : 0); |
| | | list.add(orderWarpper); |
| | | } |
| | | } |