commit
aa7db89bb9
14
README.md
14
README.md
|
@ -106,24 +106,28 @@ git clone https://gitee.com/myems/myems.git
|
||||||
```
|
```
|
||||||
|
|
||||||
修改以下文件中的数据库IP
|
修改以下文件中的数据库IP
|
||||||
假定数据库IP为: 192.168.2.2
|
假定数据库IP为: 192.168.0.1
|
||||||
```
|
```
|
||||||
sudo nano myems-api/config.py
|
sudo nano myems-api/config.py
|
||||||
sudo nano myems-aggregation/config.py
|
sudo nano myems-aggregation/config.py
|
||||||
sudo nano myems-cleaning/config.py
|
sudo nano myems-cleaning/config.py
|
||||||
sudo nano myems-modbus-tcp/config.py
|
sudo nano myems-modbus-tcp/config.py
|
||||||
sudo nano myems-normalization/config.py
|
sudo nano myems-normalization/config.py
|
||||||
|
|
||||||
# host: '127.0.0.1' => 'host': '192.168.2.2'
|
|
||||||
```
|
```
|
||||||
|
~~'host': '127.0.0.1'~~
|
||||||
|
|
||||||
|
'host': '192.168.0.1'
|
||||||
|
|
||||||
修改web和admin文件夹下nginx.conf中的location '/api'
|
修改web和admin文件夹下nginx.conf中的location '/api'
|
||||||
假定本机IP为: 192.168.2.3
|
假定本机IP为: 192.168.0.2
|
||||||
```
|
```
|
||||||
sudo nano admin/nginx.conf
|
sudo nano admin/nginx.conf
|
||||||
sudo nano web/nginx.conf
|
sudo nano web/nginx.conf
|
||||||
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/;
|
|
||||||
```
|
```
|
||||||
|
~~proxy_pass http://127.0.0.1:8000/;~~
|
||||||
|
|
||||||
|
proxy_pass http://192.168.0.2:8000/;
|
||||||
|
|
||||||
|
|
||||||
将Web打包生成产品文件
|
将Web打包生成产品文件
|
||||||
```
|
```
|
||||||
|
|
14
README_DE.md
14
README_DE.md
|
@ -107,24 +107,28 @@ git clone https://gitee.com/myems/myems.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Ändern Sie die Datenbankkonfiguration in den folgenden Dateien
|
Ändern Sie die Datenbankkonfiguration in den folgenden Dateien
|
||||||
Angenommen, die Datenbank-IP lautet 192.168.2.2
|
Angenommen, die Datenbank-IP lautet 192.168.0.1
|
||||||
```
|
```
|
||||||
sudo nano myems-api/config.py
|
sudo nano myems-api/config.py
|
||||||
sudo nano myems-aggregation/config.py
|
sudo nano myems-aggregation/config.py
|
||||||
sudo nano myems-cleaning/config.py
|
sudo nano myems-cleaning/config.py
|
||||||
sudo nano myems-modbus-tcp/config.py
|
sudo nano myems-modbus-tcp/config.py
|
||||||
sudo nano myems-normalization/config.py
|
sudo nano myems-normalization/config.py
|
||||||
|
|
||||||
# host: '127.0.0.1' => 'host': '192.168.2.2'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
~~'host': '127.0.0.1'~~
|
||||||
|
|
||||||
|
'host': '192.168.0.1'
|
||||||
|
|
||||||
Ändern Sie den location '/api' von nginx.conf in web und admin
|
Ändern Sie den location '/api' von nginx.conf in web und admin
|
||||||
Angenommen, die Host-IP lautet 192.168.2.3
|
Angenommen, die Host-IP lautet 192.168.0.2
|
||||||
```
|
```
|
||||||
sudo nano admin/nginx.conf
|
sudo nano admin/nginx.conf
|
||||||
sudo nano web/nginx.conf
|
sudo nano web/nginx.conf
|
||||||
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/;
|
|
||||||
```
|
```
|
||||||
|
~~proxy_pass http://127.0.0.1:8000/;~~
|
||||||
|
|
||||||
|
proxy_pass http://192.168.0.2:8000/;
|
||||||
|
|
||||||
Verpacken Sie das web, um Produktdateien zu generieren
|
Verpacken Sie das web, um Produktdateien zu generieren
|
||||||
```
|
```
|
||||||
|
|
15
README_EN.md
15
README_EN.md
|
@ -106,23 +106,28 @@ git clone https://gitee.com/myems/myems.git
|
||||||
```
|
```
|
||||||
|
|
||||||
Modify Database IP in the following files
|
Modify Database IP in the following files
|
||||||
Assume the Database IP is 192.168.2.2
|
Assume the Database IP is 192.168.0.1
|
||||||
```
|
```
|
||||||
sudo nano myems-api/config.py
|
sudo nano myems-api/config.py
|
||||||
sudo nano myems-aggregation/config.py
|
sudo nano myems-aggregation/config.py
|
||||||
sudo nano myems-cleaning/config.py
|
sudo nano myems-cleaning/config.py
|
||||||
sudo nano myems-modbus-tcp/config.py
|
sudo nano myems-modbus-tcp/config.py
|
||||||
sudo nano myems-normalization/config.py
|
sudo nano myems-normalization/config.py
|
||||||
|
|
||||||
# host: '127.0.0.1' => 'host': '192.168.2.2'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
~~'host': '127.0.0.1'~~
|
||||||
|
|
||||||
|
'host': '192.168.0.1'
|
||||||
|
|
||||||
Modify location '/api' in nginx.conf of web and admin
|
Modify location '/api' in nginx.conf of web and admin
|
||||||
Assume the Host IP is 192.168.2.3
|
Assume the Host IP is 192.168.0.2
|
||||||
```
|
```
|
||||||
sudo nano admin/nginx.conf
|
sudo nano admin/nginx.conf
|
||||||
sudo nano web/nginx.conf
|
sudo nano web/nginx.conf
|
||||||
# proxy_pass http://127.0.0.1:8000/; => proxy_pass http://192.168.2.3:8000/;
|
|
||||||
```
|
```
|
||||||
|
~~proxy_pass http://127.0.0.1:8000/;~~
|
||||||
|
|
||||||
|
proxy_pass http://192.168.0.2:8000/;
|
||||||
|
|
||||||
Build web for production
|
Build web for production
|
||||||
```
|
```
|
||||||
|
|
|
@ -110,24 +110,23 @@ def generate_excel(report, space_name, reporting_start_datetime_local, reporting
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Space:'
|
ws['B3'] = 'Space:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = space_name
|
ws['C3'] = space_name
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "~" + reporting_end_datetime_local
|
ws['B5'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['B5'] = 'Reporting End Datetime:'
|
||||||
|
ws['C5'].border = b_border
|
||||||
|
ws['C5'].alignment = b_c_alignment
|
||||||
|
ws['C5'] = reporting_end_datetime_local
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B6'].border = f_border
|
ws['B6'].border = f_border
|
||||||
|
|
|
@ -110,24 +110,23 @@ def generate_excel(report, space_name, reporting_start_datetime_local, reporting
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Space:'
|
ws['B3'] = 'Space:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = space_name
|
ws['C3'] = space_name
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Datetime:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "~" + reporting_end_datetime_local
|
ws['B5'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['B5'] = 'Reporting End Datetime:'
|
||||||
|
ws['C5'].border = b_border
|
||||||
|
ws['C5'].alignment = b_c_alignment
|
||||||
|
ws['C5'] = reporting_end_datetime_local
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B6'].border = f_border
|
ws['B6'].border = f_border
|
||||||
|
|
|
@ -110,24 +110,23 @@ def generate_excel(report, space_name, reporting_start_datetime_local, reporting
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Space:'
|
ws['B3'] = 'Space:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = space_name
|
ws['C3'] = space_name
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Datetime:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "~" + reporting_end_datetime_local
|
ws['B5'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['B5'] = 'Reporting End Datetime:'
|
||||||
|
ws['C5'].border = b_border
|
||||||
|
ws['C5'].alignment = b_c_alignment
|
||||||
|
ws['C5'] = reporting_end_datetime_local
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B6'].border = f_border
|
ws['B6'].border = f_border
|
||||||
|
|
|
@ -110,24 +110,23 @@ def generate_excel(report, space_name, reporting_start_datetime_local, reporting
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Space:'
|
ws['B3'] = 'Space:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = space_name
|
ws['C3'] = space_name
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Datetime:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "~" + reporting_end_datetime_local
|
ws['B5'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['B5'] = 'Reporting End Datetime:'
|
||||||
|
ws['C5'].border = b_border
|
||||||
|
ws['C5'].alignment = b_c_alignment
|
||||||
|
ws['C5'] = reporting_end_datetime_local
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B6'].border = f_border
|
ws['B6'].border = f_border
|
||||||
|
|
|
@ -120,31 +120,29 @@ def generate_excel(report,
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Name:'
|
ws['B3'] = 'Name:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = name
|
ws['C3'] = name
|
||||||
|
|
||||||
ws['D3'].font = name_font
|
|
||||||
ws['D3'].alignment = b_r_alignment
|
ws['D3'].alignment = b_r_alignment
|
||||||
ws['D3'] = 'Period:'
|
ws['D3'] = 'Period:'
|
||||||
ws['E3'].border = b_border
|
ws['E3'].border = b_border
|
||||||
ws['E3'].alignment = b_c_alignment
|
ws['E3'].alignment = b_c_alignment
|
||||||
ws['E3'].font = name_font
|
|
||||||
ws['E3'] = period_type
|
ws['E3'] = period_type
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].font = name_font
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'] = reporting_start_datetime_local + "__" + reporting_end_datetime_local
|
|
||||||
ws.merge_cells("G3:H3")
|
ws['D4'].alignment = b_r_alignment
|
||||||
|
ws['D4'] = 'Reporting End Datetime:'
|
||||||
|
ws['E4'].border = b_border
|
||||||
|
ws['E4'].alignment = b_c_alignment
|
||||||
|
ws['E4'] = reporting_end_datetime_local
|
||||||
|
|
||||||
if "reporting_period" not in report.keys() or \
|
if "reporting_period" not in report.keys() or \
|
||||||
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
||||||
|
|
|
@ -120,32 +120,29 @@ def generate_excel(report,
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Name:'
|
ws['B3'] = 'Name:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = name
|
ws['C3'] = name
|
||||||
|
|
||||||
ws['D3'].font = name_font
|
|
||||||
ws['D3'].alignment = b_r_alignment
|
ws['D3'].alignment = b_r_alignment
|
||||||
ws['D3'] = 'Period:'
|
ws['D3'] = 'Period:'
|
||||||
ws['E3'].border = b_border
|
ws['E3'].border = b_border
|
||||||
ws['E3'].alignment = b_c_alignment
|
ws['E3'].alignment = b_c_alignment
|
||||||
ws['E3'].font = name_font
|
|
||||||
ws['E3'] = period_type
|
ws['E3'] = period_type
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local[:10] + "__" + reporting_end_datetime_local[:10]
|
ws['D4'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['D4'] = 'Reporting End Datetime:'
|
||||||
|
ws['E4'].border = b_border
|
||||||
|
ws['E4'].alignment = b_c_alignment
|
||||||
|
ws['E4'] = reporting_end_datetime_local
|
||||||
|
|
||||||
if "reporting_period" not in report.keys() or \
|
if "reporting_period" not in report.keys() or \
|
||||||
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
||||||
|
|
|
@ -117,32 +117,29 @@ def generate_excel(report,
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Name:'
|
ws['B3'] = 'Name:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = name
|
ws['C3'] = name
|
||||||
|
|
||||||
ws['D3'].font = name_font
|
|
||||||
ws['D3'].alignment = b_r_alignment
|
ws['D3'].alignment = b_r_alignment
|
||||||
ws['D3'] = 'Period:'
|
ws['D3'] = 'Period:'
|
||||||
ws['E3'].border = b_border
|
ws['E3'].border = b_border
|
||||||
ws['E3'].alignment = b_c_alignment
|
ws['E3'].alignment = b_c_alignment
|
||||||
ws['E3'].font = name_font
|
|
||||||
ws['E3'] = period_type
|
ws['E3'] = period_type
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "__" + reporting_end_datetime_local
|
ws['D4'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['D4'] = 'Reporting End Datetime:'
|
||||||
|
ws['E4'].border = b_border
|
||||||
|
ws['E4'].alignment = b_c_alignment
|
||||||
|
ws['E4'] = reporting_end_datetime_local
|
||||||
|
|
||||||
if "reporting_period" not in report.keys() or \
|
if "reporting_period" not in report.keys() or \
|
||||||
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
||||||
|
|
|
@ -118,30 +118,29 @@ def generate_excel(report,
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Name:'
|
ws['B3'] = 'Name:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = name
|
ws['C3'] = name
|
||||||
|
|
||||||
ws['D3'].font = name_font
|
|
||||||
ws['D3'].alignment = b_r_alignment
|
ws['D3'].alignment = b_r_alignment
|
||||||
ws['D3'] = 'Period:'
|
ws['D3'] = 'Period:'
|
||||||
ws['E3'].border = b_border
|
ws['E3'].border = b_border
|
||||||
ws['E3'].alignment = b_c_alignment
|
ws['E3'].alignment = b_c_alignment
|
||||||
ws['E3'].font = name_font
|
|
||||||
ws['E3'] = period_type
|
ws['E3'] = period_type
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "__" + reporting_end_datetime_local
|
ws['D4'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['D4'] = 'Reporting End Datetime:'
|
||||||
|
ws['E4'].border = b_border
|
||||||
|
ws['E4'].alignment = b_c_alignment
|
||||||
|
ws['E4'] = reporting_end_datetime_local
|
||||||
|
|
||||||
if "reporting_period" not in report.keys() or \
|
if "reporting_period" not in report.keys() or \
|
||||||
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
||||||
|
|
|
@ -120,32 +120,29 @@ def generate_excel(report,
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Name:'
|
ws['B3'] = 'Name:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = name
|
ws['C3'] = name
|
||||||
|
|
||||||
ws['D3'].font = name_font
|
|
||||||
ws['D3'].alignment = b_r_alignment
|
ws['D3'].alignment = b_r_alignment
|
||||||
ws['D3'] = 'Period:'
|
ws['D3'] = 'Period:'
|
||||||
ws['E3'].border = b_border
|
ws['E3'].border = b_border
|
||||||
ws['E3'].alignment = b_c_alignment
|
ws['E3'].alignment = b_c_alignment
|
||||||
ws['E3'].font = name_font
|
|
||||||
ws['E3'] = period_type
|
ws['E3'] = period_type
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].font = name_font
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'] = reporting_start_datetime_local + "__" + reporting_end_datetime_local
|
|
||||||
ws['G3'].border = b_border
|
ws['D4'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['D4'] = 'Reporting End Datetime:'
|
||||||
|
ws['E4'].border = b_border
|
||||||
|
ws['E4'].alignment = b_c_alignment
|
||||||
|
ws['E4'] = reporting_end_datetime_local
|
||||||
|
|
||||||
if "reporting_period" not in report.keys() or \
|
if "reporting_period" not in report.keys() or \
|
||||||
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
||||||
|
|
|
@ -118,30 +118,29 @@ def generate_excel(report,
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Name:'
|
ws['B3'] = 'Name:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = name
|
ws['C3'] = name
|
||||||
|
|
||||||
ws['D3'].font = name_font
|
|
||||||
ws['D3'].alignment = b_r_alignment
|
ws['D3'].alignment = b_r_alignment
|
||||||
ws['D3'] = 'Period:'
|
ws['D3'] = 'Period:'
|
||||||
ws['E3'].border = b_border
|
ws['E3'].border = b_border
|
||||||
ws['E3'].alignment = b_c_alignment
|
ws['E3'].alignment = b_c_alignment
|
||||||
ws['E3'].font = name_font
|
|
||||||
ws['E3'] = period_type
|
ws['E3'] = period_type
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Date:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "__" + reporting_end_datetime_local
|
ws['D4'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['D4'] = 'Reporting End Datetime:'
|
||||||
|
ws['E4'].border = b_border
|
||||||
|
ws['E4'].alignment = b_c_alignment
|
||||||
|
ws['E4'] = reporting_end_datetime_local
|
||||||
|
|
||||||
if "reporting_period" not in report.keys() or \
|
if "reporting_period" not in report.keys() or \
|
||||||
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
"names" not in report['reporting_period'].keys() or len(report['reporting_period']['names']) == 0:
|
||||||
|
|
|
@ -110,24 +110,23 @@ def generate_excel(report, space_name, reporting_start_datetime_local, reporting
|
||||||
ws.add_image(img, 'A1')
|
ws.add_image(img, 'A1')
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws.row_dimensions[3].height = 60
|
|
||||||
|
|
||||||
ws['B3'].font = name_font
|
|
||||||
ws['B3'].alignment = b_r_alignment
|
ws['B3'].alignment = b_r_alignment
|
||||||
ws['B3'] = 'Space:'
|
ws['B3'] = 'Space:'
|
||||||
ws['C3'].border = b_border
|
ws['C3'].border = b_border
|
||||||
ws['C3'].alignment = b_c_alignment
|
ws['C3'].alignment = b_c_alignment
|
||||||
ws['C3'].font = name_font
|
|
||||||
ws['C3'] = space_name
|
ws['C3'] = space_name
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Datetime:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "~" + reporting_end_datetime_local
|
ws['B5'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['B5'] = 'Reporting End Datetime:'
|
||||||
|
ws['C5'].border = b_border
|
||||||
|
ws['C5'].alignment = b_c_alignment
|
||||||
|
ws['C5'] = reporting_end_datetime_local
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B6'].border = f_border
|
ws['B6'].border = f_border
|
||||||
|
|
|
@ -120,14 +120,17 @@ def generate_excel(report, space_name, reporting_start_datetime_local, reporting
|
||||||
ws['C3'].font = name_font
|
ws['C3'].font = name_font
|
||||||
ws['C3'] = space_name
|
ws['C3'] = space_name
|
||||||
|
|
||||||
ws['F3'].font = name_font
|
ws['B4'].alignment = b_r_alignment
|
||||||
ws['F3'].alignment = b_r_alignment
|
ws['B4'] = 'Reporting Start Datetime:'
|
||||||
ws['F3'] = 'Datetime:'
|
ws['C4'].border = b_border
|
||||||
ws['G3'].border = b_border
|
ws['C4'].alignment = b_c_alignment
|
||||||
ws['G3'].alignment = b_c_alignment
|
ws['C4'] = reporting_start_datetime_local
|
||||||
ws['G3'].font = name_font
|
|
||||||
ws['G3'] = reporting_start_datetime_local + "~" + reporting_end_datetime_local
|
ws['B5'].alignment = b_r_alignment
|
||||||
ws.merge_cells("G3:H3")
|
ws['B5'] = 'Reporting End Datetime:'
|
||||||
|
ws['C5'].border = b_border
|
||||||
|
ws['C5'].alignment = b_c_alignment
|
||||||
|
ws['C5'] = reporting_end_datetime_local
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
ws['B6'].border = f_border
|
ws['B6'].border = f_border
|
||||||
|
|
Loading…
Reference in New Issue