Commit e10813163cd49acda7f84be07987adad038b8c38

Authored by shiyang
1 parent 45e7cb67b7

update

Showing 2 changed files with 13 additions and 7 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ e108131
... ... @@ -825,9 +825,17 @@
825 825 condition=condition.and("firstCheckId",null,MongoOper.IS);
826 826 }
827 827 }
828   - //筛选乳房列表是否做过检查0,1
  828 + //筛选乳房列表是否做过检查0,1。false为了查出数据中没有该字段的。
  829 + Criteria c2=MongoCondition.newInstance().getCriteria();
829 830 if(StringUtils.isNotEmpty(breastType)){
830   - condition = condition.and("breastType", breastType, MongoOper.IS);
  831 + if("0".equals(breastType)){
  832 + MongoCondition con =MongoCondition.newInstance();
  833 + MongoCondition con1 = MongoCondition.newInstance("breastType", "0", MongoOper.IS);
  834 + MongoCondition con2 = MongoCondition.newInstance("breastType", false, MongoOper.EXISTS);
  835 + c2 = con.orCondition(new MongoCondition[]{con1, con2}).getCriteria();
  836 + }else {
  837 + condition = condition.and("breastType", breastType, MongoOper.IS);
  838 + }
831 839 }
832 840  
833 841 Criteria c1 = null;
834 842  
... ... @@ -1368,11 +1376,9 @@
1368 1376 }
1369 1377  
1370 1378 if (null != c1) {
1371   - condition = condition.andCondition(new MongoCondition(c1));
1372   -
  1379 + return new MongoCondition(c1.andOperator(condition.getCriteria(),c2)).toMongoQuery();
1373 1380 }
1374   -
1375   - return condition.toMongoQuery();
  1381 + return new MongoCondition(c1.andOperator(condition.getCriteria(),c2)).toMongoQuery();
1376 1382 }
1377 1383  
1378 1384 public boolean isExistRiskLevel() {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BreastController.java View file @ e108131
... ... @@ -190,7 +190,7 @@
190 190 @RequestMapping(value = "/updateBreastType", method = RequestMethod.POST)
191 191 @ResponseBody
192 192 @TokenRequired
193   - public BaseResponse updateBreastType(Patients patients, HttpServletRequest request) {
  193 + public BaseResponse updateBreastType(@RequestBody Patients patients, HttpServletRequest request) {
194 194 BaseResponse baseResponse = breastFacade.updateBreastType(patients);
195 195 return baseResponse;
196 196 }