Commit 8133eee686b8f5cd671f5e18a5761bb8e585d88f

Authored by jiangjiazhi
1 parent a284d6d6be

孕妇分娩后 变成产妇

Showing 1 changed file with 17 additions and 20 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 8133eee
1 1 package com.lyms.platform.query;
2 2  
3 3 import com.lyms.platform.common.base.IConvertToNativeQuery;
4   -import com.lyms.platform.common.core.annotation.form.FormParam;
5 4 import com.lyms.platform.common.dao.BaseQuery;
6 5 import com.lyms.platform.common.dao.operator.MongoCondition;
7 6 import com.lyms.platform.common.dao.operator.MongoOper;
... ... @@ -56,7 +55,6 @@
56 55 }
57 56  
58 57  
59   -
60 58 /**
61 59 * 访视状态
62 60 */
63 61  
64 62  
... ... @@ -167,15 +165,14 @@
167 165 private Integer yn = -1;
168 166 /**
169 167 * 1:孕妇,2:儿童
170   - *
171 168 */
172 169 private Integer type = -1;
173 170  
174   - private String hospitalId;
  171 + private String hospitalId;
175 172  
176 173 private String hcertificateNum;
177 174  
178   - private Integer buildType= -1;
  175 + private Integer buildType = -1;
179 176  
180 177 public Integer getBuildType() {
181 178 return buildType;
182 179  
... ... @@ -437,11 +434,11 @@
437 434 MongoCondition con = MongoCondition.newInstance("areaPostRestId", areaIdOrRestId, MongoOper.IS);
438 435 condition = condition.orCondition(new MongoCondition[]{con1, con});
439 436 }
440   - if(null!=dueStatus){
441   - condition=condition.and("dueStatus",dueStatus,MongoOper.IS);
  437 + if (null != dueStatus) {
  438 + condition = condition.and("dueStatus", dueStatus, MongoOper.IS);
442 439 }
443   - if( buildType!=-1){
444   - condition=condition.and("buildType",buildType,MongoOper.NE);
  440 + if (buildType != -1) {
  441 + condition = condition.and("buildType", buildType, MongoOper.NE);
445 442 }
446 443 if (visitstatus != -1) {
447 444 condition = condition.and("isVisit", visitstatus, MongoOper.IS);
448 445  
449 446  
... ... @@ -449,14 +446,17 @@
449 446 if (null != communityId && !"-1".equals(communityId)) {
450 447 condition = condition.and("communityId", communityId, MongoOper.IS);
451 448 }
452   - if(null!=created){
  449 + if (null != created) {
453 450 condition = condition.and("created", created, MongoOper.LTE);
454 451 }
455 452 if (null != hScore) {
456 453 condition = condition.and("riskScore", hScore, MongoOper.IS);
457   - }else if(null!=isHighRisk){
458   - condition=condition.and("riskScore",0,MongoOper.GT);
459 454 }
  455 + if (null != isHighRisk) {
  456 + condition = condition.and("riskLevelId", null, MongoOper.NE);
  457 + } else if (null != rLevel) {
  458 + condition = condition.and("riskLevelId", rLevel, MongoOper.IS);
  459 + }
460 460 if (null != areaId) {
461 461 condition = condition.and("areaId", areaId, MongoOper.IS);
462 462 }
463 463  
... ... @@ -475,13 +475,13 @@
475 475 }
476 476 if (null != name) {
477 477 condition = condition.and("username", name, MongoOper.IS);
478   - }else if(null!=likeName){
  478 + } else if (null != likeName) {
479 479 condition = condition.and("username", likeName, MongoOper.LIKE);
480 480 }
481 481 if (null != hospitalId) {
482 482 condition = condition.and("hospitalId", hospitalId, MongoOper.IS);
483 483 }
484   - if(null!=pid){
  484 + if (null != pid) {
485 485 condition = condition.and("pid", pid, MongoOper.IS);
486 486 }
487 487  
... ... @@ -505,7 +505,7 @@
505 505 condition = condition.and("serviceType", serviceType, MongoOper.IS);
506 506 }
507 507  
508   - if(null!=serviceStatus){
  508 + if (null != serviceStatus) {
509 509 condition = condition.and("serviceStatus", serviceStatus, MongoOper.IS);
510 510 }
511 511  
512 512  
... ... @@ -515,15 +515,12 @@
515 515  
516 516 if (null != orServiceStatus && orServiceStatus.length > 1) {
517 517 Criteria c = Criteria.where("serviceStatus").in(orServiceStatus[0], orServiceStatus[1]);
518   - condition.andCondition( new MongoCondition(c));
  518 + condition.andCondition(new MongoCondition(c));
519 519 }
520 520 if (null != hcertificateNum) {
521 521 condition = condition.and("hcertificateNum", hcertificateNum, MongoOper.LIKE);
522 522 }
523 523  
524   - if (null != rLevel) {
525   - condition = condition.and("riskLevelId", rLevel, MongoOper.IS);
526   - }
527 524  
528 525 if (null != rFactor) {
529 526 condition = condition.and("riskFactorId", rFactor, MongoOper.ALL);
... ... @@ -541,7 +538,7 @@
541 538 }
542 539 boolean isAddStart = Boolean.FALSE;
543 540 Criteria c = null;
544   - if(null!=lastMensesStart){
  541 + if (null != lastMensesStart) {
545 542 c = Criteria.where("lastMenses").gte(lastMensesStart);
546 543 isAddStart = Boolean.TRUE;
547 544 }