Commit 7b715524314fae3bbfc48516d081aab58864c37d
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-common/src/main/java/com/lyms/platform/common/enums/SieveEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveApplyOrderResult.java
platform-common/src/main/java/com/lyms/platform/common/enums/SieveEnums.java
View file @
7b71552
| ... | ... | @@ -13,6 +13,39 @@ |
| 13 | 13 | =id; |
| 14 | 14 | this.name=name; |
| 15 | 15 | } |
| 16 | + public enum NotifyEnums{ | |
| 17 | + O("未通知",0),O1("已通知",1); | |
| 18 | + private NotifyEnums(String name,Integer id){ | |
| 19 | + this.name=name; | |
| 20 | + this.id=id; | |
| 21 | + } | |
| 22 | + private Integer id; | |
| 23 | + private String name; | |
| 24 | + | |
| 25 | + public Integer getId() { | |
| 26 | + return id; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public void setId(Integer id) { | |
| 30 | + this.id = id; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public String getName() { | |
| 34 | + return name; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public void setName(String name) { | |
| 38 | + this.name = name; | |
| 39 | + } | |
| 40 | + public static String getTitle(Integer id){ | |
| 41 | + for(NotifyEnums enums:values()){ | |
| 42 | + if(id==enums.getId()){ | |
| 43 | + return enums.getName(); | |
| 44 | + } | |
| 45 | + } | |
| 46 | + return null; | |
| 47 | + } | |
| 48 | + } | |
| 16 | 49 | private Integer id; |
| 17 | 50 | private String name; |
| 18 | 51 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SieveController.java
View file @
7b71552
| ... | ... | @@ -66,6 +66,7 @@ |
| 66 | 66 | map.put("getCqResult",getCqResult()); |
| 67 | 67 | map.put("getSieveEnums",getSieveEnums()); |
| 68 | 68 | map.put("getRenShenJieJuEnums",getRenShenJieJuEnums()); |
| 69 | + map.put("getNotify",getNotify()); | |
| 69 | 70 | return new BaseObjectResponse().setData(map).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); } |
| 70 | 71 | //产前诊断结果 |
| 71 | 72 | public List<Object> getChanQResultEnums() { |
| ... | ... | @@ -78,7 +79,16 @@ |
| 78 | 79 | } |
| 79 | 80 | return list; |
| 80 | 81 | } |
| 81 | - | |
| 82 | + public List<Object> getNotify(){ | |
| 83 | + List<Object> list = new ArrayList<>(); | |
| 84 | + for (SieveEnums.NotifyEnums enums : SieveEnums.NotifyEnums.values()) { | |
| 85 | + Map<String, Object> resultMap = new HashMap<>(); | |
| 86 | + resultMap.put("id", enums.getId()); | |
| 87 | + resultMap.put("name", enums.getName()); | |
| 88 | + list.add(resultMap); | |
| 89 | + } | |
| 90 | + return list; | |
| 91 | + } | |
| 82 | 92 | //产前诊断结果 |
| 83 | 93 | public List<Object> getCqResult() { |
| 84 | 94 | List<Object> list = new ArrayList<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
7b71552
| ... | ... | @@ -118,7 +118,8 @@ |
| 118 | 118 | SieveApplyOrderModel sieveApplyOrderModel = null; |
| 119 | 119 | if (CollectionUtils.isNotEmpty(list)) { |
| 120 | 120 | sieveApplyOrderModel = list.get(0); |
| 121 | - sieveApplyOrderResult.convertToResult(sieveApplyOrderModel); | |
| 121 | + Patients patients =patientsService.findOnePatientById(sieveApplyOrderModel.getParentId()); | |
| 122 | + sieveApplyOrderResult.convertToResult(sieveApplyOrderModel,patients); | |
| 122 | 123 | } |
| 123 | 124 | return new BaseObjectResponse().setData(sieveApplyOrderResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 124 | 125 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/AntexListResult.java
View file @
7b71552
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/SieveApplyOrderResult.java
View file @
7b71552
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.common.base.IBasicResultConvert; |
| 4 | +import com.lyms.platform.common.utils.DateUtil; | |
| 4 | 5 | import com.lyms.platform.common.utils.JsonUtil; |
| 5 | 6 | import com.lyms.platform.pojo.Patients; |
| 6 | 7 | import com.lyms.platform.pojo.SieveApplyOrderModel; |
| 7 | 8 | import org.apache.commons.lang.StringUtils; |
| 8 | 9 | |
| 10 | +import java.util.Date; | |
| 9 | 11 | import java.util.List; |
| 10 | 12 | |
| 11 | 13 | /** |
| 12 | 14 | * Created by Administrator on 2016/7/7 0007. |
| 13 | 15 | */ |
| 14 | -public class SieveApplyOrderResult implements IBasicResultConvert<SieveApplyOrderResult, SieveApplyOrderModel> { | |
| 16 | +public class SieveApplyOrderResult { | |
| 17 | + | |
| 18 | + //名字 | |
| 19 | + private String name; | |
| 20 | + //年龄 | |
| 21 | + private Integer age; | |
| 22 | + //孕周 | |
| 23 | + private String dueWeek; | |
| 24 | + //预产期 | |
| 25 | + private String yChanQi; | |
| 26 | + //手机号 | |
| 27 | + private String phone; | |
| 28 | + //高危因素 | |
| 29 | + private List riskFactor; | |
| 30 | + //高危评分 | |
| 31 | + private String riskScore; | |
| 32 | + //备注 | |
| 33 | + private String remarks; | |
| 34 | + //末次月经 | |
| 35 | + private String lastMenses; | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 15 | 39 | private String id; |
| 16 | 40 | //患者id |
| 17 | 41 | private String parentId; |
| ... | ... | @@ -72,8 +96,7 @@ |
| 72 | 96 | this.parentId = parentId; |
| 73 | 97 | } |
| 74 | 98 | |
| 75 | - @Override | |
| 76 | - public SieveApplyOrderResult convertToResult(SieveApplyOrderModel destModel) { | |
| 99 | + public SieveApplyOrderResult convertToResult(SieveApplyOrderModel destModel,Patients patients) { | |
| 77 | 100 | setId(destModel.getId()); |
| 78 | 101 | setParentId(destModel.getParentId()); |
| 79 | 102 | setApplyDoctor(destModel.getApplyDoctor()); |
| 80 | 103 | |
| ... | ... | @@ -82,7 +105,97 @@ |
| 82 | 105 | if(StringUtils.isNotEmpty(destModel.getCheckItem())){ |
| 83 | 106 | setCheckItem(JsonUtil.toList(destModel.getCheckItem(),List.class)); |
| 84 | 107 | } |
| 108 | + try { | |
| 109 | + if(null!=patients.getBirth()){ | |
| 110 | + setAge(DateUtil.getAge(patients.getBirth())); | |
| 111 | + } | |
| 112 | + }catch (Exception e){ | |
| 113 | + } | |
| 114 | + setName(patients.getUsername()); | |
| 115 | + setPhone(patients.getPhone()); | |
| 116 | + setRemarks(patients.getMremark()); | |
| 117 | + setRiskScore("60"); | |
| 118 | + | |
| 119 | + int days= DateUtil.daysBetween(patients.getLastMenses(),new Date()); | |
| 120 | + String week= (days/7)+""; | |
| 121 | + int day = (days%7); | |
| 122 | + this.dueWeek="孕"+week+"周" +(day>0?"+"+day+"天":""); | |
| 123 | + if(null!=patients.getLastMenses()){ | |
| 124 | + setLastMenses(DateUtil.getyyyy_MM_dd(patients.getLastMenses())); | |
| 125 | + } | |
| 85 | 126 | return this; |
| 127 | + } | |
| 128 | + | |
| 129 | + public Integer getAge() { | |
| 130 | + return age; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setAge(Integer age) { | |
| 134 | + this.age = age; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getDueWeek() { | |
| 138 | + return dueWeek; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setDueWeek(String dueWeek) { | |
| 142 | + this.dueWeek = dueWeek; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public String getLastMenses() { | |
| 146 | + return lastMenses; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public void setLastMenses(String lastMenses) { | |
| 150 | + this.lastMenses = lastMenses; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public String getName() { | |
| 154 | + return name; | |
| 155 | + } | |
| 156 | + | |
| 157 | + public void setName(String name) { | |
| 158 | + this.name = name; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public String getPhone() { | |
| 162 | + return phone; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public void setPhone(String phone) { | |
| 166 | + this.phone = phone; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public String getRemarks() { | |
| 170 | + return remarks; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public void setRemarks(String remarks) { | |
| 174 | + this.remarks = remarks; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public List getRiskFactor() { | |
| 178 | + return riskFactor; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public void setRiskFactor(List riskFactor) { | |
| 182 | + this.riskFactor = riskFactor; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public String getRiskScore() { | |
| 186 | + return riskScore; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public void setRiskScore(String riskScore) { | |
| 190 | + this.riskScore = riskScore; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public String getyChanQi() { | |
| 194 | + return yChanQi; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public void setyChanQi(String yChanQi) { | |
| 198 | + this.yChanQi = yChanQi; | |
| 86 | 199 | } |
| 87 | 200 | } |