| | |
| | | |
| | | import annotation.Log; |
| | | import com.ycl.platform.domain.entity.CheckTemplate; |
| | | import com.ycl.platform.domain.entity.CheckTemplateRule; |
| | | import com.ycl.platform.domain.query.CheckTemplateQuery; |
| | | import com.ycl.platform.service.ICheckTemplateRuleService; |
| | | import com.ycl.platform.service.ICheckTemplateService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.Result; |
| | |
| | | @Autowired |
| | | private ICheckTemplateService checkTemplateService; |
| | | |
| | | @Autowired |
| | | private ICheckTemplateRuleService checkTemplateRuleService; |
| | | /** |
| | | * 查询考核模板列表 |
| | | */ |
| | |
| | | * 新增考核模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('check:template:add')") |
| | | @Log(title = "考核模板", businessType = BusinessType.INSERT) |
| | | @Log(title = "新增考核模板", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody @Validated CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | |
| | | * 复制考核模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('check:template:copy')") |
| | | @Log(title = "考核模板", businessType = BusinessType.INSERT) |
| | | @Log(title = "复制考核模板", businessType = BusinessType.INSERT) |
| | | @PostMapping("/copy") |
| | | public AjaxResult copy(@RequestBody CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | |
| | | * 修改考核模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('check:template:edit')") |
| | | @Log(title = "考核模板", businessType = BusinessType.UPDATE) |
| | | @Log(title = "修改考核模板", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody CheckTemplateQuery checkTemplateDTO) |
| | | { |
| | | return toAjax(checkTemplateService.updateCheckTemplate(checkTemplateDTO)); |
| | | return checkTemplateService.updateCheckTemplate(checkTemplateDTO); |
| | | } |
| | | |
| | | /** |
| | | * 修改考核模板权重 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('check:template:edit')") |
| | | @Log(title = "修改考核模板权重", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/weight") |
| | | public AjaxResult editWeight(@RequestBody CheckTemplateRule checkTemplateRule) |
| | | { |
| | | return toAjax(checkTemplateRuleService.updateCheckTemplateRule(checkTemplateRule)); |
| | | } |
| | | /** |
| | | * 删除考核模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('check:template:remove')") |
| | | @Log(title = "考核模板", businessType = BusinessType.DELETE) |
| | | @Log(title = "删除考核模板", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{id}") |
| | | public AjaxResult remove(@PathVariable String id) |
| | | { |