Exemplo n.º 1
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'reason': self.reason,
         'start_time': utc_switch(self.start_time),
         'end_time': utc_switch(self.end_time),
         'device_name': self.device.name,
         'bugtype_name': self.bugtype.name,
     }
Exemplo n.º 2
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'start_time': utc_switch(self.start_time)[11:],
         'end_time': utc_switch(self.end_time),
         'seconds': self.seconds,
         'type': self.type,
         'amount': self.amount,
         'good': self.good,
         'glue': self.glue,
         'device_name': self.device.name,
     }
Exemplo n.º 3
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'start_time': utc_switch(self.start_time),
         'end_time': utc_switch(self.end_time),
         'seconds': self.seconds,
         'volt': self.volt,
         'amount': self.amount,
         'good': self.good,
         'glue': self.glue,
         'device_name': self.device.name,
         'valve_name': self.valve.name,
         'valve_sn': self.valve.sn,
     }
Exemplo n.º 4
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'start_time': utc_switch(self.start_time),
         'status': self.status,
         'device_name': self.device.name,
     }
Exemplo n.º 5
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'uid': self.uid,
         'name': self.name,
         'createDate': utc_switch(self.createDate),
     }
Exemplo n.º 6
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'title': self.title,
         'type': self.type,
         'description': self.description,
         'read': self.read,
         'ct_time': utc_switch(self.ct_time),
     }
Exemplo n.º 7
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'name': self.name,
         'week': self.week,
         'current': self.current,
         'follow': self.follow,
         'time': utc_switch(self.time),
         'project_name': self.project.name,
         'user_name': self.user.name,
     }
Exemplo n.º 8
0
Arquivo: models.py Projeto: drgonn/oee
 def to_json(self):
     return {
         'id': self.id,
         'create_time': utc_switch(self.create_time),
         'alarmtype_code': self.alarmtype.code,
         'alarmtype_mean': self.alarmtype.mean,
         'alarmtype_cause': self.alarmtype.cause,
         'alarmtype_solution': self.alarmtype.solution,
         'valve_name': self.valve.name,
         'valve_id': self.valve.id,
     }