qrpa 1.0.43__tar.gz → 1.0.44__tar.gz
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-1.0.43 → qrpa-1.0.44}/PKG-INFO +1 -1
- {qrpa-1.0.43 → qrpa-1.0.44}/pyproject.toml +1 -1
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/fun_excel.py +13 -13
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/shein_excel.py +1 -1
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa.egg-info/PKG-INFO +1 -1
- {qrpa-1.0.43 → qrpa-1.0.44}/README.md +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/RateLimitedSender.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/__init__.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/db_migrator.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/feishu_bot_app.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/feishu_client.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/feishu_logic.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/fun_base.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/fun_file.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/fun_web.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/fun_win.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/shein_daily_report_model.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/shein_lib.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/shein_sqlite.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/shein_ziniao.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/temu_chrome.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/temu_excel.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/temu_lib.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/time_utils.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/time_utils_example.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa/wxwork.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa.egg-info/SOURCES.txt +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa.egg-info/dependency_links.txt +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/qrpa.egg-info/top_level.txt +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/setup.cfg +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/setup.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/tests/test_db_migrator.py +0 -0
- {qrpa-1.0.43 → qrpa-1.0.44}/tests/test_wxwork.py +0 -0
|
@@ -171,34 +171,34 @@ def merge_by_column_v2(sheet, column_name, other_columns):
|
|
|
171
171
|
|
|
172
172
|
log(f'需要合并的列: {all_columns}')
|
|
173
173
|
|
|
174
|
-
# 遍历数据行,从第2
|
|
175
|
-
for row in range(
|
|
174
|
+
# 遍历数据行,从第3行开始比较(因为第1行是表头,第2行是第一个数据行)
|
|
175
|
+
for row in range(3, len(data) + 1):
|
|
176
176
|
log(f'查找 {row}/{len(data)}, 当前值: {data[row-1] if row-1 < len(data) else "超出范围"}, 前一个值: {data[row-2] if row-2 < len(data) else "超出范围"}')
|
|
177
177
|
|
|
178
|
-
#
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if value_changed:
|
|
178
|
+
# 检查值是否发生变化
|
|
179
|
+
if row <= len(data) and data[row - 1] != data[row - 2]:
|
|
182
180
|
# 值发生变化,处理前一组
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
merge_row_ranges.append((start_row, end_row))
|
|
181
|
+
end_row = row - 1
|
|
182
|
+
log(f'添加合并范围: {start_row} 到 {end_row}')
|
|
183
|
+
merge_row_ranges.append((start_row, end_row))
|
|
187
184
|
start_row = row
|
|
188
185
|
|
|
189
186
|
# 处理最后一组数据(循环结束后,start_row 到数据末尾)
|
|
190
187
|
if start_row <= len(data):
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
end_row = len(data)
|
|
189
|
+
log(f'处理最后一组: {start_row} 到 {end_row}')
|
|
190
|
+
merge_row_ranges.append((start_row, end_row))
|
|
193
191
|
|
|
194
192
|
log(f'行合并范围: {merge_row_ranges}')
|
|
195
193
|
|
|
196
194
|
# 对每个行范围,在所有指定列中执行合并
|
|
197
195
|
for start_row, end_row in merge_row_ranges:
|
|
198
|
-
if start_row < end_row: #
|
|
196
|
+
if start_row < end_row: # 只有当开始行小于结束行时才合并(多行)
|
|
199
197
|
for col_name in all_columns:
|
|
200
198
|
log(f'处理 {col_name}{start_row}:{col_name}{end_row} merge')
|
|
201
199
|
sheet.range(f'{col_name}{start_row}:{col_name}{end_row}').merge()
|
|
200
|
+
elif start_row == end_row:
|
|
201
|
+
log(f'单行数据无需合并: {start_row} 到 {end_row}')
|
|
202
202
|
else:
|
|
203
203
|
log(f'跳过无效合并范围: {start_row} 到 {end_row}')
|
|
204
204
|
|
|
@@ -217,7 +217,7 @@ class SheinExcel:
|
|
|
217
217
|
format_to_money(sheet, ['单价', '金额', '成本'])
|
|
218
218
|
column_to_right(sheet, ['单价', '金额', '成本'])
|
|
219
219
|
wrap_column(sheet, ['退货原因', '退货地址', '入库问题图片地址'])
|
|
220
|
-
autofit_column(sheet, ['店铺别名', 'SKC信息'])
|
|
220
|
+
autofit_column(sheet, ['店铺信息','店铺别名', 'SKC信息'])
|
|
221
221
|
column_to_left(sheet, ['店铺信息', '商家SKU', '供方货号', '属性集', 'SKC信息', '退货地址'])
|
|
222
222
|
specify_column_width(sheet, ['退货原因', 'SKC信息', '商家SKU', '退货地址'], 200 / 6)
|
|
223
223
|
InsertImageV2(sheet, ['SKC图片'])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|