瀏覽代碼

北仑修改

shiyue 4 年之前
父節點
當前提交
9162e6a18b
共有 1 個文件被更改,包括 14 次插入11 次删除
  1. 14 11
      src/main/java/com/diagbot/facade/DataPageDockFacade.java

+ 14 - 11
src/main/java/com/diagbot/facade/DataPageDockFacade.java

@@ -14,6 +14,7 @@ import com.diagbot.util.HttpUtils;
 import com.diagbot.vo.*;
 import com.google.common.collect.Lists;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -85,17 +86,19 @@ public class DataPageDockFacade {
         PushJoinVO pushJoinVO = new PushJoinVO();
         BeanUtil.copyProperties(dataPageDockNbrmVo, pushJoinVO);
         //5.0字段转换6.0字段
-        pushJoinVO.setPasts(dataPageDockNbrmVo.getMedicalHistory().getPasts());
-        pushJoinVO.setInfectious(dataPageDockNbrmVo.getMedicalHistory().getInfectious());
-        pushJoinVO.setAllergy(dataPageDockNbrmVo.getMedicalHistory().getAllergy());
-        pushJoinVO.setPasts(dataPageDockNbrmVo.getMedicalHistory().getPasts());
-        pushJoinVO.setVaccination(dataPageDockNbrmVo.getMedicalHistory().getVaccination());
-        pushJoinVO.setPersonal(dataPageDockNbrmVo.getMedicalHistory().getPersonal());
-        pushJoinVO.setMarital(dataPageDockNbrmVo.getMedicalHistory().getMarital());
-        pushJoinVO.setFamily(dataPageDockNbrmVo.getMedicalHistory().getFamily());
-        pushJoinVO.setMenstrual(dataPageDockNbrmVo.getMedicalHistory().getMenstrual());
-        pushJoinVO.setOther(dataPageDockNbrmVo.getMedicalHistory().getOther());
-        pushJoinVO.setAge(dataPageDockNbrmVo.getAge().toString());
+        if (null!=dataPageDockNbrmVo.getMedicalHistory()) {
+            pushJoinVO.setPasts(dataPageDockNbrmVo.getMedicalHistory().getPasts());
+            pushJoinVO.setInfectious(dataPageDockNbrmVo.getMedicalHistory().getInfectious());
+            pushJoinVO.setAllergy(dataPageDockNbrmVo.getMedicalHistory().getAllergy());
+            pushJoinVO.setPasts(dataPageDockNbrmVo.getMedicalHistory().getPasts());
+            pushJoinVO.setVaccination(dataPageDockNbrmVo.getMedicalHistory().getVaccination());
+            pushJoinVO.setPersonal(dataPageDockNbrmVo.getMedicalHistory().getPersonal());
+            pushJoinVO.setMarital(dataPageDockNbrmVo.getMedicalHistory().getMarital());
+            pushJoinVO.setFamily(dataPageDockNbrmVo.getMedicalHistory().getFamily());
+            pushJoinVO.setMenstrual(dataPageDockNbrmVo.getMedicalHistory().getMenstrual());
+            pushJoinVO.setOther(dataPageDockNbrmVo.getMedicalHistory().getOther());
+            pushJoinVO.setAge(dataPageDockNbrmVo.getAge().toString());
+        }
         long time2 = System.currentTimeMillis();
         System.out.println("参数改变用时---------------"+(time2-time1));
         // 将基本参数保存到redis