Commit ae3cbe79b238700a461abb39fd94146c6fa96035

Authored by liquanyu
1 parent 088601e6b9

update code

Showing 3 changed files with 61 additions and 5 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ ae3cbe7
... ... @@ -225,6 +225,11 @@
225 225 private List<String> noRlevel;
226 226  
227 227 /**
  228 + * 存在高危等级
  229 + */
  230 + private boolean existRiskLevel;
  231 +
  232 + /**
228 233 * 高危评分
229 234 */
230 235 private Integer hScoreStart;
... ... @@ -698,6 +703,19 @@
698 703 }
699 704 }
700 705  
  706 + if (existRiskLevel)
  707 + {
  708 + MongoCondition c = MongoCondition.newInstance();
  709 + MongoCondition con1 = MongoCondition.newInstance("riskLevelId", "224b2329-cb82-4da3-a071-8527f8283aab", MongoOper.LIKE); // 紫色
  710 + MongoCondition con2 = MongoCondition.newInstance("riskLevelId", "eb146c03-b19f-4e28-b85f-fda574b2283b", MongoOper.LIKE); // 红色
  711 + MongoCondition con3 = MongoCondition.newInstance("riskLevelId", "49a36aea-c5b6-4162-87d2-9eb3c6ec00c2", MongoOper.LIKE); // 橙色
  712 + MongoCondition con4 = MongoCondition.newInstance("riskLevelId", "315107bd-91fe-42a1-9237-752f3c046a40", MongoOper.LIKE); // 黄色
  713 + if (c1 != null) {
  714 + c1 = c1.andOperator(c.orCondition(new MongoCondition[]{con1, con2,con3,con4}).getCriteria());
  715 + } else {
  716 + c1 = c.orCondition(new MongoCondition[]{con1, con2,con3,con4}).getCriteria();
  717 + }
  718 + }
701 719 if (null != pvc) {
702 720 MongoCondition c = MongoCondition.newInstance();
703 721 MongoCondition con1 = MongoCondition.newInstance("phone", pvc, MongoOper.IS);
... ... @@ -1142,6 +1160,13 @@
1142 1160 return condition.toMongoQuery();
1143 1161 }
1144 1162  
  1163 + public boolean isExistRiskLevel() {
  1164 + return existRiskLevel;
  1165 + }
  1166 +
  1167 + public void setExistRiskLevel(boolean existRiskLevel) {
  1168 + this.existRiskLevel = existRiskLevel;
  1169 + }
1145 1170  
1146 1171 public String getLiveType() {
1147 1172 return liveType;
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/TrackDownFacade.java View file @ ae3cbe7
... ... @@ -410,11 +410,31 @@
410 410 isPatient = true;
411 411 }
412 412 }
413   - if (downQueryRequest.getLevel() != null) {//高危等级
414   - patientsQuery.setrLevel(downQueryRequest.getLevel());
415   - //只查孕妇
416   - patientsQuery.setLastMensesStart(DateUtil.getMonth(-10));//只查询当前时间十个月前的数据 考虑性能问题
417   - isPatient = true;
  413 +
  414 + if (downQueryRequest.getIsRisk() != null)
  415 + {
  416 + if (downQueryRequest.getLevel() != null) {//高危等级
  417 + patientsQuery.setrLevel(downQueryRequest.getLevel());
  418 + //只查孕妇
  419 + patientsQuery.setLastMensesStart(DateUtil.getMonth(-10));//只查询当前时间十个月前的数据 考虑性能问题
  420 + isPatient = true;
  421 + }
  422 + else
  423 + {
  424 + patientsQuery.setExistRiskLevel(true);
  425 + //只查孕妇
  426 + patientsQuery.setLastMensesStart(DateUtil.getMonth(-10));//只查询当前时间十个月前的数据 考虑性能问题
  427 + isPatient = true;
  428 + }
  429 + }
  430 + else
  431 + {
  432 + if (downQueryRequest.getLevel() != null) {//高危等级
  433 + patientsQuery.setrLevel(downQueryRequest.getLevel());
  434 + //只查孕妇
  435 + patientsQuery.setLastMensesStart(DateUtil.getMonth(-10));//只查询当前时间十个月前的数据 考虑性能问题
  436 + isPatient = true;
  437 + }
418 438 }
419 439 if (downQueryRequest.getRiskFactorId() != null) {//高危因素
420 440 //高危统计中的自定义高危
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/TrackDownQueryRequest.java View file @ ae3cbe7
... ... @@ -87,6 +87,17 @@
87 87 //结束孕周
88 88 private Integer endWeek;
89 89  
  90 + // 不为空表示只查询高危 0
  91 + private Integer isRisk;
  92 +
  93 + public Integer getIsRisk() {
  94 + return isRisk;
  95 + }
  96 +
  97 + public void setIsRisk(Integer isRisk) {
  98 + this.isRisk = isRisk;
  99 + }
  100 +
90 101 public Integer getStartWeek() {
91 102 return startWeek;
92 103 }