프로젝트

일반

사용자정보

개정판 b46d1c3b

IDb46d1c3b2e2b270572bec43614ff29056c88e09f
상위 735aac62
하위 db796047

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

issue #627: doc list combo box fix

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
2123 2123
            # Close the db connection
2124 2124
            conn.close()
2125 2125

  
2126
    def getDocumentNameList(self):
2127
        '''
2128
            @brief      get documentName list
2129
            @author     euisung
2130
            @date       2018.12.11
2131
        '''
2132
        result = []
2133

  
2134
        try:
2135
            # Creates or opens a file called mydb with a SQLite3 DB
2136
            dbPath = os.path.join(self.getCurrentProject().getDbFilePath(), 'ITI_PID.db')
2137
            conn = sqlite3.connect(dbPath)
2138
            # Get a cursor object
2139
            cursor = conn.cursor()
2140

  
2141
            sql = 'select DISTINCT(PNID_NO) from LINE_DATA_LIST'
2142
            cursor.execute(sql)
2143
            sql = 'select DISTINCT(PNID_NO) from EQUIPMENT_DATA_LIST'
2144
            cursor.execute(sql)
2145
            sql = 'select DISTINCT(PNID_NO) from INSTRUMENT_DATA_LIST'
2146
            cursor.execute(sql)
2147
            sql = 'select DISTINCT(PNID_NO) from NOTE_DATA_LIST'
2148
            cursor.execute(sql)
2149
            sql = 'select DISTINCT(PNID_NO) from VALVE_DATA_LIST'
2150
            cursor.execute(sql)
2151

  
2152
            rows = cursor.fetchall()
2153
            for row in rows:
2154
                result.append(row[0])
2155

  
2156
            result = list(set(result))
2157
            result.sort()
2158
        # Catch the exception
2159
        except Exception as ex:
2160
            # Roll back any change if something goes wrong
2161
            conn.rollback()
2162
            print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno))
2163
        finally:
2164
            # Close the db connection
2165
            conn.close()
2166

  
2167
        return result
2168

  
2169

  
2126 2170
    '''
2127 2171
        @brief      get line documentName list
2128 2172
        @author     kyouho
DTI_PID/DTI_PID/ItemDataExportDialog.py
307 307
        docData = AppDocData.instance()
308 308
        
309 309
        documentNameList = []
310
        documentNameData = docData.getLineDocumentNameList()
310
        documentNameData = docData.getDocumentNameList()
311 311
        documentNameList.extend(documentNameData)
312 312
        #documentNameData = docData.getEquipDocumentNameList()
313 313
        #documentNameList.extend(documentNameData)

내보내기 Unified diff

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