Commit 6141a282a580b08c1e6526150d15fcb892d4ecd1

Authored by jiangjiazhi
1 parent b97d08fa9b

产妇增加字段

Showing 1 changed file with 49 additions and 2 deletions

platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java View file @ 6141a28
1 1 package com.lyms.platform.query;
2 2  
  3 +import com.lyms.platform.common.base.IConvertToNativeQuery;
  4 +import com.lyms.platform.common.dao.BaseQuery;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +
3 9 /**
4 10 * 产前检查查询
5 11 *
6 12 * Created by Administrator on 2016/6/16 0016.
7 13 */
8   -public class AntExQuery {
  14 +public class AntExQuery extends BaseQuery implements IConvertToNativeQuery {
  15 + private String parentId;
  16 + private Integer yn;
  17 + private String id;
  18 + @Override
  19 + public MongoQuery convertToQuery() {
  20 + MongoCondition condition=MongoCondition.newInstance();
  21 + if(null!=parentId){
  22 + condition= condition.and("parentId",parentId, MongoOper.IS);
  23 + }
  24 + if(null!=yn){
  25 + condition= condition.and("yn",yn, MongoOper.IS);
  26 + }
  27 + if(null!=id){
  28 + condition= condition.and("id",id, MongoOper.IS);
  29 + }
  30 + return condition.toMongoQuery();
  31 + }
  32 +
  33 + public String getId() {
  34 + return id;
  35 + }
  36 +
  37 + public void setId(String id) {
  38 + this.id = id;
  39 + }
  40 +
  41 + public String getParentId() {
  42 + return parentId;
  43 + }
  44 +
  45 + public void setParentId(String parentId) {
  46 + this.parentId = parentId;
  47 + }
  48 +
  49 + public Integer getYn() {
  50 + return yn;
  51 + }
  52 +
  53 + public void setYn(Integer yn) {
  54 + this.yn = yn;
  55 + }
9 56 }