Commit da54ca2b92d90473e845227225c6f130caadefb5
1 parent
a2d3530258
Exists in
master
and in
1 other branch
辖区卫生院权限关闭
Showing 1 changed file with 141 additions and 135 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
da54ca2
... | ... | @@ -114,6 +114,7 @@ |
114 | 114 | |
115 | 115 | @Autowired |
116 | 116 | private PatientWeightService patientWeightService; |
117 | + | |
117 | 118 | /** |
118 | 119 | * 修改产妇的社区 |
119 | 120 | * |
120 | 121 | |
121 | 122 | |
122 | 123 | |
123 | 124 | |
124 | 125 | |
125 | 126 | |
126 | 127 | |
127 | 128 | |
128 | 129 | |
129 | 130 | |
130 | 131 | |
131 | 132 | |
132 | 133 | |
133 | 134 | |
134 | 135 | |
135 | 136 | |
136 | 137 | |
137 | 138 | |
138 | 139 | |
139 | 140 | |
140 | 141 | |
141 | 142 | |
142 | 143 | |
143 | 144 | |
144 | 145 | |
... | ... | @@ -404,154 +405,158 @@ |
404 | 405 | |
405 | 406 | List<String> hospitalList = null; |
406 | 407 | List<String> fmHospitalList = null; |
407 | - //区域范围内孕妇 | |
408 | - if (isRegion) { | |
408 | + //辖区卫生院关闭权限 | |
409 | + if (StringUtils.isEmpty(riskPatientsQueryRequest.getTownOrgId())) { | |
410 | + //区域范围内孕妇 | |
411 | + if (isRegion) { | |
409 | 412 | |
410 | - //徐倩说的额改成只查询分娩医院记录 不管是否隐藏建档 20180703 10:01 | |
411 | - //http://jira.healthbaby.com.cn/browse/WEB-2711 | |
412 | - if (type != 3) { | |
413 | - patientsQuery.setExtEnable(false); | |
414 | - } | |
413 | + //徐倩说的额改成只查询分娩医院记录 不管是否隐藏建档 20180703 10:01 | |
414 | + //http://jira.healthbaby.com.cn/browse/WEB-2711 | |
415 | + if (type != 3) { | |
416 | + patientsQuery.setExtEnable(false); | |
417 | + } | |
415 | 418 | |
416 | - //王平说的 必须要给区域医院权限,不然他就是蠢逼 201611124 16:41 | |
417 | - hospitalList = new ArrayList<>(); | |
418 | - fmHospitalList = new ArrayList<>(); | |
419 | + //王平说的 必须要给区域医院权限,不然他就是蠢逼 201611124 16:41 | |
420 | + hospitalList = new ArrayList<>(); | |
421 | + fmHospitalList = new ArrayList<>(); | |
419 | 422 | |
420 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
421 | - if (null != hospital) { | |
422 | - hospitalList.add(hospital); | |
423 | - } | |
424 | - DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | |
425 | - dataPermissionsModelQuery.setUserId(userId); | |
426 | - List<DataPermissionsModel> permissionsModels = dataPermissionService.queryPermission(dataPermissionsModelQuery); | |
427 | - if (CollectionUtils.isNotEmpty(permissionsModels)) { | |
428 | - Set<String> set = permissionsModels.get(0).getData().keySet(); | |
429 | - Iterator<String> it = set.iterator(); | |
430 | - while (it.hasNext()) { | |
431 | - String id = it.next(); | |
432 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(id) && !hospitalList.contains(id)) { | |
433 | - hospitalList.add(id); | |
434 | - } | |
423 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
424 | + if (null != hospital) { | |
425 | + hospitalList.add(hospital); | |
435 | 426 | } |
436 | - } | |
437 | - if (StringUtils.isNotEmpty(riskPatientsQueryRequest.gethId())) { | |
438 | - List<String> orgId = new ArrayList<>(); | |
439 | - orgId.add(riskPatientsQueryRequest.gethId()); | |
440 | - hospitalList.retainAll(orgId); | |
441 | - } else if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCprovinceId())) { | |
442 | - OrganizationQuery organizationQuery = new OrganizationQuery(); | |
443 | - organizationQuery.setYn(YnEnums.YES.getId()); | |
444 | - organizationQuery.setProvinceId(riskPatientsQueryRequest.getCprovinceId()); | |
445 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCcityId())) { | |
446 | - organizationQuery.setCityId(riskPatientsQueryRequest.getCcityId()); | |
447 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCareaId())) { | |
448 | - organizationQuery.setAreaId(riskPatientsQueryRequest.getCareaId()); | |
427 | + DataPermissionsModelQuery dataPermissionsModelQuery = new DataPermissionsModelQuery(); | |
428 | + dataPermissionsModelQuery.setUserId(userId); | |
429 | + List<DataPermissionsModel> permissionsModels = dataPermissionService.queryPermission(dataPermissionsModelQuery); | |
430 | + if (CollectionUtils.isNotEmpty(permissionsModels)) { | |
431 | + Set<String> set = permissionsModels.get(0).getData().keySet(); | |
432 | + Iterator<String> it = set.iterator(); | |
433 | + while (it.hasNext()) { | |
434 | + String id = it.next(); | |
435 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(id) && !hospitalList.contains(id)) { | |
436 | + hospitalList.add(id); | |
437 | + } | |
449 | 438 | } |
450 | 439 | } |
451 | - List<String> orgId = new ArrayList<>(); | |
452 | - List<Organization> organizations = organizationService.queryOrganization(organizationQuery); | |
453 | - if (CollectionUtils.isNotEmpty(organizations)) { | |
454 | - for (Organization org : organizations) { | |
455 | - if (null != org.getId()) { | |
456 | - orgId.add(org.getId() + ""); | |
440 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.gethId())) { | |
441 | + List<String> orgId = new ArrayList<>(); | |
442 | + orgId.add(riskPatientsQueryRequest.gethId()); | |
443 | + hospitalList.retainAll(orgId); | |
444 | + } else if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCprovinceId())) { | |
445 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
446 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
447 | + organizationQuery.setProvinceId(riskPatientsQueryRequest.getCprovinceId()); | |
448 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCcityId())) { | |
449 | + organizationQuery.setCityId(riskPatientsQueryRequest.getCcityId()); | |
450 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getCareaId())) { | |
451 | + organizationQuery.setAreaId(riskPatientsQueryRequest.getCareaId()); | |
457 | 452 | } |
458 | 453 | } |
454 | + List<String> orgId = new ArrayList<>(); | |
455 | + List<Organization> organizations = organizationService.queryOrganization(organizationQuery); | |
456 | + if (CollectionUtils.isNotEmpty(organizations)) { | |
457 | + for (Organization org : organizations) { | |
458 | + if (null != org.getId()) { | |
459 | + orgId.add(org.getId() + ""); | |
460 | + } | |
461 | + } | |
462 | + } | |
463 | + if (CollectionUtils.isEmpty(orgId)) { | |
464 | + hospitalList = new ArrayList<>(); | |
465 | + } else { | |
466 | + hospitalList.retainAll(orgId); | |
467 | + } | |
459 | 468 | } |
460 | - if (CollectionUtils.isEmpty(orgId)) { | |
461 | - hospitalList = new ArrayList<>(); | |
462 | - } else { | |
463 | - hospitalList.retainAll(orgId); | |
464 | - } | |
465 | - } | |
466 | - patientsQuery.setHospitalList(hospitalList); | |
469 | + patientsQuery.setHospitalList(hospitalList); | |
467 | 470 | |
468 | - fmHospitalList.addAll(hospitalList); | |
471 | + fmHospitalList.addAll(hospitalList); | |
469 | 472 | |
470 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFprovinceId())) { | |
471 | - OrganizationQuery organizationQuery = new OrganizationQuery(); | |
472 | - organizationQuery.setYn(YnEnums.YES.getId()); | |
473 | - organizationQuery.setProvinceId(riskPatientsQueryRequest.getFprovinceId()); | |
474 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFcityId())) { | |
475 | - organizationQuery.setCityId(riskPatientsQueryRequest.getFcityId()); | |
476 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFareaId())) { | |
477 | - organizationQuery.setAreaId(riskPatientsQueryRequest.getFareaId()); | |
473 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFprovinceId())) { | |
474 | + OrganizationQuery organizationQuery = new OrganizationQuery(); | |
475 | + organizationQuery.setYn(YnEnums.YES.getId()); | |
476 | + organizationQuery.setProvinceId(riskPatientsQueryRequest.getFprovinceId()); | |
477 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFcityId())) { | |
478 | + organizationQuery.setCityId(riskPatientsQueryRequest.getFcityId()); | |
479 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFareaId())) { | |
480 | + organizationQuery.setAreaId(riskPatientsQueryRequest.getFareaId()); | |
481 | + } | |
478 | 482 | } |
479 | - } | |
480 | - List<String> orgId = new ArrayList<>(); | |
481 | - List<Organization> organizations = organizationService.queryOrganization(organizationQuery); | |
482 | - if (CollectionUtils.isNotEmpty(organizations)) { | |
483 | - for (Organization org : organizations) { | |
484 | - if (null != org.getId()) { | |
485 | - orgId.add(org.getId() + ""); | |
483 | + List<String> orgId = new ArrayList<>(); | |
484 | + List<Organization> organizations = organizationService.queryOrganization(organizationQuery); | |
485 | + if (CollectionUtils.isNotEmpty(organizations)) { | |
486 | + for (Organization org : organizations) { | |
487 | + if (null != org.getId()) { | |
488 | + orgId.add(org.getId() + ""); | |
489 | + } | |
486 | 490 | } |
487 | 491 | } |
492 | + if (CollectionUtils.isEmpty(orgId)) { | |
493 | + fmHospitalList = new ArrayList<>(); | |
494 | + } else { | |
495 | + fmHospitalList.retainAll(orgId); | |
496 | + } | |
497 | + } else { | |
498 | + //没有选择分娩医院 并且未产妇查询的时候 就只查询主档案 | |
499 | + if (type == 3) { | |
500 | + patientsQuery.setExtSource(false); | |
501 | + } | |
488 | 502 | } |
489 | - if (CollectionUtils.isEmpty(orgId)) { | |
490 | - fmHospitalList = new ArrayList<>(); | |
503 | + | |
504 | + | |
505 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFmHospital())) { | |
506 | + patientsQuery.setFmHospital(riskPatientsQueryRequest.getFmHospital()); | |
491 | 507 | } else { |
492 | - fmHospitalList.retainAll(orgId); | |
508 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFprovinceId())) { | |
509 | + patientsQuery.setFmHospitalList(fmHospitalList); | |
510 | + } | |
493 | 511 | } |
494 | 512 | } else { |
495 | - //没有选择分娩医院 并且未产妇查询的时候 就只查询主档案 | |
496 | - if (type == 3) { | |
497 | - patientsQuery.setExtSource(false); | |
498 | - } | |
499 | - } | |
500 | 513 | |
501 | - | |
502 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFmHospital())) { | |
503 | 514 | patientsQuery.setFmHospital(riskPatientsQueryRequest.getFmHospital()); |
504 | - } else { | |
505 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(riskPatientsQueryRequest.getFprovinceId())) { | |
506 | - patientsQuery.setFmHospitalList(fmHospitalList); | |
515 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
516 | + if (null != hospital) { | |
517 | + patientsQuery.setHospitalId(hospital); | |
507 | 518 | } |
508 | - } | |
509 | - } else { | |
510 | 519 | |
511 | - patientsQuery.setFmHospital(riskPatientsQueryRequest.getFmHospital()); | |
512 | - String hospital = autoMatchFacade.getHospitalId(userId); | |
513 | - if (null != hospital) { | |
514 | - patientsQuery.setHospitalId(hospital); | |
515 | - } | |
516 | 520 | |
521 | + //根据疾病进行查询 | |
522 | + if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getDiseaseType())) { | |
523 | + MongoCondition criteria = new MongoCondition("hospitalId", hospital, MongoOper.IS); | |
517 | 524 | |
518 | - //根据疾病进行查询 | |
519 | - if (StringUtils.isNotEmpty(riskPatientsQueryRequest.getDiseaseType())) { | |
520 | - MongoCondition criteria = new MongoCondition("hospitalId", hospital, MongoOper.IS); | |
525 | + List<MongoCondition> mongoCondits = new ArrayList<>(); | |
526 | + //乙肝查询 | |
527 | + if (StringUtils.contains(riskPatientsQueryRequest.getDiseaseType(), DiseaseTypeEnums.YIGAN.getId())) { | |
528 | + mongoCondits.add(new MongoCondition("ygbmky", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygbmky", "", MongoOper.NE))); | |
529 | + mongoCondits.add(new MongoCondition("ygbmkt", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygbmkt", "", MongoOper.NE))); | |
530 | + mongoCondits.add(new MongoCondition("ygeky", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygeky", "", MongoOper.NE))); | |
531 | + mongoCondits.add(new MongoCondition("ygekt", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygekt", "", MongoOper.NE))); | |
532 | + mongoCondits.add(new MongoCondition("yghxkt", true, MongoOper.EXISTS).orCondition(new MongoCondition("yghxkt", "", MongoOper.NE))); | |
521 | 533 | |
522 | - List<MongoCondition> mongoCondits = new ArrayList<>(); | |
523 | - //乙肝查询 | |
524 | - if (StringUtils.contains(riskPatientsQueryRequest.getDiseaseType(), DiseaseTypeEnums.YIGAN.getId())) { | |
525 | - mongoCondits.add(new MongoCondition("ygbmky", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygbmky", "", MongoOper.NE))); | |
526 | - mongoCondits.add(new MongoCondition("ygbmkt", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygbmkt", "", MongoOper.NE))); | |
527 | - mongoCondits.add(new MongoCondition("ygeky", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygeky", "", MongoOper.NE))); | |
528 | - mongoCondits.add(new MongoCondition("ygekt", true, MongoOper.EXISTS).orCondition(new MongoCondition("ygekt", "", MongoOper.NE))); | |
529 | - mongoCondits.add(new MongoCondition("yghxkt", true, MongoOper.EXISTS).orCondition(new MongoCondition("yghxkt", "", MongoOper.NE))); | |
534 | + } | |
535 | + //丙肝查询 | |
536 | + if (StringUtils.contains(riskPatientsQueryRequest.getDiseaseType(), DiseaseTypeEnums.BINGGAN.getId())) { | |
537 | + mongoCondits.add(new MongoCondition("bg", true, MongoOper.EXISTS).orCondition(new MongoCondition("bg", "", MongoOper.NE))); | |
538 | + } | |
539 | + //梅毒查询 | |
540 | + if (StringUtils.contains(riskPatientsQueryRequest.getDiseaseType(), DiseaseTypeEnums.MEIDU.getId())) { | |
541 | + mongoCondits.add(new MongoCondition("syjg", true, MongoOper.EXISTS).orCondition(new MongoCondition("syjg", "", MongoOper.NE))); | |
542 | + mongoCondits.add(new MongoCondition("hivkt", true, MongoOper.EXISTS).orCondition(new MongoCondition("hivkt", "", MongoOper.NE))); | |
530 | 543 | |
531 | - } | |
532 | - //丙肝查询 | |
533 | - if (StringUtils.contains(riskPatientsQueryRequest.getDiseaseType(), DiseaseTypeEnums.BINGGAN.getId())) { | |
534 | - mongoCondits.add(new MongoCondition("bg", true, MongoOper.EXISTS).orCondition(new MongoCondition("bg", "", MongoOper.NE))); | |
535 | - } | |
536 | - //梅毒查询 | |
537 | - if (StringUtils.contains(riskPatientsQueryRequest.getDiseaseType(), DiseaseTypeEnums.MEIDU.getId())) { | |
538 | - mongoCondits.add(new MongoCondition("syjg", true, MongoOper.EXISTS).orCondition(new MongoCondition("syjg", "", MongoOper.NE))); | |
539 | - mongoCondits.add(new MongoCondition("hivkt", true, MongoOper.EXISTS).orCondition(new MongoCondition("hivkt", "", MongoOper.NE))); | |
544 | + } | |
545 | + criteria = criteria.orCondition(mongoCondits.toArray(new MongoCondition[mongoCondits.size()])); | |
540 | 546 | |
547 | + List<AntExChuModel> antExChuModels = antExService.queryAntExChu(criteria.toMongoQuery()); | |
548 | + List<String> pIds = new ArrayList<>(); | |
549 | + for (AntExChuModel antChu : antExChuModels) { | |
550 | + pIds.add(antChu.getPid()); | |
551 | + } | |
552 | + patientsQuery.setpIds(pIds); | |
541 | 553 | } |
542 | - criteria = criteria.orCondition(mongoCondits.toArray(new MongoCondition[mongoCondits.size()])); | |
543 | - | |
544 | - List<AntExChuModel> antExChuModels = antExService.queryAntExChu(criteria.toMongoQuery()); | |
545 | - List<String> pIds = new ArrayList<>(); | |
546 | - for (AntExChuModel antChu : antExChuModels) { | |
547 | - pIds.add(antChu.getPid()); | |
548 | - } | |
549 | - patientsQuery.setpIds(pIds); | |
550 | - } | |
551 | 554 | /* boolean result = autoMatchFacade.checkBStatus(userId); |
552 | 555 | if(!result){ |
553 | 556 | patientsQuery.setEnable("0"); |
554 | 557 | }*/ |
558 | + } | |
559 | + | |
555 | 560 | } |
556 | 561 | patientsQuery.setNeed(needPage); |
557 | 562 | |
558 | 563 | |
... | ... | @@ -1046,13 +1051,13 @@ |
1046 | 1051 | } |
1047 | 1052 | } |
1048 | 1053 | |
1049 | - public void zcKeyPregnantWomenExcel(String ids, HttpServletResponse response,Integer userId) { | |
1054 | + public void zcKeyPregnantWomenExcel(String ids, HttpServletResponse response, Integer userId) { | |
1050 | 1055 | |
1051 | 1056 | try { |
1052 | 1057 | //1 获取list数据 |
1053 | 1058 | List<String> authors = Arrays.asList(ids.split(",")); |
1054 | 1059 | Query query = Query.query(Criteria.where("id").in(authors)); |
1055 | - List<Patients> patientsList = mongoTemplate.find(query, Patients.class); | |
1060 | + List<Patients> patientsList = mongoTemplate.find(query, Patients.class); | |
1056 | 1061 | |
1057 | 1062 | String hospital = autoMatchFacade.getHospitalId(userId); |
1058 | 1063 | List<KeyPregnantWomenExcelModel> keyPregnantWomenExcelModelList = new ArrayList<>(); |
1059 | 1064 | |
... | ... | @@ -1075,9 +1080,9 @@ |
1075 | 1080 | |
1076 | 1081 | AntExChuModel data = antExService.findOne(patients.getId()); |
1077 | 1082 | //孕次:怀孕次数== 查看母子实现 |
1078 | - keyPregnantWomenExcelModel.setPregnancyTimes(data==null?0:(data.getPregnancyTimes()==null ? 0:data.getPregnancyTimes())); | |
1083 | + keyPregnantWomenExcelModel.setPregnancyTimes(data == null ? 0 : (data.getPregnancyTimes() == null ? 0 : data.getPregnancyTimes())); | |
1079 | 1084 | //产次:生产次数== 查看母子实现 |
1080 | - keyPregnantWomenExcelModel.setProdTime(data==null?1:(data.getProdTime()==null ? 1:data.getProdTime()+1)); | |
1085 | + keyPregnantWomenExcelModel.setProdTime(data == null ? 1 : (data.getProdTime() == null ? 1 : data.getProdTime() + 1)); | |
1081 | 1086 | //预产期:产妇预产期==dueDate |
1082 | 1087 | keyPregnantWomenExcelModel.setDueDate(DateUtil.getyyyy_MM_dd(patients.getDueDate())); |
1083 | 1088 | //居住地址:现住地址== addressRegister(孕妇居住地)addressPostRest(产后休养地) |
... | ... | @@ -1126,8 +1131,8 @@ |
1126 | 1131 | header.put("husbandPhone", "丈夫手机"); |
1127 | 1132 | header.put("rFactor", "重点疾病"); |
1128 | 1133 | header.put("rLevel", "高危等级"); |
1129 | - header.put("acknowledgingTiem","确认时间"); | |
1130 | - header.put("exportime","随访-第一次日期"); | |
1134 | + header.put("acknowledgingTiem", "确认时间"); | |
1135 | + header.put("exportime", "随访-第一次日期"); | |
1131 | 1136 | response.setContentType("application/force-download"); |
1132 | 1137 | response.setHeader("Content-Disposition", "attachment;filename=" + new String(("重点孕妇登记表.xls").getBytes("UTF-8"), "ISO-8859-1")); |
1133 | 1138 | ExcelUtil.toExcel(response.getOutputStream(), list, header); |
1134 | 1139 | |
... | ... | @@ -1136,8 +1141,10 @@ |
1136 | 1141 | // ExcelUtil.writeWhExclFile(path, response.getOutputStream(), list); |
1137 | 1142 | |
1138 | 1143 | } catch (Exception e) { |
1139 | - ExceptionUtils.catchException(e, e.getMessage()); } | |
1144 | + ExceptionUtils.catchException(e, e.getMessage()); | |
1145 | + } | |
1140 | 1146 | } |
1147 | + | |
1141 | 1148 | private String getBasicConfig(String id) { |
1142 | 1149 | if (com.lyms.platform.common.utils.StringUtils.isEmpty(id)) { |
1143 | 1150 | return ""; |
... | ... | @@ -1148,6 +1155,7 @@ |
1148 | 1155 | } |
1149 | 1156 | return ""; |
1150 | 1157 | } |
1158 | + | |
1151 | 1159 | private void getRiskLevelId(Patients patients, KeyPregnantWomenExcelModel keyPregnantWomenExcelModel) { |
1152 | 1160 | List level = new ArrayList(); |
1153 | 1161 | if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getRiskLevelId())) { |
1154 | 1162 | |
... | ... | @@ -1192,14 +1200,11 @@ |
1192 | 1200 | } |
1193 | 1201 | |
1194 | 1202 | if (!"-".equals(keyPregnantWomenExcelModel.getrFactor()) && org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { |
1195 | - keyPregnantWomenExcelModel.setrFactor(keyPregnantWomenExcelModel.getrFactor()+","+patients.getoRiskFactor()); | |
1196 | - }else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) | |
1197 | - { | |
1203 | + keyPregnantWomenExcelModel.setrFactor(keyPregnantWomenExcelModel.getrFactor() + "," + patients.getoRiskFactor()); | |
1204 | + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { | |
1198 | 1205 | keyPregnantWomenExcelModel.setrFactor(patients.getoRiskFactor()); |
1199 | 1206 | } |
1200 | - } | |
1201 | - else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) | |
1202 | - { | |
1207 | + } else if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getoRiskFactor())) { | |
1203 | 1208 | keyPregnantWomenExcelModel.setrFactor(patients.getoRiskFactor()); |
1204 | 1209 | } |
1205 | 1210 | } |
... | ... | @@ -1417,6 +1422,7 @@ |
1417 | 1422 | patientManagerResult.setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); |
1418 | 1423 | return patientManagerResult; |
1419 | 1424 | } |
1425 | + | |
1420 | 1426 | public PatientManagerResult healthHandbookExcelManager(PatientManagerRequest patientManagerRequest) { |
1421 | 1427 | PatientManagerResult patientManagerResult = new PatientManagerResult(); |
1422 | 1428 | |
1423 | 1429 | |
... | ... | @@ -1491,13 +1497,13 @@ |
1491 | 1497 | //身份证号码:孕妇身份证号码 ==cardNo |
1492 | 1498 | healthHandbookExcelModel.setCardNo(patients.getCardNo()); |
1493 | 1499 | //发放机构:当前机构名称== 当前机构名称 |
1494 | - String hospitalName= couponMapper.getHospitalName(patients.getHospitalId()); | |
1495 | - healthHandbookExcelModel.setOrganization(hospitalName==null?"诸城市人民医院":hospitalName); | |
1500 | + String hospitalName = couponMapper.getHospitalName(patients.getHospitalId()); | |
1501 | + healthHandbookExcelModel.setOrganization(hospitalName == null ? "诸城市人民医院" : hospitalName); | |
1496 | 1502 | //镇街、村居或单位:现住地址 |
1497 | 1503 | healthHandbookExcelModel.setAddress(patients.getAddress()); |
1498 | 1504 | //孩次:分娩儿童数 |
1499 | 1505 | AntExChuModel data = antExService.findOne(patients.getId()); |
1500 | - healthHandbookExcelModel.setChildTime(data==null?1:(data.getProdTime()==null ? 1:data.getProdTime()+1)); | |
1506 | + healthHandbookExcelModel.setChildTime(data == null ? 1 : (data.getProdTime() == null ? 1 : data.getProdTime() + 1)); | |
1501 | 1507 | //孕期:当前使用有孕== 有孕 |
1502 | 1508 | healthHandbookExcelModel.setGestation(healthHandbookExcelModel.getGestation()); |
1503 | 1509 | //发放日期:当前日期 |