| | |
| | | package com.smartor.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.IvrTask; |
| | | import com.smartor.service.IIvrTaskService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 语音任务Controller |
| | | * |
| | | * 随访任务Controller |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrtask") |
| | | public class IvrTaskController extends BaseController |
| | | { |
| | | public class IvrTaskController extends BaseController { |
| | | @Autowired |
| | | private IIvrTaskService ivrTaskService; |
| | | |
| | |
| | | * 查询语音任务列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrTask ivrTask) |
| | | { |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrTask ivrTask) { |
| | | startPage(); |
| | | List<IvrTask> list = ivrTaskService.selectIvrTaskList(ivrTask); |
| | | return getDataTable(list); |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:export')") |
| | | @Log(title = "语音任务", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrTask ivrTask) |
| | | { |
| | | public void export(HttpServletResponse response, IvrTask ivrTask) { |
| | | List<IvrTask> list = ivrTaskService.selectIvrTaskList(ivrTask); |
| | | ExcelUtil<IvrTask> util = new ExcelUtil<IvrTask>(IvrTask.class); |
| | | util.exportExcel(response, list, "语音任务数据"); |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:query')") |
| | | @GetMapping(value = "/{taskid}") |
| | | public AjaxResult getInfo(@PathVariable("taskid") Long taskid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("taskid") Long taskid) { |
| | | return success(ivrTaskService.selectIvrTaskByTaskid(taskid)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:add')") |
| | | @Log(title = "语音任务", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrTask ivrTask) |
| | | { |
| | | public AjaxResult add(@RequestBody IvrTask ivrTask) { |
| | | return toAjax(ivrTaskService.insertIvrTask(ivrTask)); |
| | | } |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:edit')") |
| | | @Log(title = "语音任务", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrTask ivrTask) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrTask ivrTask) { |
| | | return toAjax(ivrTaskService.updateIvrTask(ivrTask)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('smartor:ivrtask:remove')") |
| | | @Log(title = "语音任务", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{taskids}") |
| | | public AjaxResult remove(@PathVariable Long[] taskids) |
| | | { |
| | | @GetMapping("/remove/{taskids}") |
| | | public AjaxResult remove(@PathVariable Long[] taskids) { |
| | | return toAjax(ivrTaskService.deleteIvrTaskByTaskids(taskids)); |
| | | } |
| | | } |