Commit b57540e01f59b12132dc22652bc5498755600f4d
1 parent
8379d57f46
Exists in
master
and in
6 other branches
血糖修改
Showing 4 changed files with 23 additions and 13 deletions
- platform-common/src/main/java/com/lyms/platform/common/enums/BloodSugarEnums.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RemoteFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryBloodSugarServiceImpl.java
platform-common/src/main/java/com/lyms/platform/common/enums/BloodSugarEnums.java
View file @
b57540e
| ... | ... | @@ -5,7 +5,17 @@ |
| 5 | 5 | */ |
| 6 | 6 | public enum BloodSugarEnums { |
| 7 | 7 | |
| 8 | - A(1, "空腹"), B(2, "早餐前"), C(3, "早餐后"), D(4, "午餐前"), E(5, "午餐后"), F(6, "晚餐前"), G(7, "晚餐后"), I(9, "睡前") ,H(8, "夜间"); | |
| 8 | + A(1, "空腹"), C(3, "早餐后"), D(4, "午餐前"), E(5, "午餐后"), F(6, "晚餐前"), G(7, "晚餐后"),H(8, "0点"); | |
| 9 | + | |
| 10 | + | |
| 11 | +// A(1, "空腹"), | |
| 12 | +// | |
| 13 | +// C(3, "早餐后"), | |
| 14 | +// D(4, "午餐前"), | |
| 15 | +// E(5, "午餐后"), | |
| 16 | +// F(6, "晚餐前"), | |
| 17 | +// G(7, "晚餐后"), | |
| 18 | +// H(8, "0点"); | |
| 9 | 19 | |
| 10 | 20 | BloodSugarEnums(Integer id, String name) { |
| 11 | 21 | this.id = id; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RemoteFacade.java
View file @
b57540e
| ... | ... | @@ -71,10 +71,10 @@ |
| 71 | 71 | if (type == BloodSugarEnums.A.getId()) { |
| 72 | 72 | min = 3.3D; |
| 73 | 73 | max = 5.6D; |
| 74 | - } else if (type == BloodSugarEnums.B.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 74 | + } else if (type == BloodSugarEnums.A.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 75 | 75 | min = 3.3D; |
| 76 | 76 | max = 5.8D; |
| 77 | - } else if (type == BloodSugarEnums.I.getId()) { | |
| 77 | + } else if (type == BloodSugarEnums.H.getId()) { | |
| 78 | 78 | min = 6.1D; |
| 79 | 79 | max = 7.8D; |
| 80 | 80 | } else { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BloodSugarServiceImpl.java
View file @
b57540e
| ... | ... | @@ -189,9 +189,9 @@ |
| 189 | 189 | private String getBloodSugarStatus(Integer type, String bloodSugar) { |
| 190 | 190 | if (type == BloodSugarEnums.A.getId()) { |
| 191 | 191 | return Double.parseDouble(bloodSugar) > 5.6D ? "高血糖" : Double.parseDouble(bloodSugar) < 3.3D ? "低血糖" : "正常"; |
| 192 | - } else if (type == BloodSugarEnums.B.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 192 | + } else if (type == BloodSugarEnums.A.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 193 | 193 | return Double.parseDouble(bloodSugar) > 5.8D ? "高血糖" : Double.parseDouble(bloodSugar) < 3.3D ? "低血糖" : "正常"; |
| 194 | - } else if (type == BloodSugarEnums.I.getId()) { | |
| 194 | + } else if (type == BloodSugarEnums.H.getId()) { | |
| 195 | 195 | return Double.parseDouble(bloodSugar) > 7.8D ? "高血糖" : Double.parseDouble(bloodSugar) < 6.1D ? "低血糖" : "正常"; |
| 196 | 196 | } else { |
| 197 | 197 | return Double.parseDouble(bloodSugar) > 6.7D ? "高血糖" : Double.parseDouble(bloodSugar) < 4.4D ? "低血糖" : "正常"; |
| 198 | 198 | |
| ... | ... | @@ -211,10 +211,10 @@ |
| 211 | 211 | if (type == BloodSugarEnums.A.getId()) { |
| 212 | 212 | minAxis = Arrays.asList(3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3); |
| 213 | 213 | maxAxis = Arrays.asList(5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6); |
| 214 | - } else if (type == BloodSugarEnums.B.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 214 | + } else if (type == BloodSugarEnums.A.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 215 | 215 | minAxis = Arrays.asList(3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3); |
| 216 | 216 | maxAxis = Arrays.asList(5.8, 5.8, 5.8, 5.8, 5.8, 5.8, 5.8); |
| 217 | - } else if (type == BloodSugarEnums.I.getId()) { | |
| 217 | + } else if (type == BloodSugarEnums.H.getId()) { | |
| 218 | 218 | minAxis = Arrays.asList(6.1, 6.1, 6.1, 6.1, 6.1, 6.1, 6.1); |
| 219 | 219 | maxAxis = Arrays.asList(7.8, 7.8, 7.8, 7.8, 7.8, 7.8, 7.8); |
| 220 | 220 | } else { |
| ... | ... | @@ -373,7 +373,7 @@ |
| 373 | 373 | |
| 374 | 374 | if(CollectionUtils.isEmpty(bloodSugars)) |
| 375 | 375 | { |
| 376 | - RespBuilder.buildSuccess("restList", restList); | |
| 376 | + return RespBuilder.buildSuccess("restList", restList); | |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | 379 | Set<String> dayCountSet = new HashSet<>(); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/TemporaryBloodSugarServiceImpl.java
View file @
b57540e
| ... | ... | @@ -227,10 +227,10 @@ |
| 227 | 227 | private String getBloodSugarStatus(Integer type, String bloodSugar) { |
| 228 | 228 | if (type == BloodSugarEnums.A.getId()) { |
| 229 | 229 | return Double.parseDouble(bloodSugar) > 5.6D ? "高血糖" : Double.parseDouble(bloodSugar) < 3.3D ? "低血糖" : "正常"; |
| 230 | - } else if (type == BloodSugarEnums.B.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 230 | + } else if (type == BloodSugarEnums.A.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 231 | 231 | return Double.parseDouble(bloodSugar) > 5.8D ? "高血糖" : Double.parseDouble(bloodSugar) < 3.3D ? "低血糖" : "正常"; |
| 232 | - } else if (type == BloodSugarEnums.I.getId()) { | |
| 233 | - return Double.parseDouble(bloodSugar) > 7.8D ? "高血糖" : Double.parseDouble(bloodSugar) < 6.1D ? "低血糖" : "正常"; | |
| 232 | +// } else if (type == BloodSugarEnums.A.getId()) { | |
| 233 | +// return Double.parseDouble(bloodSugar) > 7.8D ? "高血糖" : Double.parseDouble(bloodSugar) < 6.1D ? "低血糖" : "正常"; | |
| 234 | 234 | } else { |
| 235 | 235 | return Double.parseDouble(bloodSugar) > 6.7D ? "高血糖" : Double.parseDouble(bloodSugar) < 4.4D ? "低血糖" : "正常"; |
| 236 | 236 | } |
| 237 | 237 | |
| ... | ... | @@ -248,10 +248,10 @@ |
| 248 | 248 | if (type == BloodSugarEnums.A.getId()) { |
| 249 | 249 | minAxis = Arrays.asList(3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3); |
| 250 | 250 | maxAxis = Arrays.asList(5.6, 5.6, 5.6, 5.6, 5.6, 5.6, 5.6); |
| 251 | - } else if (type == BloodSugarEnums.B.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 251 | + } else if (type == BloodSugarEnums.A.getId() || type == BloodSugarEnums.D.getId() || type == BloodSugarEnums.F.getId()) { | |
| 252 | 252 | minAxis = Arrays.asList(3.3, 3.3, 3.3, 3.3, 3.3, 3.3, 3.3); |
| 253 | 253 | maxAxis = Arrays.asList(5.8, 5.8, 5.8, 5.8, 5.8, 5.8, 5.8); |
| 254 | - } else if (type == BloodSugarEnums.I.getId()) { | |
| 254 | + } else if (type == BloodSugarEnums.H.getId()) { | |
| 255 | 255 | minAxis = Arrays.asList(6.1, 6.1, 6.1, 6.1, 6.1, 6.1, 6.1); |
| 256 | 256 | maxAxis = Arrays.asList(7.8, 7.8, 7.8, 7.8, 7.8, 7.8, 7.8); |
| 257 | 257 | } else { |