| | |
| | | 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.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.robot.back.RobotAIDialogBack; |
| | | import com.smartor.domain.robot.back.RobotCallBack; |
| | | import com.smartor.service.IIvrTaskSingleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | * @author ruoyi |
| | | * @date 2024-02-02 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = "单一任务(随访宣教)") |
| | | @RestController |
| | | @RequestMapping("/smartor/tasksingle") |
| | | public class IvrTaskSingleController extends BaseController { |
| | | @Autowired |
| | | private IIvrTaskSingleService ivrTaskcallService; |
| | | |
| | | |
| | | /** |
| | | * 查询患者随访信息 |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:task:add')") |
| | | @Log(title = "单一任务(随访)", businessType = BusinessType.INSERT) |
| | | @PostMapping("/insertOrUpdateTask") |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskcallVO)); |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody IvrTaskVO ivrTaskVO) { |
| | | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskVO.setCreateBy(user.getNickName()); |
| | | return toAjax(ivrTaskcallService.insertOrUpdateTask(ivrTaskVO)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public AjaxResult queryTaskByCondition(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | //根据入参查询信息 |
| | | IvrTaskSingle ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, IvrTaskSingle.class); |
| | | IvrTaskSingleVO ivrTaskSingleVO = ivrTaskcallService.queryTaskByCondition(ivrTaskcall); |
| | | return success(ivrTaskSingleVO); |
| | | IvrTaskVO ivrTaskVO = ivrTaskcallService.queryTaskByCondition(ivrTaskcall); |
| | | return success(ivrTaskVO); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 任务发送执行 |
| | | * 任务的发送执行、暂停、终止 |
| | | */ |
| | | @ApiOperation("任务发送执行") |
| | | @PostMapping("/heTaskSend") |
| | | public AjaxResult heTaskSend(@RequestBody IvrTaskSingleVO ivrTaskcallVO) { |
| | | return toAjax(ivrTaskcallService.heTaskSend(ivrTaskcallVO)); |
| | | @ApiOperation("任务的发送执行、暂停、终止") |
| | | @PostMapping("/taskSend") |
| | | public AjaxResult taskSend(@RequestBody SendTaskVO sendTaskVO) { |
| | | return toAjax(ivrTaskcallService.heTaskSend(sendTaskVO)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 电话回调任务 |
| | | * 电话回调任务(上海) |
| | | */ |
| | | @ApiOperation("电话回调任务") |
| | | @PostMapping("/phoneCallBack") |
| | | public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) { |
| | | //如果uuid在redis中找不到,那就直接报异常 |
| | | return success(ivrTaskcallService.phoneCallBack(phoneCallBackVO)); |
| | | // log.error("电话回调任务成功了不?{}", phoneCallBackVO); |
| | | ivrTaskcallService.phoneCallBack(phoneCallBackVO); |
| | | return success(); |
| | | } |
| | | |
| | | } |