Commit 78cc4602082cc1ebf25f37876d0a20b29d23db9e

Authored by hujiaqi
1 parent 675b63ba07

添加完整地址与医院名称

Showing 3 changed files with 49 additions and 0 deletions

platform-dal/src/main/java/com/lyms/platform/pojo/BabyModel.java View file @ 78cc460
... ... @@ -96,6 +96,7 @@
96 96 private String cardNo;
97 97  
98 98 private String hospitalId;
  99 + private String hospitalName;
99 100 //建档类型 1、儿童直接建档 2 产妇分娩建档 3 为转诊自动建档
100 101 private Integer buildType;
101 102 /**
... ... @@ -332,6 +333,14 @@
332 333  
333 334 public void setHospitalId(String hospitalId) {
334 335 this.hospitalId = hospitalId;
  336 + }
  337 +
  338 + public String getHospitalName() {
  339 + return hospitalName;
  340 + }
  341 +
  342 + public void setHospitalName(String hospitalName) {
  343 + this.hospitalName = hospitalName;
335 344 }
336 345  
337 346 public String getCardNo() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 78cc460
... ... @@ -38,6 +38,7 @@
38 38  
39 39 public static final String HIS_VERSION = PropertiesUtils.getPropertyValue("his_version");
40 40  
  41 +
41 42 @Autowired
42 43 private HisService hisServiceV2;
43 44  
... ... @@ -479,6 +480,9 @@
479 480 model.setCreated(new Date());
480 481 model.setModified(new Date());
481 482 model.setBuildType(1);
  483 + model.setHospitalId(request.getHospitalId());
  484 + String hospitalName = organizationService.getOrganization(Integer.valueOf(request.getHospitalId())).getName();
  485 + model.setHospitalName(hospitalName);
482 486 model = babyBookbuildingService.addBabyBookbuilding(model);
483 487  
484 488 if (model == null || model.getId() == null) {
... ... @@ -1488,6 +1492,22 @@
1488 1492 result.setMonthAge(StringUtils.emptyDeal(DateUtil.getBabyMonthAge(model.getBirth(), new Date())));
1489 1493 result.setPatientId(model.getParentId());
1490 1494 result.setBuildTime(DateUtil.getyyyy_MM_dd(model.getBuildDate()));
  1495 + result.setHospitalName(model.getHospitalName());
  1496 +
  1497 + // 开始查询省市区街道
  1498 + // 省
  1499 + String provinceName = basicConfigService.getOneBasicConfigById(model.getProvinceId()).getName();
  1500 + // 市
  1501 + String cityName = basicConfigService.getOneBasicConfigById(model.getCityId()).getName();
  1502 + // 区
  1503 + String areaName = basicConfigService.getOneBasicConfigById(model.getAreaId()).getName();
  1504 + // 街道
  1505 + String streetName = basicConfigService.getOneBasicConfigById(model.getStreetId()).getName();
  1506 + // 具体
  1507 + String address = model.getAddress();
  1508 + String completeAddress = provinceName+cityName+areaName+streetName+address;
  1509 + result.setCompleteAddress(completeAddress);
  1510 +
1491 1511 String diagnose = "";
1492 1512 // if (!StringUtils.isEmpty(model.getDiagnose())) {
1493 1513 // List diagList = JsonUtil.toList(model.getDiagnose(), List.class);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/BabyManageListResult.java View file @ 78cc460
... ... @@ -48,6 +48,26 @@
48 48  
49 49 private String buildTime;
50 50  
  51 + private String hospitalName;
  52 +
  53 + private String completeAddress;
  54 +
  55 + public String getCompleteAddress() {
  56 + return completeAddress;
  57 + }
  58 +
  59 + public void setCompleteAddress(String completeAddress) {
  60 + this.completeAddress = completeAddress;
  61 + }
  62 +
  63 + public String getHospitalName() {
  64 + return hospitalName;
  65 + }
  66 +
  67 + public void setHospitalName(String hospitalName) {
  68 + this.hospitalName = hospitalName;
  69 + }
  70 +
51 71 public String getBuildTime() {
52 72 return buildTime;
53 73 }