| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.reflect.ReflectUtils; |
| | | import com.ruoyi.common.utils.uuid.IdUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.PatMedInhospMapper; |
| | |
| | | * 查询患者随访信息 |
| | | */ |
| | | @ApiOperation("查询患者随访信息") |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | // @Cacheable(value = "patItem", key = "T(org.springframework.util.DigestUtils).md5DigestAsHex(#serviceSubtaskVO.toString().getBytes())", unless = "#result == null or #result.isEmpty()") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | public Map<String, Object> patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | if (serviceSubtaskVO.getLeavehospitaldistrictcodes() != null && serviceSubtaskVO.getLeavehospitaldistrictcodes().size() > 10) { |
| | | throw new BaseException("病区查询数量不能超过10个"); |
| | | } |
| | | if (serviceSubtaskVO.getLeaveldeptcodes() != null && serviceSubtaskVO.getLeaveldeptcodes().size() > 10) { |
| | | throw new BaseException("科室查询数量不能超过10个"); |
| | | } |
| | | |
| | | serviceSubtaskVO.setPageNum(PageUtils.getOffset(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize())); |
| | | List<ServiceSubtask> serviceSubtaskList = null; |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | |
| | | } |
| | | |
| | | // patItemCount 调用redisCache记录统计数据 |
| | | // Map<String, Object> map = patItemCount(serviceSubtaskVO); |
| | | Map<String, Object> map = serviceSubtaskService.patItemCount(serviceSubtaskVO); |
| | | map.put("serviceSubtaskList", serviceSubtaskList); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | list.add(map); |
| | | //获取total |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | serviceSubtaskVO.setPageNum(null); |
| | | serviceSubtaskVO.setPageSize(null); |
| | | serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | } |
| | | }); |
| | | return getDataTable2(total, list); |
| | | |
| | | serviceSubtaskVO.setPageNum(null); |
| | | serviceSubtaskVO.setPageSize(null); |
| | | List<ServiceSubtask> serviceSubtasks = serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | |
| | | return getDataTable3(CollectionUtils.isNotEmpty(serviceSubtasks) ? serviceSubtasks.size() : 0L, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | public AjaxResult saveQuestionAnswerPhone(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | // SysUser user = getLoginUser().getUser(); |
| | | // serviceSubTaskDetailReq.setOrgid(user.getOrgid()); |
| | | log.info("患者问题结果记录(电话):{}", serviceSubTaskDetailReq); |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("通话记录回调(上海)") |
| | | @PostMapping("/recordAcceptshanghai") |
| | | public AjaxResult recordAccepshanghait(@RequestBody ServiceSubTaskDetailReq serviceSubTaskDetailReq) { |
| | | log.info("通话记录回调(上海):{}", serviceSubTaskDetailReq); |
| | | return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq)); |
| | | } |
| | | |
| | |
| | | public AjaxResult getSfStatistics(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getServiceType())) { |
| | | return error("服务类型不能为空"); |
| | | } |
| | | String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid()); |
| | | if (ObjectUtils.isNotEmpty(followUpCountStyle)) { |
| | | serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle); |
| | | } else { |
| | | serviceSubtaskCountReq.setFollowUpCountStyle("1"); |
| | | } |
| | | return success(serviceSubtaskService.getSfStatistics(serviceSubtaskCountReq)); |
| | | } |
| | |
| | | } |
| | | String configKey = serviceSubtaskCountReq.getConfigKey(); |
| | | if (StringUtils.isNotEmpty(configKey)) { |
| | | String configValue = configService.selectConfigByKey(configKey,serviceSubtaskCountReq.getOrgid()); |
| | | String configValue = configService.selectConfigByKey(configKey, serviceSubtaskCountReq.getOrgid()); |
| | | serviceSubtaskCountReq.setConfigValue(configValue); |
| | | if (StringUtils.isEmpty(configValue)) { |
| | | String logInfo = "getSfStatisticsCount-参数 " + configKey + " 未配置, 请配置好后重试"; |
| | |
| | | if (serviceSubtaskCountReq.getLeavehospitaldistrictcodes().size() == 0 && serviceSubtaskCountReq.getDeptcodes().size() == 0) { |
| | | return error("科室或病区不能为空"); |
| | | } |
| | | PageUtils.startPageByPost(serviceSubtaskCountReq.getPageNum(), serviceSubtaskCountReq.getPageSize()); |
| | | //复诊统计 |
| | | String configKey = serviceSubtaskCountReq.getConfigKey(); |
| | | if (StringUtils.isNotEmpty(configKey)) { |
| | | String configValue = configService.selectConfigByKey(configKey,serviceSubtaskCountReq.getOrgid()); |
| | | String configValue = configService.selectConfigByKey(configKey, serviceSubtaskCountReq.getOrgid()); |
| | | if (StringUtils.isEmpty(configValue)) { |
| | | String logInfo = "getSfStatisticsCountDetails-参数 " + configKey + " 未配置, 请配置好后重试"; |
| | | log.error(logInfo); |
| | |
| | | LoginUser loginUser = getLoginUser(); |
| | | String orgid = loginUser.getUser().getOrgid(); |
| | | serviceSubtaskCountReq.setOrgid(orgid); |
| | | PageUtils.startPageByPost(serviceSubtaskCountReq.getPageNum(), serviceSubtaskCountReq.getPageSize()); |
| | | return success(serviceSubtaskService.getSfStatisticsScriptDetails(serviceSubtaskCountReq)); |
| | | } |
| | | |