Commit ad4fd4da534d6ff09ae50778e2895bb5981334ba
1 parent
6175c8e524
Exists in
master
and in
3 other branches
update
Showing 1 changed file with 9 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
ad4fd4d
| ... | ... | @@ -148,11 +148,18 @@ | 
| 148 | 148 | } | 
| 149 | 149 | } | 
| 150 | 150 | |
| 151 | + ResidentsArchiveModel newModel = null; | |
| 152 | + | |
| 151 | 153 | //历史建档记录 | 
| 152 | 154 | List<Map> list = new ArrayList<>(); | 
| 153 | 155 | List<ResidentsArchiveHistoryResult> resultList = new ArrayList<>(); | 
| 154 | 156 | if (CollectionUtils.isNotEmpty(residents)){ | 
| 157 | + | |
| 158 | + //如果该身份证号或者就诊卡号已经在某家医院建档,拉取最新的一条建档记录返回给前端 | |
| 159 | + newModel = residents.get(0); | |
| 160 | + | |
| 155 | 161 | for (ResidentsArchiveModel data : residents){ | 
| 162 | + | |
| 156 | 163 | ResidentsArchiveHistoryResult result = new ResidentsArchiveHistoryResult(); | 
| 157 | 164 | //查询医院机构 | 
| 158 | 165 | if (StringUtils.isNotEmpty(data.getHospitalId())){ | 
| ... | ... | @@ -167,6 +174,7 @@ | 
| 167 | 174 | resultList.add(result); | 
| 168 | 175 | } | 
| 169 | 176 | } | 
| 177 | + | |
| 170 | 178 | //性别 | 
| 171 | 179 | List<BasicConfigResult> sexResults = basicConfigFacade.getBaseicConfigByParentId(SystemConfig.SEX_ID); | 
| 172 | 180 | typeMap.put("sex", sexResults); | 
| ... | ... | @@ -208,6 +216,7 @@ | 
| 208 | 216 | |
| 209 | 217 | //历史建档记录 | 
| 210 | 218 | Map<String,Object> mapData = new HashMap<>(); | 
| 219 | + mapData.put("firstBuildData",newModel); | |
| 211 | 220 | mapData.put("archiveHistory",resultList); | 
| 212 | 221 | mapData.put("initBuildDate", DateUtil.getyyyy_MM_dd(new Date())); | 
| 213 | 222 | list.add(mapData); |