개정판 578a3308
issue #000 on_generate_report 함수 수정
1. Sheet 1페이지에만 "Loop_Deviation" 표시
2. Page Index로 Sheet 가져올 때, Index 없을 경우 마지막 Sheet로 표시되게 변경.
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
1654 | 1654 |
"""up to here""" |
1655 | 1655 |
|
1656 | 1656 |
# Output [Pump, Compressor, Control Valve] |
1657 |
#ws['X1'].value = 'Loop_Deviation' |
|
1657 |
if page_no == 1: |
|
1658 |
ws['X1'].value = 'Loop_Deviation' |
|
1658 | 1659 |
ws['X1'].font = Font(bold=True, underline='single', size=11) |
1659 | 1660 |
|
1660 | 1661 |
# write hmb unit |
... | ... | |
1980 | 1981 |
col_no = 28 if col_no == 27 else 24 |
1981 | 1982 |
row_no = row_no - 4 if col_no == 28 else row_no + 2 |
1982 | 1983 |
|
1983 |
for sheet_loop_deviation in sheet_loop_deviations: |
|
1984 |
sheet_loop_deviation['X1'].value = 'Loop_Deviation' |
|
1985 |
|
|
1986 | 1984 |
current_ws = wb.get_sheet_by_name('Page (1)') |
1987 | 1985 |
# write hmb data |
1988 | 1986 |
drawing = app_doc_data.activeDrawing |
... | ... | |
2331 | 2329 |
|
2332 | 2330 |
def get_work_sheet(self, work_book, count, total_count): |
2333 | 2331 |
page_no = math.ceil(count / total_count) |
2334 |
return work_book.get_sheet_by_name('Page ({})'.format(page_no)) |
|
2332 |
works = [con for con in work_book.worksheets if "Page " in con.title] |
|
2333 |
ws = None |
|
2334 |
if len(works) > page_no: |
|
2335 |
ws = work_book.get_sheet_by_name('Page ({})'.format(page_no)) |
|
2336 |
else: |
|
2337 |
ws = works[-1] |
|
2338 |
|
|
2339 |
return ws |
|
2335 | 2340 |
|
2336 | 2341 |
def display_output(self): |
2337 | 2342 |
from HydroCalculationCommand import HydroCalculationCommand |
내보내기 Unified diff