예제 #1
0
 /**
  * 通过dtu号获得井
  *
  * @param dtuNum
  * @return
  */
 public WellModel getWellByDtuNum(String dtuNum) {
   Query query = new Query(Criteria.where("dtuId").is(dtuNum));
   WellModel well =
       PersistManager.INSTANCE
           .getMongoTemplate()
           .findOne(CollectionConstants.WELL_COLLECTION_NAME, query, WellModel.class);
   return well;
 }
예제 #2
0
 public List<WellModel> getAllWells() {
   Query query = new Query(Criteria.where("num").exists(true));
   List<WellModel> wellList =
       PersistManager.INSTANCE
           .getMongoTemplate()
           .find(CollectionConstants.WELL_COLLECTION_NAME, query, WellModel.class);
   return wellList;
 }
예제 #3
0
 /**
  * 通过路径获得井列表
  *
  * @param path
  * @return
  */
 public List<WellModel> getWellsByPath(String path) {
   Query query = new Query(Criteria.where("path").is(path));
   List<WellModel> wellList =
       PersistManager.INSTANCE
           .getMongoTemplate()
           .find(CollectionConstants.WELL_COLLECTION_NAME, query, WellModel.class);
   return wellList;
 }
예제 #4
0
 /**
  * 通过井号获得井
  *
  * @param wellNum
  * @return
  */
 public WellModel getWellByNum(String wellNum) {
   Query query = new Query(Criteria.where("num").is(wellNum));
   // System.out.println(wellNum);
   WellModel well =
       PersistManager.INSTANCE
           .getMongoTemplate()
           .findOne(CollectionConstants.WELL_COLLECTION_NAME, query, WellModel.class);
   return well;
 }