qrpa 1.0.67__py3-none-any.whl → 1.0.69__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/shein_excel.py +7 -6
- qrpa/shein_lib.py +21 -19
- {qrpa-1.0.67.dist-info → qrpa-1.0.69.dist-info}/METADATA +1 -1
- {qrpa-1.0.67.dist-info → qrpa-1.0.69.dist-info}/RECORD +6 -6
- {qrpa-1.0.67.dist-info → qrpa-1.0.69.dist-info}/WHEEL +0 -0
- {qrpa-1.0.67.dist-info → qrpa-1.0.69.dist-info}/top_level.txt +0 -0
qrpa/shein_excel.py
CHANGED
|
@@ -281,11 +281,11 @@ class SheinExcel:
|
|
|
281
281
|
cache_file_excel = f'{self.config.auto_dir}/shein/cache/shein_return_order_list_excel_{start_date}_{end_date}.json'
|
|
282
282
|
write_dict_to_file(cache_file_excel, excel_data)
|
|
283
283
|
|
|
284
|
-
sheet_name = '希音退货列表'
|
|
285
|
-
batch_excel_operations(self.config.excel_return_list, [
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
])
|
|
284
|
+
# sheet_name = '希音退货列表'
|
|
285
|
+
# batch_excel_operations(self.config.excel_return_list, [
|
|
286
|
+
# (sheet_name, 'write', excel_data, ['W', 'Z']),
|
|
287
|
+
# (sheet_name, 'format', self.format_return_list)
|
|
288
|
+
# ])
|
|
289
289
|
|
|
290
290
|
excel_data = [header]
|
|
291
291
|
cache_file = f'{self.config.auto_dir}/shein/cache/shein_return_order_list_{TimeUtils.today_date()}.json'
|
|
@@ -381,7 +381,8 @@ class SheinExcel:
|
|
|
381
381
|
|
|
382
382
|
batch_excel_operations(self.config.excel_return_list, [
|
|
383
383
|
(sheet_name, 'write', excel_data, ['W', 'Z']),
|
|
384
|
-
(sheet_name, 'format', self.format_return_list)
|
|
384
|
+
(sheet_name, 'format', self.format_return_list),
|
|
385
|
+
('Sheet1', 'delete')
|
|
385
386
|
])
|
|
386
387
|
|
|
387
388
|
def format_return_list(self, sheet):
|
qrpa/shein_lib.py
CHANGED
|
@@ -234,10 +234,11 @@ class SheinLib:
|
|
|
234
234
|
|
|
235
235
|
url = f"https://sso.geiwohuo.com/pfmp/returnOrder/page"
|
|
236
236
|
payload = {
|
|
237
|
-
"
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
237
|
+
"returnOrderType": 1, # 只查询退货
|
|
238
|
+
"addTimeStart" : f"{start_date} 00:00:00",
|
|
239
|
+
"addTimeEnd" : f"{end_date} 23:59:59",
|
|
240
|
+
"page" : page_num,
|
|
241
|
+
"perPage" : page_size
|
|
241
242
|
}
|
|
242
243
|
response_text = fetch(self.web_page, url, payload)
|
|
243
244
|
error_code = response_text.get('code')
|
|
@@ -259,30 +260,31 @@ class SheinLib:
|
|
|
259
260
|
today_list_item = []
|
|
260
261
|
# 过滤 退货出库时间 是昨天的
|
|
261
262
|
for item in list_item:
|
|
262
|
-
has_valid_package = item.get('hasPackage') == 1
|
|
263
|
-
is_valid_yesterday = TimeUtils.is_yesterday(item['completeTime'], None) if item.get('completeTime') else False
|
|
264
263
|
returnOrderId = item['id']
|
|
265
|
-
item['return_box_detail'] = []
|
|
266
|
-
item['qc_report_url'] = ''
|
|
267
|
-
item['report_url'] = ''
|
|
268
264
|
item['store_username'] = self.store_username
|
|
269
265
|
item['store_name'] = self.store_name
|
|
270
266
|
item['store_manager'] = self.config.shein_store_manager.get(str(self.store_username).lower())
|
|
271
|
-
if has_valid_package:
|
|
272
|
-
return_box_detail = self.get_return_order_box_detail(returnOrderId)
|
|
273
|
-
if len(return_box_detail) > 0:
|
|
274
267
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
268
|
+
item['qc_report_url'] = ''
|
|
269
|
+
if int(item['returnScrapType']) == 1:
|
|
270
|
+
purchaseCode = item['sellerOrderNo']
|
|
271
|
+
delivery_code = item['sellerDeliveryNo']
|
|
272
|
+
item['qc_report_url'] = self.get_qc_report_url(delivery_code, purchaseCode)
|
|
273
|
+
|
|
274
|
+
item['report_url'] = ''
|
|
275
|
+
if int(item['returnScrapType']) == 2:
|
|
276
|
+
item['report_url'] = self.get_inspect_report_url(returnOrderId)
|
|
279
277
|
|
|
280
|
-
|
|
281
|
-
item['report_url'] = self.get_inspect_report_url(returnOrderId)
|
|
278
|
+
item['return_box_detail'] = []
|
|
282
279
|
|
|
280
|
+
all_list_item.append(item)
|
|
281
|
+
has_valid_package = item.get('hasPackage') == 1
|
|
282
|
+
if has_valid_package:
|
|
283
|
+
return_box_detail = self.get_return_order_box_detail(returnOrderId)
|
|
284
|
+
if len(return_box_detail) > 0:
|
|
283
285
|
item['return_box_detail'] = return_box_detail
|
|
284
286
|
|
|
285
|
-
|
|
287
|
+
is_valid_yesterday = TimeUtils.is_yesterday(item['completeTime'], None) if item.get('completeTime') else False
|
|
286
288
|
if is_valid_yesterday:
|
|
287
289
|
today_list_item.append(item)
|
|
288
290
|
|
|
@@ -10,8 +10,8 @@ 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=
|
|
14
|
-
qrpa/shein_lib.py,sha256=
|
|
13
|
+
qrpa/shein_excel.py,sha256=1F9QMMsaihDfwr0ajSSQdXksBCjuKSPwMynfP7Jlkso,124825
|
|
14
|
+
qrpa/shein_lib.py,sha256=fTrSRnbAb1X9BUr6_ZrBjWDHbwbRz1wIe5kmGHs2r60,126731
|
|
15
15
|
qrpa/shein_mysql.py,sha256=SrgBYPNWaKHIpD5Q7hqz3GWvytXO8u9SPvKxJvLwYsI,2720
|
|
16
16
|
qrpa/shein_sqlite.py,sha256=ZQwD0Gz81q9WY7tY2HMEYvSF9r3N_G_Aur3bYfST9WY,5707
|
|
17
17
|
qrpa/shein_ziniao.py,sha256=Xc4pgSa7PxgmR24rClgz_HcTRb2fdbXp6slzfpCOThI,18745
|
|
@@ -24,7 +24,7 @@ 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_product_model.py,sha256=qViI_Ik3SkXXxqJ1nXjimvfB_a5uiwW9RXL0fOreBao,18880
|
|
26
26
|
qrpa/mysql_module/shein_return_order_model.py,sha256=Zt-bGOH_kCDbakW7uaTmqqo_qTT8v424yidcYSfWvWM,26562
|
|
27
|
-
qrpa-1.0.
|
|
28
|
-
qrpa-1.0.
|
|
29
|
-
qrpa-1.0.
|
|
30
|
-
qrpa-1.0.
|
|
27
|
+
qrpa-1.0.69.dist-info/METADATA,sha256=aS7CedCLn7LSxrbEBUhcQjfSbTQfiggglh0nG87qxRQ,231
|
|
28
|
+
qrpa-1.0.69.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
qrpa-1.0.69.dist-info/top_level.txt,sha256=F6T5igi0fhXDucPPUbmmSC0qFCDEsH5eVijfVF48OFU,5
|
|
30
|
+
qrpa-1.0.69.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|