Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
data_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7da52229
authored
Aug 27, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
modify py script
parent
a70c40f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
handle.py
handle.py
View file @
7da52229
...
@@ -62,13 +62,13 @@ def resolve(file_name: str, supplier_id: int):
...
@@ -62,13 +62,13 @@ def resolve(file_name: str, supplier_id: int):
brand_name
=
str
(
df
.
loc
[
i
,
"品牌"
])
brand_name
=
str
(
df
.
loc
[
i
,
"品牌"
])
if
goods_name
.
strip
()
==
""
or
brand_name
.
strip
()
==
""
or
goods_name
.
strip
()
==
"nan"
or
brand_name
.
strip
()
==
"nan"
:
if
goods_name
.
strip
()
==
""
or
brand_name
.
strip
()
==
""
or
goods_name
.
strip
()
==
"nan"
or
brand_name
.
strip
()
==
"nan"
:
continue
continue
stock
=
str
(
int
(
str
(
df
.
loc
[
i
,
"库存"
])
))
stock
=
str
(
int
(
df
.
loc
[
i
,
"库存"
]
))
moq
=
str
(
int
(
str
(
df
.
loc
[
i
,
"起订量"
])
))
moq
=
str
(
int
(
df
.
loc
[
i
,
"起订量"
]
))
mpq
=
str
(
int
(
str
(
df
.
loc
[
i
,
"MPQ(最小包装数量)"
])
))
mpq
=
str
(
int
(
df
.
loc
[
i
,
"MPQ(最小包装数量)"
]
))
price_is_us
=
False
price_is_us
=
False
supp_id
=
int
(
supplier_id
)
supp_id
=
int
(
supplier_id
)
supplier_name
=
""
supplier_name
=
""
multiple
=
str
(
int
(
str
(
df
.
loc
[
i
,
"增量"
])
))
multiple
=
str
(
int
(
df
.
loc
[
i
,
"增量"
]
))
batch_sn
=
{
batch_sn
=
{
str
(
df
.
loc
[
i
,
"批次"
]):
int
(
df
.
loc
[
i
,
"库存"
]),
str
(
df
.
loc
[
i
,
"批次"
]):
int
(
df
.
loc
[
i
,
"库存"
]),
}
}
...
@@ -123,7 +123,7 @@ def process(url: str, supplier_id: int):
...
@@ -123,7 +123,7 @@ def process(url: str, supplier_id: int):
f
.
write
(
response
.
content
)
f
.
write
(
response
.
content
)
resolve
(
absolute_path
,
supplier_id
)
resolve
(
absolute_path
,
supplier_id
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
e
)
logging
.
error
(
e
)
finally
:
finally
:
if
abs_path
!=
""
:
if
abs_path
!=
""
:
os
.
remove
(
abs_path
)
os
.
remove
(
abs_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment