| | |
| | | import com.ruoyi.approve.pojo.KnowledgeBase; |
| | | import com.ruoyi.approve.pojo.RpaProcessAutomation; |
| | | import com.ruoyi.approve.service.KnowledgeBaseService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/knowledgeBase") |
| | | @AllArgsConstructor |
| | | @Api(tags = "知识库管理") |
| | | public class KnowledgeBaseController { |
| | | @Autowired |
| | | private KnowledgeBaseService knowledgeBaseService; |
| | |
| | | return AjaxResult.success(knowledgeBaseService.removeByIds(ids)); |
| | | } |
| | | |
| | | @ApiOperation(value = "知识库管理导出") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | List<KnowledgeBase> accountExpenses = knowledgeBaseService.list(); |
| | | ExcelUtil<KnowledgeBase> util = new ExcelUtil<KnowledgeBase>(KnowledgeBase.class); |
| | | util.exportExcel(response, accountExpenses, "知识库管理导出"); |
| | | } |
| | | |
| | | } |