Commit a7eb03e0 authored by wang.wenrong's avatar wang.wenrong

tsp

parent 0398e9a7
......@@ -2,6 +2,7 @@ from pot_libs.mysql_util.mysql_util import MysqlUtil
from pot_libs.settings import SETTING
from unify_api.modules.common.service.td_engine_service import \
get_td_engine_data
from unify_api.utils.taos_new import parse_td_columns
async def get_location_dao(lids):
......@@ -39,6 +40,6 @@ async def get_adio_current_data(mtid):
return {}
if not results['data']:
return {}
head = results['head']
head = parse_td_columns(results)
res = dict(zip(head, results['data'][0]))
return res
......@@ -884,8 +884,7 @@ async def post_qual_current(req, body: PageRequest) -> QualCurrentResponse:
is_succ, results = await get_td_engine_data(url, sql)
log.info(f"is_succ:{is_succ}")
if is_succ:
head = [re.findall(r'last_row\((.*)\)', i)[0] if "(" in i else i
for i in results["head"]]
head = parse_td_columns(results)
if not results["data"]:
results["data"] = ['' for i in range(len(head))]
res = dict(zip(head, results["data"][0]))
......
......@@ -10,7 +10,9 @@ from unify_api.modules.tsp_water.service.drop_dust_service import \
@summary("降尘措施-卡片信息")
async def post_drop_dust(req, body: DdReq) -> DdResp:
storeys = body.storeys
return await post_drop_dust_service(storeys)
return_list = []
return DdResp(res_data=return_list)
# return await post_drop_dust_service(storeys) todo:tsp 临时简单处理
@summary("降尘措施-雾炮-运行曲线")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment