| | |
| | | } |
| | | @RequestMapping(value = "/updateAuth") |
| | | @ResponseBody |
| | | public Object updateAuth(TCar tCar,String zcModel,@RequestParam String serverBox) { |
| | | public Object updateAuth(TCar tCar,String zcModel,String xjModel,@RequestParam String serverBox) { |
| | | //添加经营业务 |
| | | if(tCar.getAuthState()==2){ |
| | | //删除业务 |
| | | tCarServiceService.delete(new EntityWrapper<TCarService>().eq("carId",tCar.getId())); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TCarService tCarService = tCarServiceService.selectOne(new EntityWrapper<TCarService>().eq("carId", tCar.getId()).eq("type", Integer.valueOf(serverArray[i]))); |
| | | if(null == tCarService){ |
| | | tCarService = new TCarService(); |
| | | tCarService.setCarId(tCar.getId()); |
| | | tCarService.setType(Integer.valueOf(serverArray[i])); |
| | | if (1 == tCarService.getType()){ |
| | | tCarService.setServerCarModelId(Integer.valueOf(zcModel)); |
| | | } |
| | | tCarServiceService.insert(tCarService); |
| | | }else{ |
| | | if (1 == tCarService.getType()){ |
| | | tCarService.setServerCarModelId(Integer.valueOf(zcModel)); |
| | | } |
| | | tCarServiceService.updateById(tCarService); |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(tCar.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | if (1 == service.getType()){ |
| | | service.setServerCarModelId(Integer.valueOf(zcModel)); |
| | | }else if (4 == service.getType()){ |
| | | service.setServerCarModelId(Integer.valueOf(xjModel)); |
| | | } |
| | | |
| | | |
| | | tCarServiceService.insert(service); |
| | | } |
| | | |
| | | } |
| | | tCarService.updateById(tCar); |
| | | tCar = tCarService.selectById(tCar.getId()); |
| | |
| | | if(2 == finalTCar.getAuthState()){ |
| | | car_audit1_content.text("You vehicle application has been approved. See the I-GO platform for details."); |
| | | }else{ |
| | | car_audit1_content.text("Sorry, your vehicle application was not approved. The reason for the failure is: incomplete filling of vehicle information."); |
| | | car_audit1_content.text("We are sorry to inform you that your vehicle application was rejected. Please contact our service for relevant details, call 0577777767 or send e-mail to support@i-go.group"); |
| | | } |
| | | EmailUtil.send(tDriver.getEmail(), 2 == finalTCar.getAuthState() ? "Vehicle is verified and qualified" : "Vehicle is not verified and qualified", document.html()); |
| | | }catch (Exception e){ |