zqy
2024-05-19 8b0d45c839ddb03863b0bae6ea7425fbc29b9648
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -72,6 +72,11 @@
//        return AjaxResult.success(data);
        //要查自己家庭的
        ZInfoUser myself = zInfoUserService.getMyself();
        if(myself==null)
        {
            //   System.out.println("ssssss");
            return AjaxResult.success("您没加入到对应的家庭,请联系管理员");
        }
        Long familyId = myself.getFamilyId();
        //也要查别人授权的
        List<ZAuthority> authority = zAuthorityService.getAuthority();
@@ -150,10 +155,17 @@
        }
        log.info("数据列表为:{}", dataList);
       for (ZfDoctor symptom : dataList){
           if (symptom.getSymptom().length() == 0) {
               throw new RuntimeException("症状为空,导入数据失败");
           }
       }
        for (ZfDoctor zfDoctor : dataList) {
            zfDoctorService.addData(zfDoctor);
        }
        return AjaxResult.success("导入数据成功");
    }