Beispiel #1
0
 def get_bmy_id_model_ids():
     '''
     获取bmy_id对应model_id的对应关系
     '''
     query_cond = {}
     fields = {'bmy_id': 1, 'model_id': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_bmy']\
                 .find(query_cond, fields))
Beispiel #2
0
 def get_bmy_code_to_bmy_id_dict():
     '''
     获取bmy_code到bmy_id字典
     '''
     query_cond = {}
     fields = {'bmy_code': 1, 'bmy_id': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_bmy']\
                 .find(query_cond, fields))
Beispiel #3
0
 def get_bmys():
     query_cond = {}
     fields = {
         'bmy_id': 1,
         'bmy_name': 1,
         'bmy_code': 1,
         'brand_id': 1,
         'brand_code': 1,
         'model_id': 1,
         'model_code': 1
     }
     return MMongoDb.convert_recs(MMongoDb.db['t_bmy']\
                 .find(query_cond, fields).sort([('bmy_id', pymongo.ASCENDING)]))
Beispiel #4
0
 def get_bmy_id_bmy_vos():
     query_cond = {}
     fields = {
         'bmy_id': 1,
         'bmy_name': 1,
         'bmy_code': 1,
         'brand_id': 1,
         'brand_code': 1,
         'model_id': 1,
         'model_code': 1
     }
     return MMongoDb.convert_recs(MMongoDb.db['t_bmy']\
                 .find(query_cond, fields))
Beispiel #5
0
 def get_wxs_bms():
     query_cond = {'source_type': 1}
     fields = {'model_code': 1, 'model_name': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_model']\
                 .find(query_cond, fields))
Beispiel #6
0
 def get_bmy_id_bmy_names():
     query_cond = {}
     fields = {'bmy_id': 1, 'bmy_name': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_bmy'].find(
         query_cond, fields))
Beispiel #7
0
 def get_vin_id_codes():
     query_cond = {'vin_code': {'$regex': '_'}}
     fields = {'vin_id': 1, 'vin_code': 1, 'bmy_id': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_vin']\
         .find(query_cond, fields).sort([('vin_code', 1)]))
Beispiel #8
0
 def get_wxs_brands():
     query_cond = {'source_type': 1}
     fields = {'brand_id': 1, 'brand_name': 1, 'brand_code': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_brand']\
         .find(query_cond, fields))
Beispiel #9
0
 def get_vins_base(source_type):
     query_cond = {'source_type': source_type}
     fields = {'vin_id': 1, 'vin_code': 1, 'bmy_id': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_vin']\
         .find(query_cond, fields).sort([('vin_code', 1)]))
Beispiel #10
0
 def get_vin_code_bmy_id_dict():
     query_cond = {}
     fields = {'vin_code': 1, 'bmy_id': 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_vin']\
                 .find(query_cond, fields))
Beispiel #11
0
 def get_vin_codes():
     query_cond = {}
     fields = {"vin_id": 1, "vin_code": 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_vin'].find(
         query_cond, fields).sort([('vin_code', 1)]))
Beispiel #12
0
 def get_bmy_ids_by_vin_code(prefix_vin_code):
     query_cond = {"vin_code": prefix_vin_code}
     fields = {"vin_id": 1, "bmy_id": 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_vin'].find(
         query_cond, fields))
Beispiel #13
0
 def get_vin_samples(vin_id):
     query_cond = {'vin_id': vin_id}
     fields = {"img_file": 1, "bmy_id": 1}
     return MMongoDb.convert_recs(MMongoDb.db['t_sample'].find(
         query_cond, fields).sort([('img_file', 1)]))