Selaa lähdekoodia

改版信息采集表

cgp 4 päivää sitten
vanhempi
commit
c5a012b5e9

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