Commit 39ebc4f836f03686790a57f6ed9bf0b2629a10d7
1 parent
c9c70b5847
Exists in
master
and in
6 other branches
1
Showing 1 changed file with 18 additions and 17 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
39ebc4f
| ... | ... | @@ -663,7 +663,7 @@ |
| 663 | 663 | patients.setLastRhTime(antExChuModel.getCheckTime()); |
| 664 | 664 | hasLast = true; |
| 665 | 665 | break; |
| 666 | - } else if (StringUtils.isNotEmpty(antExChuModel.getOtherHighRisk()) && !"{}".equals(antExChuModel.getOtherHighRisk())&& !"[]".equals(antExChuModel.getOtherHighRisk())) { | |
| 666 | + } else if (StringUtils.isNotEmpty(antExChuModel.getOtherHighRisk()) && !"{}".equals(antExChuModel.getOtherHighRisk()) && !"[]".equals(antExChuModel.getOtherHighRisk())) { | |
| 667 | 667 | patients.setLastRhTime(antExChuModel.getCheckTime()); |
| 668 | 668 | hasLast = true; |
| 669 | 669 | break; |
| ... | ... | @@ -680,7 +680,8 @@ |
| 680 | 680 | * 获取最后一次高危产检的高危信息 |
| 681 | 681 | * <p/> |
| 682 | 682 | * 先取复诊最后一条,在取初诊 |
| 683 | - *@param needLevel --true需要查询高危等级 | |
| 683 | + * | |
| 684 | + * @param needLevel --true需要查询高危等级 | |
| 684 | 685 | * @return |
| 685 | 686 | */ |
| 686 | 687 | public HighScoreResult findLastRisk(String pid, boolean needLevel) { |
| 687 | 688 | |
| 688 | 689 | |
| 689 | 690 | |
| ... | ... | @@ -785,16 +786,16 @@ |
| 785 | 786 | for (Map<String, Object> map : listMap) { |
| 786 | 787 | Object fxysu = map.get("fxysu").toString(); |
| 787 | 788 | if (fxysu != null) { |
| 788 | - otherRisk.append(fxysu+","); | |
| 789 | + otherRisk.append(fxysu + ","); | |
| 789 | 790 | } |
| 790 | - score+=NumberUtils.toInt(map.get("score").toString()); | |
| 791 | + score += NumberUtils.toInt(map.get("score").toString()); | |
| 791 | 792 | |
| 792 | 793 | highScoreResult.getLevel().add(map); |
| 793 | 794 | } |
| 794 | - if(StringUtils.isNotEmpty(otherRisk.toString())){ | |
| 795 | + if (StringUtils.isNotEmpty(otherRisk.toString())) { | |
| 795 | 796 | highScoreResult.setOtherRisk(otherRisk.substring(0, otherRisk.length() - 1)); |
| 796 | 797 | } |
| 797 | - highScoreResult.setScore(highScoreResult.getScore()+score); | |
| 798 | + highScoreResult.setScore(highScoreResult.getScore() + score); | |
| 798 | 799 | highScoreResult.setHighriskDesc(model.getHighriskDesc()); |
| 799 | 800 | highScoreResult.getHighRisk().addAll(listMap); |
| 800 | 801 | } else { |
| ... | ... | @@ -817,7 +818,7 @@ |
| 817 | 818 | antExChuQuery.setYn(YnEnums.YES.getId()); |
| 818 | 819 | |
| 819 | 820 | |
| 820 | - MongoQuery mongoQuery =antExChuQuery.convertToQuery(); | |
| 821 | + MongoQuery mongoQuery = antExChuQuery.convertToQuery(); | |
| 821 | 822 | mongoQuery.addOrder(Sort.Direction.DESC, "checkTime"); |
| 822 | 823 | List<AntExChuModel> list1 = antenatalExaminationService.queryAntExChu(mongoQuery); |
| 823 | 824 | if (CollectionUtils.isNotEmpty(list1)) { |
| 824 | 825 | |
| 825 | 826 | |
| ... | ... | @@ -840,14 +841,14 @@ |
| 840 | 841 | for (Map<String, Object> map : listMap) { |
| 841 | 842 | Object fxysu = map.get("fxysu").toString(); |
| 842 | 843 | if (fxysu != null) { |
| 843 | - otherRisk.append(fxysu+","); | |
| 844 | + otherRisk.append(fxysu + ","); | |
| 844 | 845 | } |
| 845 | - score+=NumberUtils.toInt(map.get("score").toString(),0); | |
| 846 | + score += NumberUtils.toInt(map.get("score").toString(), 0); | |
| 846 | 847 | |
| 847 | 848 | highScoreResult.getLevel().add(map); |
| 848 | 849 | } |
| 849 | - highScoreResult.setScore(highScoreResult.getScore()+score); | |
| 850 | - if(StringUtils.isNotEmpty(otherRisk.toString())){ | |
| 850 | + highScoreResult.setScore(highScoreResult.getScore() + score); | |
| 851 | + if (StringUtils.isNotEmpty(otherRisk.toString())) { | |
| 851 | 852 | highScoreResult.setOtherRisk(otherRisk.substring(0, otherRisk.length() - 1)); |
| 852 | 853 | } |
| 853 | 854 | highScoreResult.setHighriskDesc(antExChuModel.getHighriskDesc()); |
| ... | ... | @@ -1449,7 +1450,7 @@ |
| 1449 | 1450 | if (patients != null) { |
| 1450 | 1451 | HighScoreResult highScoreResult = findLastRisk(patients.getPid(), true); |
| 1451 | 1452 | highRisk = highScoreResult.getHighRisk(); |
| 1452 | - highriskDesc = highScoreResult.getHighriskDesc(); | |
| 1453 | + highriskDesc = highScoreResult.getHighriskDesc(); | |
| 1453 | 1454 | } |
| 1454 | 1455 | |
| 1455 | 1456 | return new BaseObjectResponse().setData(highRisk).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(highriskDesc); |
| 1456 | 1457 | |
| ... | ... | @@ -1763,10 +1764,10 @@ |
| 1763 | 1764 | patients1.setRiskScore(highScoreResult.getScore()); |
| 1764 | 1765 | patients1.setRiskFactorId(highScoreResult.getHighId()); |
| 1765 | 1766 | |
| 1766 | - HashSet set =new HashSet(highScoreResult.getLevelId()); | |
| 1767 | + HashSet set = new HashSet(highScoreResult.getLevelId()); | |
| 1767 | 1768 | patients1.setRiskLevelId(JsonUtil.array2JsonString(new ArrayList<String>(set))); |
| 1768 | 1769 | //设置其他的高危因素 |
| 1769 | - patients1.setoRiskFactor(highScoreResult.getOtherRisk()); | |
| 1770 | + patients1.setoRiskFactor(StringUtils.isNotEmpty(highScoreResult.getOtherRisk()) ? highScoreResult.getOtherRisk() : ""); | |
| 1770 | 1771 | patientsService.findAndModify(patientsQuery1, patients1); |
| 1771 | 1772 | } |
| 1772 | 1773 | |
| 1773 | 1774 | |
| 1774 | 1775 | |
| ... | ... | @@ -2289,11 +2290,11 @@ |
| 2289 | 2290 | String name = bc.getName(); |
| 2290 | 2291 | if (name.indexOf("黄色") > -1) { |
| 2291 | 2292 | name = "黄色"; |
| 2292 | - }else if (name.indexOf("橙色") > -1) { | |
| 2293 | + } else if (name.indexOf("橙色") > -1) { | |
| 2293 | 2294 | name = "橙色"; |
| 2294 | - }else if (name.indexOf("红色") > -1) { | |
| 2295 | + } else if (name.indexOf("红色") > -1) { | |
| 2295 | 2296 | name = "红色"; |
| 2296 | - }else if (name.indexOf("紫色") > -1) { | |
| 2297 | + } else if (name.indexOf("紫色") > -1) { | |
| 2297 | 2298 | name = "紫色"; |
| 2298 | 2299 | } |
| 2299 | 2300 | map.put("color", "risk_" + RiskDefaultTypeEnum.getColor(name)); |