| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.github.pagehelper.ISelect; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | * 查询患者随访信息 |
| | | */ |
| | | @ApiOperation("查询患者随访信息") |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtask ivrTaskcall) { |
| | | PageUtils.startPageByPost(ivrTaskcall.getPageNum(), ivrTaskcall.getPageSize()); |
| | | return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); |
| | | List<ServiceSubtask> serviceSubtaskList = serviceSubtaskService.patItem(ivrTaskcall); |
| | | //获取total |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | ivrTaskcall.setPageNum(null); |
| | | ivrTaskcall.setPageSize(null); |
| | | serviceSubtaskService.patItem(ivrTaskcall); |
| | | } |
| | | }); |
| | | return getDataTable2(total, serviceSubtaskList); |
| | | // return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); |
| | | } |
| | | |
| | | /** |
| | | * 导出单一任务(随访宣教)列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:export')") |
| | | //@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, "单一任务(随访)数据"); |
| | | } |
| | |
| | | /** |
| | | * 获取单一任务(随访)详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:taskcall:query')") |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(serviceSubtaskService.selectServiceSubtaskById(id)); |
| | |
| | | * 新增或修改删除单一任务 |
| | | */ |
| | | @ApiOperation("新增或修改删除单一任务") |
| | | @PreAuthorize("@ss.hasPermi('system:task:add')") |
| | | //@PreAuthorize("@ss.hasPermi('system:task:add')") |
| | | @Log(title = "单一任务(随访)", businessType = BusinessType.INSERT) |
| | | @PostMapping("/insertOrUpdateTask") |
| | | public AjaxResult insertOrUpdateHeTask(@RequestBody ServiceTaskVO ivrTaskVO) { |
| | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskVO.setCreateBy(user.getNickName()); |
| | | return toAjax(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO)); |
| | | return success(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO)); |
| | | } |
| | | |
| | | @ApiOperation("修改子任务") |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody ServiceSubtask serviceSubtask) { |
| | | return toAjax(serviceSubtaskService.updateServiceSubtask(serviceSubtask)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | @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; |
| | | } |
| | | |
| | | /** |
| | | * 患者问题结果记录 |
| | | */ |
| | | @ApiOperation("患者问题结果记录") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswer(serviceSubTaskDetailReq)); |
| | | @ApiOperation("患者问题结果记录(电话)") |
| | | @PostMapping("/saveQuestionAnswerPhone") |
| | | public AjaxResult saveQuestionAnswerPhone(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | 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)); |
| | | } |
| | | |
| | | } |