Exemplo n.º 1
0
    def get_equip_run_note(self, autoid=0, olist=[], *args, **kwargs):
        eqrunnotes = EquipmentModel.get_equip_run_note(autoid, olist, *args,
                                                       **kwargs)
        #return eqrunnotes
        if len(eqrunnotes):
            eqno_set = set(eqrunnotes.values_list('eqno', flat=True))
            equipments = self.get_equipment(False, ('eqno', 'eqname'),
                                            eqno__in=eqno_set)

            for item in eqrunnotes:
                item.eqname = ''
                for eq in equipments:
                    if item.eqno == eq[0]:
                        item.eqname = eq[1]
            return eqrunnotes
        else:
            return []
Exemplo n.º 2
0
 def delete_data(self, table_num: int, condition={}, *args, **kwargs):
     table_str = TABLE_SET[table_num][0]
     err_msg = "删除" + TABLE_SET[table_num][1]
     return EquipmentModel.delete_data(table_str, err_msg, condition, *args,
                                       **kwargs)
Exemplo n.º 3
0
 def get_data(self, table_num: int, display_flag=False, *args, **kwargs):
     table_str = TABLE_SET[table_num][0]
     err_msg = "查询" + TABLE_SET[table_num][1]
     return EquipmentModel.get_data(table_str, err_msg, display_flag, *args,
                                    **kwargs)
Exemplo n.º 4
0
 def update_equip_run_note(self, autoid, *args, **kwargs):
     return EquipmentModel.update_equip_run_note(autoid, *args, **kwargs)
Exemplo n.º 5
0
 def insert_equip_run_note(self, autoid, *args, **kwargs):
     return EquipmentModel.insert_equip_run_note(autoid, *args, **kwargs)
Exemplo n.º 6
0
 def get_equipment(self, display_flag=False, *args, **kwargs):
     return EquipmentModel.get_equipment(display_flag, *args, **kwargs)