Browse Source

update:修改术前问卷接口

zhouzeyu 6 tháng trước cách đây
mục cha
commit
6d4ffef588

+ 8 - 2
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizClinicServiceImpl.java

@@ -207,17 +207,23 @@ public class BizClinicServiceImpl extends ServiceImpl<BizClinicRepository,BizCli
     public BizPreSurgeryQuestionVO selectPreSurgeryQuestionnaire(String clinicId) {
         //判断临床id是否为空
         if(StrUtil.isBlank(clinicId)){
-            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"患者信息不存在");
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"参数为空");
         }
         BizClinicPO clinic = baseMapper.selectById(clinicId);
+        if (ObjectUtil.isNull(clinic)){
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"手术信息不存在");
+        }
         String deptId = clinic.getDeptId();
         Date lastQuestionTime = clinic.getLastQuestionTime();
 
         //判断科室id是否为空
         if(StrUtil.isBlank(deptId)){
-            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"科室信息不存在");
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"手术未关联科室");
         }
         BizDeptDTO bizDeptDTO = bizDeptService.selectBizDeptById(deptId);
+        if (ObjectUtil.isNull(bizDeptDTO)){
+            throw new ServiceException(TRExcCode.SYSTEM_ERROR_B0001,"科室信息不存在");
+        }
         String groupId = bizDeptDTO.getGroupId();
         //通过获取到的groupId查询问卷调查问题表
         List<BizWxDeptQuestionVO> questionVOList = bizQuestionService.selectBizQuestionByGroupId(groupId);