Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
python_resolve_data
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
ef4dc21d
authored
Aug 28, 2024
by
larosa
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add script
parent
49f755c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
chip1stop.py
chip1stop.py
View file @
ef4dc21d
...
...
@@ -181,6 +181,13 @@ class DataUtil:
if
len
(
content_list
[
index
]
.
split
(
"
\t
"
))
!=
len
(
txt_title
):
continue
table
=
dict
()
"""RMB接口 都是txt文件格式"""
table
[
"price_is_us"
]
=
False
table
[
"supplier_name"
]
=
""
table
[
"multiple"
]
=
"1"
table
[
"batch_sn"
]
=
""
table
[
"eccn"
]
=
""
table
[
"mpq"
]
=
"1"
line_arr
=
content_list
[
index
]
.
split
(
"
\t
"
)
for
i
in
range
(
len
(
line_arr
)):
element
=
line_arr
[
i
]
.
replace
(
"
\"
"
,
""
)
...
...
@@ -192,8 +199,11 @@ class DataUtil:
table
[
"brand_name"
]
=
element
if
txt_title
[
i
]
==
"quantity"
:
table
[
"stock"
]
=
element
if
txt_title
[
i
]
==
""
:
table
[
""
]
if
txt_title
[
i
]
==
"MOQ"
:
table
[
"moq"
]
=
element
class
Producer
:
def
__init__
(
self
):
...
...
@@ -221,7 +231,10 @@ class Producer:
except
Exception
as
e
:
print
(
e
)
# TODO 美元和人民币接口的供应商不一样
"""
供应商的名字记得修改
"""
if
__name__
==
'__main__'
:
if
ENV
==
"test"
:
config
=
config_test
...
...
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