liusheng
2024-09-04 9526971c403417c1c007804f24884c443b9e6cd7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -20,6 +20,9 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
/**
@@ -53,8 +56,9 @@
    @PreAuthorize("@ss.hasPermi('system:taskcall:export')")
    @Log(title = "单一任务(随访宣教)", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, ServiceSubtask ivrTaskcall) {
        List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(ivrTaskcall);
    public void export(HttpServletResponse response, ServiceSubtask serviceSubtask) {
        ServiceSubtaskVO serviceSubtaskVO = DtoConversionUtils.sourceToTarget(serviceSubtask, ServiceSubtaskVO.class);
        List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskVO);
        ExcelUtil<ServiceSubtask> util = new ExcelUtil<ServiceSubtask>(ServiceSubtask.class);
        util.exportExcel(response, list, "单一任务(随访)数据");
    }
@@ -90,8 +94,8 @@
    @PostMapping("/queryTaskByCondition")
    public AjaxResult queryTaskByCondition(@RequestBody ServiceSubtaskVO ivrTaskcallVO) {
        //根据入参查询信息
        ServiceSubtask ivrTaskcall = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, ServiceSubtask.class);
        ServiceTaskVO ivrTaskVO = serviceSubtaskService.queryTaskByCondition(ivrTaskcall);
        ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(ivrTaskcallVO, ServiceSubtask.class);
        ServiceTaskVO ivrTaskVO = serviceSubtaskService.queryTaskByCondition(serviceSubtask);
        return success(ivrTaskVO);
    }
@@ -101,9 +105,28 @@
    @ApiOperation("电话回调任务")
    @PostMapping("/phoneCallBack")
    public AjaxResult phoneCallBack(@RequestBody PhoneCallBackVO phoneCallBackVO) {
//        log.error("电话回调任务成功了不?{}", phoneCallBackVO);
        serviceSubtaskService.phoneCallBack(phoneCallBackVO);
        return success();
    }
    @ApiOperation("电话ASR通话回调(雨绮)")
    @PostMapping("/phoneCallBackYQ")
    public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) {
        log.error("电话ASR通话回调(雨绮) ?{}", phoneCallReqYQVO);
        PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO);
        return phoneCallBackYQVO;
    }
    /**
     * 电话回调任务(雨绮)
     */
    @ApiOperation("电话回调任务(雨绮)")
    @PostMapping("/taskPull")
    public List<PullTaskVO> taskPull() {
        log.error("电话回调任务(雨绮)");
        List<PullTaskVO> pullTaskVOList = serviceSubtaskService.taskPull();
        log.error("电话回调任务(雨绮):{}", pullTaskVOList);
        return pullTaskVOList;
    }
    /**
@@ -115,4 +138,22 @@
        return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
    }
    /**
     * 通话记录回调
     */
    @ApiOperation("通话记录回调")
    @PostMapping("/recordAccept")
    public AjaxResult recordAccept(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) {
        return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq));
    }
    /**
     * 获取每个月的随访、复诊量
     */
    @ApiOperation("获取每个月的随访、复诊量")
    @PostMapping("/getSfFzInfoEveryMonth")
    public TableDataInfo getSfFzInfoEveryMonth(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) {
        return getDataTable(serviceSubtaskService.getSfFzInfoEveryMonth(serviceSubtaskCountReq));
    }
}