预警判断逻辑更改

This commit is contained in:
liurui 2024-12-11 15:54:57 +08:00
parent abd8b25914
commit 3937d9a4ea
2 changed files with 40 additions and 40 deletions

View File

@ -91,48 +91,48 @@ ClassifyId = 1214
################################################################################################################ 变量定义--线上环境 ################################################################################################################ 变量定义--线上环境
login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login" # login_pushreport_url = "http://10.200.32.39/jingbo-api/api/server/login"
upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave" # upload_url = "http://10.200.32.39/jingbo-api/api/analysis/reportInfo/researchUploadReportSave"
upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save" # upload_warning_url = "http://10.200.32.39/jingbo-api/api/basicBuiness/crudeOilWarning/save"
login_data = { # login_data = {
"data": { # "data": {
"account": "api_dev", # "account": "api_dev",
"password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=", # "password": "ZTEwYWRjMzk0OWJhNTlhYmJlNTZlMDU3ZjIwZjg4M2U=",
"tenantHashCode": "8a4577dbd919675758d57999a1e891fe", # "tenantHashCode": "8a4577dbd919675758d57999a1e891fe",
"terminal": "API" # "terminal": "API"
}, # },
"funcModule": "API", # "funcModule": "API",
"funcOperation": "获取token" # "funcOperation": "获取token"
} # }
upload_data = { # upload_data = {
"funcModule":'研究报告信息', # "funcModule":'研究报告信息',
"funcOperation":'上传原油价格预测报告', # "funcOperation":'上传原油价格预测报告',
"data":{ # "data":{
"ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋 # "ownerAccount":'27663', #报告所属用户账号 27663 - 刘小朋
"reportType":'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST # "reportType":'OIL_PRICE_FORECAST', # 报告类型固定为OIL_PRICE_FORECAST
"fileName": '', #文件名称 # "fileName": '', #文件名称
"fileBase64": '' ,#文件内容base64 # "fileBase64": '' ,#文件内容base64
"categoryNo":'yyjgycbg', # 研究报告分类编码 # "categoryNo":'yyjgycbg', # 研究报告分类编码
"smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码 # "smartBusinessClassCode":'YCJGYCBG', #分析报告分类编码
"reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋 # "reportEmployeeCode":"E40482" ,# 报告人 E40482 - 管理员 0000027663 - 刘小朋
"reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部 # "reportDeptCode" :"002000621000", # 报告部门 - 002000621000 SH期货研究部
"productGroupCode":"RAW_MATERIAL" # 商品分类 # "productGroupCode":"RAW_MATERIAL" # 商品分类
} # }
} # }
warning_data = { # warning_data = {
"funcModule":'原油特征停更预警', # "funcModule":'原油特征停更预警',
"funcOperation":'原油特征停更预警', # "funcOperation":'原油特征停更预警',
"data":{ # "data":{
'WARNING_TYPE_NAME':'特征数据停更预警', # 'WARNING_TYPE_NAME':'特征数据停更预警',
'WARNING_CONTENT':'', # 'WARNING_CONTENT':'',
'WARNING_DATE':'' # 'WARNING_DATE':''
} # }
} # }
# 生产环境数据库 # 生产环境数据库
# url: jdbc:mysql://rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com:3306/jingbo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&useSSL=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true # url: jdbc:mysql://rm-2zehj3r1n60ttz9x5.mysql.rds.aliyuncs.com:3306/jingbo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&useSSL=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true

View File

@ -139,8 +139,8 @@ def predict_main():
sqlitedb.insert_data('most_model', (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'), most_common_model,), columns=('ds', 'most_common_model',)) sqlitedb.insert_data('most_model', (datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'), most_common_model,), columns=('ds', 'most_common_model',))
try: try:
# if is_weekday: if is_weekday:
if True: # if True:
logger.info('今天是周一,发送特征预警') logger.info('今天是周一,发送特征预警')
# 上传预警信息到数据库 # 上传预警信息到数据库
warning_data_df = df_zhibiaoliebiao.copy() warning_data_df = df_zhibiaoliebiao.copy()
@ -234,7 +234,7 @@ def predict_main():
file=max(glob.glob(os.path.join(dataset,'*.pdf')), key=os.path.getctime), file=max(glob.glob(os.path.join(dataset,'*.pdf')), key=os.path.getctime),
ssl=ssl, ssl=ssl,
) )
# m.send_mail() m.send_mail()
if __name__ == '__main__': if __name__ == '__main__':