Commit e515e8cefcfe6c5cedea633051a8ac75e9584481
1 parent
e7d55a03e0
Exists in
master
and in
6 other branches
孕前优生上传省平台:经期范围、月经周期数据解析
Showing 1 changed file with 14 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/hospitalapi/lhxfy/LhxfyUploadingProvince.java
View file @
e515e8c
... | ... | @@ -383,10 +383,20 @@ |
383 | 383 | List<Object> menstrualCycle=(List<Object>)baseInfo.get("menstrualCycle"); |
384 | 384 | general.setMenstrualYes(menstrualCycle.get(0).toString().equals("true")?"1":"2"); // 月经周期规律1:是 2:否 |
385 | 385 | general.setMenstrualNothing(menstrualCycle.get(0).toString().equals("true")?"2":"1"); // 月经周期不规律1:是 2:否 |
386 | - general.setPeriod(null); // 经期范围开始天数 | |
387 | - general.setEndPeriod(menstrualCycle.get(1).toString()); // 经期范围结束天数 | |
388 | - general.setCycle(null); // 月经周期范围开始天数 | |
389 | - general.setEndCycle(menstrualCycle.get(2).toString()); // 月经周期单位结束天数 | |
386 | + if(null!=menstrualCycle.get(1)) { | |
387 | + String[] fw=menstrualCycle.get(1).toString().split("-"); | |
388 | + if (fw.length==2) { | |
389 | + general.setPeriod(fw[0]); // 经期范围开始天数 | |
390 | + general.setEndPeriod(fw[1]); // 经期范围结束天数 | |
391 | + } | |
392 | + } | |
393 | + if(null!=menstrualCycle.get(2)) { | |
394 | + String[] zq=menstrualCycle.get(2).toString().split("-"); | |
395 | + if (zq.length==2) { | |
396 | + general.setCycle(zq[0]); // 月经周期范围开始天数 | |
397 | + general.setEndCycle(zq[1]); // 月经周期单位结束天数 | |
398 | + } | |
399 | + } | |
390 | 400 | } |
391 | 401 | general.setMenstrualMany(null!=baseInfo.get("menstrualAmount")?baseInfo.get("menstrualAmount").toString().equals("1")?"1":"2":""); // 月经量多 1:是 2:否 |
392 | 402 | general.setMenstrualMiddle(null!=baseInfo.get("menstrualAmount")?baseInfo.get("menstrualAmount").toString().equals("2")?"1":"2":""); // 月经量中 1:是 2:否 |