From a5c5845b8ff51edc79d422781d65a91afaa65dab Mon Sep 17 00:00:00 2001 From: yangfei Date: Fri, 10 Nov 2017 10:58:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=96=BE=E7=97=85=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/operate/web/facade/PatientFacade.java | 44 +++++++--------------- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java index cb9f2b2..5efa78f 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java @@ -490,7 +490,6 @@ public class PatientFacade { mongoCondits.add(new MongoCondition("syjg", true, MongoOper.EXISTS)); mongoCondits.add(new MongoCondition("hivkt", true, MongoOper.EXISTS)); } - criteria = criteria.orCondition(mongoCondits.toArray(new MongoCondition[mongoCondits.size()])); List antExChuModels = antExService.queryAntExChu(criteria.toMongoQuery()); @@ -584,20 +583,20 @@ public class PatientFacade { /** * 查询高危孕妇 * - * @param patientQueryRequest + * @param riskPatientsQueryRequest * @param isHighRisk 控制是否是高危 * @param type 控制类型 1孕妇 3产妇 * @return */ - public BaseResponse queryHighRisk(RiskPatientsQueryRequest patientQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { + public BaseResponse queryHighRisk(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) { //组合请求 - PatientsQuery patientsQuery = complayRequest(patientQueryRequest, isHighRisk, type, userId, needPage, isRegion); + PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion); String hospital = autoMatchFacade.getHospitalId(userId); //查询符合条件的孕妇 StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital); stopWatch.start(); - List patientses = patientsService.queryPatientBySort(patientsQuery,patientQueryRequest.getSort(),patientQueryRequest.getOrder()); + List patientses = patientsService.queryPatient1(patientsQuery, "modified"); stopWatch.stop(); logger.info(stopWatch.toString()); @@ -679,18 +678,11 @@ public class PatientFacade { } listFuture.add(commonThreadPool.submit(new QuanChanPatientWorker(patientses.subList(i, end), hospital, usersService, postReviewService, matDeliverService, patientsService, organizationService, basicConfigService))); } - if (CollectionUtils.isNotEmpty(listFuture)) - { - for (Future f : listFuture) { - try { - if (f != null) - { - data.addAll((List) f.get(30, TimeUnit.SECONDS)); - } - - } catch (Exception e) { - ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); - } + for (Future f : listFuture) { + try { + data.addAll((List) f.get(30, TimeUnit.SECONDS)); + } catch (Exception e) { + ExceptionUtils.catchException(e, "convertToQuanCPatient get result Future error."); } } return data; @@ -709,21 +701,13 @@ public class PatientFacade { } listFuture.add(commonThreadPool.submit(new QuanPatientWorker(patientses.subList(i, end), usersService, hospital, antExService, basicConfigService, patientsService, organizationService))); } - if (CollectionUtils.isNotEmpty(listFuture)) - { - for (Future f : listFuture) { - try { - if (f != null) - { - data.addAll((List) f.get(30, TimeUnit.SECONDS)); - } - - } catch (Exception e) { - ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); - } + for (Future f : listFuture) { + try { + data.addAll((List) f.get(30, TimeUnit.SECONDS)); + } catch (Exception e) { + ExceptionUtils.catchException(e, "convertToQuanPatient get result Future error."); } } - return data; } -- 1.8.3.1