|  |  | 
 |  |  | import com.smartor.mapper.PatMedOuthospMapper; | 
 |  |  | import com.smartor.service.IServiceSubtaskRecordService; | 
 |  |  | import com.smartor.service.IServiceSubtaskService; | 
 |  |  | import com.smartor.service.IServiceTaskService; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | 
 |  |  |     private IServiceSubtaskService serviceSubtaskService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private IServiceTaskService serviceTaskService; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     private IServiceSubtaskRecordService serviceSubtaskRecordService; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  | 
 |  |  |             if (ObjectUtils.isNotEmpty((serviceSubtask.getTaskid()))) | 
 |  |  |                 serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); | 
 |  |  |             serviceSubtask.setServiceSubtaskRecordList(serviceSubtaskRecordService.selectServiceSubtaskRecordList(serviceSubtaskRecord)); | 
 |  |  |  | 
 |  |  |             ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); | 
 |  |  |             if (ObjectUtils.isNotEmpty(serviceTask)) serviceSubtask.setPreachform(serviceTask.getPreachform()); | 
 |  |  |         } | 
 |  |  |         Map<String, Object> map = serviceSubtaskService.patItemCount(serviceSubtaskVO); | 
 |  |  |         map.put("serviceSubtaskList", serviceSubtaskList); | 
 |  |  | 
 |  |  |             } | 
 |  |  |         }); | 
 |  |  |         return getDataTable2(total, list); | 
 |  |  | //        return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         ExcelUtil<ServiceSubtaskExprot> util = new ExcelUtil<ServiceSubtaskExprot>(ServiceSubtaskExprot.class); | 
 |  |  |         util.exportExcel(response, serviceSubtaskExprots, "患者随访信息表单"); | 
 |  |  |     } | 
 |  |  | 
 |  |  |         List<ServiceSubtask> list = serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskVO); | 
 |  |  |         ExcelUtil<ServiceSubtask> util = new ExcelUtil<ServiceSubtask>(ServiceSubtask.class); | 
 |  |  |         util.exportExcel(response, list, "单一任务(随访)数据"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 随访数据查询 | 
 |  |  |      */ | 
 |  |  |     @Log(title = "随访数据查询", businessType = BusinessType.EXPORT) | 
 |  |  |     @PostMapping("/querySubtaskList") | 
 |  |  |     public AjaxResult querySubtaskList(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { | 
 |  |  |         PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); | 
 |  |  |         serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskVO); | 
 |  |  |         return success(serviceSubtaskService.selectServiceSubtaskList(serviceSubtaskVO)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PostMapping("/phoneCallBackYQ") | 
 |  |  |     public PhoneCallBackYQVO phoneCallBackYQ(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) { | 
 |  |  |         log.info("电话ASR通话回调(雨绮) ?{}", phoneCallReqYQVO); | 
 |  |  | //        SysUser user = getLoginUser().getUser(); | 
 |  |  | //        phoneCallReqYQVO.setOrgid(user.getOrgid()); | 
 |  |  |         PhoneCallBackYQVO phoneCallBackYQVO = serviceSubtaskService.phoneCallBackYQ(phoneCallReqYQVO); | 
 |  |  |         return phoneCallBackYQVO; | 
 |  |  |     } | 
 |  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 获取随访统计比例 | 
 |  |  |      */ | 
 |  |  |     @ApiOperation("获取随访满意度统计") | 
 |  |  |     @PostMapping("/getSfStatisticsJoy") | 
 |  |  |     public AjaxResult getSfStatisticsJoy(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { | 
 |  |  |         if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) { | 
 |  |  |             return error("服务类型不能为空"); | 
 |  |  |         } | 
 |  |  |         return success(serviceSubtaskService.getSfStatisticsJoy(serviceSubtaskCountReq)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 随访统计导出 | 
 |  |  |      */ | 
 |  |  |     //@PreAuthorize("@ss.hasPermi('system:taskcall:export')") | 
 |  |  | 
 |  |  |         return success(serviceStatistics); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 获取随访统计比例 | 
 |  |  |      */ | 
 |  |  |     @ApiOperation("获取随访满意度明细") | 
 |  |  |     @PostMapping("/getSfStatisticsJoydetails") | 
 |  |  |     public AjaxResult getSfStatisticsJoydetails(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { | 
 |  |  |         if (serviceSubtaskCountReq.getLeavehospitaldistrictcodes().size() == 0 && serviceSubtaskCountReq.getDeptcodes().size() == 0) { | 
 |  |  |             return error("科室或病区不能为空"); | 
 |  |  |         } | 
 |  |  |         return success(serviceSubtaskService.getSfStatisticsJoydetails(serviceSubtaskCountReq)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |