| | |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.DistancematrixVo; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.FleetEngineUtil; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.GoogleMapUtil; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.ReverseGeocodeVo; |
| | | import com.stylefeng.guns.modular.system.util.Tingg.TinggPayUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IRedEnvelopePaymentSettingsService redEnvelopePaymentSettingsService; |
| | | |
| | | @Autowired |
| | | private FleetEngineUtil fleetEngineUtil; |
| | | |
| | | @Resource |
| | | private CarModelMapper carModelMapper; |
| | | |
| | | @Autowired |
| | | private ICarService carService; |
| | | |
| | | |
| | | |
| | |
| | | orderPrivateCar.setIsReassign(1); |
| | | orderPrivateCar.setIsDelete(1); |
| | | this.insert(orderPrivateCar); |
| | | |
| | | |
| | | Integer vehicleId = null; |
| | | if(null != orderPrivateCar.getDriverId()){ |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | vehicleId = driver.getCarId(); |
| | | //查询车辆信息,没有则创建信息 |
| | | String vehicles = fleetEngineUtil.getVehicles(vehicleId); |
| | | if(ToolUtil.isEmpty(vehicles)){ |
| | | Car car = carService.selectById(vehicleId); |
| | | CarModel carModel = carModelMapper.selectById(car.getCarModelId()); |
| | | fleetEngineUtil.createVehicles(carModel.getSeat() - 1, car.getCarLicensePlate(), driver.getCarId()); |
| | | fleetEngineUtil.updateVehicles("ONLINE", carModel.getSeat() - 1, car.getCarLicensePlate(), driver.getCarId()); |
| | | } |
| | | |
| | | } |
| | | //创建行程数据 |
| | | fleetEngineUtil.createTrip(vehicleId, 1, 1, orderPrivateCar.getId(), |
| | | orderPrivateCar.getStartLat().toString(), orderPrivateCar.getStartLon().toString(), orderPrivateCar.getEndLat().toString(), orderPrivateCar.getEndLon().toString()); |
| | | |
| | | |
| | | if(orderSource == 2){//扫码下单 |
| | | new Thread(new Runnable() { |
| | |
| | | driver.setState(2); |
| | | driverService.updateById(driver); |
| | | } |
| | | |
| | | //修改行程信息 |
| | | fleetEngineUtil.updateTrip("CANCELED", null, null, 1, orderPrivateCar.getId(), null, null, null, null); |
| | | |
| | | |
| | | //添加消息 |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功取消出行订单,谢谢使用!" : language == 2 ? "You've cancelled the ride order successfully, thank you for using I-GO " : "Vous avez annulé la commande de course avec succès, merci d’utiliser I-GO", orderPrivateCar.getUserId(), 1); |
| | |
| | | //计算优惠券 |
| | | UserCouponRecord userCouponRecord = null; |
| | | if(null != couponId){ |
| | | //TODO 待翻译 |
| | | if(null != redDeduction && 1 == redDeduction){ |
| | | return ResultUtil.error(language == 1 ? "优惠券和红包不能同时使用" : language == 2 ? "" : "", ""); |
| | | return ResultUtil.error(language == 1 ? "优惠券和红包不能同时使用" : language == 2 ? "Coupons and lucky-promo cannot be used at the same time." : "Les coupons et les bonus ne peuvent pas être utilisés en même temps", ""); |
| | | } |
| | | userCouponRecord = userCouponRecordService.selectById(couponId); |
| | | if(!userCouponRecord.getCompanyId().equals(orderPrivateCar.getCompanyId())){ |
| | |
| | | query.setRedPacketActivityId(id.getId()); |
| | | userRedPacketRecordService.updateById(query); |
| | | |
| | | // todo 待翻译 |
| | | String content = 1 == language ? ("您收到一个额度为GHS " + money + " 的红包,请查收") : 2 == language ? "" : ""; |
| | | String content = 1 == language ? ("您收到一个额度为GHS " + money + " 的红包,请查收") : 2 == language ? "You have received a lucky promo of GHS " + money + ", please check" : "Vous avez reçu un bonus de GHS " + money + ", veuillez vérifier"; |
| | | systemNoticeService.addSystemNotice(1, content, query.getUserId(), 1); |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(orderPrivateCar.getUserId()); |