Commit 68d38516c5a58d260e350fe75744a49aeb6367c4
1 parent
8ab25fd5af
Exists in
master
and in
1 other branch
修改建档返回
Showing 2 changed files with 81 additions and 24 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ResidentsArchiveFacade.java
View file @
68d3851
| ... | ... | @@ -9,11 +9,13 @@ |
| 9 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 10 | 10 | import com.lyms.platform.common.result.BaseResponse; |
| 11 | 11 | import com.lyms.platform.common.utils.DateUtil; |
| 12 | +import com.lyms.platform.common.utils.JsonUtil; | |
| 12 | 13 | import com.lyms.platform.common.utils.SystemConfig; |
| 13 | 14 | import com.lyms.platform.operate.web.request.ResidentsArchiveAddRequest; |
| 14 | 15 | import com.lyms.platform.operate.web.request.ResidentsArchiveQueryRequest; |
| 15 | 16 | import com.lyms.platform.operate.web.result.BasicConfigResult; |
| 16 | 17 | import com.lyms.platform.operate.web.result.ResidentsArchiveHistoryResult; |
| 18 | +import com.lyms.platform.operate.web.result.ResidentsArchiveResult; | |
| 17 | 19 | import com.lyms.platform.operate.web.utils.CommonsHelper; |
| 18 | 20 | import com.lyms.platform.permission.model.Organization; |
| 19 | 21 | import com.lyms.platform.permission.model.Users; |
| 20 | 22 | |
| 21 | 23 | |
| 22 | 24 | |
| ... | ... | @@ -323,21 +325,75 @@ |
| 323 | 325 | return objectResponse; |
| 324 | 326 | } |
| 325 | 327 | |
| 326 | - ResidentsArchiveModel model = new ResidentsArchiveModel(); | |
| 328 | + ResidentsArchiveResult result = new ResidentsArchiveResult(); | |
| 327 | 329 | |
| 328 | 330 | ResidentsArchiveQuery query = new ResidentsArchiveQuery(); |
| 329 | 331 | query.setYn(YnEnums.YES.getId()); |
| 330 | 332 | query.setId(id); |
| 331 | 333 | List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(query); |
| 332 | 334 | if (CollectionUtils.isNotEmpty(modelList)){ |
| 333 | - model = modelList.get(0); | |
| 335 | + ResidentsArchiveModel model = modelList.get(0); | |
| 336 | + | |
| 337 | + result = getResult(model); | |
| 334 | 338 | } |
| 335 | 339 | |
| 336 | - objectResponse.setData(model); | |
| 340 | + objectResponse.setData(result); | |
| 337 | 341 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
| 338 | 342 | objectResponse.setErrormsg("成功"); |
| 339 | 343 | return objectResponse; |
| 340 | 344 | } |
| 345 | + | |
| 346 | + public ResidentsArchiveResult getResult(ResidentsArchiveModel model){ | |
| 347 | + | |
| 348 | + ResidentsArchiveResult result = new ResidentsArchiveResult(); | |
| 349 | + result.setId(model.getId()); | |
| 350 | + result.setUsername(model.getUsername()); | |
| 351 | + result.setSex(model.getSex()); | |
| 352 | + result.setBrithDay(model.getBuildDay()); | |
| 353 | + result.setCountryId(model.getCountryId()); | |
| 354 | + result.setNationId(model.getNationId()); | |
| 355 | + result.setMarriageId(model.getMarriageId()); | |
| 356 | + result.setCertificateTypeId(model.getCertificateTypeId()); | |
| 357 | + result.setCertificateNum(model.getCertificateNum()); | |
| 358 | + result.setCensusTypeId(model.getCensusTypeId()); | |
| 359 | + result.setLiveTypeId(model.getLiveTypeId()); | |
| 360 | + result.setLevelTypeId(model.getLevelTypeId()); | |
| 361 | + result.setProfessionTypeId(model.getProfessionTypeId()); | |
| 362 | + result.setHospitalId(model.getHospitalId()); | |
| 363 | + | |
| 364 | + result.setPhone(model.getPhone()); | |
| 365 | + result.setWorkUnit(model.getWorkUnit()); | |
| 366 | + result.setProvinceId(model.getProvinceId()); | |
| 367 | + result.setCityId(model.getCityId()); | |
| 368 | + result.setAreaId(model.getAreaId()); | |
| 369 | + result.setStreetId(model.getStreetId()); | |
| 370 | + result.setAddress(model.getAddress()); | |
| 371 | + | |
| 372 | + result.setProvinceRegisterId(model.getProvinceRegisterId()); | |
| 373 | + result.setCityRegisterId(model.getCityRegisterId()); | |
| 374 | + result.setAreaRegisterId(model.getAreaRegisterId()); | |
| 375 | + result.setStreetRegisterId(model.getStreetRegisterId()); | |
| 376 | + result.setAddressRegister(model.getAddressRegister()); | |
| 377 | + | |
| 378 | + result.setPastHistory(JsonUtil.str2Obj(model.getPastHistory(),Map.class)); | |
| 379 | + result.setFamilyHistory(JsonUtil.str2Obj(model.getFamilyHistory(),Map.class)); | |
| 380 | + result.setPersonalHistory(JsonUtil.str2Obj(model.getPresentHistory(),Map.class)); | |
| 381 | + result.setYwgmHistory(JsonUtil.str2Obj(model.getYwgmHistory(),Map.class)); | |
| 382 | + result.setPresentHistory(JsonUtil.str2Obj(model.getPresentHistory(),Map.class)); | |
| 383 | + | |
| 384 | + result.setVcCardNo(model.getVcCardNo()); | |
| 385 | + result.setBuildDoctor(model.getBuildDoctor()); | |
| 386 | + result.setBuildDay(model.getBuildDay()); | |
| 387 | + | |
| 388 | + result.setCreated(model.getCreated()); | |
| 389 | + result.setModified(model.getModified()); | |
| 390 | + | |
| 391 | + result.setPublishId(model.getPublishId()); | |
| 392 | + result.setPublishName(model.getPublishName()); | |
| 393 | + | |
| 394 | + return result; | |
| 395 | + } | |
| 396 | + | |
| 341 | 397 | |
| 342 | 398 | /** |
| 343 | 399 | * 妇女健康管理 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ResidentsArchiveResult.java
View file @
68d3851
| 1 | 1 | package com.lyms.platform.operate.web.result; |
| 2 | 2 | |
| 3 | 3 | import java.util.Date; |
| 4 | +import java.util.Map; | |
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * 居民建档记录详情返回参数 |
| ... | ... | @@ -16,7 +17,7 @@ |
| 16 | 17 | //性别 |
| 17 | 18 | private String sex; |
| 18 | 19 | //出生日期 |
| 19 | - private Date brithDay; | |
| 20 | + private String brithDay; | |
| 20 | 21 | //国籍 |
| 21 | 22 | private String countryId; |
| 22 | 23 | //民族Id |
| 23 | 24 | |
| 24 | 25 | |
| 25 | 26 | |
| 26 | 27 | |
| ... | ... | @@ -62,15 +63,15 @@ |
| 62 | 63 | /************病史信息*************/ |
| 63 | 64 | |
| 64 | 65 | //既往史 |
| 65 | - private String pastHistory; | |
| 66 | + private Map pastHistory; | |
| 66 | 67 | //家族史 |
| 67 | - private String familyHistory; | |
| 68 | + private Map familyHistory; | |
| 68 | 69 | //个人史 |
| 69 | - private String personalHistory; | |
| 70 | + private Map personalHistory; | |
| 70 | 71 | //药物过敏史 |
| 71 | - private String ywgmHistory; | |
| 72 | + private Map ywgmHistory; | |
| 72 | 73 | //现病史 |
| 73 | - private String presentHistory; | |
| 74 | + private Map presentHistory; | |
| 74 | 75 | |
| 75 | 76 | /************院内信息*************/ |
| 76 | 77 | |
| ... | ... | @@ -79,7 +80,7 @@ |
| 79 | 80 | //建档人 |
| 80 | 81 | private String buildDoctor; |
| 81 | 82 | //建档日期 |
| 82 | - private Date buildDay; | |
| 83 | + private String buildDay; | |
| 83 | 84 | |
| 84 | 85 | /* table info */ |
| 85 | 86 | |
| 86 | 87 | |
| ... | ... | @@ -114,11 +115,11 @@ |
| 114 | 115 | this.sex = sex; |
| 115 | 116 | } |
| 116 | 117 | |
| 117 | - public Date getBrithDay() { | |
| 118 | + public String getBrithDay() { | |
| 118 | 119 | return brithDay; |
| 119 | 120 | } |
| 120 | 121 | |
| 121 | - public void setBrithDay(Date brithDay) { | |
| 122 | + public void setBrithDay(String brithDay) { | |
| 122 | 123 | this.brithDay = brithDay; |
| 123 | 124 | } |
| 124 | 125 | |
| 125 | 126 | |
| 126 | 127 | |
| 127 | 128 | |
| 128 | 129 | |
| 129 | 130 | |
| 130 | 131 | |
| 131 | 132 | |
| 132 | 133 | |
| 133 | 134 | |
| ... | ... | @@ -298,43 +299,43 @@ |
| 298 | 299 | this.addressRegister = addressRegister; |
| 299 | 300 | } |
| 300 | 301 | |
| 301 | - public String getPastHistory() { | |
| 302 | + public Map getPastHistory() { | |
| 302 | 303 | return pastHistory; |
| 303 | 304 | } |
| 304 | 305 | |
| 305 | - public void setPastHistory(String pastHistory) { | |
| 306 | + public void setPastHistory(Map pastHistory) { | |
| 306 | 307 | this.pastHistory = pastHistory; |
| 307 | 308 | } |
| 308 | 309 | |
| 309 | - public String getFamilyHistory() { | |
| 310 | + public Map getFamilyHistory() { | |
| 310 | 311 | return familyHistory; |
| 311 | 312 | } |
| 312 | 313 | |
| 313 | - public void setFamilyHistory(String familyHistory) { | |
| 314 | + public void setFamilyHistory(Map familyHistory) { | |
| 314 | 315 | this.familyHistory = familyHistory; |
| 315 | 316 | } |
| 316 | 317 | |
| 317 | - public String getPersonalHistory() { | |
| 318 | + public Map getPersonalHistory() { | |
| 318 | 319 | return personalHistory; |
| 319 | 320 | } |
| 320 | 321 | |
| 321 | - public void setPersonalHistory(String personalHistory) { | |
| 322 | + public void setPersonalHistory(Map personalHistory) { | |
| 322 | 323 | this.personalHistory = personalHistory; |
| 323 | 324 | } |
| 324 | 325 | |
| 325 | - public String getYwgmHistory() { | |
| 326 | + public Map getYwgmHistory() { | |
| 326 | 327 | return ywgmHistory; |
| 327 | 328 | } |
| 328 | 329 | |
| 329 | - public void setYwgmHistory(String ywgmHistory) { | |
| 330 | + public void setYwgmHistory(Map ywgmHistory) { | |
| 330 | 331 | this.ywgmHistory = ywgmHistory; |
| 331 | 332 | } |
| 332 | 333 | |
| 333 | - public String getPresentHistory() { | |
| 334 | + public Map getPresentHistory() { | |
| 334 | 335 | return presentHistory; |
| 335 | 336 | } |
| 336 | 337 | |
| 337 | - public void setPresentHistory(String presentHistory) { | |
| 338 | + public void setPresentHistory(Map presentHistory) { | |
| 338 | 339 | this.presentHistory = presentHistory; |
| 339 | 340 | } |
| 340 | 341 | |
| 341 | 342 | |
| ... | ... | @@ -354,11 +355,11 @@ |
| 354 | 355 | this.buildDoctor = buildDoctor; |
| 355 | 356 | } |
| 356 | 357 | |
| 357 | - public Date getBuildDay() { | |
| 358 | + public String getBuildDay() { | |
| 358 | 359 | return buildDay; |
| 359 | 360 | } |
| 360 | 361 | |
| 361 | - public void setBuildDay(Date buildDay) { | |
| 362 | + public void setBuildDay(String buildDay) { | |
| 362 | 363 | this.buildDay = buildDay; |
| 363 | 364 | } |
| 364 | 365 |