Commit f98174f1 by 潘建波

Merge branch 'develop' of http://192.168.9.26/platform/tx1_box_serv into develop

# Conflicts:
#	code/tx1_box_serv/apps/api/http_serv.py
#	code/tx1_box_serv/apps/api/ws_serv.py
#	code/tx1_box_serv/apps/api/ws_serv.pyc
#	code/tx1_box_serv/apps/gbvar/database_global.pyc
#	code/tx1_box_serv/apps/main.py
2 parents 72dfbc75 4865325a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# coding=utf-8 # coding=utf-8
from flask import Blueprint, request from flask import Blueprint, request
import time,json import time,json
import apps.gbvar.dict_properties as dict_p import gbvar.dict_properties as dict_p
login = Blueprint('login', __name__) login = Blueprint('login', __name__)
register = Blueprint('register', __name__) register = Blueprint('register', __name__)
......
...@@ -63,6 +63,7 @@ class EventToLocalUtil(object): ...@@ -63,6 +63,7 @@ class EventToLocalUtil(object):
if(len(picPath) >0): if(len(picPath) >0):
if 'pic_base64' in pic: if 'pic_base64' in pic:
try: try:
picPath= picPath.decode('utf8').encode('gb2312')
with open(picPath, 'wb') as f: with open(picPath, 'wb') as f:
f.write(base64.b64decode(pic['pic_base64'])) f.write(base64.b64decode(pic['pic_base64']))
outPicsPath.append(picPath) outPicsPath.append(picPath)
...@@ -87,6 +88,7 @@ class EventToLocalUtil(object): ...@@ -87,6 +88,7 @@ class EventToLocalUtil(object):
infoPath = basePath + '/' + infoPath + '.json' infoPath = basePath + '/' + infoPath + '.json'
try: try:
infoPath = infoPath.decode('utf8').encode('gb2312')
with open(infoPath, 'w') as f: with open(infoPath, 'w') as f:
json.dump(dataDict, f) json.dump(dataDict, f)
outInfoPath.append(infoPath) outInfoPath.append(infoPath)
...@@ -141,13 +143,16 @@ class EventToLocalUtil(object): ...@@ -141,13 +143,16 @@ class EventToLocalUtil(object):
eventCate = dataDict['event_cate'] eventCate = dataDict['event_cate']
if eventType == 'vehicle' : if eventType == 'vehicle' :
# 卡口 # 卡口
if 'illegal' not in dataDict: if 'illegal' not in dataDict['event_data'] or dataDict['event_data']['illegal']['state'] == 0:
genPath = '%s/kakou/%s/%04d%02d%02d/%02d/%02d'%(self.rootPath,vid,et.year, \ genPath = '%s/kakou/%s/%04d%02d%02d/%02d/%02d'%(self.rootPath,vid,et.year, \
et.month,et.day,et.hour, et.minute) et.month,et.day,et.hour, et.minute)
else: else:
#违法 #违法
illegalType = 'unknow'
if 'code' in dataDict['event_data']['illegal']:
illegalType = 'code' + str(dataDict['event_data']['illegal']['code'])
genPath = '%s/weifa/%s/%04d%02d%02d/%s/%02d'%(self.rootPath,vid,et.year, \ genPath = '%s/weifa/%s/%04d%02d%02d/%s/%02d'%(self.rootPath,vid,et.year, \
et.month,et.day,dataDict['event_type'], et.hour) et.month,et.day,illegalType, et.hour)
# 交通参数 # 交通参数
elif eventType == 'tflow' \ elif eventType == 'tflow' \
or eventType == 'pflow' or eventType == 'pdensity': or eventType == 'pflow' or eventType == 'pdensity':
......
...@@ -7,16 +7,17 @@ tx1_ws_port=20080 ...@@ -7,16 +7,17 @@ tx1_ws_port=20080
datasource_url=F:\ssss\ss\TF.FDB datasource_url=F:\ssss\ss\TF.FDB
#初始化任务列表(说明:路径@任务名称 #初始化任务列表(说明:路径@任务名称
task_1=F:\公司项目目录\mini_fanxin\config\TASK1\tasks.xml@F:\公司项目目录\mini_fanxin\config\TASK1\TASK1\@F:\公司项目目录\mini_fanxin\config\TASK1\TASK1\TASK1\@F:\公司项目目录\mini_fanxin\config\TrafficConfig.xml task_1=/root/UserApp/vioncfg/Device/TASK1/tasks.xml@/root/UserApp/vioncfg/Device/TASK1/TASK1/@/root/UserApp/vioncfg/Device/TASK1/TASK1/TASK1/@/root/UserApp/services/analysis_service/VAServer/TrafficConfig.xml
task_2= #task_1=/root/UserApp/vioncfg/Device/d8802881b1fa40a0bca979214acb78d7/tasks.xml@/root/UserApp/vioncfg/Device/d8802881b1fa40a0bca979214acb78d7/d1f69df819a0472bbbe2e5a34806d1a0/@/root/UserApp/vioncfg/Device/d8802881b1fa40a0bca979214acb78d7/d1f69df819a0472bbbe2e5a34806d1a0/ea3ade4d66d04cfa94c289285b05df96/@/root/UserApp/services/analysis_service/VAServer/TrafficConfig.xml
task_2=/root/UserApp/vioncfg/Device/TASK2/tasks.xml@/root/UserApp/vioncfg/Device/TASK2/TASK2/@/root/UserApp/vioncfg/Device/TASK2/TASK2/TASK2/@/root/UserApp/services/analysis_service/VAServer/TrafficConfig.xml
task_3= task_3=
task_4=/root/UserApp/vioncfg/Ops/ServerConfig.xml@运维服务@./start.sh task_4=
#截图接口地址 #截图接口地址
cut_pic_url=http://192.168.88.109:10088/apiv1/capture cut_pic_url=http://127.0.0.1:10088/apiv1/capture
#重启任务指令 #重启任务指令
start_task=./task_start.sh start_task=./task_start.sh
save_root_path=./datasave
\ No newline at end of file \ No newline at end of file
save_root_path=/root/Log/saveresult
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!