浏览代码

根据病历id获取患者年龄

chengyao 4 年之前
父节点
当前提交
44c3749024
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

+ 10 - 0
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -223,6 +223,13 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 .eq("behospital_code", getDetailVO.getBehospitalCode()), false
         );
 
+        // 获取患者年龄
+        HomePage homePage = homePageFacade.getOne(new QueryWrapper<HomePage>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", getDetailVO.getHospitalId())
+                .eq("behospital_code", getDetailVO.getBehospitalCode()), false
+        );
+
         List<String> paramList = getDetailVO.getParamStr();// 参数列表
 
         if (ListUtil.isEmpty(paramList) || paramList.contains("beHospital")) {
@@ -231,6 +238,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该病历已删除!");
             }
             BeanUtil.copyProperties(behospitalInfo, behosDTO);
+            if(null != homePage){
+                behosDTO.setAge(homePage.getAge());
+            }
             res.put("beHospital", behosDTO);
         }