qrpa 1.0.58__py3-none-any.whl → 1.0.60__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of qrpa might be problematic. Click here for more details.

qrpa/fun_excel.py CHANGED
@@ -2109,11 +2109,12 @@ def format_to_month(sheet, columns=None):
2109
2109
 
2110
2110
  def add_sum_for_cell(sheet, col_list, row=2):
2111
2111
  last_row = sheet.range('A' + str(sheet.cells.last_cell.row)).end('up').row
2112
- for col_name in col_list:
2113
- col_letter = find_column_by_data(sheet, 1, col_name)
2114
- sheet.range(f'{col_letter}{row}').formula = f'=SUM({col_letter}{row + 1}:{col_letter}{last_row})'
2115
- sheet.range(f'{col_letter}{row}').api.Font.Color = 255
2116
- sheet.range(f'{col_letter}:{col_letter}').autofit()
2112
+ if last_row > row:
2113
+ for col_name in col_list:
2114
+ col_letter = find_column_by_data(sheet, 1, col_name)
2115
+ sheet.range(f'{col_letter}{row}').formula = f'=SUM({col_letter}{row + 1}:{col_letter}{last_row})'
2116
+ sheet.range(f'{col_letter}{row}').api.Font.Color = 255
2117
+ sheet.range(f'{col_letter}:{col_letter}').autofit()
2117
2118
 
2118
2119
  def clear_for_cell(sheet, col_list, row=2):
2119
2120
  last_row = sheet.range('A' + str(sheet.cells.last_cell.row)).end('up').row
qrpa/shein_excel.py CHANGED
@@ -38,13 +38,19 @@ class SheinExcel:
38
38
  summary_excel_data = [header] + summary_excel_data
39
39
  log(summary_excel_data)
40
40
  sheet_name = '新品转备货款明细'
41
- write_data(excel_path, sheet_name, summary_excel_data)
42
- self.format_week_ntb(excel_path, sheet_name)
41
+
42
+ # write_data(excel_path, sheet_name, summary_excel_data)
43
+ # self.format_week_ntb(excel_path, sheet_name)
44
+
45
+ batch_excel_operations(excel_path, [
46
+ (sheet_name, 'write', summary_excel_data),
47
+ (sheet_name, 'format', self.format_week_ntb),
48
+ ])
49
+
43
50
  dict_key = f'{self.config.auto_dir}/shein/dict/dict_store_bak_stat_{TimeUtils.today_date()}.json'
44
51
  write_dict_to_file(dict_key, dict_store_bak_stat)
45
52
 
46
- def format_week_ntb(self, excel_path, sheet_name):
47
- app, wb, sheet = open_excel(excel_path, sheet_name)
53
+ def format_week_ntb(self, sheet):
48
54
  beautify_title(sheet)
49
55
  format_to_date(sheet, ['统计日期'])
50
56
  format_to_percent(sheet, ['占比'])
@@ -53,8 +59,6 @@ class SheinExcel:
53
59
  autofit_column(sheet, ['店铺名称', '商品信息', '第4周SKC点击率/SKC转化率', '第4周SKC销量/SKC曝光'])
54
60
  add_borders(sheet)
55
61
  InsertImageV2(sheet, ['SKC图片'], 'shein', 120)
56
- wb.save()
57
- close_excel(app, wb)
58
62
 
59
63
  def dealFundsExcelFormat(self, sheet):
60
64
  col_a = find_column_by_data(sheet, 1, '店铺名称')
@@ -1445,6 +1449,7 @@ class SheinExcel:
1445
1449
  sheet.range(f'{target_month}:{target_month}').autofit()
1446
1450
  wb.save()
1447
1451
  close_excel(app, wb)
1452
+ WxWorkBot('b30aaa8d-1a1f-4378-841a-8b0f8295f2d9').send_file(excel_path_month)
1448
1453
 
1449
1454
  def write_summary_algorithm_1(self):
1450
1455
  excel_path = self.config.excel_shein_finance_month_report_summary
@@ -1520,6 +1525,7 @@ class SheinExcel:
1520
1525
  continue
1521
1526
  row[2] = dict_store_manager_shein.get(str(mall_name).lower())
1522
1527
  self.write_to_one(filtered_value, excel_path, sheet_name)
1528
+ WxWorkBot('b30aaa8d-1a1f-4378-841a-8b0f8295f2d9').send_file(excel_path)
1523
1529
 
1524
1530
  def sumary_part(self):
1525
1531
  excel_path = self.config.excel_shein_finance_month_report_summary
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qrpa
3
- Version: 1.0.58
3
+ Version: 1.0.60
4
4
  Summary: qsir's rpa library
5
5
  Author: QSir
6
6
  Author-email: QSir <1171725650@qq.com>
@@ -5,12 +5,12 @@ qrpa/feishu_bot_app.py,sha256=6r2YqCAMUN7y3F7onoABRmHC7S-UPOLHwbhsQnQ3IRc,9452
5
5
  qrpa/feishu_client.py,sha256=gXvyhf7r-IqeDhPjM01SfsGf17t8g1ZwUAkhymBkBeg,17544
6
6
  qrpa/feishu_logic.py,sha256=yuwb-LeZiHKGlz-W8JobinorHonVa8L-5h12WxnU7_Q,67508
7
7
  qrpa/fun_base.py,sha256=lMzqPwsbVfe968CUR2MVNImzIskIUZqPCE2tWxYqb5o,10728
8
- qrpa/fun_excel.py,sha256=S9MmJ9Z4ATv8t-rhK_xE4Gidd8rmcJR0XIxaTsFcNJE,117341
8
+ qrpa/fun_excel.py,sha256=-GFtjg0LeiiXrpTU5RtMlBUHl05mqzdHCzIxlssT59U,117385
9
9
  qrpa/fun_file.py,sha256=yzjDV16WL5vRys7J4uQcNzIFkX4D5MAlSCwxcD-mwQo,11966
10
10
  qrpa/fun_web.py,sha256=F6cxwwOxB8twg2XK73oAvKla0FqpwDYJiM37CWmFwXo,6322
11
11
  qrpa/fun_win.py,sha256=-LnTeocdTt72NVH6VgLdpAT9_C5oV9okeudXG6CftMA,8034
12
12
  qrpa/shein_daily_report_model.py,sha256=H8oZmIN5Pyqe306W1_xuz87lOqLQ_LI5RjXbaxDkIzE,12589
13
- qrpa/shein_excel.py,sha256=WhICroRITi9pD_BhddRyk_SpB_d166Td58hzY7cJxDY,124294
13
+ qrpa/shein_excel.py,sha256=F1tH0-GZgTAw8T-y0VUjovkJL_T7KFHAkOrQ1R51avY,124518
14
14
  qrpa/shein_lib.py,sha256=iqHxngPl5fhopJ3ieNgMY3_Jb3_3MMMjgpmRrOp9BUU,119451
15
15
  qrpa/shein_mysql.py,sha256=MGPJsz13evsLygZWhmitpPzUswiTKZ91VFvr8KA0M40,750
16
16
  qrpa/shein_sqlite.py,sha256=ZQwD0Gz81q9WY7tY2HMEYvSF9r3N_G_Aur3bYfST9WY,5707
@@ -23,7 +23,7 @@ qrpa/time_utils_example.py,sha256=shHOXKKF3QSzb0SHsNc34M61wEkkLuM30U9X1THKNS8,80
23
23
  qrpa/wxwork.py,sha256=gIytG19DZ5g7Tsl0-W3EbjfSnpIqZw-ua24gcB78YEg,11264
24
24
  qrpa/mysql_module/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  qrpa/mysql_module/shein_return_order_model.py,sha256=Zt-bGOH_kCDbakW7uaTmqqo_qTT8v424yidcYSfWvWM,26562
26
- qrpa-1.0.58.dist-info/METADATA,sha256=u1J_SzBHwSfx6zNdsjaFF09ghhSrzW7K5jvT69eyfW8,231
27
- qrpa-1.0.58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- qrpa-1.0.58.dist-info/top_level.txt,sha256=F6T5igi0fhXDucPPUbmmSC0qFCDEsH5eVijfVF48OFU,5
29
- qrpa-1.0.58.dist-info/RECORD,,
26
+ qrpa-1.0.60.dist-info/METADATA,sha256=xXSUIf5ot9asDrF3NTmLD7RV2MyuhOuHWiAZvONgdiw,231
27
+ qrpa-1.0.60.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ qrpa-1.0.60.dist-info/top_level.txt,sha256=F6T5igi0fhXDucPPUbmmSC0qFCDEsH5eVijfVF48OFU,5
29
+ qrpa-1.0.60.dist-info/RECORD,,
File without changes