Commit 00217511545c835c4b5faa915b9d26448f731377
1 parent
1837c754c1
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 12 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
0021751
... | ... | @@ -499,14 +499,24 @@ |
499 | 499 | BabyEvaluationCriterionModel evaluationCriterionModel = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(configId)), BabyEvaluationCriterionModel.class); |
500 | 500 | val += evaluationCriterionModel.getProjectVal(); |
501 | 501 | } |
502 | - if (checkMonth - 3 > 0){ | |
502 | + | |
503 | + Integer month = DateUtil.getBabyMonthAge1(paramModel.getBirth(), new Date()); | |
504 | + int [] months = null; | |
505 | + months = getInts(months, month); | |
506 | + int month1 = months[0]; | |
507 | + List<BabyEvaluationCriterionModel> ecmodels = mongoTemplate.find(Query.query(Criteria.where("month").lt(month1).and("type").is(3)), BabyEvaluationCriterionModel.class); | |
508 | + for (BabyEvaluationCriterionModel m : ecmodels) { | |
509 | + val += m.getProjectVal(); | |
510 | + } | |
511 | + | |
512 | + /* if (checkMonth - 3 > 0){ | |
503 | 513 | // 默认之前的全部通过 |
504 | 514 | Integer currentMonth = getCurrentMonth(checkMonth - 3, 3, 3); |
505 | 515 | List<BabyEvaluationCriterionModel> modelList = mongoTemplate.find(Query.query(Criteria.where("month").lte(currentMonth).and("type").is(3)), BabyEvaluationCriterionModel.class); |
506 | 516 | for (BabyEvaluationCriterionModel model : modelList) { |
507 | 517 | val += model.getProjectVal(); |
508 | 518 | } |
509 | - } | |
519 | + }*/ | |
510 | 520 | BigDecimal developmentQuotient; |
511 | 521 | if (val > 0) { |
512 | 522 | double mentalAge = new BigDecimal(val.toString()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP).doubleValue(); |