!135 write the data of multiple row and column into report
From: @xuezhizone Reviewed-by: @xingwei-liu Signed-off-by: @xingwei-liu
This commit is contained in:
commit
37a83e5b32
69
0082-write-the-data-of-each-row-and-column-into-report.patch
Normal file
69
0082-write-the-data-of-each-row-and-column-into-report.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From a609740d7ec3993c33db7179715abb9d624239ae Mon Sep 17 00:00:00 2001
|
||||
From: xuezhixin <xuezhixin@uniontech.com>
|
||||
Date: Mon, 13 Nov 2023 14:40:54 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?=E5=86=99=E5=85=A5=E5=A4=9A=E8=A1=8C=E5=92=8C?=
|
||||
=?UTF-8?q?=E5=A4=9A=E5=88=97=E7=9A=84=E6=95=B0=E6=8D=AE=E5=88=B0=E6=8A=A5?=
|
||||
=?UTF-8?q?=E5=91=8A=E5=86=85?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
sysmig_agent/Abisystmcompchk.py | 44 +++++++++++++++++++++++++++++++++
|
||||
1 file changed, 44 insertions(+)
|
||||
|
||||
diff --git a/sysmig_agent/Abisystmcompchk.py b/sysmig_agent/Abisystmcompchk.py
|
||||
index 7b77d95..4484fef 100644
|
||||
--- a/sysmig_agent/Abisystmcompchk.py
|
||||
+++ b/sysmig_agent/Abisystmcompchk.py
|
||||
@@ -688,3 +688,47 @@ def write_row_and_column(report_name_rc, value_list, index):
|
||||
for data in value_list:
|
||||
row_column_sheet.write(int(data.split('|')[0]),int(data.split('|')[1]),data.split('|')[2])
|
||||
row_column_wb.save(report_name_rc)
|
||||
+
|
||||
+
|
||||
+def write_column_by_column(report_name_cc, column_value_list, row, column, index):
|
||||
+
|
||||
+ column_column_rb = xlrd.open_workbook(report_name_cc, formatting_info=True)
|
||||
+ r_sheet = column_column_rb.sheet_by_index(index)
|
||||
+ column_column_wb = copy(column_column_rb)
|
||||
+ column_column_sheet = column_column_wb.get_sheet(index)
|
||||
+
|
||||
+ row_cc = row
|
||||
+ for column_data in column_value_list:
|
||||
+ column_column_sheet.write(row_cc, column, column_data.replace('\n','').split(',')[0])
|
||||
+ row_cc = row_cc + 1
|
||||
+
|
||||
+ column_column_wb.save(report_name_cc)
|
||||
+
|
||||
+def write_row_by_row(report_name_rr, row_value_list, row, column, index):
|
||||
+
|
||||
+ row_row_rb = xlrd.open_workbook(report_name_rr, formatting_info=True)
|
||||
+ r_sheet = row_row_rb.sheet_by_index(index)
|
||||
+ row_row_wb = copy(row_row_rb)
|
||||
+ row_row_sheet = row_row_wb.get_sheet(index)
|
||||
+
|
||||
+ before_summary_info = r_sheet.row_values(0)[0].replace('INCOMP_NUM', str(incomp_pkg_num()))
|
||||
+ row_row_sheet.write(0, 0, before_summary_info)
|
||||
+
|
||||
+ row_rr = row
|
||||
+ column_rr = column
|
||||
+ for row_data in row_value_list:
|
||||
+ row_list = row_data.replace('\n','').split(',')
|
||||
+ i = column
|
||||
+ column_rr = column
|
||||
+ while i < (len(row_list) - 1):
|
||||
+ if i==2 or i==3:
|
||||
+ i = i + 1
|
||||
+ continue
|
||||
+ elif i==5:
|
||||
+ row_row_sheet.write(row_rr, column_rr, row_list[i]+','+row_list[i+1])
|
||||
+ else:
|
||||
+ row_row_sheet.write(row_rr, column_rr, row_list[i])
|
||||
+ i = i + 1
|
||||
+ column_rr = column_rr + 1
|
||||
+ row_rr = row_rr + 1
|
||||
+ row_row_wb.save(report_name_rr)
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: migration-tools
|
||||
Version: 1.0.2
|
||||
Release: 81
|
||||
Release: 82
|
||||
License: MulanPSL-2.0
|
||||
Summary: A tool to help users migrate the Centos system to the UOS system and openEuler system
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
@ -88,7 +88,7 @@ Patch78: 0078-fill-in-the-data-in-the-checked-templace.patch
|
||||
Patch79: 0079-get-agent-storage-information.patch
|
||||
Patch80: 0080-write-the-data-of-each-row-into-report.patch
|
||||
Patch81: 0081-add-interface-to-export-migration-check-report.patch
|
||||
|
||||
Patch82: 0082-write-the-data-of-each-row-and-column-into-report.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
@ -187,6 +187,9 @@ rm -rf /usr/bin/migration-tools
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-82
|
||||
- 0082-write-the-data-of-each-row-and-column-into-report.patch
|
||||
|
||||
* Tue Nov 5 2024 xuezhixin <xuezhixin@uniontech.com> - 1.0.2-81
|
||||
- 0081-add-interface-to-export-migration-check-report.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user