LISHUZUOXUN_yangjiang/database_test.py

56 lines
1.5 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from Database.database_mgr import *
if __name__ == "__main__":
database = Database()
print(database.get_this_batch())
# print(database.generate_batch())
all_batch = database.get_all_batch()
# print(all_batch)
all_id = database.get_all_id()
# print(all_id)
all_name = database.get_all_name()
# print(all_name)
'''总览页面的接口'''
'''接口1 获得各课目训练汇总'''
print(
"API1",
database.get_exercise_statistic(
type_list=[PULLUP, SITUP, RUNAROUND, RUNNING],
batch=all_batch[0]
)
)
'''接口2 各班级科目汇总'''
print(
"API2",
database.get_class_statistic(
batch=all_batch[0],
_type=PULLUP
)
)
'''接口3 集体科目训练汇总'''
print(
"API3",
database.get_group_statistic(
_type=PULLUP
)
)
'''集体页面接口'''
print(
database.get_group_multiple_statistic(
_type=PULLUP,
class_list=database.get_all_class(),
batch=all_batch[0]
)
)
'''个人统计页面接口'''
'''batch_avg为各批次统计用于绘制平均成绩'''
'''type_avg为各类型统计用于雷达图'''
'''batch为各批次成绩明细'''
print(
database.get_individual_statistic(
_id="1",
_type_list=[PULLUP, SITUP, RUNAROUND, RUNNING],
batch_list=all_batch
)
)