Commit d7eff4120b6ced0aa1ad21f2e75ae94cf41ba152

Authored by liquanyu
1 parent dfc441f6ad

update code

Showing 1 changed file with 9 additions and 12 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java View file @ d7eff41
... ... @@ -5494,26 +5494,23 @@
5494 5494  
5495 5495 PatientsQuery patientsQuery = new PatientsQuery();
5496 5496 List<Patients> patientses = null;
  5497 + List<String> patientIds = new ArrayList<>();
5497 5498 if (StringUtils.isNotEmpty(antExManagerQueryRequest.getQueryNo())) {
5498 5499 patientsQuery.setQueryNo(antExManagerQueryRequest.getQueryNo());
5499 5500 patientses = patientsService.queryPatient1(patientsQuery, "created");
5500   - if (!CollectionUtils.isNotEmpty(patientses))
  5501 + if (CollectionUtils.isEmpty(patientses))
5501 5502 {
5502 5503 return new BaseListResponse().setData(riskList).
5503 5504 setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(baseQuery.getPageInfo());
5504 5505 }
5505   - }
5506   -
5507   - List<String> patientIds = new ArrayList<>();
5508   - if (CollectionUtils.isNotEmpty(patientses))
5509   - {
5510   - for (Patients pat : patientses)
  5506 + else
5511 5507 {
5512   - patientIds.add(pat.getId());
  5508 + for (Patients pat : patientses)
  5509 + {
  5510 + patientIds.add(pat.getId());
  5511 + }
5513 5512 }
5514 5513 }
5515   -
5516   -
5517 5514 Query query = new Query();
5518 5515 if (CollectionUtils.isNotEmpty(patientIds)) {
5519 5516 query.addCriteria(Criteria.where("patientId").in(patientIds));
5520 5517  
... ... @@ -5530,11 +5527,11 @@
5530 5527 query.addCriteria(Criteria.where("status").is(antExManagerQueryRequest.getStatus()));
5531 5528 }
5532 5529  
5533   - if (antExManagerQueryRequest.getLevel() != null) {
  5530 + if (StringUtils.isNotEmpty(antExManagerQueryRequest.getLevel())) {
5534 5531 query.addCriteria(Criteria.where("hLevel").in(antExManagerQueryRequest.getLevel()));
5535 5532 }
5536 5533  
5537   - if (antExManagerQueryRequest.getRiskFactorId() != null) {
  5534 + if (StringUtils.isNotEmpty(antExManagerQueryRequest.getRiskFactorId())) {
5538 5535 query.addCriteria(Criteria.where("hRisk").in(com.lyms.platform.common.utils.StringUtils.covertToList(antExManagerQueryRequest.getRiskFactorId(), String.class)));
5539 5536 }
5540 5537