| | |
| | | |
| | | @Override |
| | | public List<ServiceSubtaskRes> patItem(ServiceSubtaskEntity serviceSubtaskEntity) { |
| | | if (serviceSubtaskEntity.getSendstateView() != null) { |
| | | // 1:待随访(2 待发送);2:随访中(3 已发送、1 被领取)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行) |
| | | if (serviceSubtaskEntity.getSendstateView() == 1) serviceSubtaskEntity.setSendstates(Arrays.asList(2L)); |
| | | if (serviceSubtaskEntity.getSendstateView() == 2) serviceSubtaskEntity.setSendstates(Arrays.asList(1L, 3L)); |
| | | if (serviceSubtaskEntity.getSendstateView() == 3) serviceSubtaskEntity.setSendstates(Arrays.asList(5L, 7L)); |
| | | if (serviceSubtaskEntity.getSendstateView() == 4) serviceSubtaskEntity.setSendstates(Arrays.asList(6L)); |
| | | if (serviceSubtaskEntity.getSendstateView() == 5) serviceSubtaskEntity.setSendstates(Arrays.asList(4L)); |
| | | } |
| | | |
| | | List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskEntity); |
| | | |
| | | List<ServiceSubtaskRes> serviceSubtaskResList = new ArrayList<>(); |
| | |
| | | if (ObjectUtils.isNotEmpty(serviceSubtask.getContinueContent())) { |
| | | serviceSubtaskRes.setContinueContent(serviceSubtask.getContinueContent()); |
| | | } |
| | | // 1:待随访(2 待发送);2:随访中(3 已发送、1 被领取)、3:未完成(5 发送失败、7、超时)、4:已完成( 6 已完成)、5:无需随访(4 不执行) |
| | | if (serviceSubtaskRes.getSendstate() == 2) serviceSubtaskRes.setSendstateView(1L); |
| | | if (serviceSubtaskRes.getSendstate() == 1 || serviceSubtaskRes.getSendstate() == 3L) |
| | | serviceSubtaskRes.setSendstateView(2L); |
| | | if (serviceSubtaskRes.getSendstate() == 5 || serviceSubtaskRes.getSendstate() == 7L) |
| | | serviceSubtaskRes.setSendstateView(3L); |
| | | if (serviceSubtaskRes.getSendstate() == 6) serviceSubtaskRes.setSendstateView(4L); |
| | | if (serviceSubtaskRes.getSendstate() == 4) serviceSubtaskRes.setSendstateView(5L); |
| | | serviceSubtaskResList.add(serviceSubtaskRes); |
| | | } |
| | | return serviceSubtaskResList; |
| | |
| | | return serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateTemplate(ServiceSubtaskTemplateVO serviceSubtaskTemplateVO) { |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubtaskTemplateVO.getSubId()); |
| | | if (serviceSubtask == null || serviceSubtask.getSendstate() != 2L) |
| | | throw new BaseException("该任务已发送给患者,不能再进行修改模板"); |
| | | |
| | | Integer taskTempid = svyTaskTemplateService.saveOrUpdateTemplate(serviceSubtaskTemplateVO.getSvyTaskTemplateVO()); |
| | | if (taskTempid == null) return false; |
| | | |
| | | String tempName = svyTaskTemplateService.selectSvyTaskTemplateBySvyid(Long.valueOf(taskTempid)).getSvyname(); |
| | | serviceSubtask.setTemplateid(taskTempid.longValue()); |
| | | serviceSubtask.setTemplatename(tempName); |
| | | serviceSubtask.setUpdateBy(serviceSubtaskTemplateVO.getUpdateBy()); |
| | | serviceSubtask.setLibtemplateid(serviceSubtaskTemplateVO.getSvyTaskTemplateVO().getTemplateid()); |
| | | return updateServiceSubtask(serviceSubtask); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除单一任务(随访) |
| | | * |
| | |
| | | if (serviceTaskVO.getLongTask() == 1) serviceTaskdiag.setLongtask(1L); |
| | | serviceTaskdiag.setIcd10code(serviceTaskVO.getIcd10code()); |
| | | serviceTaskdiag.setIcd10name(serviceTaskVO.getIcd10name()); |
| | | //南华附一的icd10code是有重复的,所以不能用南华附一的icd10code去查询 |
| | | if (!active.equals("nhfy") && StringUtils.isEmpty(serviceTaskVO.getIcd10name())) { |
| | | Icd10 icd10 = new Icd10(); |
| | | icd10.setIcdcode(serviceTaskVO.getIcd10code()); |
| | | List<Icd10> icd10s = icd10Mapper.selectIcd10List(icd10); |
| | | if (CollectionUtils.isNotEmpty(icd10s)) |
| | | serviceTaskdiag.setIcd10name(icd10s.get(0).getIcdname()); |
| | | } |
| | | serviceTaskdiag.setGuid(serviceTask.getGuid()); |
| | | serviceTaskdiag.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskdiag.setCreateTime(new Date()); |
| | | serviceTaskdiag.setDeptCode(serviceTaskVO.getDeptcode()); |
| | | serviceTaskdiag.setDeptName(serviceTaskVO.getDeptname()); |
| | | serviceTaskdiag.setWardCode(serviceTaskVO.getLeavehospitaldistrictcode()); |
| | | serviceTaskdiag.setWardName(serviceTaskVO.getLeavehospitaldistrictname()); |
| | | //南华附一的icd10code是有重复的,所以不能用南华附一的icd10code去查询 |
| | | log.info("----serviceTaskdiag的值为:{}", serviceTaskdiag); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) { |
| | | if (!StringUtils.isEmpty(serviceTaskVO.getIcd10name())) { |
| | | String[] Icd10Names = serviceTaskVO.getIcd10name().split(","); |
| | | String[] Icd10codes = serviceTaskVO.getIcd10code().split(","); |
| | | for (String icd10code : Icd10codes) { |
| | | serviceTaskdiag.setIcd10code(icd10code); |
| | | for (int i = 0; i < Icd10Names.length; i++) { |
| | | serviceTaskdiag.setIcd10code(Icd10codes[i]); |
| | | serviceTaskdiag.setIcd10name(Icd10Names[i]); |
| | | serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); |
| | | } |
| | | } |
| | |
| | | serviceTaskoper.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskoper.setCreateTime(new Date()); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getOplevelcode())) { |
| | | // String[] opcodes = serviceTaskVO.getOpcode().split(","); |
| | | // for (String opcode : opcodes) { |
| | | // serviceTaskoper.setOpcode(opcode); |
| | | // log.info("----serviceTaskoper的值为:{}", serviceTaskoper); |
| | | // serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | // } |
| | | log.info("----serviceTaskoper的值为:{}", serviceTaskoper); |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | } |
| | | else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) { |
| | | } else if (serviceTaskVO.getIsoperation() != null && serviceTaskVO.getIsoperation() == 2) { |
| | | //任务修改 |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVO.getSendTimeslot())) |
| | | serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot())); |
| | |
| | | serviceTaskdiag.setIcd10name(serviceTaskVO.getIcd10name()); |
| | | serviceTaskdiag.setGuid(serviceTask.getGuid()); |
| | | serviceTaskdiag.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskdiag.setDeptCode(serviceTaskVO.getDeptcode()); |
| | | serviceTaskdiag.setDeptName(serviceTaskVO.getDeptname()); |
| | | serviceTaskdiag.setWardCode(serviceTaskVO.getLeavehospitaldistrictcode()); |
| | | serviceTaskdiag.setWardName(serviceTaskVO.getLeavehospitaldistrictname()); |
| | | serviceTaskdiag.setUpdateTime(new Date()); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) { |
| | | String[] icd10codes = serviceTaskVO.getIcd10code().split(","); |
| | | for (String icdcode : icd10codes) { |
| | | String[] icd10names = serviceTaskVO.getIcd10name().split(","); |
| | | if (icd10codes.length != icd10names.length) { |
| | | throw new BaseException("疾病编码和疾病名称数量不一致"); |
| | | } |
| | | for (int i = 0; i < icd10codes.length; i++) { |
| | | //先查询一下是否存在 |
| | | ServiceTaskdiag serviceTaskdiag2 = new ServiceTaskdiag(); |
| | | serviceTaskdiag2.setTaskId(serviceTaskVO.getTaskid()); |
| | | serviceTaskdiag2.setIcd10code(icdcode); |
| | | serviceTaskdiag2.setIcd10code(icd10codes[i]); |
| | | serviceTaskdiag2.setIcd10name(icd10names[i]); |
| | | List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag2); |
| | | serviceTaskdiag.setIcd10code(icdcode); |
| | | serviceTaskdiag.setIcd10code(icd10codes[i]); |
| | | serviceTaskdiag.setIcd10name(icd10names[i]); |
| | | log.info("----serviceTaskdiag更新的值为:{}", serviceTaskdiag); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskdiags)) { |
| | | serviceTaskdiag.setId(serviceTaskdiags.get(0).getId()); |
| | |
| | | return jsRates; |
| | | } |
| | | |
| | | @Override |
| | | |
| | | public List<ServiceSubtaskStatistic> getSfStatisticsExport(ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | List<ServiceSubtaskStatistic> sfStatistics = getSfStatistics(serviceSubtaskCountReq); |
| | | // 添加总计行 |
| | |
| | | } |
| | | |
| | | return sfStatistics; |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtaskIsAbnormalStatistic> getSfStatisticsIsAbnormalExport(ServiceSubtaskCountReq serviceSubtaskCountReq) { |
| | | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | |
| | | serviceSubtaskStatistic.setDrname(serviceSubtaskList.get(0).getDrname()); |
| | | //出院人次 |
| | | serviceSubtaskStatistic.setDischargeCount(serviceSubtaskList.size()); |
| | | //出院人次详情 |
| | | serviceSubtaskStatistic.setDischargeCountInfo(serviceSubtaskList); |
| | | //无需随访详情 |
| | | List<ServiceSubtask> nonFollowUpInfo = new ArrayList<>(); |
| | | //记录过滤患者详情 |
| | |
| | | List<ServiceSubtask> followUpFailInfo = new ArrayList<>(); |
| | | //记录首次随访人工详情 |
| | | List<ServiceSubtask> manualInfo = new ArrayList<>(); |
| | | //记录首次随访语音详情 |
| | | List<ServiceSubtask> voiceInfo = new ArrayList<>(); |
| | | //记录首次随访短信详情 |
| | | List<ServiceSubtask> smsInfo = new ArrayList<>(); |
| | | //记录首次随访微信详情 |
| | |
| | | List<ServiceSubtask> followUpSuccessAgainInfo = new ArrayList<>(); |
| | | //记录再次随访失败详情 |
| | | List<ServiceSubtask> followUpFailAgainInfo = new ArrayList<>(); |
| | | //记录首次随访人工详情 |
| | | //记录再次随访人工详情 |
| | | List<ServiceSubtask> manualAgainInfo = new ArrayList<>(); |
| | | //记录首次随访短信详情 |
| | | //记录再次随访语音详情 |
| | | List<ServiceSubtask> voiceAgainInfo = new ArrayList<>(); |
| | | //记录再次随访短信详情 |
| | | List<ServiceSubtask> smsAgainInfo = new ArrayList<>(); |
| | | //记录首次随访微信详情 |
| | | //记录再次随访微信详情 |
| | | List<ServiceSubtask> wechatAgainInfo = new ArrayList<>(); |
| | | |
| | | //记录随访情况详情 |
| | | List<ServiceSubtask> taskSituation1Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation2Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation3Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation4Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation5Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation6Info = new ArrayList<>(); |
| | | |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | //无需随访人次 |
| | |
| | | followUpSuccessInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访人工 (不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | | manualInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访语音 (不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoice(serviceSubtaskStatistic.getVoice() + 1L); |
| | | voiceInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访短信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSms(serviceSubtaskStatistic.getSms() + 1L); |
| | | smsInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访微信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChat(serviceSubtaskStatistic.getWeChat() + 1L); |
| | | wechatInfo.add(serviceSubtask); |
| | | } |
| | |
| | | followUpSuccessInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访人工 (统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | | manualInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访语音 (统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoice(serviceSubtaskStatistic.getVoice() + 1L); |
| | | voiceInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访短信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSms(serviceSubtaskStatistic.getSms() + 1L); |
| | | smsInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访微信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChat(serviceSubtaskStatistic.getWeChat() + 1L); |
| | | wechatInfo.add(serviceSubtask); |
| | | } |
| | |
| | | followUpSuccessAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访人工(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManualAgain(serviceSubtaskStatistic.getManualAgain() + 1L); |
| | | manualAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访语音(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoiceAgain(serviceSubtaskStatistic.getVoiceAgain() + 1L); |
| | | voiceAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访短信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSmsAgain(serviceSubtaskStatistic.getSmsAgain() + 1L); |
| | | smsAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访微信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChatAgain(serviceSubtaskStatistic.getWeChatAgain() + 1L); |
| | | wechatAgainInfo.add(serviceSubtask); |
| | | } |
| | |
| | | followUpSuccessAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访人工(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManualAgain(serviceSubtaskStatistic.getManualAgain() + 1L); |
| | | manualAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访语音(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoiceAgain(serviceSubtaskStatistic.getVoiceAgain() + 1L); |
| | | voiceAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访短信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSmsAgain(serviceSubtaskStatistic.getSmsAgain() + 1L); |
| | | smsAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访微信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChatAgain(serviceSubtaskStatistic.getWeChatAgain() + 1L); |
| | | wechatAgainInfo.add(serviceSubtask); |
| | | } |
| | |
| | | //随访情况 |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 1) { |
| | | serviceSubtaskStatistic.setTaskSituation1(serviceSubtaskStatistic.getTaskSituation1() + 1); |
| | | taskSituation1Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 2) { |
| | | serviceSubtaskStatistic.setTaskSituation2(serviceSubtaskStatistic.getTaskSituation2() + 1); |
| | | taskSituation2Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 3) { |
| | | serviceSubtaskStatistic.setTaskSituation3(serviceSubtaskStatistic.getTaskSituation3() + 1); |
| | | taskSituation3Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 4) { |
| | | serviceSubtaskStatistic.setTaskSituation4(serviceSubtaskStatistic.getTaskSituation4() + 1); |
| | | taskSituation4Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 5) { |
| | | serviceSubtaskStatistic.setTaskSituation5(serviceSubtaskStatistic.getTaskSituation5() + 1); |
| | | taskSituation5Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 7) { |
| | | serviceSubtaskStatistic.setTaskSituation6(serviceSubtaskStatistic.getTaskSituation6() + 1); |
| | | taskSituation6Info.add(serviceSubtask); |
| | | } |
| | | } |
| | | serviceSubtaskStatistic.setFilterCountList(filterServiceSubtasks); |
| | |
| | | serviceSubtaskStatistic.setFollowUpFailInfo(followUpFailInfo); |
| | | //记录首次随访人工详情 |
| | | serviceSubtaskStatistic.setManualInfo(manualInfo); |
| | | //记录首次随访语音详情 |
| | | serviceSubtaskStatistic.setVoiceInfo(voiceInfo); |
| | | //记录首次随访短信详情 |
| | | serviceSubtaskStatistic.setSmsInfo(smsInfo); |
| | | //记录首次随访微信详情 |
| | |
| | | serviceSubtaskStatistic.setFollowUpFailAgainInfo(followUpFailAgainInfo); |
| | | //记录再次随访人工详情 |
| | | serviceSubtaskStatistic.setManualAgainInfo(manualAgainInfo); |
| | | //记录再次随访语音详情 |
| | | serviceSubtaskStatistic.setVoiceAgainInfo(voiceAgainInfo); |
| | | //记录再次随访短信详情 |
| | | serviceSubtaskStatistic.setSmsAgainInfo(smsAgainInfo); |
| | | //记录再次随访微信详情 |
| | | serviceSubtaskStatistic.setWechatAgainInfo(wechatAgainInfo); |
| | | |
| | | //随访情况详情 |
| | | serviceSubtaskStatistic.setTaskSituation1Info(taskSituation1Info); |
| | | serviceSubtaskStatistic.setTaskSituation2Info(taskSituation2Info); |
| | | serviceSubtaskStatistic.setTaskSituation3Info(taskSituation3Info); |
| | | serviceSubtaskStatistic.setTaskSituation4Info(taskSituation4Info); |
| | | serviceSubtaskStatistic.setTaskSituation5Info(taskSituation5Info); |
| | | serviceSubtaskStatistic.setTaskSituation6Info(taskSituation6Info); |
| | | return serviceSubtaskStatistic; |
| | | } |
| | | return serviceSubtaskStatistic; |
| | |
| | | serviceSubtaskStatistic.setDrname(serviceSubtaskList.get(0).getDrname()); |
| | | //出院人次 |
| | | serviceSubtaskStatistic.setDischargeCount(serviceSubtaskList.size()); |
| | | //出院人次详情 |
| | | serviceSubtaskStatistic.setDischargeCountInfo(serviceSubtaskList); |
| | | //无需随访详情 |
| | | List<ServiceSubtask> nonFollowUpInfo = new ArrayList<>(); |
| | | //记录过滤患者详情 |
| | |
| | | List<ServiceSubtask> followUpFailInfo = new ArrayList<>(); |
| | | //记录首次随访人工详情 |
| | | List<ServiceSubtask> manualInfo = new ArrayList<>(); |
| | | //记录首次随访语音详情 |
| | | List<ServiceSubtask> voiceInfo = new ArrayList<>(); |
| | | //记录首次随访短信详情 |
| | | List<ServiceSubtask> smsInfo = new ArrayList<>(); |
| | | //记录首次随访微信详情 |
| | | List<ServiceSubtask> wechatInfo = new ArrayList<>(); |
| | | |
| | | //记录随访情况详情 |
| | | List<ServiceSubtask> taskSituation1Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation2Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation3Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation4Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation5Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation6Info = new ArrayList<>(); |
| | | |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | //无需随访人次 |
| | |
| | | followUpSuccessInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访人工 (不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | | manualInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访语音 (不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoice(serviceSubtaskStatistic.getVoice() + 1L); |
| | | voiceInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访短信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSms(serviceSubtaskStatistic.getSms() + 1L); |
| | | smsInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访微信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChat(serviceSubtaskStatistic.getWeChat() + 1L); |
| | | wechatInfo.add(serviceSubtask); |
| | | } |
| | |
| | | followUpSuccessInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访人工 (统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | | manualInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访语音 (统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoice(serviceSubtaskStatistic.getVoice() + 1L); |
| | | voiceInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访短信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSms(serviceSubtaskStatistic.getSms() + 1L); |
| | | smsInfo.add(serviceSubtask); |
| | | } |
| | | //首次随访微信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChat(serviceSubtaskStatistic.getWeChat() + 1L); |
| | | wechatInfo.add(serviceSubtask); |
| | | } |
| | |
| | | //随访情况 |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 1) { |
| | | serviceSubtaskStatistic.setTaskSituation1(serviceSubtaskStatistic.getTaskSituation1() + 1); |
| | | taskSituation1Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 2) { |
| | | serviceSubtaskStatistic.setTaskSituation2(serviceSubtaskStatistic.getTaskSituation2() + 1); |
| | | taskSituation2Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 3) { |
| | | serviceSubtaskStatistic.setTaskSituation3(serviceSubtaskStatistic.getTaskSituation3() + 1); |
| | | taskSituation3Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 4) { |
| | | serviceSubtaskStatistic.setTaskSituation4(serviceSubtaskStatistic.getTaskSituation4() + 1); |
| | | taskSituation4Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 5) { |
| | | serviceSubtaskStatistic.setTaskSituation5(serviceSubtaskStatistic.getTaskSituation5() + 1); |
| | | taskSituation5Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 7) { |
| | | serviceSubtaskStatistic.setTaskSituation6(serviceSubtaskStatistic.getTaskSituation6() + 1); |
| | | taskSituation6Info.add(serviceSubtask); |
| | | } |
| | | } |
| | | serviceSubtaskStatistic.setFilterCountList(filterServiceSubtasks); |
| | |
| | | serviceSubtaskStatistic.setFollowUpFailInfo(followUpFailInfo); |
| | | //记录首次随访人工详情 |
| | | serviceSubtaskStatistic.setManualInfo(manualInfo); |
| | | //记录首次随访语音详情 |
| | | serviceSubtaskStatistic.setVoiceInfo(voiceInfo); |
| | | //记录首次随访短信详情 |
| | | serviceSubtaskStatistic.setSmsInfo(smsInfo); |
| | | //记录首次随访微信详情 |
| | | serviceSubtaskStatistic.setWechatInfo(wechatInfo); |
| | | |
| | | //随访情况详情 |
| | | serviceSubtaskStatistic.setTaskSituation1Info(taskSituation1Info); |
| | | serviceSubtaskStatistic.setTaskSituation2Info(taskSituation2Info); |
| | | serviceSubtaskStatistic.setTaskSituation3Info(taskSituation3Info); |
| | | serviceSubtaskStatistic.setTaskSituation4Info(taskSituation4Info); |
| | | serviceSubtaskStatistic.setTaskSituation5Info(taskSituation5Info); |
| | | serviceSubtaskStatistic.setTaskSituation6Info(taskSituation6Info); |
| | | return serviceSubtaskStatistic; |
| | | } |
| | | |
| | |
| | | serviceSubtaskStatistic.setDrname(serviceSubtaskList.get(0).getDrname()); |
| | | //出院人次 |
| | | serviceSubtaskStatistic.setDischargeCount(serviceSubtaskList.size()); |
| | | //出院人次详情 |
| | | serviceSubtaskStatistic.setDischargeCountInfo(serviceSubtaskList); |
| | | //无需随访详情 |
| | | List<ServiceSubtask> nonFollowUpInfo = new ArrayList<>(); |
| | | //记录过滤患者详情 |
| | |
| | | List<ServiceSubtask> followUpFailAgainInfo = new ArrayList<>(); |
| | | //记录再次随访人工详情 |
| | | List<ServiceSubtask> manualAgainInfo = new ArrayList<>(); |
| | | //记录再次随访语音详情 |
| | | List<ServiceSubtask> voiceAgainInfo = new ArrayList<>(); |
| | | //记录再次随访短信详情 |
| | | List<ServiceSubtask> smsAgainInfo = new ArrayList<>(); |
| | | //记录再次随访微信详情 |
| | | List<ServiceSubtask> wechatAgainInfo = new ArrayList<>(); |
| | | |
| | | //记录随访情况详情 |
| | | List<ServiceSubtask> taskSituation1Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation2Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation3Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation4Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation5Info = new ArrayList<>(); |
| | | List<ServiceSubtask> taskSituation6Info = new ArrayList<>(); |
| | | |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | //无需随访人次 |
| | |
| | | followUpSuccessAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访人工(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManualAgain(serviceSubtaskStatistic.getManualAgain() + 1L); |
| | | manualAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访语音(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoiceAgain(serviceSubtaskStatistic.getVoiceAgain() + 1L); |
| | | voiceAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访短信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSmsAgain(serviceSubtaskStatistic.getSmsAgain() + 1L); |
| | | smsAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访微信(不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChatAgain(serviceSubtaskStatistic.getWeChatAgain() + 1L); |
| | | wechatAgainInfo.add(serviceSubtask); |
| | | } |
| | |
| | | followUpSuccessAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访人工(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManualAgain(serviceSubtaskStatistic.getManualAgain() + 1L); |
| | | manualAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访语音(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoiceAgain(serviceSubtaskStatistic.getVoiceAgain() + 1L); |
| | | voiceAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访短信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSmsAgain(serviceSubtaskStatistic.getSmsAgain() + 1L); |
| | | smsAgainInfo.add(serviceSubtask); |
| | | } |
| | | //再次随访微信(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChatAgain(serviceSubtaskStatistic.getWeChatAgain() + 1L); |
| | | wechatAgainInfo.add(serviceSubtask); |
| | | } |
| | |
| | | //随访情况 |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 1) { |
| | | serviceSubtaskStatistic.setTaskSituation1(serviceSubtaskStatistic.getTaskSituation1() + 1); |
| | | taskSituation1Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 2) { |
| | | serviceSubtaskStatistic.setTaskSituation2(serviceSubtaskStatistic.getTaskSituation2() + 1); |
| | | taskSituation2Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 3) { |
| | | serviceSubtaskStatistic.setTaskSituation3(serviceSubtaskStatistic.getTaskSituation3() + 1); |
| | | taskSituation3Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 4) { |
| | | serviceSubtaskStatistic.setTaskSituation4(serviceSubtaskStatistic.getTaskSituation4() + 1); |
| | | taskSituation4Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 5) { |
| | | serviceSubtaskStatistic.setTaskSituation5(serviceSubtaskStatistic.getTaskSituation5() + 1); |
| | | taskSituation5Info.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getTaskSituation() != null && serviceSubtask.getTaskSituation() == 7) { |
| | | serviceSubtaskStatistic.setTaskSituation6(serviceSubtaskStatistic.getTaskSituation6() + 1); |
| | | taskSituation6Info.add(serviceSubtask); |
| | | } |
| | | } |
| | | serviceSubtaskStatistic.setFilterCountList(filterServiceSubtasks); |
| | |
| | | serviceSubtaskStatistic.setFollowUpFailAgainInfo(followUpFailAgainInfo); |
| | | //记录再次随访人工详情 |
| | | serviceSubtaskStatistic.setManualAgainInfo(manualAgainInfo); |
| | | //记录再次随访语音详情 |
| | | serviceSubtaskStatistic.setVoiceAgainInfo(voiceAgainInfo); |
| | | //记录再次随访短信详情 |
| | | serviceSubtaskStatistic.setSmsAgainInfo(smsAgainInfo); |
| | | //记录再次随访微信详情 |
| | | serviceSubtaskStatistic.setWechatAgainInfo(wechatAgainInfo); |
| | | |
| | | //随访情况详情 |
| | | serviceSubtaskStatistic.setTaskSituation1Info(taskSituation1Info); |
| | | serviceSubtaskStatistic.setTaskSituation2Info(taskSituation2Info); |
| | | serviceSubtaskStatistic.setTaskSituation3Info(taskSituation3Info); |
| | | serviceSubtaskStatistic.setTaskSituation4Info(taskSituation4Info); |
| | | serviceSubtaskStatistic.setTaskSituation5Info(taskSituation5Info); |
| | | serviceSubtaskStatistic.setTaskSituation6Info(taskSituation6Info); |
| | | return serviceSubtaskStatistic; |
| | | } |
| | | |
| | |
| | | serviceSubtaskStatistic.setDrname(serviceSubtaskList.get(0).getDrname()); |
| | | //出院人次 |
| | | serviceSubtaskStatistic.setDischargeCount(serviceSubtaskList.size()); |
| | | //出院人次详情 |
| | | serviceSubtaskStatistic.setDischargeCountInfo(serviceSubtaskList); |
| | | serviceSubtaskStatistic.setJoyCount(0); |
| | | serviceSubtaskStatistic.setJoyAllCount(0); |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | |
| | | } else { |
| | | serviceSubtaskStatistic.setFollowUpRate("0.00%"); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSms(serviceSubtaskStatistic.getSms() + 1L); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChat(serviceSubtaskStatistic.getWeChat() + 1L); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getExcep().equals("1")) { |
| | |
| | | } else { |
| | | serviceSubtaskStatistic.setFollowUpRateAgain("0.00%"); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManualAgain(serviceSubtaskStatistic.getManualAgain() + 1L); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSmsAgain(serviceSubtaskStatistic.getSmsAgain() + 1L); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChatAgain(serviceSubtaskStatistic.getWeChatAgain() + 1L); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getExcep().equals("1")) { |
| | |
| | | serviceSubtaskStatistic.setDrname(serviceSubtaskList.get(0).getDrname()); |
| | | //出院人次 |
| | | serviceSubtaskStatistic.setDischargeCount(serviceSubtaskList.size()); |
| | | //出院人次详情 |
| | | serviceSubtaskStatistic.setDischargeCountInfo(serviceSubtaskList); |
| | | serviceSubtaskStatistic.setJoyCount(0); |
| | | serviceSubtaskStatistic.setJoyAllCount(0); |
| | | |
| | |
| | | List<ServiceSubtaskCount> subCounts = new ArrayList<>(); |
| | | subCounts = serviceSubtaskMapper.getSfStatisticsCategory(serviceSubtaskCountReq); |
| | | |
| | | //无需随访详情 |
| | | List<ServiceSubtask> nonFollowUpInfo = new ArrayList<>(); |
| | | //应随访详情 |
| | | List<ServiceSubtask> followUpNeededAllInfo = new ArrayList<>(); |
| | | //记录首次应随访详情 |
| | | List<ServiceSubtask> needFollowUpInfo = new ArrayList<>(); |
| | | //记录首次待随访详情 |
| | | List<ServiceSubtask> pendingFollowUpInfo = new ArrayList<>(); |
| | | //记录首次随访成功详情 |
| | | List<ServiceSubtask> followUpSuccessInfo = new ArrayList<>(); |
| | | //记录首次随访失败详情 |
| | | List<ServiceSubtask> followUpFailInfo = new ArrayList<>(); |
| | | //记录首次随访人工详情 |
| | | List<ServiceSubtask> manualInfo = new ArrayList<>(); |
| | | //记录首次随访语音详情 |
| | | List<ServiceSubtask> voiceInfo = new ArrayList<>(); |
| | | //记录首次随访短信详情 |
| | | List<ServiceSubtask> smsInfo = new ArrayList<>(); |
| | | //记录首次随访微信详情 |
| | | List<ServiceSubtask> wechatInfo = new ArrayList<>(); |
| | | |
| | | //记录首次结果异常详情 |
| | | List<ServiceSubtask> abnormalInfo = new ArrayList<>(); |
| | | |
| | | //记录再次应随访详情 |
| | | List<ServiceSubtask> needFollowUpAgainInfo = new ArrayList<>(); |
| | | //记录再次待随访详情 |
| | | List<ServiceSubtask> pendingFollowUpAgainInfo = new ArrayList<>(); |
| | | //记录再次随访成功详情 |
| | | List<ServiceSubtask> followUpSuccessAgainInfo = new ArrayList<>(); |
| | | //记录再次随访失败详情 |
| | | List<ServiceSubtask> followUpFailAgainInfo = new ArrayList<>(); |
| | | //记录再次随访人工详情 |
| | | List<ServiceSubtask> manualAgainInfo = new ArrayList<>(); |
| | | //记录再次随访语音详情 |
| | | List<ServiceSubtask> voiceAgainInfo = new ArrayList<>(); |
| | | //记录再次随访短信详情 |
| | | List<ServiceSubtask> smsAgainInfo = new ArrayList<>(); |
| | | //记录再次随访微信详情 |
| | | List<ServiceSubtask> wechatAgainInfo = new ArrayList<>(); |
| | | //记录再次结果异常详情 |
| | | List<ServiceSubtask> abnormalAgainInfo = new ArrayList<>(); |
| | | |
| | | |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | List<ServiceSubtaskCount> subCountTemp = subCounts.stream().filter(r -> r.getSubTaskId().equals(serviceSubtask.getId())).collect(Collectors.toList()); |
| | | |
| | |
| | | //无需随访人次 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 4) { |
| | | serviceSubtaskStatistic.setNonFollowUp(serviceSubtaskStatistic.getNonFollowUp() + 1L); |
| | | nonFollowUpInfo.add(serviceSubtask); |
| | | } |
| | | //应随访人次 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setFollowUpNeeded(serviceSubtaskStatistic.getFollowUpNeeded() + 1L); |
| | | followUpNeededAllInfo.add(serviceSubtask); |
| | | } |
| | | |
| | | //首次出院随访 |
| | | if (serviceSubtask.getVisitCount() != null && serviceSubtask.getVisitCount() == 1) { |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setNeedFollowUp(serviceSubtaskStatistic.getNeedFollowUp() + 1L); |
| | | needFollowUpInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | | serviceSubtaskStatistic.setPendingFollowUp(serviceSubtaskStatistic.getPendingFollowUp() + 1L); |
| | | pendingFollowUpInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate() == 6)) { |
| | | serviceSubtaskStatistic.setFollowUpSuccess(serviceSubtaskStatistic.getFollowUpSuccess() + 1L); |
| | | followUpSuccessInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate() == 5 || serviceSubtask.getSendstate() == 7)) { |
| | | serviceSubtaskStatistic.setFollowUpFail(serviceSubtaskStatistic.getFollowUpFail() + 1L); |
| | | followUpFailInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtaskStatistic.getNeedFollowUp() > 0) { |
| | | double rate = (double) (serviceSubtaskStatistic.getFollowUpSuccess() + serviceSubtaskStatistic.getFollowUpFail()) / serviceSubtaskStatistic.getNeedFollowUp(); |
| | |
| | | } else { |
| | | serviceSubtaskStatistic.setFollowUpRate("0.00%"); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | | manualInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoice(serviceSubtaskStatistic.getVoice() + 1L); |
| | | voiceInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSms(serviceSubtaskStatistic.getSms() + 1L); |
| | | smsInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChat(serviceSubtaskStatistic.getWeChat() + 1L); |
| | | wechatInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getExcep().equals("1")) { |
| | | serviceSubtaskStatistic.setAbnormal(serviceSubtaskStatistic.getAbnormal() + 1L); |
| | | abnormalInfo.add(serviceSubtask); |
| | | } |
| | | }//二次出院随访 |
| | | else if (serviceSubtask.getVisitCount() != null && serviceSubtask.getVisitCount() > 1) { |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setNeedFollowUpAgain(serviceSubtaskStatistic.getNeedFollowUpAgain() + 1L); |
| | | needFollowUpAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | | serviceSubtaskStatistic.setPendingFollowUpAgain(serviceSubtaskStatistic.getPendingFollowUpAgain() + 1L); |
| | | pendingFollowUpAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate() == 1 || serviceSubtask.getSendstate() == 3 || serviceSubtask.getSendstate() == 6)) { |
| | | serviceSubtaskStatistic.setFollowUpSuccessAgain(serviceSubtaskStatistic.getFollowUpSuccessAgain() + 1L); |
| | | followUpSuccessAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 5) { |
| | | serviceSubtaskStatistic.setFollowUpFailAgain(serviceSubtaskStatistic.getFollowUpFailAgain() + 1L); |
| | | followUpFailAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtaskStatistic.getNeedFollowUp() > 0) { |
| | | double rate = (double) (serviceSubtaskStatistic.getFollowUpSuccessAgain() + serviceSubtaskStatistic.getFollowUpFailAgain()) / serviceSubtaskStatistic.getNeedFollowUpAgain(); |
| | |
| | | } else { |
| | | serviceSubtaskStatistic.setFollowUpRateAgain("0.00%"); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("1")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManualAgain(serviceSubtaskStatistic.getManualAgain() + 1L); |
| | | manualAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("4")) { |
| | | //再次随访语音(统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("3")) { |
| | | serviceSubtaskStatistic.setVoiceAgain(serviceSubtaskStatistic.getVoiceAgain() + 1L); |
| | | voiceAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("4")) { |
| | | serviceSubtaskStatistic.setSmsAgain(serviceSubtaskStatistic.getSmsAgain() + 1L); |
| | | smsAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getPreachform().equals("5")) { |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("5")) { |
| | | serviceSubtaskStatistic.setWeChatAgain(serviceSubtaskStatistic.getWeChatAgain() + 1L); |
| | | wechatAgainInfo.add(serviceSubtask); |
| | | } |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getExcep().equals("1")) { |
| | | serviceSubtaskStatistic.setAbnormalAgain(serviceSubtaskStatistic.getAbnormalAgain() + 1L); |
| | | abnormalAgainInfo.add(serviceSubtask); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //记录无需随访详情 |
| | | serviceSubtaskStatistic.setNonFollowUpInfo(nonFollowUpInfo); |
| | | //记录需随访详情 |
| | | serviceSubtaskStatistic.setFollowUpNeededAllInfo(followUpNeededAllInfo); |
| | | //记录首次应随访详情 |
| | | serviceSubtaskStatistic.setNeedFollowUpInfo(needFollowUpInfo); |
| | | //记录首次待随访详情 |
| | | serviceSubtaskStatistic.setPendingFollowUpInfo(pendingFollowUpInfo); |
| | | //记录首次随访成功详情 |
| | | serviceSubtaskStatistic.setFollowUpSuccessInfo(followUpSuccessInfo); |
| | | //记录首次随访失败详情 |
| | | serviceSubtaskStatistic.setFollowUpFailInfo(followUpFailInfo); |
| | | //记录首次随访人工详情 |
| | | serviceSubtaskStatistic.setManualInfo(manualInfo); |
| | | //记录首次随访语音详情 |
| | | serviceSubtaskStatistic.setVoiceInfo(voiceInfo); |
| | | //记录首次随访短信详情 |
| | | serviceSubtaskStatistic.setSmsInfo(smsInfo); |
| | | //记录首次随访微信详情 |
| | | serviceSubtaskStatistic.setWechatInfo(wechatInfo); |
| | | //记录再次应随访详情 |
| | | serviceSubtaskStatistic.setNeedFollowUpAgainInfo(needFollowUpAgainInfo); |
| | | //记录再次待随访详情 |
| | | serviceSubtaskStatistic.setPendingFollowUpAgainInfo(pendingFollowUpAgainInfo); |
| | | //记录再次随访成功详情 |
| | | serviceSubtaskStatistic.setFollowUpSuccessAgainInfo(followUpSuccessAgainInfo); |
| | | //记录再次随访失败详情 |
| | | serviceSubtaskStatistic.setFollowUpFailAgainInfo(followUpFailAgainInfo); |
| | | //记录再次随访人工详情 |
| | | serviceSubtaskStatistic.setManualAgainInfo(manualAgainInfo); |
| | | //记录再次随访语音详情 |
| | | serviceSubtaskStatistic.setVoiceAgainInfo(voiceAgainInfo); |
| | | //记录再次随访短信详情 |
| | | serviceSubtaskStatistic.setSmsAgainInfo(smsAgainInfo); |
| | | //记录再次随访微信详情 |
| | | serviceSubtaskStatistic.setWechatAgainInfo(wechatAgainInfo); |
| | | return serviceSubtaskStatistic; |
| | | } |
| | | |
| | |
| | | serviceSubtaskPreachform1.setRemark(remark); |
| | | serviceSubtaskPreachformMapper.updateServiceSubtaskPreachform(serviceSubtaskPreachform1); |
| | | |
| | | |
| | | //如果当前的preachform已经是最后一个了,那直接将serviceSubtask的sendstate状态改成5就行了(全失败了) |
| | | if (serviceSubtaskPreachform1.getSort() == spSize.size() && failSendstate.equals("4")) { |
| | | serviceSubtask.setCurrentPreachform(preachform); |
| | | serviceSubtask.setSendstate(5L); |
| | | serviceSubtask.setRemark("所有发送方式均未获取结果,任务失败"); |
| | | serviceSubtask.setRemark(remark + ";所有发送方式均未获取结果,任务失败"); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | return true; |
| | | } else { |
| | | //加入目前补偿里的 remark |
| | | serviceSubtask.setRemark(StringUtils.isNotEmpty(serviceSubtask.getRemark()) ? serviceSubtask.getRemark() + "," + remark : remark); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | } |
| | | |