| | |
| | | |
| | | import com.github.pagehelper.ISelect; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | 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.redis.RedisCache; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.PreachFormEnum; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import com.smartor.mapper.PatMedOuthospMapper; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import net.bytebuddy.implementation.bytecode.Throw; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public class ServiceSubtaskController extends BaseController { |
| | | @Autowired |
| | | 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)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 发送短信模板 |
| | | */ |
| | | @ApiOperation("发送短信模板") |
| | | @PostMapping("/sendMsgTemplate") |
| | | public Map<String, Object> sendMsgTemplate(@RequestBody List<PatArchiveSrmVO> patArchiveSrmVOS) { |
| | | if (CollectionUtils.isEmpty(patArchiveSrmVOS)) { |
| | | throw new BaseException("患者信息不能为空"); |
| | | } |
| | | List<PatArchiveSrmVO> pasList = serviceSubtaskService.sendMsgTemplate(patArchiveSrmVOS); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("code", HttpStatus.SUCCESS); |
| | | map.put("fail", CollectionUtils.isEmpty(pasList) ? null : pasList); |
| | | return map; |
| | | } |
| | | |
| | | } |