프로젝트

일반

사용자정보

개정판 5c6db40e

ID5c6db40e9c9edf443ba5787a15efb824c77c8318
상위 de3f62c6
하위 217af533

함의성이(가) 약 5년 전에 추가함

issue #46: custom code table added and on going

Change-Id: I79e9ae695616e1eae04c1901312905df3aeb1c7d

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
2039 2039
    def getCustomTables(self):
2040 2040
        ''' get custom code tables '''
2041 2041

  
2042
        import uuid
2043
        from CodeTables import CodeTable
2044

  
2042 2045
        with self.project.database.connect() as conn:
2043 2046
            try:
2047
                result = []
2048

  
2044 2049
                # Get a cursor object
2045 2050
                cursor = conn.cursor()
2046 2051

  
......
2048 2053
                cursor.execute(sql)
2049 2054
                rows = cursor.fetchall()
2050 2055
                for row in rows:
2051
                    attr = SymbolAttr()
2052
                    attr.UID = uuid.UUID(row[0])
2053
                    attr.Attribute = row[1]
2054
                    attr.DisplayAttribute = row[2]
2055
                    attr.AttributeType = row[3]
2056
                    attr.AttrAt = row[4]
2057
                    attr.Expression = row[5]
2058
                    attr.Target = row[7]
2059
                    attr.IsProp = row[8]
2060
                    attr.Codes = CodeTable.instance('SymbolAttributeCodeTable', row[0])
2061
                    result.append(attr)
2056
                    table = []
2057
                    table.append(uuid.UUID(row[0]))
2058
                    table.append(row[1])
2059
                    table.append(row[2])
2060
                    table.append(CodeTable.instance('CustomTables', custom_table_uid=row[0]))
2061
                    result.append(table)
2062 2062
            # Catch the exception
2063 2063
            except Exception as ex:
2064 2064
                from App import App
......
2119 2119
                    attr.Expression = row[5]
2120 2120
                    attr.Target = row[7]
2121 2121
                    attr.IsProp = row[8]
2122
                    attr.Codes = CodeTable.instance('SymbolAttributeCodeTable', row[0])
2122
                    attr.Codes = CodeTable.instance('SymbolAttributeCodeTable', symbol_attribute_uid=row[0])
2123 2123
                    result.append(attr)
2124 2124
            # Catch the exception
2125 2125
            except Exception as ex:
DTI_PID/DTI_PID/CodeTables.py
80 80
                values = appDocData.getCodeTable(_table_name, False, symbol_attribute_uid=symbol_attribute_uid)
81 81
                CodeTable.TABLES[symbol_attribute_uid] = CodeTable(symbol_attribute_uid, values)
82 82
                return CodeTable.TABLES[symbol_attribute_uid]
83
        elif _table_name == 'CUSTOMTABLES' and symbol_attribute_uid:
83
        elif _table_name == 'CUSTOMTABLES' and custom_table_uid:
84 84
            if custom_table_uid in CodeTable.TABLES:
85 85
                return CodeTable.TABLES[custom_table_uid]
86 86
            else:

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)