Commit f697a5284fdd1997a0ef053c53d15a283ef8616b
1 parent
f17b175b31
Exists in
master
and in
6 other branches
微量元素
Showing 1 changed file with 3 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MicroelementFacade.java
View file @
f697a52
... | ... | @@ -317,6 +317,7 @@ |
317 | 317 | data.put("created", DateUtil.getyyyy_MM_dd(model.getCreated())); |
318 | 318 | Map<String,List<String>> contents = new HashMap<>(); |
319 | 319 | boolean isNormal = false; |
320 | + int month = DateUtil.getBabyAgeMonth(babyModel.getBirth(),model.getCreated()); | |
320 | 321 | if (CollectionUtils.isNotEmpty(model.getMicroelements())) |
321 | 322 | { |
322 | 323 | for (MicroelementModel.Microelement ele : model.getMicroelements()) |
... | ... | @@ -327,7 +328,8 @@ |
327 | 328 | continue; |
328 | 329 | } |
329 | 330 | MicroelementConfigModel configModel = mongoTemplate.findOne( |
330 | - Query.query(Criteria.where("eleName").is(ele.getEleName()).and("status").is(ele.getStatus()).and("type").is(1)), MicroelementConfigModel.class); | |
331 | + Query.query(Criteria.where("eleName").is(ele.getEleName()).and("status").is(ele.getStatus()).and("type").is(1) | |
332 | + .and("startWeek").gte(month).and("endWeek").lte(month)), MicroelementConfigModel.class); | |
331 | 333 | contents.put(configModel.getEleName(),configModel.getContents()); |
332 | 334 | } |
333 | 335 | } |