| | |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagement; |
| | | import com.ruoyi.collaborativeApproval.service.DutyPlanService; |
| | | import com.ruoyi.common.utils.excel.ExcelUtils; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | |
| | | @GetMapping("/getList") |
| | | @ApiOperation("分页查询") |
| | | @Log(title = "分页查询岗位计划", businessType = BusinessType.OTHER) |
| | | public AjaxResult listPage(Page page, DutyPlanDTO dutyPlanDTO){ |
| | | return AjaxResult.success(dutyPlanService.listPage(page, dutyPlanDTO)); |
| | | } |
| | | @GetMapping("/getNum") |
| | | @ApiOperation("获取等级数据") |
| | | @Log(title = "获取岗位计划等级数据", businessType = BusinessType.OTHER) |
| | | public AjaxResult getNum(){ |
| | | return AjaxResult.success(dutyPlanService.getNum()); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增") |
| | | @Log(title = "新增岗位计划", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody DutyPlan dutyPlan){ |
| | | return AjaxResult.success(dutyPlanService.save(dutyPlan)); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | @ApiOperation("修改") |
| | | @Log(title = "修改岗位计划", businessType = BusinessType.UPDATE) |
| | | public AjaxResult update(@RequestBody DutyPlan dutyPlan){ |
| | | return AjaxResult.success(dutyPlanService.updateById(dutyPlan)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("删除") |
| | | @Log(title = "删除岗位计划", businessType = BusinessType.DELETE) |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | throw new RuntimeException("请传入要删除的ID"); |
| | |
| | | } |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出") |
| | | @Log(title = "导出岗位计划", businessType = BusinessType.EXPORT) |
| | | public void exportData(HttpServletResponse response, DutyPlanDTO dutyPlanDTO){ |
| | | dutyPlanService.exportData(response, dutyPlanDTO); |
| | | } |