Ejemplo n.º 1
0
 def test_014_warning_mapinfo(self):
     """
     Time       :2019-04-08
     author     : 罗林
     desc       :获取报警详情地图信息
     """
     warnid = fis.get_warn_id()
     rs1 = cla.test_warning_mapinfo(warningid=warnid)
     ass.verity(json.loads(rs1)['message'], '请求成功')
Ejemplo n.º 2
0
 def test_015_warning_stationdetail(self):
     """
     Time       :2019-04-08
     author     : 罗林
     desc       :未回家/公司获取停车记录
     """
     warnid = fis.get_warn_id('whj')
     rs1 = cla.test_warning_stationdetail(warnid=warnid)
     ass.verity(json.loads(rs1)['message'], '请求成功')
Ejemplo n.º 3
0
 def test_012_warning_resolve(self):
     """
     Time       :2019-04-08
     author     : 罗林
     desc       :提交报警处理数据
     """
     warnid = fis.get_warn_id()
     rs1 = cla.test_warning_resolve(dangervalue=1, warningid=warnid, feedbackvalue=1, mark='', feedbackothertext='')
     ass.verity(json.loads(rs1)['message'], '请求成功')
Ejemplo n.º 4
0
 def test_011_warning_handleinit(self):
     """
     Time       :2019-04-08
     author     : 罗林
     desc       :动态获取情况反馈与风险等级
     """
     warnid = fis.get_warn_id()
     rs1 = cla.test_warning_handleinit(warnid=warnid)
     ass.verity(json.loads(rs1)['message'], '请求成功')
Ejemplo n.º 5
0
 def test_012_warnDist(self):
     # 处理报警信息页面初始化数据
     finance_id = fs.get_car_id(c.car_owner)
     warnid = fs.get_warn_id(warn_type='jl', financeid=finance_id)
     f.test_warnDist_getHandleWarnMessage(warnid)
     # 查看设备距离报警信息
     f.test_warnDist_getDeviceWarnIntervalDetail(warnid)
     # 获取设备距离报警记录
     f.test_warnDist_getWarnIntervals('', 1, 10, 0)
     # 执行报警信息处理
     f.test_warnDist_doHandleWarn(99, 'test 其它', 'test 备注', 3, warnid)
Ejemplo n.º 6
0
 def test_010_warnOffline(self):
     # 离线报警获取离线报警记录
     f.test_warnOffline_getWarns('', 1, 10, 0)
     f.test_warnOffline_getWarns('', 1, 10, 1)
     warnid = fs.get_warn_id('lx')
     # 离线报警处理报警信息页面初始化数据
     r = json.loads(f.test_warnOffline_getHandleWarnMessage(warnid))
     a.verity(r['data']['warnid'], warnid, '断言warnid')
     a.verity(r['data']['warnFeedbacks'][0]['feedbackName'], "误报", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][0]['feedbackCode'], '0', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][1]['feedbackName'], "数据异常", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][1]['feedbackCode'], '10', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][2]['feedbackName'], "二次抵押", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][2]['feedbackCode'], '2', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][3]['feedbackName'], "失联", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][3]['feedbackCode'], '3', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][4]['feedbackName'], "GPS换车安装", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][4]['feedbackCode'], '8', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][5]['feedbackName'], "定位偏差", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][5]['feedbackCode'], '9', '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][6]['feedbackName'], "其它", '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][6]['feedbackCode'], '99', '断言feedbackCode')
     a.verity(r['data']['warnRisks'][0]['warnCode'], "1", '断言warnCode')
     a.verity(r['data']['warnRisks'][0]['warnName'], "低风险", '断言warnName')
     a.verity(r['data']['warnRisks'][1]['warnCode'], "2", '断言warnCode')
     a.verity(r['data']['warnRisks'][1]['warnName'], "中风险", '断言warnName')
     a.verity(r['data']['warnRisks'][2]['warnCode'], "3", '断言warnCode')
     a.verity(r['data']['warnRisks'][2]['warnName'], "高风险", '断言warnName')
     a.verity(r['data']['warnRisks'][3]['warnCode'], "0", '断言warnCode')
     a.verity(r['data']['warnRisks'][3]['warnName'], "正常", '断言warnName')
     # 离线报警执行报警信息处理
     f.test_warnOffline_doHandleWarn(0, '', '', 1, warnid)
     financeid = fs.get_finance_id_bywarnid(warnid)
     # 离线报警获取车辆和GPS列表
     f.test_warnOffline_getFinanceById(financeid)
     gpsid = fs.get_warn_id('lx', 'gps_id', 0, financeid)
     # 通过gpsId和离线时长查询离线点
     f.test_warnOffline_getOfflinePoint(gpsid, "")
Ejemplo n.º 7
0
 def test_001_warn(self):
     # 处理报警信息页面初始化数据
     finance_id = fs.get_car_id(c.car_owner)
     warnid = fs.get_warn_id(warn_type='sh', financeid=finance_id)
     r = json.loads(f.test_warn_getHandleWarnMessage(warnid))
     a.verity(r['data']['warnid'], warnid, '断言warnid')
     # 获取设备报警记录
     f.test_warn_getWarns('', 1, 10, 0)
     riskid = fs.get_risk_id(c.riskName)
     # 根据ID获取风险点详情
     r1 = json.loads(f.test_warn_getRiskDetail(riskid))
     a.verity(r1['data']['id'], riskid, '断言riskid')
     # 根据报警记录ID获取报警记录详情
     f.test_warn_getWarnDetailById()
     f.test_warn_doHandleWarn(1, '', '', 1, warnid)
Ejemplo n.º 8
0
 def test_013_warnhb(self):
     # 未回家/公司阀值设置
     f.test_warnhb_saveThreshold(c.TRAVEL_OUT)
     # 未回家/公司阀值获取
     r = json.loads(f.test_warnhb_getThreshold())
     a.verity(r['data'], c.TRAVEL_OUT)
     # 查询停车记录
     finance_id = fs.get_car_id(c.car_owner)
     warnid = fs.get_warn_id(warn_type='wh', financeid=finance_id)
     f.test_warnhb_getStations(warnid)
     # 查询用户住址信息
     r1 = json.loads(f.test_warnhb_getFinanceInfo(finance_id))
     a.verity(r1['data']['companyAddress'], fs.get_car_info(c.car_owner, 'company_address'))
     a.verity(r1['data']['companyCoord'], fs.get_car_info(c.car_owner, 'company_coord'))
     a.verity(r1['data']['ownerAddress'], fs.get_car_info(c.car_owner, 'owner_address'))
     a.verity(r1['data']['ownerCoord'], fs.get_car_info(c.car_owner, 'owner_coord'))
     # 查询未回家/公司报警
     f.test_warnhb_getWarns('', 1, 10, 0)
     f.test_warnhb_getWarns('', 1, 10, 1)
Ejemplo n.º 9
0
 def test_017_historyTrack(self):
     # 根据gpscode查询用户的车贷数据
     r = json.loads(f.test_historyTrack_getFinanceByGpsCode(c.deviceCode))
     gpsid = fs.get_device_id(c.deviceCode)
     financeid = fs.get_carid_by_gpsid(gpsid)
     carNo = fs.get_car_info_by_financeid(financeid, 'car_no')
     owner = fs.get_car_info_by_financeid(financeid)
     ownerMoble = fs.get_car_info_by_financeid(financeid, 'owner_moble')
     a.verity(r['data']['id'], financeid)
     a.verity(r['data']['orgCode'], orgCode)
     a.verity(r['data']['carNo'], carNo)
     a.verity(r['data']['owner'], owner)
     a.verity(r['data']['ownerMoble'], ownerMoble)
     # 根据financeId查询用户的车贷数据
     r1 = json.loads(f.test_historyTrack_getFinanceById(financeid))
     a.verity(r1['data']['id'], financeid)
     a.verity(r1['data']['orgCode'], orgCode)
     a.verity(r1['data']['carNo'], carNo)
     a.verity(r1['data']['owner'], owner)
     a.verity(r1['data']['ownerMoble'], ownerMoble)
     # 根据financeId查询绑定的GPS信息
     f.test_historyTrack_getGpsByFinanceId(financeid)
     # 获取历史轨迹定位信息(单条记录,返回所有字段)
     f.test_historyTrack_getHistoryLocation('5b188ff706699000015cda1e')
     # 获取历史轨迹(多条记录,分页查询)
     f.test_historyTrack_getHistoryLocationByPage(
         '', '', '', 1, 10, 1, c.deviceCode, c.station_starttime, c.station_endtime, 0)
     # 获取历史轨迹定位信息(全部,只返回定位相关)
     f.test_historyTrack_getHistoryTrack(
         c.deviceCode, 0, 1, c.station_starttime, c.station_endtime)
     riskid = fs.get_risk_id(c.riskName)
     # 根据id查询风险点详情
     f.test_historyTrack_getRiskDtoById(riskid)
     # 通过车贷id查询相关的所有风险点
     f.test_historyTrack_getRisksByOrgCode(c.deviceCode)
     # 根据gpsId查询相关的停车数据,查询所有
     f.test_historyTrack_getStationByGpsId(financeid, gpsid, c.station_starttime, c.station_endtime, 0)
     # 根据报警记录ID获取报警记录详情
     warnid = fs.get_warn_id(financeid=financeid)
     f.test_historyTrack_getWarnDetailById(warnid)
     # 根据报警记录ID获取报警记录详情
     f.test_historyTrack_getWarnsByGpsId(gpsid, c.station_starttime, c.station_endtime)
Ejemplo n.º 10
0
 def test_005_warnOffline_getHandleWarnMessage(self):
     warnid = fs.get_warn_id('lx')
     # 离线报警处理报警信息页面初始化数据
     r = json.loads(f.test_warnOffline_getHandleWarnMessage(warnid))
     a.verity(r['data']['warnid'], warnid, '断言warnid')
     a.verity(r['data']['warnFeedbacks'][0]['feedbackName'], "误报",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][0]['feedbackCode'], '0',
              '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][1]['feedbackName'], "数据异常",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][1]['feedbackCode'], '10',
              '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][2]['feedbackName'], "二次抵押",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][2]['feedbackCode'], '2',
              '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][3]['feedbackName'], "失联",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][3]['feedbackCode'], '3',
              '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][4]['feedbackName'], "GPS换车安装",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][4]['feedbackCode'], '8',
              '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][5]['feedbackName'], "定位偏差",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][5]['feedbackCode'], '9',
              '断言feedbackCode')
     a.verity(r['data']['warnFeedbacks'][6]['feedbackName'], "其它",
              '断言feedbackName')
     a.verity(r['data']['warnFeedbacks'][6]['feedbackCode'], '99',
              '断言feedbackCode')
     a.verity(r['data']['warnRisks'][0]['warnCode'], "1", '断言warnCode')
     a.verity(r['data']['warnRisks'][0]['warnName'], "低风险", '断言warnName')
     a.verity(r['data']['warnRisks'][1]['warnCode'], "2", '断言warnCode')
     a.verity(r['data']['warnRisks'][1]['warnName'], "中风险", '断言warnName')
     a.verity(r['data']['warnRisks'][2]['warnCode'], "3", '断言warnCode')
     a.verity(r['data']['warnRisks'][2]['warnName'], "高风险", '断言warnName')
     a.verity(r['data']['warnRisks'][3]['warnCode'], "0", '断言warnCode')
     a.verity(r['data']['warnRisks'][3]['warnName'], "正常", '断言warnName')
Ejemplo n.º 11
0
 def test_008_warnOffline_getOfflinePoint(self):
     warnid = fs.get_warn_id('lx')
     financeid = fs.get_finance_id_bywarnid(warnid)[0][0]
     gpsid = fs.get_warn_id('lx', 'wire_id', 0, financeid)
     # 通过gpsId和离线时长查询离线点
     f.test_warnOffline_getOfflinePoint(gpsid, "")
Ejemplo n.º 12
0
 def test_007_warnOffline_getFinanceById(self):
     warnid = fs.get_warn_id('lx')
     financeid = fs.get_finance_id_bywarnid(warnid)
     # 离线报警获取车辆和GPS列表
     f.test_warnOffline_getFinanceById(financeid)
Ejemplo n.º 13
0
 def test_006_warnOffline_doHandleWarn(self):
     # 离线报警执行报警信息处理
     warnid = fs.get_warn_id('lx')
     f.test_warnOffline_doHandleWarn(0, '', '', 1, warnid)