package com.ruoyi.web.controller.smartor;
|
|
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.PageUtils;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.smartor.domain.HeTaskVO;
|
import com.smartor.domain.IvrTaskcall;
|
import com.smartor.domain.IvrTaskcallVO;
|
import com.smartor.service.IIvrTaskcallService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
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
|
*
|
* @author ruoyi
|
* @date 2024-02-02
|
*/
|
@Api(description = "单一任务(随访)")
|
@RestController
|
@RequestMapping("/smartor/taskcall")
|
public class IvrTaskcallController extends BaseController {
|
@Autowired
|
private IIvrTaskcallService ivrTaskcallService;
|
|
/**
|
* 查询单一任务(随访)列表
|
*/
|
@ApiOperation("查询单一任务(随访)列表")
|
@PreAuthorize("@ss.hasPermi('system:taskcall:list')")
|
@PostMapping("/list")
|
public TableDataInfo list(@RequestBody IvrTaskcall ivrTaskcall) {
|
PageUtils.startPageByPost(ivrTaskcall.getPageNum(), ivrTaskcall.getPageSize());
|
List<IvrTaskcall> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
|
return getDataTable(list);
|
}
|
|
/**
|
* 导出单一任务(随访)列表
|
*/
|
@PreAuthorize("@ss.hasPermi('system:taskcall:export')")
|
@Log(title = "单一任务(随访)", businessType = BusinessType.EXPORT)
|
@PostMapping("/export")
|
public void export(HttpServletResponse response, IvrTaskcall ivrTaskcall) {
|
List<IvrTaskcall> list = ivrTaskcallService.selectIvrTaskcallList(ivrTaskcall);
|
ExcelUtil<IvrTaskcall> util = new ExcelUtil<IvrTaskcall>(IvrTaskcall.class);
|
util.exportExcel(response, list, "单一任务(随访)数据");
|
}
|
|
/**
|
* 获取单一任务(随访)详细信息
|
*/
|
@PreAuthorize("@ss.hasPermi('system:taskcall:query')")
|
@GetMapping(value = "/getInfo/{id}")
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
return success(ivrTaskcallService.selectIvrTaskcallById(id));
|
}
|
|
/**
|
* 新增或修改删除单一任务
|
*/
|
@ApiOperation("新增或修改删除单一任务")
|
@PreAuthorize("@ss.hasPermi('system:task:add')")
|
@Log(title = "单一任务(随访)", businessType = BusinessType.INSERT)
|
@PostMapping("/insertOrUpdateTask")
|
public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskcallVO ivrTaskcallVO) {
|
return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskcallVO));
|
}
|
|
|
|
}
|