Commit 7212f6c623efce878c0bc385037e0e8a6e114d18
1 parent
cb332e4c01
Exists in
master
and in
6 other branches
改字段
Showing 3 changed files with 31 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
7212f6c
| ... | ... | @@ -2202,7 +2202,7 @@ |
| 2202 | 2202 | Iterator<Map.Entry<String, List<String>>> iterator = treatmentOpinion2.entrySet().iterator(); |
| 2203 | 2203 | while (iterator.hasNext()) { |
| 2204 | 2204 | Map.Entry<String, List<String>> map = iterator.next(); |
| 2205 | - restTreatmentOpinion2.put(map.getKey(), mongoUtil.findPlatValueList2(map.getValue())); | |
| 2205 | + restTreatmentOpinion2.put(map.getKey(), mongoUtil.findPlatValueList3(map.getValue())); | |
| 2206 | 2206 | } |
| 2207 | 2207 | } |
| 2208 | 2208 | antexChuResult.setTreatmentOpinion2(restTreatmentOpinion2); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
7212f6c
| ... | ... | @@ -1119,10 +1119,9 @@ |
| 1119 | 1119 | |
| 1120 | 1120 | Map<String, Object> map = new HashMap<>(); |
| 1121 | 1121 | |
| 1122 | -// map.put("treatmentOpinion2Types", mongoUtil.findPlatValues(data.getTreatmentOpinion2Types())); | |
| 1123 | -// map.put("treatmentOpinion2", mongoUtil.findPlatList(data.getTreatmentOpinion2())); | |
| 1124 | - map.put("treatmentOpinion2Types", data.getTreatmentOpinion2Types()); | |
| 1122 | + map.put("treatmentOpinion2Types", mongoUtil.findPlatValues(data.getTreatmentOpinion2Types())); | |
| 1125 | 1123 | map.put("treatmentOpinion2", mongoUtil.findPlatList2(data.getTreatmentOpinion2())); |
| 1124 | +// map.put("treatmentOpinion2", mongoUtil.findPlatList(data.getTreatmentOpinion2())); | |
| 1126 | 1125 | map.put("quickenRemark",data.getQuickenRemark()); |
| 1127 | 1126 | |
| 1128 | 1127 | /* 基本信息 */ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/utils/MongoUtil.java
View file @
7212f6c
| ... | ... | @@ -336,6 +336,26 @@ |
| 336 | 336 | return rest; |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | + public List<Map<String, Object>> findPlatValueList3(List<String> ids) { | |
| 340 | + if(CollectionUtils.isEmpty(ids)) { | |
| 341 | + return new ArrayList<>(); | |
| 342 | + } | |
| 343 | + List<Map<String, Object>> rest = new ArrayList<>(); | |
| 344 | + for (String id : ids) { | |
| 345 | +// PlantformConfigModel platformConfig = getPlatformConfig(id); | |
| 346 | + if(StringUtils.isNotEmpty(id)) { | |
| 347 | + Map<String, Object> tempMap = new HashedMap(); | |
| 348 | + String[] values = id.split("\\[fuck\\]"); | |
| 349 | + tempMap.put("id", values.length > 1 ? values[1] : ""); | |
| 350 | + tempMap.put("typeName", ""); | |
| 351 | + tempMap.put("serchKey", values[0]); | |
| 352 | + tempMap.put("value", values[0]); | |
| 353 | + rest.add(tempMap); | |
| 354 | + } | |
| 355 | + } | |
| 356 | + return rest; | |
| 357 | + } | |
| 358 | + | |
| 339 | 359 | public PlantformConfigModel findPlatFormById(String id) { |
| 340 | 360 | return mongoTemplate.findById(id, PlantformConfigModel.class); |
| 341 | 361 | } |
| ... | ... | @@ -368,7 +388,14 @@ |
| 368 | 388 | while (iterator.hasNext()) { |
| 369 | 389 | Map.Entry<String, List<String>> next = iterator.next(); |
| 370 | 390 | StringBuilder sb = new StringBuilder(); |
| 371 | - sb.append(next.getKey()).append(": ").append(org.apache.commons.lang.StringUtils.join(next.getValue().toArray(), ",")); | |
| 391 | + StringBuilder value = new StringBuilder(); | |
| 392 | + List<String> valueList = next.getValue(); | |
| 393 | + if(CollectionUtils.isNotEmpty(valueList)) { | |
| 394 | + for (String s : valueList) { | |
| 395 | + value.append(s.split("\\[fuck\\]")[0]); | |
| 396 | + } | |
| 397 | + } | |
| 398 | + sb.append(findPlatValue(next.getKey())).append(": ").append(value.length() == 0 ? "" : sb.toString().substring(0, sb.toString().length() - 1)); | |
| 372 | 399 | list.add(sb.toString()); |
| 373 | 400 | } |
| 374 | 401 | return list; |