liusheng
8 天以前 18a48c5c23bf1c8547165cb2bb3162f2c2172016
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -166,7 +166,7 @@
    private Integer phoneEndHour;
    @Autowired
    private Icd10Mapper icd10Mapper;
    private IPatMedOuthospService patMedOuthospService;
    @Value("${spring.profiles.active}")
    private String active;
@@ -804,7 +804,6 @@
                serviceTask.setSendTimeSlot(JSON.toJSONString(serviceTaskVO.getSendTimeslot()));
            //修改操作,需要将stopState状态+1
            ServiceTask serviceTask1 = serviceTaskService.selectServiceTaskByTaskid(serviceTask.getTaskid());
            //获取到该任务所有的服务,并从队列里删除
            ServiceSubtaskEntity serviceSubtaskVO = new ServiceSubtaskEntity();
            serviceSubtaskVO.setTaskid(serviceTask1.getTaskid());
            serviceSubtaskVO.setSendstate(2L);
@@ -826,6 +825,27 @@
                    redisCache.removeElementFromList("cache-2", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-3", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-4", serviceSubtask.getId().toString());
                    //将出入院表的数据,还原成还未处理的状态
                    if(serviceSubtask.getServiceType().equals("2")) {
                        PatMedInhosp patMedInhosp = new PatMedInhosp();
                        patMedInhosp.setDeptcheckFlag("0");
                        patMedInhosp.setWardcheckFlag("0");
                        patMedInhosp.setDiagcheckFlag("0");
                        patMedInhosp.setInhospid(serviceSubtask.getInhospid());
                        patMedInhospMapper.updatePatMedInhosp(patMedInhosp);
                    }else if(serviceSubtask.getServiceType().equals("3")) {
                        if(serviceSubtask.getInhospid()!=null) {
                            PatMedOuthospQueryReq req=new PatMedOuthospQueryReq();
                            req.setOuthospno(serviceSubtask.getHospno());
                            List<PatMedOuthosp> patMedOuthosps = patMedOuthospMapper.callSpQueryOuthosp(req);
                            if(CollectionUtils.isNotEmpty(patMedOuthosps)) {
                                PatMedOuthosp patMedOuthosp = patMedOuthosps.get(0);
                                patMedOuthosp.setServerState("0");
                                patMedOuthospService.updatePatMedOuthosp(patMedOuthosp);
                            }
                        }
                    }
                }
            }
@@ -891,12 +911,13 @@
                    }
                    serviceTaskdiag.setLongtask(Long.valueOf(serviceTask.getLongTask()));
                    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.setGuid(serviceTask1.getGuid());
                    serviceTaskdiag.setServiceType(serviceTask1.getServiceType());
                    serviceTaskdiag.setOrgid(serviceTask1.getOrgid());
                    serviceTaskdiag.setDeptCode(serviceTask1.getDeptcode());
                    serviceTaskdiag.setDeptName(serviceTask1.getDeptname());
                    serviceTaskdiag.setWardCode(serviceTask1.getLeavehospitaldistrictcode());
                    serviceTaskdiag.setWardName(serviceTask1.getLeavehospitaldistrictname());
                    serviceTaskdiag.setUpdateTime(new Date());
                    if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) {
                        String[] icd10codes = serviceTaskVO.getIcd10code().split(",");
@@ -3610,8 +3631,8 @@
                serviceSubtaskCountReq.setSendstates(sendstates1);
            }
        }
        List<ServiceSubtask> subtasks = serviceSubtaskMapper.getSfStatistics(serviceSubtaskCountReq);
        return subtasks;
        List<ServiceSubtask> serviceSubtasks = serviceSubtaskMapper.getSfStatisticsHyperlink(serviceSubtaskCountReq);
        return serviceSubtasks;
    }
    private void applyHyperLinkInfoType(ServiceSubtaskCountReq serviceSubtaskCountReq, String hyperLinkInfoType) {