Commit 3b2c085ee38016ed49336e448ba08fc56b9d3763
1 parent
d202bfd725
Exists in
master
and in
6 other branches
修改体重营养报告
Showing 1 changed file with 19 additions and 20 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java
View file @
3b2c085
... | ... | @@ -487,6 +487,25 @@ |
487 | 487 | week = DateUtil.getWeek2(patients.getLastMenses(), new Date()); |
488 | 488 | String yunqi = "孕" + String.valueOf(week) + "期"; |
489 | 489 | map.put("yunqi", yunqi); |
490 | + List<String> factor = patients.getRiskFactorId(); | |
491 | + String risk=""; | |
492 | + if (CollectionUtils.isNotEmpty(factor)) { | |
493 | + StringBuilder sb = new StringBuilder(56); | |
494 | + for (String srt : factor) { | |
495 | + if (StringUtils.isNotEmpty(srt)) { | |
496 | + BasicConfig basicConfig1 = basicConfigService.getOneBasicConfigById(srt); | |
497 | + if (null != basicConfig1 && sb.indexOf(basicConfig1.getName()) == -1) { | |
498 | + sb.append(basicConfig1.getName()).append(','); | |
499 | + } | |
500 | + } | |
501 | + } | |
502 | + if (sb.toString().endsWith(",")) { | |
503 | + risk=sb.substring(0, sb.length() - 1); | |
504 | + } else { | |
505 | + risk=sb.toString(); | |
506 | + } | |
507 | + } | |
508 | + map.put("risk", risk); | |
490 | 509 | } |
491 | 510 | map.put("height", patientWeight.getBeforeHeight() == null ? "" : MathUtil.doubleFormat(Double.parseDouble(patientWeight.getBeforeHeight()) / 100) + " 米"); |
492 | 511 | map.put("beforeWeight", patientWeight.getBeforeWeight() == null ? "" : patientWeight.getBeforeWeight() + " 公斤"); |
... | ... | @@ -523,26 +542,6 @@ |
523 | 542 | week = DateUtil.getWeek2(patients.getLastMenses(), new Date()); |
524 | 543 | String yunqi = "孕" + String.valueOf(week) + "期"; |
525 | 544 | map.put("yunqi", yunqi); |
526 | - | |
527 | - List<String> factor = patients.getRiskFactorId(); | |
528 | - String risk=""; | |
529 | - if (CollectionUtils.isNotEmpty(factor)) { | |
530 | - StringBuilder sb = new StringBuilder(56); | |
531 | - for (String srt : factor) { | |
532 | - if (StringUtils.isNotEmpty(srt)) { | |
533 | - BasicConfig basicConfig1 = basicConfigService.getOneBasicConfigById(srt); | |
534 | - if (null != basicConfig && sb.indexOf(basicConfig1.getName()) == -1) { | |
535 | - sb.append(basicConfig1.getName()).append(','); | |
536 | - } | |
537 | - } | |
538 | - } | |
539 | - if (sb.toString().endsWith(",")) { | |
540 | - risk=sb.substring(0, sb.length() - 1); | |
541 | - } else { | |
542 | - risk=sb.toString(); | |
543 | - } | |
544 | - } | |
545 | - map.put("risk", risk); | |
546 | 545 | } |
547 | 546 | map.put("height", patientWeight.getBeforeHeight() == null ? "" : MathUtil.doubleFormat(Double.parseDouble(patientWeight.getBeforeHeight()) / 100) + " 米"); |
548 | 547 | map.put("beforeWeight", patientWeight.getBeforeWeight() == null ? "" : patientWeight.getBeforeWeight() + " 公斤"); |