Commit 9bf344575b7dc5181e836706cf1a66a6284ef91c
1 parent
e9091b636b
Exists in
dev
#fix:孕期营养报告优化模版根据名称查询逻辑
Showing 3 changed files with 24 additions and 4 deletions
platform-dal/src/main/java/com/lyms/platform/query/PregnancyReportQuery.java
View file @
9bf3445
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); |
107 | 107 | } |
108 | 108 | if (StringUtils.isNotEmpty(name)){ |
109 | - condition=condition.and("name",name,MongoOper.LIKE); | |
109 | + condition=condition.and("name",name,MongoOper.IS); | |
110 | 110 | } |
111 | 111 | if (-1 != yn) { |
112 | 112 | condition = condition.and("yn", yn, MongoOper.IS); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PregnancyReportController.java
View file @
9bf3445
... | ... | @@ -109,12 +109,14 @@ |
109 | 109 | @ResponseBody |
110 | 110 | public BaseResponse getWxPatientReport(@RequestParam String rFactor, |
111 | 111 | @RequestParam Integer week, |
112 | + @RequestParam Integer weightType, | |
112 | 113 | @RequestParam String hospitalId |
113 | 114 | ){ |
114 | 115 | PregnancyReportQuery pregnancyReportQuery=new PregnancyReportQuery(); |
115 | 116 | pregnancyReportQuery.setWeek(week); |
116 | 117 | pregnancyReportQuery.setHospitalId(hospitalId); |
117 | 118 | pregnancyReportQuery.setName(rFactor); |
119 | + pregnancyReportQuery.setWeightType(weightType); | |
118 | 120 | // pregnancyReportQuery.setrFactorList(StringUtils.covertToList(rFactor, String.class)); |
119 | 121 | return pregnancyReportFacade.getWxPatientReport(pregnancyReportQuery); |
120 | 122 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PregnancyReportFacade.java
View file @
9bf3445
... | ... | @@ -93,8 +93,26 @@ |
93 | 93 | baseResponse.setErrormsg("成功"); |
94 | 94 | return baseResponse; |
95 | 95 | } |
96 | + //1是孕早期 14周之前 2是孕中期 14-27周+6 3是孕晚期28周及以后 | |
97 | + private static String getReportName(String name,Integer week,Integer weightType){ | |
98 | + String sb; | |
99 | + if (week==1){ | |
100 | + sb="孕早期"; | |
101 | + }else if (week==2){ | |
102 | + sb="孕中期"; | |
103 | + }else { | |
104 | + sb="孕晚期"; | |
105 | + } | |
106 | + //体重类型 0为正常 1为轻 2为重 | |
107 | + String wt; | |
108 | + if (weightType==0){ | |
109 | + wt="正常"; | |
110 | + }else if (weightType==1){ | |
111 | + wt="轻"; | |
112 | + }else { | |
113 | + wt="重"; | |
114 | + } | |
96 | 115 | |
97 | - private static String getReportName(String name){ | |
98 | 116 | String str; |
99 | 117 | if (name.contains("健康")){ |
100 | 118 | str="健康"; |
... | ... | @@ -104,7 +122,7 @@ |
104 | 122 | }else { |
105 | 123 | str="高危"; |
106 | 124 | } |
107 | - return str; | |
125 | + return str+"-"+sb+"-"+wt; | |
108 | 126 | } |
109 | 127 | |
110 | 128 | |
111 | 129 | |
... | ... | @@ -116,8 +134,8 @@ |
116 | 134 | baseResponse.setErrorcode(ErrorCodeConstants.DATA_EXIST); |
117 | 135 | baseResponse.setErrormsg("模版异常"); |
118 | 136 | } |
119 | - pregnancyReportQuery.setName(getReportName(basicConfig.getName())); | |
120 | 137 | Integer week= pregnancyReportQuery.getWeek(); |
138 | + pregnancyReportQuery.setName(getReportName(basicConfig.getName(),getWeek(week),pregnancyReportQuery.getWeightType())); | |
121 | 139 | pregnancyReportQuery.setWeek(getWeek(week)); |
122 | 140 | List<PregnancyReport> list= pregnancyReportService.queryPregnancyReport(pregnancyReportQuery); |
123 | 141 | if (CollectionUtils.isNotEmpty(list)){ |