from requests import get,post
import time
ip = "http://192.168.0.209:8100"
param = {
    "username": "zhongwei",
    "password": "123456a",
    "client_id": "client",
    "grant_type": "password",
    "client_secret": "123456",
}
data = get(url=f"{ip}/oauth/token",params=param).json()
token = data["access_token"]
header = {
    "content-type": "application/json",
    "authorization": f"Bearer {token}",
}
teamId=110
month=5
data1= get(f"{ip}/counseling/screen/stats",headers=header,params={"teamId":teamId,"year":2026,"month":month}).text
print(data1,end="\n\n")

data2=get(f"{ip}/counseling/screen/trend",headers=header,params={"teamId":teamId,"year":2026,"month":month}).text
print(data2,end="\n\n")

data3=get(f"{ip}/counseling/screen/statusDistribution",headers=header,params={"teamId":teamId,"year":2026,"month":month}).text
print(data3,end="\n\n")

data4=get(f"{ip}/counseling/screen/gradeStats",headers=header,params={"teamId":teamId,"year":2026,"month":month}).text
print(data4,end="\n\n")

data5=get(f"{ip}/counseling/screen/projectStats",headers=header,params={"teamId":teamId,"year":2026,"month":month}).text
print(data5,end="\n\n")

data6=get(f"{ip}/counseling/screen/completionStats",headers=header,params={"teamId":teamId,"year":2026,"month":month}).text
print(data6,end="\n\n")
