Commit fcdb8484ff265880f2fbd56900324c6c8cb29ea4
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 1 changed file
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
fcdb848
| ... | ... | @@ -94,7 +94,10 @@ |
| 94 | 94 | @Autowired |
| 95 | 95 | private SmsConfigFacade smsConfigFacade; |
| 96 | 96 | |
| 97 | + @Autowired | |
| 98 | + private DataPermissionService dataPermissionService; | |
| 97 | 99 | |
| 100 | + | |
| 98 | 101 | public BaseResponse getBabyBase(String babyId) { |
| 99 | 102 | //查询儿童的基本信息 |
| 100 | 103 | BabyBasicResult base = new BabyBasicResult(); |
| ... | ... | @@ -1436,7 +1439,7 @@ |
| 1436 | 1439 | |
| 1437 | 1440 | List<String> hospitalIdList = new ArrayList<>(); |
| 1438 | 1441 | |
| 1439 | - if(String.valueOf(YnEnums.YES.getId()).equals(request.getIsArea())){ | |
| 1442 | + if(String.valueOf("true").equals(request.getIsArea())){ | |
| 1440 | 1443 | |
| 1441 | 1444 | OrganizationQuery organizationQuery = new OrganizationQuery(); |
| 1442 | 1445 | // List<Integer> typeList = new ArrayList<>(); |
| ... | ... | @@ -1466,9 +1469,22 @@ |
| 1466 | 1469 | hospitalIdList.add(String.valueOf(organization.getId())); |
| 1467 | 1470 | } |
| 1468 | 1471 | }else{ |
| 1469 | - List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1470 | - for (Organization organization : organizationList) { | |
| 1471 | - hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1472 | + // List<Organization> organizationList = organizationService.queryOrganization(organizationQuery); | |
| 1473 | + // for (Organization organization : organizationList) { | |
| 1474 | + // hospitalIdList.add(String.valueOf(organization.getId())); | |
| 1475 | + // } | |
| 1476 | + DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | |
| 1477 | + dataPermissionsModelQuery.setUserId(userId); | |
| 1478 | + List<DataPermissionsModel> dataPermissionsModelList = dataPermissionService.queryPermission(dataPermissionsModelQuery); | |
| 1479 | + if (CollectionUtils.isNotEmpty(dataPermissionsModelList)) { | |
| 1480 | + Set<String> set = dataPermissionsModelList.get(0).getData().keySet(); | |
| 1481 | + Iterator<String> it = set.iterator(); | |
| 1482 | + while (it.hasNext()) { | |
| 1483 | + String id = it.next(); | |
| 1484 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(id) && !hospitalIdList.contains(id)) { | |
| 1485 | + hospitalIdList.add(id); | |
| 1486 | + } | |
| 1487 | + } | |
| 1472 | 1488 | } |
| 1473 | 1489 | } |
| 1474 | 1490 | |
| ... | ... | @@ -1538,7 +1554,12 @@ |
| 1538 | 1554 | if(streetName!=null){ |
| 1539 | 1555 | completeAddress+=streetName.getName(); |
| 1540 | 1556 | } |
| 1541 | - completeAddress+=address; | |
| 1557 | + if(!StringUtils.isEmpty(address)) { | |
| 1558 | + completeAddress += address; | |
| 1559 | + } | |
| 1560 | + if(completeAddress.length()==0){ | |
| 1561 | + completeAddress = "-"; | |
| 1562 | + } | |
| 1542 | 1563 | result.setCompleteAddress(completeAddress); |
| 1543 | 1564 | |
| 1544 | 1565 | String diagnose = ""; |