Commit cdff9352d5e5bdd284d06441c84d5e5cfa9711f5
1 parent
53b9150b59
Exists in
master
and in
1 other branch
增加设置parentid
Showing 1 changed file with 7 additions and 6 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
cdff935
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import com.lyms.platform.common.dao.operator.MongoCondition; |
6 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
7 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
8 | +import com.lyms.platform.common.utils.StringUtils; | |
8 | 9 | import org.springframework.data.mongodb.core.query.Criteria; |
9 | 10 | |
10 | 11 | import java.util.Date; |
11 | 12 | |
12 | 13 | |
13 | 14 | |
14 | 15 | |
... | ... | @@ -469,26 +470,26 @@ |
469 | 470 | } |
470 | 471 | if (null != isHighRisk) { |
471 | 472 | condition = condition.and("riskLevelId", null, MongoOper.NE); |
472 | - } else if (null != rLevel) { | |
473 | + } else if (StringUtils.isNotEmpty( rLevel)) { | |
473 | 474 | condition = condition.and("riskLevelId", rLevel, MongoOper.IS); |
474 | 475 | } |
475 | 476 | if (null != areaId) { |
476 | 477 | condition = condition.and("areaId", areaId, MongoOper.IS); |
477 | 478 | } |
478 | - if (null != id) { | |
479 | + if (StringUtils.isNotEmpty(id)) { | |
479 | 480 | condition = condition.and("id", id, MongoOper.IS); |
480 | 481 | } |
481 | 482 | if (null != vcCardNo) { |
482 | 483 | condition = condition.and("vcCardNo", vcCardNo, MongoOper.IS); |
483 | 484 | } |
484 | - if (null != cardNo) { | |
485 | + if (StringUtils.isNotEmpty(cardNo)) { | |
485 | 486 | condition = condition.and("cardNo", cardNo, MongoOper.IS); |
486 | 487 | |
487 | 488 | } |
488 | - if (null != phone) { | |
489 | + if (StringUtils.isNotEmpty( phone)) { | |
489 | 490 | condition = condition.and("phone", phone, MongoOper.IS); |
490 | 491 | } |
491 | - if (null != name) { | |
492 | + if (StringUtils.isNotEmpty(name)) { | |
492 | 493 | condition = condition.and("username", name, MongoOper.IS); |
493 | 494 | } else if (null != likeName) { |
494 | 495 | condition = condition.and("username", likeName, MongoOper.LIKE); |
... | ... | @@ -537,7 +538,7 @@ |
537 | 538 | } |
538 | 539 | |
539 | 540 | |
540 | - if (null != rFactor) { | |
541 | + if (StringUtils.isNotEmpty(rFactor)) { | |
541 | 542 | condition = condition.and("riskFactorId", rFactor, MongoOper.ALL); |
542 | 543 | } |
543 | 544 | if (-1 != yn) { |