Commit cb82cd394ccd9874d6a0d3422518c000dccec76d
1 parent
0247bd1e99
Exists in
master
and in
6 other branches
分娩添加筛选条件
Showing 2 changed files with 72 additions and 25 deletions
platform-dal/src/main/java/com/lyms/platform/query/MatDeliverQuery.java
View file @
cb82cd3
... | ... | @@ -123,6 +123,9 @@ |
123 | 123 | //畸形 0非畸形 1畸形 |
124 | 124 | private Integer deformity; |
125 | 125 | |
126 | + // 1 <2500g、2 ≥4000g、3 ≥2500g与<4000g之间 | |
127 | + private Integer weight; | |
128 | + | |
126 | 129 | @Override |
127 | 130 | public MongoQuery convertToQuery() { |
128 | 131 | MongoCondition condition = MongoCondition.newInstance(); |
... | ... | @@ -172,30 +175,6 @@ |
172 | 175 | condition = condition.and("baby.deformity", deformity, MongoOper.IS); |
173 | 176 | } |
174 | 177 | |
175 | - if (hloseBloodType != null) { | |
176 | - /** | |
177 | - * 出血量: | |
178 | - * 顺产:1-产后2小时出血≥300ml、2-产后24小时出血<500ml、3-产后24小时出血≥500ml | |
179 | - * 破宫产:4-产后24小时出血<1000ml、5-产后24小时出血≥2000ml | |
180 | - */ | |
181 | - switch (hloseBloodType) { | |
182 | - case 1: | |
183 | - condition = condition.and("tHloseBloodL", 300, MongoOper.GTE); | |
184 | - break; | |
185 | - case 2: | |
186 | - condition = condition.and("rHloseBloodL", 500, MongoOper.LT); | |
187 | - break; | |
188 | - case 3: | |
189 | - condition = condition.and("rHloseBloodL", 500, MongoOper.GTE); | |
190 | - break; | |
191 | - case 4: | |
192 | - condition = condition.and("rHloseBloodL", 1000, MongoOper.LT); | |
193 | - break; | |
194 | - case 5: | |
195 | - condition = condition.and("rHloseBloodL", 2000, MongoOper.GTE); | |
196 | - break; | |
197 | - } | |
198 | - } | |
199 | 178 | |
200 | 179 | if (null != cardNo) { |
201 | 180 | condition = condition.and("cardNo", cardNo, MongoOper.IS); |
202 | 181 | |
... | ... | @@ -258,9 +237,57 @@ |
258 | 237 | condition = condition.and("deliveryMode", deliveryModeQueryJson, MongoOper.LIKE); |
259 | 238 | } |
260 | 239 | Criteria c = null; |
261 | - | |
262 | 240 | Boolean isAddStart = Boolean.FALSE; |
263 | 241 | |
242 | + if (hloseBloodType != null) { | |
243 | + isAddStart = Boolean.TRUE; | |
244 | + /** | |
245 | + * 出血量: | |
246 | + * 顺产:1-产后2小时出血≥300ml、2-产后24小时出血<500ml、3-产后24小时出血≥500ml | |
247 | + * 破宫产:4-产后24小时出血<1000ml、5-产后24小时出血≥2000ml | |
248 | + */ | |
249 | + switch (hloseBloodType) { | |
250 | + case 1: | |
251 | + condition = condition.and("tHloseBloodL", 300, MongoOper.GTE); | |
252 | + break; | |
253 | + case 2: | |
254 | + condition = condition.and("rHloseBloodL", 500, MongoOper.LT); | |
255 | + break; | |
256 | + case 3: | |
257 | + condition = condition.and("rHloseBloodL", 500, MongoOper.GTE); | |
258 | + break; | |
259 | + case 4: | |
260 | + condition = condition.and("rHloseBloodL", 1000, MongoOper.LT); | |
261 | + break; | |
262 | + case 5: | |
263 | + condition = condition.and("rHloseBloodL", 2000, MongoOper.GTE); | |
264 | + break; | |
265 | + case 6: | |
266 | + c = c.where("rHloseBloodL").gte(1000).lt(2000); | |
267 | + break; | |
268 | + } | |
269 | + } | |
270 | + | |
271 | + if (weight != null) { | |
272 | + isAddStart = Boolean.TRUE; | |
273 | + //1 <2500g、2 ≥4000g、3 ≥2500g与<4000g之间 | |
274 | + switch (weight) { | |
275 | + case 1: | |
276 | + condition = condition.and("baby.babyWeight", 2500, MongoOper.LT); | |
277 | + break; | |
278 | + case 2: | |
279 | + condition = condition.and("baby.babyWeight", 4000, MongoOper.GTE); | |
280 | + break; | |
281 | + case 3: | |
282 | + | |
283 | + c = c.where("baby.babyWeight").gte(2500).lt(4000); | |
284 | + break; | |
285 | + } | |
286 | + } | |
287 | + | |
288 | + | |
289 | + | |
290 | + | |
264 | 291 | if (null != createdStart) { |
265 | 292 | if (neStart) { |
266 | 293 | c = Criteria.where("dueDate1").gt(createdStart); |
... | ... | @@ -305,6 +332,15 @@ |
305 | 332 | return new MongoCondition(c.andOperator(condition.getCriteria())).toMongoQuery(); |
306 | 333 | } |
307 | 334 | return condition.toMongoQuery(); |
335 | + } | |
336 | + | |
337 | + | |
338 | + public Integer getWeight() { | |
339 | + return weight; | |
340 | + } | |
341 | + | |
342 | + public void setWeight(Integer weight) { | |
343 | + this.weight = weight; | |
308 | 344 | } |
309 | 345 | |
310 | 346 | public List<String> getPregnancyOuts() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ChildbirthManagerRequest.java
View file @
cb82cd3
... | ... | @@ -165,6 +165,17 @@ |
165 | 165 | //1-需要隐藏姓名、电话、地址 |
166 | 166 | private int showDetail; |
167 | 167 | |
168 | + // 1 <2500g、2 ≥4000g、3 ≥2500g与<4000g之间 | |
169 | + private Integer weight; | |
170 | + | |
171 | + public Integer getWeight() { | |
172 | + return weight; | |
173 | + } | |
174 | + | |
175 | + public void setWeight(Integer weight) { | |
176 | + this.weight = weight; | |
177 | + } | |
178 | + | |
168 | 179 | public int getShowDetail() { |
169 | 180 | return showDetail; |
170 | 181 | } |