Пример #1
0
    def get(self):
        substid = self.get_argument('substid')

        data, map_data = manage.get_map_info_by_substid(substid)
        subst_info = get_subst_info(substid = substid)

        self.render("MapInfoLine.html",data = data, substid = substid, subst_info = subst_info,map_data = map_data)
Пример #2
0
    def get(self):
        bind_args = dict((k, v[-1]) for k, v in self.request.arguments.items())
        substid = self.get_argument('substid')
        euaddr = self.get_argument('euaddr', None)
        subst_info = manage.get_subst_info(substid = substid)
        eu = manage.get_eu_info(substid)
        data, map_data = manage.get_map_info_by_substid(substid)

        self.render("control_status.html",bind_args=bind_args, subst_info = subst_info, eu = eu, data =data, map_data = map_data)
Пример #3
0
    def get(self):
        substid = self.get_argument('substid')
        subst = manage.get_subst_info(substid = substid)
        m, mapinfo = manage.get_map_info_by_substid(substid)
        eu = manage.get_eu_info(substid)

        data = []
        for e in eu:
            euaddr = e.get('euaddr')
            fields = ['EuAddr', 'CollectTime', 'SchemeNum', 'PlanNum', 'MeasuNum', 'JqrTime', 'BatteryCapat', 'BatteryVar', 'JqrConMode', 'LocalTemp', 'LocalHum', 'LocalWind', 'SysTemp', 'JqrSpeed', 'CurrentPoint', 'CurrentPointLog', 'FrontPoint', 'FrontPointLog']

            sql = "select {} from TermRealTimeShowData where euaddr='{}'".format(','.join(fields), euaddr)
            d, t = mysql_util.m_query(sql, fields, findall=True)
            for _d in d:
                _d['name'] = e.get('name')
                _d['JqrTime'] = str(_d.get('JqrTime'))
                _d['CollectTime'] = str(_d.get('CollectTime'))
            data.extend(d)

        self.write(dict(status = True, data = data, mapinfo = mapinfo))