Commit 80f0d372fc05ebe89cc4429c29cfc73d1e23c697

Authored by zhangchao
1 parent 38ad21cd75
Exists in dev

#fix:优化高危因素查询空的逻辑

Showing 4 changed files with 12 additions and 7 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PatientsService.java View file @ 80f0d37
... ... @@ -132,7 +132,7 @@
132 132 patientsQuery.mysqlBuild(iPatientDao.queryPatientCount(query));
133 133 query.start(patientsQuery.getOffset()).end(patientsQuery.getLimit());
134 134 }
135   - System.out.println(query.convertToMongoQuery());
  135 + // System.out.println(query.convertToMongoQuery().toString());
136 136 return iPatientDao.queryPatient(query.addOrder(Sort.Direction.fromString(sort), field));
137 137 }
138 138  
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 80f0d37
... ... @@ -1329,10 +1329,10 @@
1329 1329 }
1330 1330 }
1331 1331 //高危颜色等级无标记查询
1332   - if (null != noRlevel) {
  1332 + if (CollectionUtils.isNotEmpty(noRlevel)) {
1333 1333 MongoCondition c = MongoCondition.newInstance();
1334   - MongoCondition con1 = MongoCondition.newInstance("riskLevelId", noRlevel, MongoOper.NIN);
1335   - MongoCondition con2 = MongoCondition.newInstance("riskLevelId", true, MongoOper.EXISTS);
  1334 + MongoCondition con1 = MongoCondition.newInstance("riskLevelId", "[]", MongoOper.IS);
  1335 + MongoCondition con2 = MongoCondition.newInstance("riskLevelId", false, MongoOper.EXISTS);
1336 1336 if (c1 != null) {
1337 1337 c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2}).getCriteria());
1338 1338 } else {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java View file @ 80f0d37
... ... @@ -147,6 +147,7 @@
147 147 BaseResponse baseResponse = new BaseResponse();
148 148 baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
149 149  
  150 + System.out.println(yxzhVO.getHospitalId()+" HospitalId,"+yxzhVO.getIdno());
150 151 try {
151 152 PatientsQuery patientsQuery = new PatientsQuery();
152 153 patientsQuery.setCardNo(yxzhVO.getIdno());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ 80f0d37
... ... @@ -274,6 +274,10 @@
274 274 patientsQuery.setType(type);
275 275 if ("2100002419".equals(hospitalId)){
276 276 patientsQuery.setHospitalId(hospitalId);
  277 + if (type!=3){
  278 + patientsQuery.setDtFm(true);
  279 + }
  280 +
277 281 }
278 282  
279 283  
... ... @@ -375,7 +379,7 @@
375 379  
376 380 } else {
377 381 patientsQuery.setrLevel(riskPatientsQueryRequest.getrLevel());
378   -
  382 + patientsQuery.setIsHighRisk(isHighRisk);
379 383 }
380 384  
381 385 patientsQuery.setLastMensesStart(riskPatientsQueryRequest.capEnd());
... ... @@ -423,7 +427,7 @@
423 427  
424 428 patientsQuery.setLimit(riskPatientsQueryRequest.getLimit());
425 429 patientsQuery.setPage(riskPatientsQueryRequest.getPage());
426   - patientsQuery.setIsHighRisk(isHighRisk);
  430 +
427 431 patientsQuery.setYn(YnEnums.YES.getId());
428 432 // patientsQuery.setBuildType(1);
429 433 //0 未分娩建档 2 自动分娩类型 http://jira.healthbaby.com.cn/browse/WEB-639
... ... @@ -743,7 +747,7 @@
743 747 riskPatientsQueryRequest.setSort("6");//按分娩时间排序
744 748 riskPatientsQueryRequest.setOrder("1");//降序
745 749 //以前逻辑
746   - // System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString());
  750 + System.out.println(patientsQuery.convertToQuery().convertToMongoQuery().toString());
747 751 patientses = patientsService.queryPatientBySort(patientsQuery, riskPatientsQueryRequest.getSort(), riskPatientsQueryRequest.getOrder());
748 752 }
749 753 stopWatch.stop();