陈昶聿
13 小时以前 f58b1d61cb9313f9c05f4dcd95dcbb7d5f416db5
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -204,6 +204,10 @@
    @Value("${spring.profiles.active}")
    private String active;
    @Autowired
    private PatMedOperationMapper patMedOperationMapper;
    @Autowired
    private PatMedOperationItemMapper patMedOperationItemMapper;
    /**
     * 查询单一任务(随访)
@@ -667,8 +671,12 @@
        patMedInhosp.setInhospstate("0");
        List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp);
        PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(serviceSubtask1.getPatid());
        if (patMedInhospList.size() > 0) {
        //景宁 新增再次随访不能触发患者再入院
        boolean inhospAgain = true;
        if (serviceSubtask1.getOrgid().equals("47255004333112711A1001")) {
            inhospAgain = false;
        }
        if (patMedInhospList.size() > 0 && inhospAgain) {
            serviceSubtask1.setIsVisitAgain(2);
            serviceSubtask1.setRemark(StringUtils.isNotEmpty(serviceSubtask.getRemark()) ? serviceSubtask.getRemark() + ";患者再入院了" : "患者再入院了");
            serviceSubtask1.setSendstate(4L);
@@ -1121,6 +1129,15 @@
                                patMedOuthosp.setServerState("0");
                                patMedOuthospService.updatePatMedOuthosp(patMedOuthosp);
                            }
                        }
                    } else if (serviceSubtask.getServiceType().equals("19")) {
                        ServiceTask st = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid());
                        //如果任务是长期任务,需要将该患者的手术详情数据
                        if (st != null && st.getLongTask() == 1 && ObjectUtils.isNotEmpty(serviceSubtask.getOperationItemId())) {
                            PatMedOperationItem patMedOperationItem = new PatMedOperationItem();
                            patMedOperationItem.setOpercheckFlag("0");
                            patMedOperationItem.setId(serviceSubtask.getOperationItemId());
                            patMedOperationItemMapper.updatePatMedOperationItem(patMedOperationItem);
                        }
                    }
                }
@@ -2849,6 +2866,12 @@
                collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getDrcode()).orElse("Unknown")));
                break;
            case "management_doctor_code":
                rawData = rawData.stream()
                        .peek(item -> {
                            item.setDrname(item.getManagementDoctor());
                            item.setDrcode(item.getManagementDoctorCode());
                        })
                        .collect(Collectors.toList());
                collect = rawData.stream().collect(Collectors.groupingBy(subtask -> Optional.ofNullable(subtask.getManagementDoctorCode()).orElse("Unknown")));
                break;
            case "deptcode":