diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java index 19682ee..06e7045 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java @@ -499,14 +499,24 @@ public class BabyEvaluationCriterionServiceImpl implements BabyEvaluationCriteri BabyEvaluationCriterionModel evaluationCriterionModel = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(configId)), BabyEvaluationCriterionModel.class); val += evaluationCriterionModel.getProjectVal(); } - if (checkMonth - 3 > 0){ + + Integer month = DateUtil.getBabyMonthAge1(paramModel.getBirth(), new Date()); + int [] months = null; + months = getInts(months, month); + int month1 = months[0]; + List ecmodels = mongoTemplate.find(Query.query(Criteria.where("month").lt(month1).and("type").is(3)), BabyEvaluationCriterionModel.class); + for (BabyEvaluationCriterionModel m : ecmodels) { + val += m.getProjectVal(); + } + + /* if (checkMonth - 3 > 0){ // 默认之前的全部通过 Integer currentMonth = getCurrentMonth(checkMonth - 3, 3, 3); List modelList = mongoTemplate.find(Query.query(Criteria.where("month").lte(currentMonth).and("type").is(3)), BabyEvaluationCriterionModel.class); for (BabyEvaluationCriterionModel model : modelList) { val += model.getProjectVal(); } - } + }*/ BigDecimal developmentQuotient; if (val > 0) { double mentalAge = new BigDecimal(val.toString()).divide(new BigDecimal(5), 2, BigDecimal.ROUND_HALF_UP).doubleValue();