Commit b40b652bd9ac9daaeab6c75ceaeb181a26749d14
1 parent
e3dbcfc526
Exists in
master
and in
6 other branches
高危统计管理BUG。(重复and问题)
Showing 1 changed file with 5 additions and 1 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
b40b652
| ... | ... | @@ -1006,6 +1006,7 @@ |
| 1006 | 1006 | if (c1 != null) { |
| 1007 | 1007 | c1 = c1.andOperator(c.andCondition(MongoCondition.newInstance("lastCheckEmployeeId", null, MongoOper.NE)).getCriteria()); |
| 1008 | 1008 | } else { |
| 1009 | + c1 = Criteria.where("lastCheckEmployeeId").ne(null);//下面这样写会导致重复and | |
| 1009 | 1010 | c1 = c.andCondition(MongoCondition.newInstance("lastCheckEmployeeId", null, MongoOper.NE)).getCriteria(); |
| 1010 | 1011 | } |
| 1011 | 1012 | } |
| ... | ... | @@ -1077,7 +1078,8 @@ |
| 1077 | 1078 | if (c1 != null) { |
| 1078 | 1079 | c1 = c1.andOperator(c.andCondition(MongoCondition.newInstance("riskFactorId", null, MongoOper.NE)).getCriteria()); |
| 1079 | 1080 | } else { |
| 1080 | - c1 = c.andCondition(MongoCondition.newInstance("riskFactorId", Arrays.asList("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"), MongoOper.NE)).getCriteria(); | |
| 1081 | + c1 = Criteria.where("postViewTimes").ne(Arrays.asList("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"));//下面这样写会导致重复and | |
| 1082 | +// c1 = c.andCondition(MongoCondition.newInstance("riskFactorId", Arrays.asList("d42eec03-aa86-45b8-a4e0-78a0ff365fb6"), MongoOper.NE)).getCriteria(); | |
| 1081 | 1083 | } |
| 1082 | 1084 | } else if (null != rFactorList && !rFactorList.isEmpty()) { |
| 1083 | 1085 | condition = condition.and("riskFactorId", rFactorList, MongoOper.IN); |
| 1084 | 1086 | |
| ... | ... | @@ -1392,8 +1394,10 @@ |
| 1392 | 1394 | |
| 1393 | 1395 | if (null != c1) { |
| 1394 | 1396 | return new MongoCondition(c1.andOperator(condition.getCriteria(),c2)).toMongoQuery(); |
| 1397 | +// return new MongoCondition(c1.andOperator(condition.getCriteria())).toMongoQuery(); | |
| 1395 | 1398 | } |
| 1396 | 1399 | return new MongoCondition(c2.andOperator(condition.getCriteria())).toMongoQuery(); |
| 1400 | +// return condition.toMongoQuery(); | |
| 1397 | 1401 | } |
| 1398 | 1402 | |
| 1399 | 1403 | public boolean isExistRiskLevel() { |