Commit 976bddfafd8b89b43deb70f09422ea9acf70339f

Authored by litao@lymsh.com
1 parent 165d429a20

bug

Showing 2 changed files with 19 additions and 4 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/NextVisitTimeEnums.java View file @ 976bddf
1 1 package com.lyms.platform.common.enums;
2 2  
  3 +import com.lyms.platform.common.utils.StringUtils;
  4 +
3 5 /**
4 6 * 下次访视时间 :出生0-42天
5 7 * Created by lt on 2017/7/18 0018
... ... @@ -52,9 +54,22 @@
52 54 private Integer id;
53 55 private String name;
54 56  
55   - public static FeedTypeEnums get(Integer id) {
56   - FeedTypeEnums[] values = FeedTypeEnums.values();
57   - for (FeedTypeEnums value : values) {
  57 + public static NextVisitTimeEnums getName(String id) {
  58 + if(StringUtils.isNotEmpty(id)) {
  59 + NextVisitTimeEnums[] values = NextVisitTimeEnums.values();
  60 + for (NextVisitTimeEnums value : values) {
  61 + if (value.getId() == Integer.parseInt(id)) {
  62 + return value;
  63 + }
  64 + }
  65 + }
  66 + return null;
  67 + }
  68 +
  69 +
  70 + public static NextVisitTimeEnums get(Integer id) {
  71 + NextVisitTimeEnums[] values = NextVisitTimeEnums.values();
  72 + for (NextVisitTimeEnums value : values) {
58 73 if (value.getId() == id) {
59 74 return value;
60 75 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java View file @ 976bddf
... ... @@ -272,7 +272,7 @@
272 272 restMap.put("doctor", mapper.getUserName(newbornVisit.getDoctor())); /** 访视医生 */
273 273 restMap.put("checkTime", DateUtil.getYyyyMmDd(newbornVisit.getCheckTime())); /** 访视时间 */
274 274 restMap.put("visitLocation", newbornVisit.getVisitLocation()); /** 访视地点 */
275   - restMap.put("nextVisitTime", newbornVisit.getNextVisitTime()); /** 预约下次访视时间 */
  275 + restMap.put("nextVisitTime", NextVisitTimeEnums.getName(newbornVisit.getNextVisitTime())); /** 预约下次访视时间 */
276 276 /** 问诊 */
277 277 restMap.put("feedType", FeedTypeEnums.getName(newbornVisit.getFeedType())); /** 喂养方式 */
278 278 restMap.put("feedNumber", newbornVisit.getFeedNumber()); /** 喂奶量 */