Commit 9b6a5115f6b4b947242013c442e2abb948962384
1 parent
39679dc9ee
Exists in
master
and in
6 other branches
秦皇岛-早产孩子运动测评按预产期测评不按照出生日期天数测评或者医生想自己手动输入结果,输入错误能自己删除.
Showing 2 changed files with 18 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/ExerciseAppraisalModel.java
View file @
9b6a511
| ... | ... | @@ -127,6 +127,17 @@ |
| 127 | 127 | private String updateUser; |
| 128 | 128 | private Integer yn; |
| 129 | 129 | |
| 130 | + //月龄 | |
| 131 | + private Integer monthAge; | |
| 132 | + | |
| 133 | + public Integer getMonthAge() { | |
| 134 | + return monthAge; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public void setMonthAge(Integer monthAge) { | |
| 138 | + this.monthAge = monthAge; | |
| 139 | + } | |
| 140 | + | |
| 130 | 141 | public String getId() { |
| 131 | 142 | return id; |
| 132 | 143 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
9b6a511
| ... | ... | @@ -1190,7 +1190,8 @@ |
| 1190 | 1190 | if (babyModel == null) { |
| 1191 | 1191 | return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("未查到该儿童的建档数据"); |
| 1192 | 1192 | } |
| 1193 | - Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), new Date()); | |
| 1193 | + //前端算出来的月龄model.getMonthAge()直接拿 | |
| 1194 | +// Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), new Date()); | |
| 1194 | 1195 | //Integer currentMonth = getCurrentMonth(month, 3, 1); |
| 1195 | 1196 | model.setBirth(babyModel.getBirth()); |
| 1196 | 1197 | model.setCardNo(babyModel.getCardNo()); |
| ... | ... | @@ -1206,7 +1207,7 @@ |
| 1206 | 1207 | // 总分 |
| 1207 | 1208 | model.setTotalScore(model.getStandingComponent() + model.getSeatComponent() + model.getSupineComponent() + model.getLieProstratComponent()); |
| 1208 | 1209 | // 百分位 |
| 1209 | - BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, month); | |
| 1210 | + BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, model.getMonthAge()); | |
| 1210 | 1211 | model.setPercentileScore(babyEvaluationCriterionModel.getPercent()); |
| 1211 | 1212 | mongoTemplate.insert(model); |
| 1212 | 1213 | } |
| ... | ... | @@ -1216,8 +1217,9 @@ |
| 1216 | 1217 | if (babyModel == null) { |
| 1217 | 1218 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("查无数据"); |
| 1218 | 1219 | } |
| 1219 | - Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), | |
| 1220 | - mongoTemplate.findOne(Query.query(Criteria.where("_id").is(id)), ExerciseAppraisalModel.class).getCreateTime()); | |
| 1220 | + //前端算出来的月龄model.getMonthAge()直接拿 | |
| 1221 | +// Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), | |
| 1222 | +// mongoTemplate.findOne(Query.query(Criteria.where("_id").is(id)), ExerciseAppraisalModel.class).getCreateTime()); | |
| 1221 | 1223 | model.setCreateUser(null); |
| 1222 | 1224 | model.setCreateTime(null); |
| 1223 | 1225 | model.setBirth(null); |
| ... | ... | @@ -1234,7 +1236,7 @@ |
| 1234 | 1236 | // 总分 |
| 1235 | 1237 | model.setTotalScore(model.getStandingComponent() + model.getSeatComponent() + model.getSupineComponent() + model.getLieProstratComponent()); |
| 1236 | 1238 | // 百分位 |
| 1237 | - BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, month); | |
| 1239 | + BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, model.getMonthAge()); | |
| 1238 | 1240 | if (param.getPercentileScore() == null) {//add by cpf |
| 1239 | 1241 | model.setPercentileScore(babyEvaluationCriterionModel.getPercent()); |
| 1240 | 1242 | } |