| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.vo.CategoryDcaProblemDto; |
| | | import com.doumee.service.business.CategoryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.io.File; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public void exportExcel (@RequestBody PageWrap<Category> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Category.class).export(categoryService.findPage(pageWrap).getRecords(), "分类信息表", response); |
| | | } |
| | | @ApiOperation("导出DCAExcel") |
| | | @PostMapping("/exportDcaExcel") |
| | | @EncryptionReq |
| | | @RequiresPermissions("business:category:exportExcel") |
| | | public void exportDcaExcel (@RequestBody Category pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(CategoryDcaProblemDto.class).export(categoryService.findListForDca(pageWrap), "DCA事件主题和观察项配置_"+System.currentTimeMillis(), response); |
| | | } |
| | | |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | |
| | | public ApiResponse<List<Category>> tree (@RequestBody Category param){ |
| | | return ApiResponse.success(categoryService.treeList(param)); |
| | | } |
| | | |
| | | @ApiOperation(value = "DCA主题和观察项信息导入" ,notes = "保单申请") |
| | | @PostMapping("/importDcaExcel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | }) |
| | | @RequiresPermissions("business:member:create") |
| | | public ApiResponse<String> imporimportDcaExceltExcel (@ApiParam(value = "file") MultipartFile file ) { |
| | | return ApiResponse.success(categoryService.importDcaBatch(file)); |
| | | } |
| | | } |