| | |
| | | import com.smartor.domain.SvyTaskTemplate; |
| | | import com.smartor.domain.SvyTaskTemplateVO; |
| | | import com.smartor.service.ISvyTaskTemplateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-06-12 |
| | | */ |
| | | @Api(description = "任务问卷模板") |
| | | @RestController |
| | | @RequestMapping("/smartor/svytemplate") |
| | | @RequestMapping("/smartor/svytemplateTask") |
| | | public class SvyTaskTemplateController extends BaseController { |
| | | @Autowired |
| | | private ISvyTaskTemplateService svyTaskTemplateService; |
| | |
| | | * 查询任务问卷模板列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:template:list')") |
| | | @ApiOperation("查询任务问卷模板列表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SvyTaskTemplate svyTaskTemplate) { |
| | | startPage(); |
| | |
| | | /** |
| | | * 导出任务问卷模板列表 |
| | | */ |
| | | @ApiOperation("导出任务问卷模板列表") |
| | | @PreAuthorize("@ss.hasPermi('system:template:export')") |
| | | @Log(title = "任务问卷模板", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 获取任务问卷模板详细信息 |
| | | */ |
| | | @ApiOperation("获取任务问卷模板详细信息") |
| | | @PreAuthorize("@ss.hasPermi('system:template:query')") |
| | | @GetMapping(value = "/{svyid}") |
| | | public AjaxResult getInfo(@PathVariable("svyid") Long svyid) { |
| | |
| | | /** |
| | | * 新增任务问卷模板 |
| | | */ |
| | | @ApiOperation("新增任务问卷模板") |
| | | @PreAuthorize("@ss.hasPermi('system:template:add')") |
| | | @Log(title = "任务问卷模板", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改任务问卷模板 |
| | | */ |
| | | @ApiOperation("修改任务问卷模板") |
| | | @PreAuthorize("@ss.hasPermi('system:template:edit')") |
| | | @Log(title = "任务问卷模板", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SvyTaskTemplate svyTaskTemplate) { |
| | | return toAjax(svyTaskTemplateService.updateSvyTaskTemplate(svyTaskTemplate)); |
| | | } |
| | |
| | | /** |
| | | * 删除任务问卷模板 |
| | | */ |
| | | @ApiOperation("删除任务问卷模板") |
| | | @PreAuthorize("@ss.hasPermi('system:template:remove')") |
| | | @Log(title = "任务问卷模板", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{svyids}") |
| | | @GetMapping("/remove/{svyids}") |
| | | public AjaxResult remove(@PathVariable Long[] svyids) { |
| | | return toAjax(svyTaskTemplateService.deleteSvyTaskTemplateBySvyids(svyids)); |
| | | } |