dms-client/common/tools/dms.py

41 lines
1.2 KiB
Python
Raw Normal View History

"""
Author : XinYi Song
Time : 2021/11/5 14:12
Desc:
"""
from util.http_util import httpUtil
def dms_login():
"""
数管系统登录
:return:
"""
res = httpUtil(url='http://192.168.2.9:8820/api/login',
params={"userName": "client1", "password": "sxy1998"}).post_param()
return res.json()['data']
def dms_task_record(token_s: str, collectionCode: str):
"""
调用数管系统获取遥感数据归档任务的接口
:param collectionCode:
:param token_s:
:return:
"""
res = httpUtil(url='http://192.168.2.9:8820/api/data-storage-task-record/get/collection-code/revision',
params={"collectionCode": collectionCode, "revision": 1}, token=token_s).get_herder()
return res.json()['data']
def dms_sensing_data(token_s: str, collectionCode: str):
"""
调用数管系统获取所有遥感数据的接口
:param collectionCode:
:param token_s:
:return:
"""
res = httpUtil(url='http://192.168.2.9:8820/api/remote-sensing-data/get/collection-code',
params={"collectionCode": collectionCode}, token=token_s).get_herder()
return res.json()['data']