| | |
| | | */ |
| | | @Override |
| | | public ResultUtil addCar(Integer modelId, String color, String licensePlate, Date time, String drivingLicenseNumber, String drivingLicensePhoto, String drivingLicenseEndTime, |
| | | String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid,Integer id, String peopleAndCarsPhone) throws Exception { |
| | | String carPhoto, String insurancePhoto, String commercialInsuranceTime, Integer uid,Integer id, String peopleAndCarsPhone, Integer language) throws Exception { |
| | | |
| | | Car query = carMapper.query(licensePlate); |
| | | if(id==null){ |
| | | if(null != query){ |
| | | return ResultUtil.error("车牌号已经使用"); |
| | | return ResultUtil.error(language == 1 ? "车牌号已经使用" : language == 2 ? "License plate number has been used" : "Plaque d’immatriculation déjà utilisée"); |
| | | } |
| | | }else{ |
| | | if(null != query && !id.equals(query.getId())){ |
| | | return ResultUtil.error("车牌号已经使用"); |
| | | return ResultUtil.error(language == 1 ? "车牌号已经使用" : language == 2 ? "License plate number has been used" : "Plaque d’immatriculation déjà utilisée"); |
| | | } |
| | | } |
| | | |