Commit b218e4fd78e04ce6eaf2d11644683d2a71b7454f

Authored by yangfei

Merge remote-tracking branch 'origin/master'

Showing 5 changed files

platform-common/src/main/java/com/lyms/platform/common/utils/ReflectionUtils.java View file @ b218e4f
... ... @@ -51,6 +51,8 @@
51 51 if (!key.equals("class")) {
52 52 // 得到property对应的getter方法
53 53 Method getter = property.getReadMethod();
  54 + if (getter == null)
  55 + continue;
54 56 Object value = getter.invoke(obj);
55 57  
56 58 map.put(key, value);
platform-operate-api/src/main/java/com/lyms/hospitalapi/Cdfy/CdGwInterface.java View file @ b218e4f
... ... @@ -179,7 +179,6 @@
179 179 Map<String,Object> map = (Map)br.getData();
180 180  
181 181  
182   -
183 182 String inSql = "insert into WOMAN_PREFIRSTVISIT(LAST_UPDATE_DTIME,ORG_CODE,PATIENT_ID,PREN_VISIT_FORM_NO,\n" +
184 183 "HEALTH_RECORD_NO,NAME,FILL_IN_DATE,GEST_WEEKS,BIRTH_DATE,HUSBAND_NAME,HUSBAND_TEL_NO,HUSBAND_BIRTH_DATE,\n" +
185 184 "GRAVIDITY,PARITY,VAGINAL_DELIVERY_TIMES,C_SECT_DELIVERY_TIMES,LAST_MENSES_MARK,MENSES_LAST_DATE,\n" +
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ b218e4f
... ... @@ -621,6 +621,10 @@
621 621 }
622 622 antExRecordQuery.setParentIds(parentIds);
623 623 }
  624 + else
  625 + {
  626 + return new BaseListResponse().setData(new ArrayList()).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
  627 + }
624 628 }
625 629  
626 630  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/SieveFacade.java View file @ b218e4f
... ... @@ -106,6 +106,12 @@
106 106 } else {
107 107  
108 108 sieveService.addSieve(sieveResultModel);
  109 +
  110 + if (StringUtils.isNotEmpty(sieveResultModel.getExamineId()) && StringUtils.isNotEmpty(sieveResultModel.getCheckerId()) )
  111 + {
  112 + createSieveSms(sieveResultModel.getParentId());
  113 + }
  114 +
109 115 operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospital), sieveResultModel, OptActionEnums.ADD.getId(), "添加产筛结果");
110 116 }
111 117  
... ... @@ -146,12 +152,6 @@
146 152  
147 153 //短信前缀
148 154 String messagePrefix = smsConfigFacade.getMsgPrefix(configModel, patient.getLastCheckEmployeeId(), ServiceObjEnums.YUNOBJ.getId());
149   -
150   - //发送推送类模板建档
151   - if (startType == 3)
152   - {
153   - return;
154   - }
155 155  
156 156 List<MsgRequest> messages = new ArrayList<>();
157 157 MsgRequest mr = new MsgRequest();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ b218e4f
... ... @@ -119,7 +119,7 @@
119 119  
120 120  
121 121  
122   - WEIGHT_RANGE.put("BMI<18.5孕0-12周","1.00-1.50");
  122 + //WEIGHT_RANGE.put("BMI<18.5孕0-12周","1.00-1.50");
123 123 WEIGHT_RANGE.put("BMI<18.5孕13周","1.41-2.09");
124 124 WEIGHT_RANGE.put("BMI<18.5孕14周","1.82-2.68");
125 125 WEIGHT_RANGE.put("BMI<18.5孕15周","2.23-3.27");
... ... @@ -150,7 +150,7 @@
150 150 WEIGHT_RANGE.put("BMI<18.5孕40周","12.50-18.00");
151 151  
152 152  
153   - WEIGHT_RANGE.put("BMI=18.5-24.9孕0-12周","1.00-1.50");
  153 + // WEIGHT_RANGE.put("BMI=18.5-24.9孕0-12周","1.00-1.50");
154 154 WEIGHT_RANGE.put("BMI=18.5-24.9孕13周","1.37-2.02");
155 155 WEIGHT_RANGE.put("BMI=18.5-24.9孕14周","1.75-2.54");
156 156 WEIGHT_RANGE.put("BMI=18.5-24.9孕15周","2.12-3.06");
... ... @@ -181,7 +181,7 @@
181 181 WEIGHT_RANGE.put("BMI=18.5-24.9孕40周","11.50-16.00");
182 182  
183 183  
184   - WEIGHT_RANGE.put("BMI=25-29.9孕0-12周","1.00-1.50");
  184 + //WEIGHT_RANGE.put("BMI=25-29.9孕0-12周","1.00-1.50");
185 185 WEIGHT_RANGE.put("BMI=25-29.9孕13周","1.21-1.86");
186 186 WEIGHT_RANGE.put("BMI=25-29.9孕14周","1.42-2.22");
187 187 WEIGHT_RANGE.put("BMI=25-29.9孕15周","1.64-2.58");
... ... @@ -212,7 +212,7 @@
212 212 WEIGHT_RANGE.put("BMI=25-29.9孕40周","7.00-11.50");
213 213  
214 214  
215   - WEIGHT_RANGE.put("BMI≥30孕0-12周","1.00-1.50");
  215 + //WEIGHT_RANGE.put("BMI≥30孕0-12周","1.00-1.50");
216 216 WEIGHT_RANGE.put("BMI≥30孕13周","1.14-1.77");
217 217 WEIGHT_RANGE.put("BMI≥30孕14周","1.28-2.22");
218 218 WEIGHT_RANGE.put("BMI≥30孕15周","1.42-2.04");
... ... @@ -243,7 +243,7 @@
243 243 WEIGHT_RANGE.put("BMI≥30孕40周","5.00-9.00");
244 244  
245 245  
246   - DWEIGHT_RANGE.put("BMI≤24.9孕0-12周","1.00-1.50kg");
  246 + //DWEIGHT_RANGE.put("BMI≤24.9孕0-12周","1.00-1.50kg");
247 247 DWEIGHT_RANGE.put("BMI≤24.9孕13周","1.57-2.34");
248 248 DWEIGHT_RANGE.put("BMI≤24.9孕14周","2.14-3.18");
249 249 DWEIGHT_RANGE.put("BMI≤24.9孕15周","2.71-4.02");
... ... @@ -274,7 +274,7 @@
274 274 DWEIGHT_RANGE.put("BMI≤24.9孕40周","17.00-25.00");
275 275  
276 276  
277   - DWEIGHT_RANGE.put("BMI=25-29.9孕0-12周","1.00-1.50");
  277 + //DWEIGHT_RANGE.put("BMI=25-29.9孕0-12周","1.00-1.50");
278 278 DWEIGHT_RANGE.put("BMI=25-29.9孕13周","1.46-2.27");
279 279 DWEIGHT_RANGE.put("BMI=25-29.9孕14周","1.93-3.04");
280 280 DWEIGHT_RANGE.put("BMI=25-29.9孕15周","2.39-3.81");
... ... @@ -304,7 +304,7 @@
304 304 DWEIGHT_RANGE.put("BMI=25-29.9孕39周","13.55-22.29");
305 305 DWEIGHT_RANGE.put("BMI=25-29.9孕40周","14.00-23.00");
306 306  
307   - DWEIGHT_RANGE.put("BMI≥30孕0-12周","1.00-1.50");
  307 + //DWEIGHT_RANGE.put("BMI≥30孕0-12周","1.00-1.50");
308 308 DWEIGHT_RANGE.put("BMI≥30孕13周","1.36-2.12");
309 309 DWEIGHT_RANGE.put("BMI≥30孕14周","1.72-2.75");
310 310 DWEIGHT_RANGE.put("BMI≥30孕15周","2.08-3.37");
... ... @@ -588,7 +588,7 @@
588 588 map.put("isShow",false);
589 589 }
590 590  
591   - setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights());
  591 + setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(),patientWeight.getBregmatic());
592 592  
593 593 CollectionUtils.removeNullValue(map);
594 594 return RespBuilder.buildSuccess(map);
... ... @@ -720,7 +720,7 @@
720 720 weights.put(DateUtil.getWeek2(patients.getLastMenses(), DateUtil.parseYMD(entry.getKey())), entry.getValue());
721 721 }
722 722 }
723   - setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights());
  723 + setReport(map, weights, patientWeight.getBeforeWeight(), patientWeight.getBmi(), patientWeight.getDayWeights(),patientWeight.getBregmatic());
724 724 CollectionUtils.removeNullValue(map);
725 725 return RespBuilder.buildSuccess(map);
726 726 }
... ... @@ -1198,7 +1198,8 @@
1198 1198 return restList;
1199 1199 }
1200 1200  
1201   - public void setReport(Map<String, Object> restMap, Map<Integer, String> weights, String beforeWeight, String bmi, Map<String, String> dayWeights) {
  1201 + public void setReport(Map<String, Object> restMap, Map<Integer, String> weights, String beforeWeight,
  1202 + String bmi, Map<String, String> dayWeights,String bregmatic) {
1202 1203 List<Map<String, Object>> restList = new ArrayList<>();
1203 1204 if(MapUtils.isNotEmpty(dayWeights)) {
1204 1205 for (String key : dayWeights.keySet()) {
1205 1206  
1206 1207  
1207 1208  
1208 1209  
1209 1210  
1210 1211  
1211 1212  
1212 1213  
... ... @@ -1216,69 +1217,94 @@
1216 1217 }
1217 1218 String title = "";
1218 1219 String color = "";
1219   - double low = 0D;
1220   - double low2 = 0D;
1221   - double high = 0D;
1222   - double high2 = 0D;
1223   - if(bmiD <= 18.5) {
1224   - title = "低体重推荐增重均值";
1225   - low = 1.2;
1226   - low2 = 11.9;
1227   - high = 3.8;
1228   - high2 = 18.1;
1229   - color = "#00CD00";
1230   - } else if(bmiD > 18.5 && bmiD <= 24.9){
1231   - title = "标准体重推荐增重均值";
1232   - low = 1.4;
1233   - low2 = 11.9;
1234   - high = 3.2;
1235   - high2 = 15.9;
1236   - color = "#7EC0EE";
1237   - } else if(bmiD > 24.9 && bmiD < 30){
1238   - title = "超重体重推荐增重均值";
1239   - low = 1.1 ;
1240   - low2 = 7.1;
1241   - high = 3.1;
1242   - high2 = 11.6;
1243   - color = "#CD3333";
1244   - } else if(bmiD >= 30){
1245   - title = "肥胖体重推荐增重均值";
1246   - low = 0.8 ;
1247   - low2 = 4.9;
1248   - high = 2.1;
1249   - high2 = 8.9;
1250   - color = "#CD00CD";
  1220 + double low = 1;
  1221 + double high = 1.5D;
  1222 + String bmiStr = "";
  1223 +
  1224 + //空和1表示单胎
  1225 + if (!StringUtils.isNotEmpty(bregmatic) || "1".equals(bregmatic))
  1226 + {
  1227 + if(bmiD <= 18.5) {
  1228 + title = "低体重推荐增重均值";
  1229 + color = "#00CD00";
  1230 + bmiStr = "BMI<18.5";
  1231 + } else if(bmiD > 18.5 && bmiD <= 24.9){
  1232 + title = "标准体重推荐增重均值";
  1233 + color = "#7EC0EE";
  1234 + bmiStr = "BMI=18.5-24.9";
  1235 + } else if(bmiD > 24.9 && bmiD < 30){
  1236 + title = "超重体重推荐增重均值";
  1237 + color = "#CD3333";
  1238 + bmiStr = "BMI=25-29.9";
  1239 + } else if(bmiD >= 30){
  1240 + title = "肥胖体重推荐增重均值";
  1241 + color = "#CD00CD";
  1242 + bmiStr = "BMI≥30";
  1243 + }
1251 1244 }
  1245 + else
  1246 + {
  1247 + if(bmiD <= 24.9) {
  1248 + title = "标准体重推荐增重均值";
  1249 + color = "#7EC0EE";
  1250 + bmiStr = "BMI≤24.9";
  1251 + } else if(bmiD >= 25 && bmiD <= 29.9){
  1252 + title = "超重体重推荐增重均值";
  1253 + color = "#CD3333";
  1254 + bmiStr = "BMI=25-29.9";
  1255 + } else if(bmiD >= 30){
  1256 + title = "肥胖体重推荐增重均值";
  1257 + color = "#CD00CD";
  1258 + bmiStr = "BMI≥30";
  1259 + }
  1260 + }
1252 1261  
  1262 +
1253 1263 Map<Integer, Double> highMap = new LinkedHashMap<>();
1254 1264 Map<Integer, Double> normalMap = new LinkedHashMap<>();
1255 1265 Map<Integer, Double> lowMap = new LinkedHashMap<>();
1256 1266 List<Integer> xAxis = new ArrayList<>();
1257   - double avg = low / 13;
1258   - for (int i = 0; i <= 13; i++) {
1259   - lowMap.put(i, i * avg);
  1267 +
  1268 + double avg = Double.valueOf(String.format("%.2f", low / 12));
  1269 + for (int i = 1; i <= 12; i++) {
  1270 + lowMap.put(i, Double.valueOf(String.format("%.2f",i * avg)));
1260 1271 }
1261   - double avg2 = (low2 - low) / 27;
1262   - for (int i = 1; i <= 27; i++) {
1263   - lowMap.put(13 + i, low + i * avg2);
  1272 +
  1273 + double highAvg = Double.valueOf(String.format("%.2f",high / 12));
  1274 + for (int i = 1; i <= 12; i++) {
  1275 + highMap.put(i, Double.valueOf(String.format("%.2f",i * highAvg)));
1264 1276 }
1265   - double highAvg = high / 13;
1266   - for (int i = 0; i <= 13; i++) {
1267   - highMap.put(i, i * highAvg);
  1277 +
  1278 + for (int i = 13; i <= 40; i++) {
  1279 +
  1280 + String range = "";
  1281 + //空和1表示单胎
  1282 + if (!StringUtils.isNotEmpty(bregmatic) || "1".equals(bregmatic))
  1283 + {
  1284 + range = WEIGHT_RANGE.get(bmiStr+"孕"+i+"周");
  1285 + }
  1286 + else
  1287 + {
  1288 + range = DWEIGHT_RANGE.get(bmiStr+"孕"+i+"周");
  1289 + }
  1290 +
  1291 + if (StringUtils.isNotEmpty(range))
  1292 + {
  1293 + String[] array = range.split("-");
  1294 + lowMap.put(i, Double.valueOf(String.format("%.2f", Double.valueOf(array[0]))));
  1295 + highMap.put(i, Double.valueOf(String.format("%.2f", Double.valueOf(array[1]))));
  1296 + }
1268 1297 }
1269   - double highAvg2 = (high2 - high) / 27;
1270   - for (int i = 1; i <= 27; i++) {
1271   - highMap.put(13 + i, high + i * highAvg2);
  1298 +
  1299 + for (int i = 1; i <= 40; i++) {
  1300 + normalMap.put(i, Double.valueOf(String.format("%.2f", (highMap.get(i) + lowMap.get(i)) / 2)) );
1272 1301 }
1273   - for (int i = 0; i <= 40; i++) {
1274   - normalMap.put(i, (highMap.get(i) + lowMap.get(i)) / 2);
1275   - }
1276 1302  
1277 1303 Map<String, Object> reportModel = new LinkedHashMap<>();
1278 1304 Map<String, Object> series = new LinkedHashMap<>();
1279   - series.put("lowData", MathUtil.doubleFormat2(CollectionUtils.getValList(lowMap)));
1280   - series.put("highData", MathUtil.doubleFormat2(CollectionUtils.getValList(highMap)));
1281   - series.put("normalData", MathUtil.doubleFormat2(CollectionUtils.getValList(normalMap)));
  1305 + series.put("lowData", CollectionUtils.getValList(lowMap));
  1306 + series.put("highData", CollectionUtils.getValList(highMap));
  1307 + series.put("normalData", CollectionUtils.getValList(normalMap));
1282 1308  
1283 1309 series.put("dayWeights", restList);
1284 1310  
... ... @@ -1287,7 +1313,7 @@
1287 1313 reportModel.put("title", title);
1288 1314 reportModel.put("color", color);
1289 1315  
1290   - for (int i = 0; i <= 40; i++) {
  1316 + for (int i = 1; i <= 40; i++) {
1291 1317 xAxis.add(i);
1292 1318 }
1293 1319 reportModel.put("xAxis", xAxis);
... ... @@ -1301,7 +1327,6 @@
1301 1327 }
1302 1328 }
1303 1329 series.put("portData", list);
1304   - series.put("portData", list);
1305 1330 restMap.put("reportModel", reportModel);
1306 1331 }
1307 1332  
... ... @@ -1314,7 +1339,7 @@
1314 1339 }
1315 1340 Double b = Double.parseDouble(before);
1316 1341 Double n = Double.parseDouble(now);
1317   - return MathUtil.doubleFormat2(n - b);
  1342 + return Double.parseDouble(MathUtil.doubleFormat(n - b));
1318 1343 }
1319 1344  
1320 1345