Commit b529919071f82657373f75766b772c65e5dd6adc
1 parent
92796030aa
Exists in
master
and in
6 other branches
新生儿筛查
Showing 3 changed files with 50 additions and 1 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/BabySieveModel.java
View file @
b529919
| ... | ... | @@ -2,9 +2,11 @@ |
| 2 | 2 | |
| 3 | 3 | import com.lyms.platform.beans.SerialIdEnum; |
| 4 | 4 | import com.lyms.platform.common.result.BaseModel; |
| 5 | +import com.lyms.platform.common.utils.DateUtil; | |
| 5 | 6 | import org.springframework.data.mongodb.core.mapping.Document; |
| 6 | 7 | |
| 7 | 8 | import java.util.Date; |
| 9 | +import java.util.HashMap; | |
| 8 | 10 | import java.util.List; |
| 9 | 11 | import java.util.Map; |
| 10 | 12 | |
| ... | ... | @@ -287,6 +289,38 @@ |
| 287 | 289 | |
| 288 | 290 | public void setModified(Date modified) { |
| 289 | 291 | this.modified = modified; |
| 292 | + } | |
| 293 | + | |
| 294 | + public Map<String,String> convertToDataModel(){ | |
| 295 | + Map<String,String> map = new HashMap<String,String>(); | |
| 296 | + map.put("id",id); | |
| 297 | + map.put("testNumber",testNumber); | |
| 298 | + map.put("collectHospitalId",collectHospitalId); | |
| 299 | + map.put("currentHospitalId",currentHospitalId); | |
| 300 | + map.put("collectDocterId",collectDocterId); | |
| 301 | + map.put("collectDate", DateUtil.getYMDH(collectDate)); | |
| 302 | + map.put("montherName",montherName); | |
| 303 | + map.put("zyNo",zyNo); | |
| 304 | + map.put("montherCardNo",montherCardNo); | |
| 305 | + map.put("montherDisease",montherDisease); | |
| 306 | + map.put("phone",phone); | |
| 307 | + map.put("address",address); | |
| 308 | + map.put("babyBirth",DateUtil.getYMDH(babyBirth)); | |
| 309 | + map.put("babyName",babyName); | |
| 310 | + map.put("dueWeek",dueWeek); | |
| 311 | + map.put("dueType",dueType); | |
| 312 | + map.put("duescfs",duescfs); | |
| 313 | + if(sex != null){ | |
| 314 | + map.put("sex",String.valueOf(sex)); | |
| 315 | + } | |
| 316 | + map.put("diseaseSieve",diseaseSieve); | |
| 317 | + map.put("sendCheckHospitalId",sendCheckHospitalId); | |
| 318 | + map.put("babyId",babyId); | |
| 319 | + map.put("matdeliverId",matdeliverId); | |
| 320 | + map.put("patientId",patientId); | |
| 321 | + map.put("created",DateUtil.getyyyy_MM_dd(created)); | |
| 322 | + map.put("modified",DateUtil.getyyyy_MM_dd(modified)); | |
| 323 | + return map; | |
| 290 | 324 | } |
| 291 | 325 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySieveFacede.java
View file @
b529919
| ... | ... | @@ -318,6 +318,9 @@ |
| 318 | 318 | babySieveManager.setCardNo(patients.getCardNo()); |
| 319 | 319 | babySieveManager.setPhone(patients.getPhone()); |
| 320 | 320 | babySieveManager.setBabyId(babyModel.getId()); |
| 321 | + if(patients.getBirth() != null){ | |
| 322 | + babySieveManager.setAge(DateUtil.getAge(patients.getBirth())); | |
| 323 | + } | |
| 321 | 324 | List<MaternalDeliverModel.Baby> babies = maternalDeliverModel.getBaby(); |
| 322 | 325 | if (CollectionUtils.isNotEmpty(babies)) { |
| 323 | 326 | for (MaternalDeliverModel.Baby baby : babies) { |
| ... | ... | @@ -392,7 +395,7 @@ |
| 392 | 395 | BaseObjectResponse br = new BaseObjectResponse(); |
| 393 | 396 | BabySieveModel bm = babySieveService.findOneBabySieveById(id); |
| 394 | 397 | if(bm != null){ |
| 395 | - br.setData(bm); | |
| 398 | + br.setData(bm.convertToDataModel()); | |
| 396 | 399 | br.setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); |
| 397 | 400 | return br; |
| 398 | 401 | } |
| ... | ... | @@ -452,6 +455,7 @@ |
| 452 | 455 | babySieveQuery.setTestNumber(babySieveAddRequest.getTestNumber()); |
| 453 | 456 | } |
| 454 | 457 | List<BabySieveModel> list = babySieveService.getBabySieveQuery(babySieveQuery); |
| 458 | + //明天继续 | |
| 455 | 459 | |
| 456 | 460 | |
| 457 | 461 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabySieveManager.java
View file @
b529919
| ... | ... | @@ -23,6 +23,9 @@ |
| 23 | 23 | //母亲身份证号 |
| 24 | 24 | private String cardNo; |
| 25 | 25 | |
| 26 | + //母亲年龄 | |
| 27 | + private Integer age; | |
| 28 | + | |
| 26 | 29 | //母亲手机号 |
| 27 | 30 | private String phone; |
| 28 | 31 | |
| ... | ... | @@ -66,6 +69,14 @@ |
| 66 | 69 | |
| 67 | 70 | //母亲姓名 |
| 68 | 71 | private String mName; |
| 72 | + | |
| 73 | + public Integer getAge() { | |
| 74 | + return age; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setAge(Integer age) { | |
| 78 | + this.age = age; | |
| 79 | + } | |
| 69 | 80 | |
| 70 | 81 | public String getBabyId() { |
| 71 | 82 | return babyId; |