From 277e152057d5409323bbd083fbe2e7f633f32ddd Mon Sep 17 00:00:00 2001 From: wangbo <184677810@qq.com> Date: Fri, 31 May 2019 18:39:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=B8=E5=9F=8E=E4=BA=BA=E6=B0=91=E5=84=BF?= =?UTF-8?q?=E7=AB=A5=E8=AE=B0=E5=BD=95=E8=A1=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operate/web/facade/BabyBookbuildingFacade.java | 64 +++++++++++++--------- 1 file changed, 39 insertions(+), 25 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java index 076656c..46d0548 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java @@ -1292,16 +1292,13 @@ public class BabyBookbuildingFacade { * @param id * @return */ - public BaseObjectResponse queryBabyBuildById(String id,boolean isBuild) { + public BaseObjectResponse queryBabyBuildById(String id, boolean isBuild) { BabyModelQuery babyQuery = new BabyModelQuery(); babyQuery.setId(id); - if (isBuild) - { + if (isBuild) { babyQuery.setYn(YnEnums.YES.getId()); - } - else - { + } else { babyQuery.setFmDataStatu(true); } @@ -1684,8 +1681,7 @@ public class BabyBookbuildingFacade { buildInfo = build; } - if (build != null && build.getYn() == YnEnums.YES.getId()) - { + if (build != null && build.getYn() == YnEnums.YES.getId()) { result.setIsBuild(true); } @@ -2246,12 +2242,9 @@ public class BabyBookbuildingFacade { buildType.add(2);//产妇分娩建档 babyQuery.setBuildTypeList(buildType); - if (request.getHighRiskType() != null && request.getHighRiskType() == 4) - { + if (request.getHighRiskType() != null && request.getHighRiskType() == 4) { babyQuery.setFmDataStatu(true); - } - else - { + } else { babyQuery.setDataStatus(true);//排除自动建档数据 babyQuery.setYn(YnEnums.YES.getId()); } @@ -3955,7 +3948,7 @@ public class BabyBookbuildingFacade { String weakSonsInfo = basicConfigFacade.queryBaseInfoByStr(babyModel.getWeakSonInfo()); dataMap.put("weakSone", weakSonsInfo); } - dataMap.put("phone", babyModel.getFphone()); + dataMap.put("parentName", babyModel.getMname()); List babyCheckModel = mongoTemplate.find(Query.query(Criteria.where("buildId").is(id)), BabyCheckModel.class); if (CollectionUtils.isNotEmpty(babyCheckModel)) { @@ -3981,15 +3974,36 @@ public class BabyBookbuildingFacade { } } Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(babyModel.getParentId())), Patients.class); - //市区 - dataMap.put("city", CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService)); - //县 - dataMap.put("county", CommonsHelper.getName1(patients.getAreaRegisterId(), basicConfigService)); - //乡镇 - dataMap.put("township", CommonsHelper.getName1(patients.getStreetRegisterId(), basicConfigService)); - //村 - dataMap.put("village", patients.getAddressRegister()); - dataMap.put("education", getBasicConfig(babyModel.getmLevelId())); + + if (null != patients && StringUtils.isNotEmpty(patients.getCityRegisterId()) && StringUtils.isNotEmpty(patients.getAreaRegisterId())) { + //市区 + dataMap.put("city", CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService)); + //县 + dataMap.put("county", CommonsHelper.getName1(patients.getAreaRegisterId(), basicConfigService)); + //乡镇 + dataMap.put("township", CommonsHelper.getName1(patients.getStreetRegisterId(), basicConfigService)); + //村 + dataMap.put("village", patients.getAddressRegister()); + dataMap.put("phone", patients.getPhone()); + dataMap.put("education", getBasicConfig(babyModel.getmLevelId())); + } else { + /* private String address; + private String provinceId; + private String cityId; + private String areaId; + private String streetId;*/ + //市区 + dataMap.put("city", CommonsHelper.getName1(babyModel.getCityId(), basicConfigService)); + //县 + dataMap.put("county", CommonsHelper.getName1(babyModel.getAreaId(), basicConfigService)); + //乡镇 + dataMap.put("township", CommonsHelper.getName1(babyModel.getStreetId(), basicConfigService)); + //村 + dataMap.put("village", babyModel.getAddress()); + dataMap.put("phone", babyModel.getMphone()); + dataMap.put("education", getBasicConfig(babyModel.getmLevelId())); + } + } return dataMap; } @@ -4005,7 +4019,7 @@ public class BabyBookbuildingFacade { return ""; } - public BaseObjectResponse queryBabyTempBuildById(String id,boolean isBuild) { - return queryBabyBuildById(id,isBuild); + public BaseObjectResponse queryBabyTempBuildById(String id, boolean isBuild) { + return queryBabyBuildById(id, isBuild); } } \ No newline at end of file -- 1.8.3.1