|
|
|
@ -56,7 +56,6 @@ public class PolicyController {
|
|
|
|
|
|
|
|
|
|
@PostMapping("/create") |
|
|
|
|
@Operation(summary = "创建政策法规") |
|
|
|
|
@PreAuthorize("@ss.hasPermission('system:policy:create')") |
|
|
|
|
public CommonResult<Integer> createPolicy(@Valid @RequestBody PolicySaveReqVO createReqVO) { |
|
|
|
|
Integer policy = policyService.createPolicy(createReqVO); |
|
|
|
|
MaxkbdocumentVo maxkbdocumentVo =new MaxkbdocumentVo(); |
|
|
|
@ -73,7 +72,6 @@ public class PolicyController {
|
|
|
|
|
|
|
|
|
|
@PutMapping("/update") |
|
|
|
|
@Operation(summary = "更新政策法规") |
|
|
|
|
@PreAuthorize("@ss.hasPermission('system:policy:update')") |
|
|
|
|
public CommonResult<Boolean> updatePolicy(@Valid @RequestBody PolicySaveReqVO updateReqVO) { |
|
|
|
|
policyService.updatePolicy(updateReqVO); |
|
|
|
|
String viewUrl = getViewUrl(updateReqVO.getId()); |
|
|
|
@ -88,7 +86,6 @@ public class PolicyController {
|
|
|
|
|
@DeleteMapping("/delete") |
|
|
|
|
@Operation(summary = "删除政策法规") |
|
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
|
@PreAuthorize("@ss.hasPermission('system:policy:delete')") |
|
|
|
|
public CommonResult<Boolean> deletePolicy(@RequestParam("id") Integer id) { |
|
|
|
|
policyService.deletePolicy(id); |
|
|
|
|
String viewUrl = getViewUrl(id); |
|
|
|
@ -118,15 +115,14 @@ public class PolicyController {
|
|
|
|
|
|
|
|
|
|
@GetMapping("/page") |
|
|
|
|
@Operation(summary = "获得政策法规分页") |
|
|
|
|
@PreAuthorize("@ss.hasPermission('system:policy:query')") |
|
|
|
|
public CommonResult<PageResult<PolicyRespVO>> getPolicyPage(@Valid PolicyPageReqVO pageReqVO) { |
|
|
|
|
PageResult<PolicyDO> pageResult = policyService.getPolicyPage(pageReqVO); |
|
|
|
|
return success(BeanUtils.toBean(pageResult, PolicyRespVO.class)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/export-excel") |
|
|
|
|
@Operation(summary = "导出政策法规 Excel") |
|
|
|
|
@PreAuthorize("@ss.hasPermission('system:policy:export')") |
|
|
|
|
@ApiAccessLog(operateType = EXPORT) |
|
|
|
|
public void exportPolicyExcel(@Valid PolicyPageReqVO pageReqVO, |
|
|
|
|
HttpServletResponse response) throws IOException { |
|
|
|
|