개정판 c7f1c038
add export line list full line no
Change-Id: I548a4641bb9506591609c596ee12b6ab4c64082d
DTI_PID/DTI_PID/AppDocData.py | ||
---|---|---|
3640 | 3640 |
# Get a cursor object |
3641 | 3641 |
cursor = conn.cursor() |
3642 | 3642 |
|
3643 |
sql = 'select A.UID,B.Name from Components A left join Drawings B on A.Drawings_UID=B.UID' |
|
3643 |
sql = 'select A.UID,B.Name,A.Value as [Line No] from Components A left join Drawings B on A.Drawings_UID=B.UID'
|
|
3644 | 3644 |
if drawings is not None: |
3645 | 3645 |
doc_names = "','".join(drawings) |
3646 | 3646 |
sql += f" where Drawings_UID in (select UID from Drawings where Name in ('{doc_names}'))" |
3647 | 3647 |
cursor.execute(sql) |
3648 |
comps = [(row['UID'], row['Name']) for row in cursor.fetchall()] |
|
3648 |
comps = [(row['UID'], row['Name'], row['Line No']) for row in cursor.fetchall()]
|
|
3649 | 3649 |
for comp in comps: |
3650 | 3650 |
sql = f"select b.Name,a.Value from LineNoAttributes a left join LineProperties b " \ |
3651 | 3651 |
f"on a.LineProperties_UID=b.UID where a.Components_UID='{comp[0]}'" |
... | ... | |
3657 | 3657 |
if data: |
3658 | 3658 |
data.insert(0, ['Drawing Name', comp[1]]) |
3659 | 3659 |
data.insert(0, ['UID', comp[0]]) |
3660 |
data.insert(0, ['Line No', comp[2]]) |
|
3660 | 3661 |
result.append(data) |
3661 | 3662 |
|
3662 | 3663 |
# catch the exception |
DTI_PID/DTI_PID/ItemDataExportDialog.py | ||
---|---|---|
340 | 340 |
|
341 | 341 |
app_doc_data = AppDocData.instance() |
342 | 342 |
special_item_types = SpecialItemTypes.instance() |
343 |
self.lineColumnListAll = ['UID', 'Drawing Name', 'Stream No', 'FROM', 'TO', 'Case'] |
|
343 |
self.lineColumnListAll = ['UID', 'Drawing Name', 'Line No', 'Stream No', 'FROM', 'TO', 'Case']
|
|
344 | 344 |
self.lineColumnListAll.extend([prop.Attribute for prop in app_doc_data.getLineProperties()]) |
345 | 345 |
self.lineColumnListAll = QItemDataExportDialog.add_hmb_header(self.lineColumnListAll) |
346 | 346 |
self.equipColumnListAll = ['UID', 'ITEM_NO'] |
내보내기 Unified diff