This commit is contained in:
2025-06-20 10:34:34 +08:00
parent 1463ff16b6
commit 40f71e47c7
2 changed files with 3 additions and 1 deletions

BIN
data.db Normal file

Binary file not shown.

View File

@ -76,7 +76,7 @@ def get_table_record(id, page_token=None):
.field_names(["规格", "外库数量", "排序", "已盘"]) .field_names(["规格", "外库数量", "排序", "已盘"])
.sort([Sort.builder() .sort([Sort.builder()
.field_name("排序") .field_name("排序")
.desc(False) .desc(True)
.build() .build()
]) ])
.automatic_fields(True) .automatic_fields(True)
@ -166,6 +166,7 @@ def init_db():
youxin, page_token= get_table_record(application.config['YOUXIN_ID']) youxin, page_token= get_table_record(application.config['YOUXIN_ID'])
for i in youxin: for i in youxin:
print(i, page_token)
inv = Inventory() inv = Inventory()
inv.tag = i['tag'] inv.tag = i['tag']
inv.amount = i['amount'] inv.amount = i['amount']
@ -178,6 +179,7 @@ def init_db():
if not youxin: if not youxin:
break break
for i in youxin: for i in youxin:
print(i, page_token)
inv = Inventory() inv = Inventory()
inv.tag = i['tag'] inv.tag = i['tag']
inv.amount = i['amount'] inv.amount = i['amount']