19 lines
484 B
Python
19 lines
484 B
Python
|
from DBHelper.MongoHelperInstance import DB_TEST
|
||
|
from Utils.CommonUtil import CommonUtils
|
||
|
|
||
|
|
||
|
class FinanceIndexUtils(object):
|
||
|
|
||
|
@staticmethod
|
||
|
def make_new_cid():
|
||
|
new_cid = CommonUtils.random_code(8)
|
||
|
case = DB_TEST.find_single_column(
|
||
|
"模型数据",
|
||
|
"计算函数",
|
||
|
{"函数ID": new_cid},
|
||
|
"函数ID"
|
||
|
) is not None
|
||
|
while case:
|
||
|
new_cid = CommonUtils.random_code(8)
|
||
|
return new_cid
|