| | |
| | | |
| | | @GetMapping("/export-excel") |
| | | @Operation(summary = "导出调度方案 Excel") |
| | | @PreAuthorize("@ss.hasPermission('system:tenant:export')") |
| | | @PreAuthorize("@ss.hasPermission('sche:scheme:export')") |
| | | @ApiAccessLog(operateType = EXPORT) |
| | | public void exportTenantExcel(@Valid StScheduleSchemePageReqVO exportReqVO, |
| | | HttpServletResponse response) throws IOException { |
| | |
| | | ExcelUtils.write(response, "调度方案.xls", "数据", StScheduleSchemeEntity.class, |
| | | BeanUtils.toBean(list, StScheduleSchemeEntity.class)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('sche:scheme:update')") |
| | | @PutMapping("/enable") |
| | | @Operation(summary = "启用") |
| | | public CommonResult<Boolean> enable(@RequestBody String[] ids) { |
| | | stScheduleSchemeService.enableByIds(ids); |
| | | return success(true); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('sche:scheme:update')") |
| | | @PutMapping("/disable") |
| | | @Operation(summary = "禁用") |
| | | public CommonResult<Boolean> disable(@RequestBody String[] ids) { |
| | | stScheduleSchemeService.disableByIds(ids); |
| | | return success(true); |
| | | } |
| | | } |