|
|
|
@ -20,19 +20,27 @@ class BllModule(Repository):
|
|
|
|
|
select module_id, module_type, module_name, sort_index, description from rms_module where is_enabled=1
|
|
|
|
|
"""
|
|
|
|
|
data = {
|
|
|
|
|
"sys_list":[],
|
|
|
|
|
"client_list":[]
|
|
|
|
|
|
|
|
|
|
# "client_list":[]
|
|
|
|
|
"client_manage": [],
|
|
|
|
|
"sys_manage": [],
|
|
|
|
|
"standard_manage": [],
|
|
|
|
|
"consumables_manage": [],
|
|
|
|
|
"instrument_manage": []
|
|
|
|
|
}
|
|
|
|
|
sql_data = Utils.msyql_table_model(self.execute(sql_all).fetchall())
|
|
|
|
|
for i in sql_data:
|
|
|
|
|
if i["module_type"] == "1":
|
|
|
|
|
data["client_list"].append(i)
|
|
|
|
|
else:
|
|
|
|
|
data["sys_list"].append(i)
|
|
|
|
|
data["sys_list"].sort(key=lambda x: x['sort_index'])
|
|
|
|
|
data["client_list"].sort(key=lambda x: x['sort_index'])
|
|
|
|
|
data["client_manage"].append(i)
|
|
|
|
|
elif i["module_type"] == "2":
|
|
|
|
|
data["sys_manage"].append(i)
|
|
|
|
|
elif i["module_type"] == "3":
|
|
|
|
|
data["standard_manage"].append(i)
|
|
|
|
|
elif i["module_type"] == "4":
|
|
|
|
|
data["consumables_manage"].append(i)
|
|
|
|
|
elif i["module_type"] == "5":
|
|
|
|
|
data["instrument_manage"].append(i)
|
|
|
|
|
return data
|
|
|
|
|
# return self.findList().all()
|
|
|
|
|
|
|
|
|
|
def inster_info_list(self):
|
|
|
|
|
obj_list = []
|
|
|
|
@ -49,9 +57,6 @@ class BllModule(Repository):
|
|
|
|
|
create_date=Utils.get_str_datetime(),
|
|
|
|
|
create_user_id='4cea74ee-0d8b-11ed-943e-f47b094925e1',
|
|
|
|
|
create_user_name="admin",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
|
obj_list.append(obj)
|
|
|
|
|
self.insert_many(obj_list)
|
|
|
|
|