| | |
| | | public ResultUtil placeOrderPackage(String remark, String placementLon, String placementLat, String startLon, String startLat, String startAddress, |
| | | String recipient, String recipientPhone, String endLon, String endLat, String endAddress, |
| | | Integer serverCarModelId, Integer driverId, Integer orderSource, Integer uid, Integer language) throws Exception { |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | if(ToolUtil.isEmpty(userInfo.getPhone())){ |
| | | return ResultUtil.error(language == 1 ? "请先绑定手机号码" : language == 2 ? "Please bind your mobile phone number first." : "Veuillez d’abord vous inscrire en liant votre numéro de téléphone portable."); |
| | | } |
| | | String[] split1 = placementLon.split(","); |
| | | Company company = companyCityService.query1(uid, split1[0], split1[1]); |
| | | if(null != userInfo && null != company){ |
| | | userInfo.setCompanyId(company.getId()); |
| | | userInfoService.updateById(userInfo); |
| | | } |
| | | /** |
| | | * 1.下了即时单就不能下预约单和即时单 |
| | | * 2.下了预约单和再下一张即时单不能再下预约单 |
| | |
| | | return ResultUtil.error(language == 1 ? "请选择服务车型" : language == 2 ? "Please select vehicle-type" : "Veuillez sélectionner le type de véhicule"); |
| | | } |
| | | |
| | | userInfo.setLanguage(language); |
| | | userInfoService.updateById(userInfo); |
| | | OrderLogistics orderLogistics = new OrderLogistics(); |
| | | orderLogistics.setType(4); |
| | | orderLogistics.setUserId(uid); |
| | |
| | | Long distance1 = distancematrix1.getDistance(); |
| | | orderLogistics.setEstimatedMileage(new BigDecimal(distance1).divide(new BigDecimal(1000)).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); |
| | | this.insert(orderLogistics); |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(uid); |
| | | userInfo.setLanguage(language); |
| | | userInfoService.updateById(userInfo); |
| | | |
| | | //google创建车辆信息 |
| | | String vehicleId = null; |