Commit 277e152057d5409323bbd083fbe2e7f633f32ddd
1 parent
1d21b67c04
Exists in
master
and in
1 other branch
诸城人民儿童记录表导出
Showing 1 changed file with 39 additions and 25 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
277e152
| ... | ... | @@ -1292,16 +1292,13 @@ |
| 1292 | 1292 | * @param id |
| 1293 | 1293 | * @return |
| 1294 | 1294 | */ |
| 1295 | - public BaseObjectResponse queryBabyBuildById(String id,boolean isBuild) { | |
| 1295 | + public BaseObjectResponse queryBabyBuildById(String id, boolean isBuild) { | |
| 1296 | 1296 | |
| 1297 | 1297 | BabyModelQuery babyQuery = new BabyModelQuery(); |
| 1298 | 1298 | babyQuery.setId(id); |
| 1299 | - if (isBuild) | |
| 1300 | - { | |
| 1299 | + if (isBuild) { | |
| 1301 | 1300 | babyQuery.setYn(YnEnums.YES.getId()); |
| 1302 | - } | |
| 1303 | - else | |
| 1304 | - { | |
| 1301 | + } else { | |
| 1305 | 1302 | babyQuery.setFmDataStatu(true); |
| 1306 | 1303 | } |
| 1307 | 1304 | |
| ... | ... | @@ -1684,8 +1681,7 @@ |
| 1684 | 1681 | buildInfo = build; |
| 1685 | 1682 | } |
| 1686 | 1683 | |
| 1687 | - if (build != null && build.getYn() == YnEnums.YES.getId()) | |
| 1688 | - { | |
| 1684 | + if (build != null && build.getYn() == YnEnums.YES.getId()) { | |
| 1689 | 1685 | result.setIsBuild(true); |
| 1690 | 1686 | } |
| 1691 | 1687 | |
| 1692 | 1688 | |
| ... | ... | @@ -2246,12 +2242,9 @@ |
| 2246 | 2242 | buildType.add(2);//产妇分娩建档 |
| 2247 | 2243 | babyQuery.setBuildTypeList(buildType); |
| 2248 | 2244 | |
| 2249 | - if (request.getHighRiskType() != null && request.getHighRiskType() == 4) | |
| 2250 | - { | |
| 2245 | + if (request.getHighRiskType() != null && request.getHighRiskType() == 4) { | |
| 2251 | 2246 | babyQuery.setFmDataStatu(true); |
| 2252 | - } | |
| 2253 | - else | |
| 2254 | - { | |
| 2247 | + } else { | |
| 2255 | 2248 | babyQuery.setDataStatus(true);//排除自动建档数据 |
| 2256 | 2249 | babyQuery.setYn(YnEnums.YES.getId()); |
| 2257 | 2250 | } |
| ... | ... | @@ -3955,7 +3948,7 @@ |
| 3955 | 3948 | String weakSonsInfo = basicConfigFacade.queryBaseInfoByStr(babyModel.getWeakSonInfo()); |
| 3956 | 3949 | dataMap.put("weakSone", weakSonsInfo); |
| 3957 | 3950 | } |
| 3958 | - dataMap.put("phone", babyModel.getFphone()); | |
| 3951 | + | |
| 3959 | 3952 | dataMap.put("parentName", babyModel.getMname()); |
| 3960 | 3953 | List<BabyCheckModel> babyCheckModel = mongoTemplate.find(Query.query(Criteria.where("buildId").is(id)), BabyCheckModel.class); |
| 3961 | 3954 | if (CollectionUtils.isNotEmpty(babyCheckModel)) { |
| ... | ... | @@ -3981,15 +3974,36 @@ |
| 3981 | 3974 | } |
| 3982 | 3975 | } |
| 3983 | 3976 | Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(babyModel.getParentId())), Patients.class); |
| 3984 | - //市区 | |
| 3985 | - dataMap.put("city", CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService)); | |
| 3986 | - //县 | |
| 3987 | - dataMap.put("county", CommonsHelper.getName1(patients.getAreaRegisterId(), basicConfigService)); | |
| 3988 | - //乡镇 | |
| 3989 | - dataMap.put("township", CommonsHelper.getName1(patients.getStreetRegisterId(), basicConfigService)); | |
| 3990 | - //村 | |
| 3991 | - dataMap.put("village", patients.getAddressRegister()); | |
| 3992 | - dataMap.put("education", getBasicConfig(babyModel.getmLevelId())); | |
| 3977 | + | |
| 3978 | + if (null != patients && StringUtils.isNotEmpty(patients.getCityRegisterId()) && StringUtils.isNotEmpty(patients.getAreaRegisterId())) { | |
| 3979 | + //市区 | |
| 3980 | + dataMap.put("city", CommonsHelper.getName1(patients.getCityRegisterId(), basicConfigService)); | |
| 3981 | + //县 | |
| 3982 | + dataMap.put("county", CommonsHelper.getName1(patients.getAreaRegisterId(), basicConfigService)); | |
| 3983 | + //乡镇 | |
| 3984 | + dataMap.put("township", CommonsHelper.getName1(patients.getStreetRegisterId(), basicConfigService)); | |
| 3985 | + //村 | |
| 3986 | + dataMap.put("village", patients.getAddressRegister()); | |
| 3987 | + dataMap.put("phone", patients.getPhone()); | |
| 3988 | + dataMap.put("education", getBasicConfig(babyModel.getmLevelId())); | |
| 3989 | + } else { | |
| 3990 | + /* private String address; | |
| 3991 | + private String provinceId; | |
| 3992 | + private String cityId; | |
| 3993 | + private String areaId; | |
| 3994 | + private String streetId;*/ | |
| 3995 | + //市区 | |
| 3996 | + dataMap.put("city", CommonsHelper.getName1(babyModel.getCityId(), basicConfigService)); | |
| 3997 | + //县 | |
| 3998 | + dataMap.put("county", CommonsHelper.getName1(babyModel.getAreaId(), basicConfigService)); | |
| 3999 | + //乡镇 | |
| 4000 | + dataMap.put("township", CommonsHelper.getName1(babyModel.getStreetId(), basicConfigService)); | |
| 4001 | + //村 | |
| 4002 | + dataMap.put("village", babyModel.getAddress()); | |
| 4003 | + dataMap.put("phone", babyModel.getMphone()); | |
| 4004 | + dataMap.put("education", getBasicConfig(babyModel.getmLevelId())); | |
| 4005 | + } | |
| 4006 | + | |
| 3993 | 4007 | } |
| 3994 | 4008 | return dataMap; |
| 3995 | 4009 | } |
| ... | ... | @@ -4005,8 +4019,8 @@ |
| 4005 | 4019 | return ""; |
| 4006 | 4020 | } |
| 4007 | 4021 | |
| 4008 | - public BaseObjectResponse queryBabyTempBuildById(String id,boolean isBuild) { | |
| 4009 | - return queryBabyBuildById(id,isBuild); | |
| 4022 | + public BaseObjectResponse queryBabyTempBuildById(String id, boolean isBuild) { | |
| 4023 | + return queryBabyBuildById(id, isBuild); | |
| 4010 | 4024 | } |
| 4011 | 4025 | } |