|
@@ -41,6 +41,9 @@ async def roughTimeStatus(
|
|
|
data = WRJApi.roughTimeStatus()
|
|
|
area_code = ''
|
|
|
status_list = status.split(',')
|
|
|
+ mode_list = mode.split(',')
|
|
|
+ type_list = type_list.split(',')
|
|
|
+
|
|
|
if area != '':
|
|
|
row = db.query(GovdataArea).filter(GovdataArea.id == int(area)).first()
|
|
|
area_code = row.area_code.rstrip('0')
|
|
@@ -60,11 +63,11 @@ async def roughTimeStatus(
|
|
|
continue
|
|
|
|
|
|
# 建设模式 0-财政资金采购 (硬件) 1-财政资金采购 (服务) 2-社会面资源 3-示范地区补点
|
|
|
- if time != '' and n['constructionModel'] != int(mode):
|
|
|
+ if mode != '' and str(n['constructionModel']) not in mode_list:
|
|
|
continue
|
|
|
|
|
|
# "isHangarControl": 1 // 配置机巢/机库/基站控制 0-否 1-是
|
|
|
- if type != '' and n['isHangarControl'] != int(type):
|
|
|
+ if type != '' and str(n['isHangarControl']) not in type_list:
|
|
|
continue
|
|
|
|
|
|
# "convertCode": null, // // 第三方机库的状态 0-离线、1-待命中、2-飞行中、3-管制中、4-维护中、5-执行任务
|
|
@@ -78,6 +81,9 @@ async def roughTimeStatus(
|
|
|
"drone_name": n['uavName'],
|
|
|
"status": n['convertCode'],
|
|
|
"status_text": n['status_text'],
|
|
|
+ "time": n['dispatchResponseTime'],
|
|
|
+ "mode": n['constructionModel'],
|
|
|
+ "type": n['isHangarControl'],
|
|
|
"fly_url": n['mediaPullStreamAddress'] if n['mediaPullStreamAddress'] is not None else "", # 飞机视频流
|
|
|
"nest_url": n['nestOutMediaPullStreamAddress'] if n['nestOutMediaPullStreamAddress'] is not None else "", # 机巢视频流
|
|
|
}
|
|
@@ -100,6 +106,7 @@ async def roughTimeStatus(
|
|
|
}
|
|
|
|
|
|
except Exception as e:
|
|
|
+ traceback.print_exc()
|
|
|
return {
|
|
|
"code": 500,
|
|
|
"msg": "操作失败"
|