|
@@ -1,40 +1,30 @@
|
|
|
package com.doc.biz.controller;
|
|
|
|
|
|
-import java.util.List;
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.PutMapping;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.doc.biz.domain.DocDirLevel;
|
|
|
+import com.doc.biz.service.IDocDirLevelService;
|
|
|
import com.doc.common.annotation.Log;
|
|
|
import com.doc.common.core.controller.BaseController;
|
|
|
import com.doc.common.core.domain.AjaxResult;
|
|
|
-import com.doc.common.enums.BusinessType;
|
|
|
-import com.doc.biz.domain.DocDirLevel;
|
|
|
-import com.doc.biz.service.IDocDirLevelService;
|
|
|
-import com.doc.common.utils.poi.ExcelUtil;
|
|
|
import com.doc.common.core.page.TableDataInfo;
|
|
|
+import com.doc.common.enums.BusinessType;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 文档目录加密级别Controller
|
|
|
- *
|
|
|
+ *
|
|
|
* @author wukai
|
|
|
* @date 2023-10-19
|
|
|
*/
|
|
|
-@Api(tags="文档目录加密级别")
|
|
|
+@Api(tags = "文档目录加密级别")
|
|
|
@RestController
|
|
|
@RequestMapping("/biz/level")
|
|
|
-public class DocDirLevelController extends BaseController
|
|
|
-{
|
|
|
+public class DocDirLevelController extends BaseController {
|
|
|
@Resource
|
|
|
private IDocDirLevelService docDirLevelService;
|
|
|
|
|
@@ -42,73 +32,71 @@ public class DocDirLevelController extends BaseController
|
|
|
* 查询文档目录加密级别列表
|
|
|
*/
|
|
|
@ApiOperation("查询文档目录加密级别列表")
|
|
|
- @PreAuthorize("@ss.hasPermi('biz:level:list')")
|
|
|
+// @PreAuthorize("@ss.hasPermi('biz:level:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(DocDirLevel docDirLevel)
|
|
|
- {
|
|
|
+ public TableDataInfo list(DocDirLevel docDirLevel) {
|
|
|
startPage();
|
|
|
List<DocDirLevel> list = docDirLevelService.selectDocDirLevelList(docDirLevel);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 导出文档目录加密级别列表
|
|
|
+ * 修改文档目录加密级别
|
|
|
*/
|
|
|
- @ApiOperation("导出文档目录加密级别列表")
|
|
|
- @PreAuthorize("@ss.hasPermi('biz:level:export')")
|
|
|
- @Log(title = "文档目录加密级别", businessType = BusinessType.EXPORT)
|
|
|
- @PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, DocDirLevel docDirLevel)
|
|
|
- {
|
|
|
- List<DocDirLevel> list = docDirLevelService.selectDocDirLevelList(docDirLevel);
|
|
|
- ExcelUtil<DocDirLevel> util = new ExcelUtil<DocDirLevel>(DocDirLevel.class);
|
|
|
- util.exportExcel(response, list, "文档目录加密级别数据");
|
|
|
+ @ApiOperation("修改文档目录加密级别")
|
|
|
+ @PreAuthorize("@ss.hasPermi('biz:level:edit')")
|
|
|
+ @Log(title = "文档目录加密级别", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody List<DocDirLevel> docDirLevel) {
|
|
|
+ return toAjax(docDirLevelService.updateDocDirLevel(docDirLevel));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取文档目录加密级别详细信息
|
|
|
*/
|
|
|
@ApiOperation("获取文档目录加密级别详细信息")
|
|
|
- @PreAuthorize("@ss.hasPermi('biz:level:query')")
|
|
|
- @GetMapping(value = "/{levelId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("levelId") Long levelId)
|
|
|
- {
|
|
|
- return success(docDirLevelService.selectDocDirLevelByLevelId(levelId));
|
|
|
+// @PreAuthorize("@ss.hasPermi('biz:level:query')")
|
|
|
+ @GetMapping(value = "/{levelCode}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("levelCode") String levelCode) {
|
|
|
+ return success(docDirLevelService.selectDocDirLevelByLevelCode(levelCode));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
- * 新增文档目录加密级别
|
|
|
+ * 导出文档目录加密级别列表
|
|
|
*/
|
|
|
- @ApiOperation("新增文档目录加密级别")
|
|
|
- @PreAuthorize("@ss.hasPermi('biz:level:add')")
|
|
|
- @Log(title = "文档目录加密级别", businessType = BusinessType.INSERT)
|
|
|
- @PostMapping
|
|
|
- public AjaxResult add(@RequestBody DocDirLevel docDirLevel)
|
|
|
- {
|
|
|
- return toAjax(docDirLevelService.insertDocDirLevel(docDirLevel));
|
|
|
- }
|
|
|
+// @ApiOperation("导出文档目录加密级别列表")
|
|
|
+// @PreAuthorize("@ss.hasPermi('biz:level:export')")
|
|
|
+// @Log(title = "文档目录加密级别", businessType = BusinessType.EXPORT)
|
|
|
+// @PostMapping("/export")
|
|
|
+// public void export(HttpServletResponse response, DocDirLevel docDirLevel) {
|
|
|
+// List<DocDirLevel> list = docDirLevelService.selectDocDirLevelList(docDirLevel);
|
|
|
+// ExcelUtil<DocDirLevel> util = new ExcelUtil<DocDirLevel>(DocDirLevel.class);
|
|
|
+// util.exportExcel(response, list, "文档目录加密级别数据");
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
- * 修改文档目录加密级别
|
|
|
+ * 新增文档目录加密级别
|
|
|
*/
|
|
|
- @ApiOperation("修改文档目录加密级别")
|
|
|
- @PreAuthorize("@ss.hasPermi('biz:level:edit')")
|
|
|
- @Log(title = "文档目录加密级别", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
- public AjaxResult edit(@RequestBody DocDirLevel docDirLevel)
|
|
|
- {
|
|
|
- return toAjax(docDirLevelService.updateDocDirLevel(docDirLevel));
|
|
|
- }
|
|
|
+// @ApiOperation("新增文档目录加密级别")
|
|
|
+// @PreAuthorize("@ss.hasPermi('biz:level:add')")
|
|
|
+// @Log(title = "文档目录加密级别", businessType = BusinessType.INSERT)
|
|
|
+// @PostMapping
|
|
|
+// public AjaxResult add(@RequestBody DocDirLevel docDirLevel) {
|
|
|
+// return toAjax(docDirLevelService.insertDocDirLevel(docDirLevel));
|
|
|
+// }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 删除文档目录加密级别
|
|
|
*/
|
|
|
- @ApiOperation("删除文档目录加密级别")
|
|
|
- @PreAuthorize("@ss.hasPermi('biz:level:remove')")
|
|
|
- @Log(title = "文档目录加密级别", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{levelIds}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] levelIds)
|
|
|
- {
|
|
|
- return toAjax(docDirLevelService.deleteDocDirLevelByLevelIds(levelIds));
|
|
|
- }
|
|
|
+// @ApiOperation("删除文档目录加密级别")
|
|
|
+// @PreAuthorize("@ss.hasPermi('biz:level:remove')")
|
|
|
+// @Log(title = "文档目录加密级别", businessType = BusinessType.DELETE)
|
|
|
+// @DeleteMapping("/{levelIds}")
|
|
|
+// public AjaxResult remove(@PathVariable Long[] levelIds) {
|
|
|
+// return toAjax(docDirLevelService.deleteDocDirLevelByLevelIds(levelIds));
|
|
|
+// }
|
|
|
}
|