Commit a90b6b510c22b3d12fb18dc94a5c86717ed895f1
1 parent
9b6a5115f6
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 14 additions and 7 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
a90b6b5
| ... | ... | @@ -1190,9 +1190,12 @@ |
| 1190 | 1190 | if (babyModel == null) { |
| 1191 | 1191 | return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("未查到该儿童的建档数据"); |
| 1192 | 1192 | } |
| 1193 | - //前端算出来的月龄model.getMonthAge()直接拿 | |
| 1194 | -// Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), new Date()); | |
| 1193 | + Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), new Date()); | |
| 1195 | 1194 | //Integer currentMonth = getCurrentMonth(month, 3, 1); |
| 1195 | + //秦皇岛-前端算出来的月龄model.getMonthAge()直接拿 | |
| 1196 | + if("216".equals(hospitalId)){ | |
| 1197 | + month= model.getMonthAge(); | |
| 1198 | + } | |
| 1196 | 1199 | model.setBirth(babyModel.getBirth()); |
| 1197 | 1200 | model.setCardNo(babyModel.getCardNo()); |
| 1198 | 1201 | model.setVcCardNo(babyModel.getVcCardNo()); |
| ... | ... | @@ -1207,7 +1210,7 @@ |
| 1207 | 1210 | // 总分 |
| 1208 | 1211 | model.setTotalScore(model.getStandingComponent() + model.getSeatComponent() + model.getSupineComponent() + model.getLieProstratComponent()); |
| 1209 | 1212 | // 百分位 |
| 1210 | - BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, model.getMonthAge()); | |
| 1213 | + BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, month); | |
| 1211 | 1214 | model.setPercentileScore(babyEvaluationCriterionModel.getPercent()); |
| 1212 | 1215 | mongoTemplate.insert(model); |
| 1213 | 1216 | } |
| ... | ... | @@ -1217,9 +1220,13 @@ |
| 1217 | 1220 | if (babyModel == null) { |
| 1218 | 1221 | return new BaseResponse().setErrorcode(ErrorCodeConstants.PARAMETER_ERROR).setErrormsg("查无数据"); |
| 1219 | 1222 | } |
| 1220 | - //前端算出来的月龄model.getMonthAge()直接拿 | |
| 1221 | -// Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), | |
| 1222 | -// mongoTemplate.findOne(Query.query(Criteria.where("_id").is(id)), ExerciseAppraisalModel.class).getCreateTime()); | |
| 1223 | + | |
| 1224 | + Integer month = DateUtil.getBabyAgeMonth(babyModel.getBirth(), | |
| 1225 | + mongoTemplate.findOne(Query.query(Criteria.where("_id").is(id)), ExerciseAppraisalModel.class).getCreateTime()); | |
| 1226 | + //秦皇岛-前端算出来的月龄model.getMonthAge()直接拿 | |
| 1227 | + if("216".equals(hospitalId)){ | |
| 1228 | + month= model.getMonthAge(); | |
| 1229 | + } | |
| 1223 | 1230 | model.setCreateUser(null); |
| 1224 | 1231 | model.setCreateTime(null); |
| 1225 | 1232 | model.setBirth(null); |
| ... | ... | @@ -1236,7 +1243,7 @@ |
| 1236 | 1243 | // 总分 |
| 1237 | 1244 | model.setTotalScore(model.getStandingComponent() + model.getSeatComponent() + model.getSupineComponent() + model.getLieProstratComponent()); |
| 1238 | 1245 | // 百分位 |
| 1239 | - BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, model.getMonthAge()); | |
| 1246 | + BabyEvaluationCriterionModel babyEvaluationCriterionModel = getBabyEvaluationCriterionModel(model, month); | |
| 1240 | 1247 | if (param.getPercentileScore() == null) {//add by cpf |
| 1241 | 1248 | model.setPercentileScore(babyEvaluationCriterionModel.getPercent()); |
| 1242 | 1249 | } |