| | |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | |
| | | serviceSubtaskRes.setSendstateView(1L); |
| | | if (serviceSubtaskRes.getSendstate() == 6) serviceSubtaskRes.setSendstateView(2L); |
| | | if (serviceSubtaskRes.getSendstate() == 4) serviceSubtaskRes.setSendstateView(3L); |
| | | // 填充当前补偿 |
| | | if (StringUtils.isEmpty(serviceSubtask.getCurrentPreachform())){ |
| | | if(StringUtils.isNotEmpty(serviceSubtask.getPreachform())){ |
| | | //默认取第一个 |
| | | serviceSubtaskRes.setCurrentPreachform(serviceSubtask.getPreachform().split(",")[0]); |
| | | } |
| | | } |
| | | serviceSubtaskResList.add(serviceSubtaskRes); |
| | | } |
| | | return serviceSubtaskResList; |
| | |
| | | //首次出院随访 |
| | | if (serviceSubtask.getVisitCount() != null && serviceSubtask.getVisitCount() == 1) { |
| | | //首次应随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L)) { |
| | | serviceSubtaskStatistic.setNeedFollowUp(serviceSubtaskStatistic.getNeedFollowUp() + 1L); |
| | | } |
| | | //首次待随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | | serviceSubtaskStatistic.setPendingFollowUp(serviceSubtaskStatistic.getPendingFollowUp() + 1L); |
| | | //首次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate().equals(4L)) { |
| | | serviceSubtaskStatistic.setNonFollowUpFirst(serviceSubtaskStatistic.getNonFollowUpFirst() + 1L); |
| | | } |
| | | //首次随访失败(包括随访失败+人工超时) |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate() == 5 || serviceSubtask.getSendstate() == 7)) { |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(5L) || serviceSubtask.getSendstate().equals(7L))) { |
| | | serviceSubtaskStatistic.setFollowUpFail(serviceSubtaskStatistic.getFollowUpFail() + 1L); |
| | | } |
| | | /** |
| | |
| | | //首次随访成功 |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(6L))) { |
| | | serviceSubtaskStatistic.setFollowUpSuccess(serviceSubtaskStatistic.getFollowUpSuccess() + 1L); |
| | | } |
| | | //首次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(4L))) { |
| | | serviceSubtaskStatistic.setNonFollowUpFirst(serviceSubtaskStatistic.getNonFollowUpFirst() + 1L); |
| | | } |
| | | //首次随访人工 (不统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && !serviceSubtask.getSendstate().equals(4L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(6L))) { |
| | | serviceSubtaskStatistic.setFollowUpSuccess(serviceSubtaskStatistic.getFollowUpSuccess() + 1L); |
| | | } |
| | | //首次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(4L))) { |
| | | serviceSubtaskStatistic.setNonFollowUpFirst(serviceSubtaskStatistic.getNonFollowUpFirst() + 1L); |
| | | } |
| | | //首次随访人工 (只统计已完成) |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate().equals(6L) && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | | serviceSubtaskStatistic.setManual(serviceSubtaskStatistic.getManual() + 1L); |
| | |
| | | //首次随访成功 - 统计时候加上不执行的,已发送的 |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(6L) || serviceSubtask.getSendstate().equals(3L) || serviceSubtask.getSendstate().equals(4L))) { |
| | | serviceSubtaskStatistic.setFollowUpSuccess(serviceSubtaskStatistic.getFollowUpSuccess() + 1L); |
| | | } |
| | | //首次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(4L))) { |
| | | serviceSubtaskStatistic.setNonFollowUpFirst(serviceSubtaskStatistic.getNonFollowUpFirst() + 1L); |
| | | } |
| | | //首次随访人工 (统计不执行) |
| | | if (serviceSubtask.getSendstate() != null && ObjectUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) && serviceSubtask.getCurrentPreachform().equals("1")) { |
| | |
| | | //再次应随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setNeedFollowUpAgain(serviceSubtaskStatistic.getNeedFollowUpAgain() + 1L); |
| | | } |
| | | //再次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 4) { |
| | | serviceSubtaskStatistic.setNonFollowUpAgain(serviceSubtaskStatistic.getNonFollowUpAgain() + 1L); |
| | | } |
| | | //再次待随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setNeedFollowUp(serviceSubtaskStatistic.getNeedFollowUp() + 1L); |
| | | } |
| | | //首次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate().equals(4L))) { |
| | | serviceSubtaskStatistic.setNonFollowUpFirst(serviceSubtaskStatistic.getNonFollowUpFirst() + 1L); |
| | | } |
| | | //首次待随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | | serviceSubtaskStatistic.setPendingFollowUp(serviceSubtaskStatistic.getPendingFollowUp() + 1L); |
| | |
| | | //再次应随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setNeedFollowUpAgain(serviceSubtaskStatistic.getNeedFollowUpAgain() + 1L); |
| | | } |
| | | //再次无需随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 4) { |
| | | serviceSubtaskStatistic.setNonFollowUpAgain(serviceSubtaskStatistic.getNonFollowUpAgain() + 1L); |
| | | } |
| | | //再次待随访 |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtask> gethelibraryCountHyperlink(HeLibraryCountVO heLibraryCountVO){ |
| | | String hyperLinkInfoType = heLibraryCountVO.getHyperLinkInfoType(); |
| | | if(StringUtils.isNotEmpty(hyperLinkInfoType)){ |
| | | heLibraryCountVO.setSendstate(null); |
| | | heLibraryCountVO.setIsFinished(null); |
| | | switch (hyperLinkInfoType) { |
| | | case "totalCountInfo": |
| | | break; |
| | | case "sendSuccessCountInfo": |
| | | heLibraryCountVO.setSendstate(6L); |
| | | break; |
| | | case "readCountInfo": |
| | | heLibraryCountVO.setIsFinished("1"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.gethelibraryCountHyperlink(heLibraryCountVO); |
| | | return serviceSubtasks; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> smsSubTask(Long subid) { |
| | | log.info("smsSubTask的入参为:{}", subid); |
| | | Map<String, Object> resultMap = new HashMap<>(); |
| | |
| | | return resultMap; |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtaskDetailRatioExport> statQuestionOption(List<Long> taskIds) { |
| | | return serviceSubtaskMapper.statQuestionOption(taskIds); |
| | | } |
| | | |
| | | private Boolean saveServiceSubtaskDetail(ServiceSubtask serviceSubtask) { |
| | | Boolean result = true; |
| | | //3.4 如果3.1或3.2为true的话,根据type判断什么类型 |