|  |  |  | 
|---|
|  |  |  | import com.doumee.config.annotation.CloudRequiredPermission; | 
|---|
|  |  |  | import com.doumee.core.annotation.excel.ExcelExporter; | 
|---|
|  |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageData; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Cars; | 
|---|
|  |  |  | import com.doumee.service.business.CarsService; | 
|---|
|  |  |  | import com.doumee.service.business.ParkBookService; | 
|---|
|  |  |  | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; | 
|---|
|  |  |  | import io.swagger.annotations.*; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private CarsService carsService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ParkBookService parkBookService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @CloudRequiredPermission("business:cars:create") | 
|---|
|  |  |  | public ApiResponse<String> importExcel (@ApiParam(value = "file") MultipartFile file, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | return ApiResponse.success(carsService.importBatch(file,this.getLoginUser(token))); | 
|---|
|  |  |  | List<Cars> carsList = carsService.importBatch(file,this.getLoginUser(token)); | 
|---|
|  |  |  | //异步更新车辆授权数据 | 
|---|
|  |  |  | carsService.dealCarsAuthBiz(carsList); | 
|---|
|  |  |  | return ApiResponse.success("导入成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|