-    point_measure_window = models.CharField(_('point_measure_window'), max_length=16, blank=True, null=True, help_text='隔离点测温时间段', db_index=True)
288
-
289
-    macid = models.CharField(_('macid'), max_length=32, blank=True, null=True, help_text='设备号')
290
-    sn = models.CharField(_('sn'), max_length=32, blank=True, null=True, help_text='序列号')
291
-
292
-    temperature = models.FloatField(_('temperature'), default=0, help_text='用户体温')
293
-
294
-    class Meta:
295
-        verbose_name = _('测温信息')
296
-        verbose_name_plural = _('测温信息')
297
-
298
-        unique_together = (
299
-            ('point_id', 'point_measure_ymd', 'point_measure_window', 'macid')
300
-        )
301
-
302
-    def __unicode__(self):
303
-        return self.pk
304
-
305
-    @property
306
-    def data(self):
307
-        return {
308
-            'point_id': self.point_id,
309
-            'point_measure_window': self.point_measure_window,
310
-            'macid': self.macid,
311
-            'sn': self.sn,
312
-            'temperature': self.temperature,
313
-            'updated_at': tc.local_string(utc_dt=self.updated_at, format='%m-%d %H:%M'),
314
-        }
315
-
316
-
317 228
 class ThermometerMeasureLogInfo(BaseModelMixin):
318 229
     CALLBACK = 1
319 230
     MQTT = 2

Sign In - Gogs: Go Git Service

Sign In