Commit f3359d764ab1a9627c6c899c26087c9b3eaa4eb7

Authored by liquanyu
1 parent f3bec32e8b

code update

Showing 2 changed files with 5 additions and 1 deletions

platform-dal/src/main/java/com/lyms/platform/query/PersonModelQuery.java View file @ f3359d7
... ... @@ -63,6 +63,10 @@
63 63 if (type != null) {
64 64 condition = condition.and("type", type, MongoOper.IS);
65 65 }
  66 + if (type != yn) {
  67 + condition = condition.and("yn", yn, MongoOper.IS);
  68 + }
  69 +
66 70 if (types != null && types.length == 2) {
67 71 Criteria c = Criteria.where("type").in(types[0],types[1]);
68 72 return new MongoCondition(condition.getCriteria().andOperator(c)).toMongoQuery();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ f3359d7
... ... @@ -747,7 +747,7 @@
747 747 List<BabyModel> allModels = babyBookbuildingService.queryBabyBuildByCond(babyQuery);
748 748 if (CollectionUtils.isNotEmpty(allModels))
749 749 {
750   - if (allModels.get(0) != null && allModels.get(0).getId().equals(id) && allModels.size() == 0)
  750 + if (allModels.get(0) != null && allModels.size() == 1 && allModels.get(0).getId().equals(id))
751 751 {
752 752 PersonModel personModel = new PersonModel();
753 753 personModel.setYn(YnEnums.NO.getId());