Commit 7c3843aa26a610152e074e5480ab7e60105d1ef2
1 parent
f5ec85662f
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 13 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyCheckModelQuery.java
View file @
7c3843a
... | ... | @@ -208,9 +208,6 @@ |
208 | 208 | MongoCondition condition2 = new MongoCondition("created", gteCreated, MongoOper.GTE); |
209 | 209 | condition = condition.orCondition(new MongoCondition[]{mongoCondition, condition2}); |
210 | 210 | } |
211 | - if(StringUtils.isNotEmpty(hemoglobinLt)){ | |
212 | - condition=condition.and("hemoglobin", hemoglobinLt, MongoOper.LT); | |
213 | - } | |
214 | 211 | |
215 | 212 | Criteria c = null; |
216 | 213 | if (null != birthStart) { |
217 | 214 | |
... | ... | @@ -273,11 +270,19 @@ |
273 | 270 | } |
274 | 271 | } |
275 | 272 | |
276 | - if(null != hemoglobinStart && hemoglobinEnd != null){ | |
273 | + if(StringUtils.isNotEmpty(hemoglobinStart) && StringUtils.isNotEmpty(hemoglobinEnd)){ | |
277 | 274 | if(null != c){ |
278 | 275 | c = c.and("hemoglobin").gte(hemoglobinStart).lte(hemoglobinEnd); |
279 | 276 | }else{ |
280 | 277 | c = Criteria.where("hemoglobin").gte(createdTimeStart).lte(createdTimeEnd); |
278 | + } | |
279 | + } | |
280 | + | |
281 | + if(StringUtils.isNotEmpty(hemoglobinLt)){ | |
282 | + if(null != c){ | |
283 | + c = c.and("hemoglobin").gte("0").lt(hemoglobinLt); | |
284 | + }else{ | |
285 | + c = Criteria.where("hemoglobin").gte("0").lt(hemoglobinLt); | |
281 | 286 | } |
282 | 287 | } |
283 | 288 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
7c3843a
... | ... | @@ -4722,24 +4722,27 @@ |
4722 | 4722 | query.setCheckMonthStart(cms); |
4723 | 4723 | query.setCheckMonthEnd(cme); |
4724 | 4724 | //轻度贫血 |
4725 | + query.setHemoglobinLt(null); | |
4725 | 4726 | query.setHemoglobinStart(lightHls); |
4726 | 4727 | query.setHemoglobinEnd(lightHln); |
4727 | 4728 | int light =babyCheckService.queryBabyCheckCount(query); |
4728 | 4729 | map.put("light"+i,light); |
4729 | 4730 | //中度贫血 |
4731 | + query.setHemoglobinLt(null); | |
4730 | 4732 | query.setHemoglobinStart(middleHls); |
4731 | 4733 | query.setHemoglobinEnd(middleHln); |
4732 | 4734 | int middle =babyCheckService.queryBabyCheckCount(query); |
4733 | 4735 | map.put("middle"+i,middle); |
4734 | 4736 | //重度贫血 |
4737 | + query.setHemoglobinLt(null); | |
4735 | 4738 | query.setHemoglobinStart(matterHls); |
4736 | 4739 | query.setHemoglobinEnd(matterHls); |
4737 | 4740 | int matter =babyCheckService.queryBabyCheckCount(query); |
4738 | 4741 | map.put("matter"+i,matter); |
4739 | 4742 | //极重度贫血 |
4740 | - query.setHemoglobinLt(severityHll); | |
4741 | 4743 | query.setHemoglobinStart(null); |
4742 | 4744 | query.setHemoglobinEnd(null); |
4745 | + query.setHemoglobinLt(severityHll); | |
4743 | 4746 | int severity =babyCheckService.queryBabyCheckCount(query); |
4744 | 4747 | map.put("severity"+i,severity); |
4745 | 4748 | //月龄区间总数 |