Переглянути джерело

根据病历id获取患者年龄

chengyao 4 роки тому
батько
коміт
44c3749024

+ 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);
         }