def getCardHistoryDataTime(self,
                               start_time,
                               end_time=None,
                               card_ids=None,
                               building_id=None,
                               scene_id=None,
                               floor_id=None):  #5.6.2 查询有历史消息的时间段
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularHistory/History/getCardHistoryDataTime"
        data["start_time"] = start_time  #整型数字 	开始时间戳(毫秒) 	是
        if end_time: data["end_time"] = end_time  #整型数字 	结束时间戳(毫秒)
        if card_ids: data["card_ids"] = card_ids  #数组 	卡号 id 数组
        if building_id: data["building_id"] = building_id  #整型数字 	建筑 id
        if scene_id: data["scene_id"] = scene_id  #整型数字 	场景 id
        if floor_id: data["floor_id"] = floor_id  #整型数字 	楼层 id

        result = Proxy.send(self.url, data)
        return result
    def getAreaCardRecord(self,
                          start_time=None,
                          end_time=None,
                          card_id=None,
                          type=None,
                          area_id=None,
                          page=None,
                          limit=None):  #5.6.3 查询卡在区域中停留时长的历史信息
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularHistory/History/getAreaCardRecord"
        if start_time: data["start_time"] = start_time  #整型数字 	开始时间戳(毫秒) 	是
        if end_time: data["end_time"] = end_time  #整型数字 	结束时间戳(毫秒)
        if card_id: data["card_id"] = card_id  #整型数字 	卡号 id 数组
        if type: data["type"] = type  #整型数字 	当前考勤状态 0 超时离开 1 正常离开
        if area_id: data["area_id"] = area_id  #整型数字 	区域 id
        if page: data["page"] = page  #整型数字 	页数
        if limit: data["limit"] = limit  #整型数字 	每页数据条数

        result = Proxy.send(self.url, data)
        return result
    def getCardHistory(self,
                       time,
                       end_time=None,
                       data_flag=None,
                       area_xy=None,
                       card_ids=None,
                       area_ids=None,
                       building_id=None,
                       scene_id=None,
                       floor_id=None):  #5.6.1 查询卡的历史信息
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularHistory/History/getCardHistory"
        data["time"] = time  #整型数字 	开始时间戳(毫秒) 是
        if end_time: data["end_time"] = end_time  #整型数字 	结束时间戳(毫秒)
        if data_flag: data["data_flag"] = data_flag  #整型数字 	是否平滑:0 不平滑 1 平滑
        if area_xy:
            data["area_xy"] = area_xy  #数组 	区域坐标:[x 最小值,x 最大值,y 最小值, y 最大值]
        if card_ids: data["card_ids"] = card_ids  #字符串 	卡号 id 多个卡号以逗号隔开
        if area_ids: data["area_ids"] = area_ids  #字符串 	区域 id 多个区域以逗号隔开
        if building_id: data["building_id"] = building_id  #整型数字 	建筑 id
        if scene_id: data["scene_id"] = scene_id  #整型数字 	场景 id
        if floor_id: data["floor_id"] = floor_id  #整型数字 	楼层 id

        result = Proxy.send(self.url, data)
        return result
    def getNowInfo(self,
                   area_id=None,
                   blind=None,
                   floor_id=None,
                   page=None,
                   limit=None):  #5.9.7 查询当前所有卡的信息及所在区域
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/getNowInfo"
        if area_id: data["area_id"] = area_id
        if blind: data["blind"] = blind
        if floor_id: data["floor_id"] = floor_id
        if page: data["page"] = page
        if limit: data["limit"] = limit

        result = Proxy.send(self.url, data)
        return result
    def send(self):
        #参数示例
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["ip"] = self.ip
        data["port"] = Funcs.toInt(self.port)

        data["cmd"] = self.cmd

        result = Proxy.send(self.url, data)
        return result
示例#6
0
    def send(self):
        #参数示例
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["ip"] = self.ip
        data["port"] = Funcs.toInt(self.port)

        data["voiceFilePath"] = self.voiceFilePath
        data["snlist"] = self.snlist

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为1
    def getAllAreaCardID(self):  #5.9.6查询所有区域中卡号查询所有区域中卡号
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/getAllAreaCardID"

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如{"type":1,"message":"Request success","result":{"8":[18438,16479]}}
    def getAllCardNowPos(self, card_id=None):  #5.9.4 获取指定卡号或所有卡号的实时定位信息
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/getAllCardNowPos"
        if card_id: data["card_id"] = card_id  #整型数字 	卡号 id  	否

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如{"type":1,"message":"Request success","result":{"18438":{"card_relative_z":1.5,"uuid":2,"utype":0,"floor_id":1,"card_id":18438,"static":true,"time":1553148514364,"y":1.2125836680006,"x":3.2918612590217,"z":1.5,"floor_name":"楼层1","building_id":"1","building_name":"建筑1","scene_id":"1","scene_name":"场景1"}}}
    def callCardList(self, card_list):  #5.9.3 呼叫卡号,card_list逗号分隔
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/callCardList"
        data["card_list"] = card_list  #数组  	卡号 id 数组 	是

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如{"type":1,"message":"Request success","result":"18438,16479"}
示例#10
0
    def evacuateArea(self, area_id_str):  #5.9.2 撤离已有区域
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/evacuateArea"
        data["area_id_str"] = area_id_str  #数组  	区域 id 数组  	是

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如{"type":1,"message":"Request success","result":[16479]}
示例#11
0
    def getAreaByCard(self, card_ids):  #5.9.9 查询指定卡号所在的区域
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/getAreaByCard"
        data["card_ids"] = card_ids

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如{"type":1,"message":"Request success","result":{"1":[],"4":[],"9":[],"6":[],"7":[]}}
示例#12
0
    def getCardByArea(self, area_ids):  #5.9.8 查询指定区域中存在的卡号
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/getCardByArea"
        data["area_ids"] = area_ids

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如{"type":1,"message":"Request success","result":{"8":[16479]}}
示例#13
0
    def evacuateTmpArea(self, floor_id, area, z_start, z_end):  #5.9.1 撤离临时划定区域
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularNowInfo/NowInfo/evacuateTmpArea"
        data["floor_id"] = floor_id  #整型数字 	楼层 id 	必须
        data["area"] = area  #数组 	划定的区域坐标信息 	是
        data["z_start"] = z_start  #整型数字 	开始高度 	是
        data["z_end"] = z_end  #整型数字 	结束高度 	是

        result = Proxy.send(self.url, data)
        return result  #异常返回值为'',正确返回值为,如
示例#14
0
    def getCardFloorDataTime(
        self,
        card_id,
        start_time,
        end_time=None,
    ):  #5.6.4 指定卡号查询该卡号有数据的时间段和所在楼层
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        data["loginUrl"] = self.locationUrl + self.loginPath
        data["username"] = self.username
        data["password"] = self.passwordMD5
        data["http_api_version"] = self.apiver

        data[
            "cmd"] = self.locationUrl + "/position_sdk/ModularHistory/History/getCardFloorDataTime"
        data["card_id"] = card_id  #整型数字 	卡号 id 数组
        data["start_time"] = start_time  #整型数字 	开始时间戳(毫秒) 	是
        if end_time: data["end_time"] = end_time  #整型数字 	结束时间戳(毫秒)
        result = Proxy.send(self.url, data)
        return result
示例#15
0
    def send(self):
        #参数示例
        data = {}
        data["token"] = self.token
        data["device"] = self.device

        # AddScreen
        data['nControlType'] = self.nControlType
        data['nScreenNo'] = self.nScreenNo
        data['nSendMode'] = self.nSendMode
        data['nWidth'] = self.nWidth
        data['nHeight'] = self.nHeight

        data['nScreenType'] = self.nScreenType
        data['nPixelMode'] = self.nPixelMode
        data['nDataDA'] = self.nDataDA
        data['nDataOE'] = self.nDataOE
        data['nRowOrder'] = self.nRowOrder
        data['nDataFlow'] = self.nDataFlow
        data['nFreqPar'] = self.nFreqPar

        data['pCom'] = self.pCom
        data['nBaud'] = self.nBaud
        data['pSocketIP'] = self.pSocketIP
        data['nSocketPort'] = self.nSocketPort
        data['nStaticIPMode'] = self.nStaticIPMode
        data['nServerMode'] = self.nServerMode
        data['pBarcode'] = self.pBarcode

        data['pNetworkID'] = self.pNetworkID
        data['pServerIP'] = self.pServerIP
        data['nServerPort'] = self.nServerPort
        data['pServerAccessUser'] = self.pServerAccessUser
        data['pServerAccessPassword'] = self.pServerAccessPassword
        data['pWiFiIP'] = self.pWiFiIP

        data['nWiFiPort'] = self.nWiFiPort
        data['pGprsIP'] = self.pGprsIP
        data['nGprsPort'] = self.nGprsPort
        data['pGprsID'] = self.pGprsID
        data['pScreenStatusFile'] = self.pScreenStatusFile

        # AddScreenProgram
        # nScreenNo
        data['nProgramType'] = self.nProgramType
        data['nPlayLength'] = self.nPlayLength

        data['nStartYear'] = self.nStartYear
        data['nStartMonth'] = self.nStartMonth
        data['nStartDay'] = self.nStartDay
        data['nEndYear'] = self.nEndYear
        data['nEndMonth'] = self.nEndMonth
        data['nEndDay'] = self.nEndDay

        data['nMonPlay'] = self.nMonPlay
        data['nTuesPlay'] = self.nTuesPlay
        data['nWedPlay'] = self.nWedPlay
        data['nThursPlay'] = self.nThursPlay
        data['nFriPlay'] = self.nFriPlay
        data['nSatPlay'] = self.nSatPlay
        data['nSunPlay'] = self.nSunPlay

        data['nStartHour'] = self.nStartHour
        data['nStartMinute'] = self.nStartMinute
        data['nEndHour'] = self.nEndHour
        data['nEndMinute'] = self.nEndMinute

        # AddScreenProgramBmpTextArea
        # =self.nScreenNo
        data['nProgramOrd'] = self.nProgramOrd
        data['nX'] = self.nX
        data['nY'] = self.nY
        data['nAreaWidth'] = self.nAreaWidth
        data['nAreaHeight'] = self.nAreaHeight

        # AddScreenProgramAreaBmpTextText
        # nScreenNo
        # nProgramOrd
        data['nAreaOrd'] = self.nAreaOrd

        data['pText'] = self.pText
        data['nShowSingle'] = self.nShowSingle
        data['nHorAlign'] = self.nHorAlign
        data['nVerAlign'] = self.nVerAlign
        data['pFontName'] = self.pFontName
        data['nFontSize'] = self.nFontSize
        data['nBold'] = self.nBold
        data['nItalic'] = self.nItalic
        data['nUnderline'] = self.nUnderline
        data['nFontColor'] = self.nFontColor

        data['nStunt'] = self.nStunt
        data['nRunSpeed'] = self.nRunSpeed
        data['nShowTime'] = self.nShowTime
        data['nStretch'] = self.nStretch
        data['nShift'] = self.nShift

        # SendScreenInfo
        # nScreenNo
        data['nSendCmd'] = self.nSendCmd
        data['nOtherParam1'] = self.nOtherParam1

        #定时关机
        data['nOnHour1'] = self.nOnHour1
        data['nOnMinute1'] = self.nOnMinute1
        data['nOffHour1'] = self.nOffHour1
        data['nOffMinute1'] = self.nOffMinute1
        data['nOnHour2'] = self.nOnHour2
        data['nOnMinute2'] = self.nOnMinute2
        data['nOffHour2'] = self.nOffHour2
        data['nOffMinute2'] = self.nOffMinute2
        data['nOnHour3'] = self.nOnHour3
        data['nOnMinute3'] = self.nOnMinute3
        data['nOffHour3'] = self.nOffHour3
        data['nOffMinute3'] = self.nOffMinute3

        #调亮度
        data['nAdjustType'] = self.nAdjustType
        data['nHandleLight'] = self.nHandleLight
        data['nHour1'] = self.nHour1
        data['nMinute1'] = self.nMinute1
        data['nLight1'] = self.nLight1
        data['nHour2'] = self.nHour2
        data['nMinute2'] = self.nMinute2
        data['nLight2'] = self.nLight2
        data['nHour3'] = self.nHour3
        data['nMinute3'] = self.nMinute3
        data['nLight3'] = self.nLight3
        data['nHour4'] = self.nHour4
        data['nMinute4'] = self.nMinute4
        data['nLight4'] = self.nLight4

        result = Proxy.send(self.url, data)
        return result