Commit 03da858af0af49f7699b66b6966ad1e19cdbc639
1 parent
65dd1d4d64
Exists in
master
and in
8 other branches
修改bug
Showing 1 changed file with 5 additions and 4 deletions
platform-data-api/src/main/java/com/lyms/platform/data/service/impl/DataImportTaskServiceImpl.java
View file @
03da858
| ... | ... | @@ -478,7 +478,8 @@ |
| 478 | 478 | continue; |
| 479 | 479 | } |
| 480 | 480 | if (CollectionUtils.isNotEmpty(config.getAreas())) { |
| 481 | - String areaId = config.getAreas().get(config.getAreas().size() - 1); | |
| 481 | + int size = config.getAreas().size() >= 3 ? 2 : config.getAreas().size() - 1; | |
| 482 | + String areaId = config.getAreas().get(size); | |
| 482 | 483 | //查看map里面是否存在该区域 |
| 483 | 484 | if (listMap.containsKey(areaId)) { |
| 484 | 485 | List<SimpleCommunity> list = listMap.get(areaId); |
| ... | ... | @@ -569,7 +570,7 @@ |
| 569 | 570 | } |
| 570 | 571 | |
| 571 | 572 | } |
| 572 | - if (!isMatch&&StringUtils.isNotBlank(patients.getAddress()) && StringUtils.isNotBlank(patients.getAreaId()) ) { | |
| 573 | + if (!isMatch && StringUtils.isNotBlank(patients.getAddress()) && StringUtils.isNotBlank(patients.getAreaId())) { | |
| 573 | 574 | List<SimpleCommunity> communityList = map.get(patients.getAreaId()); |
| 574 | 575 | if (CollectionUtils.isNotEmpty(communityList)) { |
| 575 | 576 | for (SimpleCommunity community : communityList) { |
| ... | ... | @@ -583,7 +584,7 @@ |
| 583 | 584 | } |
| 584 | 585 | } |
| 585 | 586 | } |
| 586 | - if (isMatch){ | |
| 587 | + if (isMatch) { | |
| 587 | 588 | patientsService.updatePatient(patients); |
| 588 | 589 | //修改产妇下面的小孩信息 |
| 589 | 590 | BabyModelQuery babyModelQuery = new BabyModelQuery(); |
| ... | ... | @@ -591,7 +592,7 @@ |
| 591 | 592 | babyModelQuery.setParentId(patients.getId()); |
| 592 | 593 | BabyModel babyModel = new BabyModel(); |
| 593 | 594 | babyModel.setCommunityId(patients.getCommunityId()); |
| 594 | - babyService.findAndModify(babyModelQuery.convertToQuery(),babyModel); | |
| 595 | + babyService.findAndModify(babyModelQuery.convertToQuery(), babyModel); | |
| 595 | 596 | isMatch = Boolean.FALSE; |
| 596 | 597 | } |
| 597 | 598 | } |