소스 검색

改版信息采集表

cgp 4 일 전
부모
커밋
c5a012b5e9
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

+ 7 - 3
fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -454,9 +454,13 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
             throw new CustomException("网络异常,请稍后再试!");
         }
         //组装处方表里的患者信息
-        String birthday = String.valueOf(param.getPatientInfo().getBirthday());
-        fsPrescribe.setPatientBirthday(birthday);
-        fsPrescribe.setPatientAge(String.valueOf(calculateAge(birthday)));
+        String birthday = null;
+        if (param.getPatientInfo().getBirthday() != null) {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            birthday = sdf.format(param.getPatientInfo().getBirthday());
+            fsPrescribe.setPatientBirthday(birthday);
+            fsPrescribe.setPatientAge(String.valueOf(calculateAge(birthday)));
+        }
         fsPrescribe.setPatientId(param.getPatientInfo().getPatientId());
         fsPrescribe.setPatientName(param.getPatientInfo().getPatientName());
         fsPrescribe.setPatientTel(param.getPatientInfo().getMobile());