Commit 726137ca1eab4249a1e0dc10847fa6a84e3ea01c
1 parent
69a7f36a7f
Exists in
master
and in
3 other branches
建档与优惠券分开功能:添加机构类型orgType字段
Showing 1 changed file with 12 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
726137c
... | ... | @@ -2748,13 +2748,20 @@ |
2748 | 2748 | patientManagerQueryModel.setLevel(patients.getRiskLevelId()); |
2749 | 2749 | String join = org.apache.commons.lang.StringUtils.join( patients.getRiskFactorId(), ","); |
2750 | 2750 | patientManagerQueryModel.setRiskFactorId(join); |
2751 | - try { | |
2752 | - String hname = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())).getName(); | |
2753 | - patientManagerQueryModel.setCouponCommunity(hname); | |
2754 | - } catch (Exception e) { | |
2755 | - patientManagerQueryModel.setCouponCommunity(""); | |
2751 | + | |
2752 | + Organization org = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId())); | |
2753 | + if(null != org){ | |
2754 | + patientManagerQueryModel.setOrgType(org.getType()); | |
2756 | 2755 | } |
2757 | 2756 | |
2757 | + String comm = "未分配"; | |
2758 | + if(StringUtils.isNotEmpty(patients.getCommunityId())){ | |
2759 | + CommunityConfig communityConfig = communityConfigService.getCommunityById(patients.getCommunityId()); | |
2760 | + if(null != communityConfig){ | |
2761 | + comm = communityConfig.getName(); | |
2762 | + } | |
2763 | + } | |
2764 | + patientManagerQueryModel.setCouponCommunity(comm); | |
2758 | 2765 | patientManagerQueryModel.setTypeStr(patients.getType() == 1 ? "未分娩" : "已分娩"); |
2759 | 2766 | patientManagerQueryModel.setYyzyfmHospitalName( |
2760 | 2767 | (patients.getYyzyfmHospitalId() != null && "-1".equals(patients.getYyzyfmHospitalId())) ? "其他" : couponMapper.getHospitalName(patients.getYyzyfmHospitalId())); |