Commit a8b31b75c5f6ad3d37f1446d80fcf3090d9fd197

Authored by liquanyu
1 parent 1d2595f9e0
Exists in master and in 2 other branches dev, luanping

民生工程

Showing 3 changed files with 59 additions and 10 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LivelihoodProjectsFacade.java View file @ a8b31b7
... ... @@ -876,9 +876,7 @@
876 876 map.put("mother_address_detail", StringUtils.isNotEmpty(patients.getAddress())?patients.getAddress():"/");
877 877 //母亲地址(出生证明母亲地址) 获取母亲 户籍地址,没有 就/
878 878 String mother_address="/";
879   - if(StringUtils.isNotEmpty(patients.getProvinceId()) && StringUtils.isNotEmpty(patients.getCityId()) &&
880   - StringUtils.isNotEmpty(patients.getAreaId()) && StringUtils.isNotEmpty(patients.getStreetId()) &&
881   - StringUtils.isNotEmpty(patients.getAddress())){
  879 + if(StringUtils.isNotEmpty(patients.getProvinceId())){
882 880 mother_address= CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService);
883 881 }
884 882 map.put("mother_address", mother_address);
... ... @@ -1239,7 +1237,7 @@
1239 1237 try{
1240 1238 if ("4".equals(HIS_VERSION))
1241 1239 {
1242   - if (!("2".equals(patients.getCityId()) || (patients.isSendCoupon() != null && patients.isSendCoupon())))
  1240 + if (!("2".equals(patients.getCityId()) ))
1243 1241 {
1244 1242 return null;
1245 1243 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ a8b31b7
... ... @@ -2748,9 +2748,58 @@
2748 2748 PatientManagerQueryModel patientManagerQueryModel = new PatientManagerQueryModel();
2749 2749 BeanUtils.copy(patients, patientManagerQueryModel);
2750 2750  
2751   - patientManagerQueryModel.setLevel(patients.getRiskLevelId());
2752   - String join = org.apache.commons.lang.StringUtils.join( patients.getRiskFactorId(), ",");
2753   - patientManagerQueryModel.setRiskFactorId(join);
  2751 +// patientManagerQueryModel.setLevel(patients.getRiskLevelId());
  2752 +// String join = org.apache.commons.lang.StringUtils.join( patients.getRiskFactorId(), ",");
  2753 +// patientManagerQueryModel.setRiskFactorId(join);
  2754 + //高危因素
  2755 + List<String> factor = patients.getRiskFactorId();
  2756 +
  2757 + if (CollectionUtils.isNotEmpty(factor)) {
  2758 + StringBuilder sb = new StringBuilder(56);
  2759 + for (String srt : factor) {
  2760 + if (org.apache.commons.lang.StringUtils.isNotEmpty(srt)) {
  2761 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(srt);
  2762 + if (null != basicConfig && sb.indexOf(basicConfig.getName()) == -1) {
  2763 + sb.append(basicConfig.getName()).append(',');
  2764 + }
  2765 + }
  2766 + }
  2767 + if (sb.toString().endsWith(",")) {
  2768 + patientManagerQueryModel.setRiskFactorId(sb.substring(0, sb.length() - 1));
  2769 + } else {
  2770 + patientManagerQueryModel.setRiskFactorId(sb.toString());
  2771 + }
  2772 +
  2773 + if (!"-".equals(patientManagerQueryModel.getRiskFactorId()) && org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) {
  2774 + patientManagerQueryModel.setRiskFactorId(patientManagerQueryModel.getRiskFactorId()+","+patients.getoRiskFactor());
  2775 + }else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor()))
  2776 + {
  2777 + patientManagerQueryModel.setRiskFactorId(patients.getoRiskFactor());
  2778 + }
  2779 + }
  2780 + else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor()))
  2781 + {
  2782 + patientManagerQueryModel.setRiskFactorId(patients.getoRiskFactor());
  2783 + }
  2784 +
  2785 +
  2786 + List level = new ArrayList();
  2787 + if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getRiskLevelId())) {
  2788 + try {
  2789 + List<String> list = JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class);
  2790 + for (String str : list) {
  2791 + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str);
  2792 + if (null != basicConfig) {
  2793 + Map map = new HashMap();
  2794 + basicConfig.replenRisk(map);
  2795 + level.add(map);
  2796 + }
  2797 + }
  2798 + } catch (Exception e) {
  2799 + ExceptionUtils.catchException(e, "patients.getRiskLevelId error.");
  2800 + }
  2801 + patientManagerQueryModel.setLevel(HighScoreResult.filter(level));
  2802 + }
2754 2803  
2755 2804 Organization org = organizationService.getOrganization(Integer.valueOf(patients.getHospitalId()));
2756 2805 if(null != org){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientManagerQueryModel.java View file @ a8b31b7
1 1 package com.lyms.platform.operate.web.result;
2 2  
  3 +import java.util.List;
  4 +
3 5 /**
4 6 * @auther HuJiaqi
5 7 * @createTime 2016年12月20日 14时35分
... ... @@ -117,7 +119,7 @@
117 119 //高危因素
118 120 private String riskFactorId;
119 121 //高危等级
120   - private String level;
  122 + private List<String> level;
121 123 //领劵社区
122 124 private String couponCommunity;
123 125 /**
124 126  
... ... @@ -150,11 +152,11 @@
150 152 this.riskFactorId = riskFactorId;
151 153 }
152 154  
153   - public String getLevel() {
  155 + public List<String> getLevel() {
154 156 return level;
155 157 }
156 158  
157   - public void setLevel(String level) {
  159 + public void setLevel(List<String> level) {
158 160 this.level = level;
159 161 }
160 162