|
|
@@ -5,19 +5,14 @@ import com.railway.business.catenary.service.IBusJcebLbjghjlService;
|
|
|
import com.railway.common.core.controller.BaseController;
|
|
|
import com.railway.common.core.domain.AjaxResult;
|
|
|
import com.railway.common.core.page.TableDataInfo;
|
|
|
+import com.railway.system.service.ISysFileService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-import java.util.List;
|
|
|
-import javax.validation.Valid;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @author fenghao
|
|
|
@@ -29,9 +24,11 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
public class BusJcebLbjghjlController extends BaseController {
|
|
|
|
|
|
private final IBusJcebLbjghjlService busJcbLbjghjlService;
|
|
|
+ private final ISysFileService sysFileService;
|
|
|
|
|
|
- public BusJcebLbjghjlController(IBusJcebLbjghjlService busJcbLbjghjlService) {
|
|
|
+ public BusJcebLbjghjlController(IBusJcebLbjghjlService busJcbLbjghjlService, ISysFileService sysFileService) {
|
|
|
this.busJcbLbjghjlService = busJcbLbjghjlService;
|
|
|
+ this.sysFileService = sysFileService;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增")
|
|
|
@@ -69,6 +66,13 @@ public class BusJcebLbjghjlController extends BaseController {
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "导出excel")
|
|
|
+ @GetMapping(value = "exportExcel")
|
|
|
+ public AjaxResult exportExcel(BusJcebLbjghjl busJcebLbjghjl) {
|
|
|
+ String localFilePath = busJcbLbjghjlService.exportExcel(busJcebLbjghjl);
|
|
|
+ return sysFileService.uploadFile(localFilePath);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "提交")
|
|
|
@PutMapping("/submit")
|
|
|
public AjaxResult submit(@RequestBody BusJcebLbjghjl busJcebLbjghjl) {
|