Explorar o código

根据病历id获取患者年龄

chengyao %!s(int64=4) %!d(string=hai) anos
pai
achega
44c3749024
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  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);
         }