| | |
| | | import com.ycl.domain.excel.ProjectExcelTemplate; |
| | | import com.ycl.domain.form.DocumentInfoForm; |
| | | import com.ycl.domain.form.ProjectInfoForm; |
| | | import com.ycl.domain.query.ProjectExportQuery; |
| | | import com.ycl.domain.query.ProjectInfoQuery; |
| | | import com.ycl.service.ProjectInfoService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | // @PreAuthorize("hasAuthority('projectInfo:del')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | public Result removeById(@PathVariable("id") Long id) { |
| | | return projectInfoService.removeById(id); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/export/template") |
| | | public void exportTemplate(HttpServletResponse response, |
| | | @RequestBody List<String> fieldList |
| | | ) throws IOException { |
| | | public void exportTemplate(HttpServletResponse response) throws IOException { |
| | | List<String> fieldList = new ArrayList<>(); |
| | | OutputExcelUtils.export(response, "导入模板", "项目信息", null, ProjectExcelTemplate.class ,fieldList); |
| | | } |
| | | |
| | | /** |
| | | * 项目导出 |
| | | * @param response |
| | | * @throws IOException |
| | | */ |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ProjectExportQuery query) throws IOException { |
| | | projectInfoService.export(response, query); |
| | | } |
| | | } |