Commit 51776e89446e4aa6757969062c3ffc59bf4e3c70
1 parent
732116364d
Exists in
master
and in
6 other branches
bug1.1 1.2
Showing 1 changed file with 18 additions and 5 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
51776e8
| ... | ... | @@ -1064,7 +1064,6 @@ |
| 1064 | 1064 | condition = condition.and("sieveStatus", sieveStatusList2, MongoOper.IN); |
| 1065 | 1065 | } |
| 1066 | 1066 | |
| 1067 | - | |
| 1068 | 1067 | Criteria c = null; |
| 1069 | 1068 | if (null != birthStart) { |
| 1070 | 1069 | c = Criteria.where("birth").gte(birthStart); |
| ... | ... | @@ -1087,7 +1086,7 @@ |
| 1087 | 1086 | } |
| 1088 | 1087 | }*/ |
| 1089 | 1088 | |
| 1090 | - if (null != startAge) { | |
| 1089 | + /* if (null != startAge) { | |
| 1091 | 1090 | c = Criteria.where("mbirth").lte(startAge); |
| 1092 | 1091 | } |
| 1093 | 1092 | |
| ... | ... | @@ -1097,7 +1096,7 @@ |
| 1097 | 1096 | } else { |
| 1098 | 1097 | c = Criteria.where("mbirth").gte(endAge); |
| 1099 | 1098 | } |
| 1100 | - } | |
| 1099 | + }*/ | |
| 1101 | 1100 | |
| 1102 | 1101 | if (-1 != yn) { |
| 1103 | 1102 | condition = condition.and("yn", yn, MongoOper.IS); |
| ... | ... | @@ -1114,8 +1113,7 @@ |
| 1114 | 1113 | } |
| 1115 | 1114 | } |
| 1116 | 1115 | |
| 1117 | - if (fmDataStatu != null && fmDataStatu == true) | |
| 1118 | - { | |
| 1116 | + if (fmDataStatu != null && fmDataStatu == true) { | |
| 1119 | 1117 | condition = condition.and("dataStatus", 1, MongoOper.IS); |
| 1120 | 1118 | condition = condition.and("yn", 0, MongoOper.IS); |
| 1121 | 1119 | } |
| ... | ... | @@ -1136,6 +1134,21 @@ |
| 1136 | 1134 | } |
| 1137 | 1135 | } |
| 1138 | 1136 | |
| 1137 | + if (null != startAge && null != endAge) { | |
| 1138 | + if (null != c) { | |
| 1139 | + c.and("mbirth").lte(startAge).gte(endAge); | |
| 1140 | + } else { | |
| 1141 | + c = Criteria.where("mbirth").lte(startAge); | |
| 1142 | + } | |
| 1143 | + } | |
| 1144 | + | |
| 1145 | + /*if (null != endAge) { | |
| 1146 | + if (null != c) { | |
| 1147 | + c = c.gte(endAge); | |
| 1148 | + } else { | |
| 1149 | + c = Criteria.where("mbirth").gte(endAge); | |
| 1150 | + } | |
| 1151 | + }*/ | |
| 1139 | 1152 | |
| 1140 | 1153 | if (null != asphyxiaMStart) { |
| 1141 | 1154 | if (null != c) { |