# Created on 2017/08/25
#
# @author: zhangxin
import datetime
from cma.cimiss.DataQueryClient import DataQuery
if __name__ == '__main__':
# 定义client对象,指定数据服务ip和port
# client = DataQuery(serverIp="10.96.89.55", serverPort=1888)
# 定义client对象,默认使用client.config指定服务连接配置,需根据自己的地址进行修改
client = DataQuery()
# 用户名和密码
userName = "BEHB_xxxx"
password = "xxxxx"
# 接口ID
interfaceId = "getSurfEleInRegionByTime"
# 当前时间减一天
now_time = (datetime.datetime.now() - datetime.timedelta(hours=8)).strftime('%Y%m%d%H') + "0000"
print('now_time:', now_time)
# 接口参数
params = {'dataCode': "SURF_CHN_MUL_HOR_N",
'elements': "Station_ID_C,PRE_12h",
'times': now_time,
'adminCodes'