Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
daw
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d3e145e8
authored
Jul 24, 2026
by
江名洋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 添加门店名称映射以修复匹配错误
1 parent
feca99ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
app/api/__pycache__/endpoints.cpython-313.pyc
app/services/__pycache__/analysis_service.cpython-313.pyc
app/services/analysis_service.py
app/api/__pycache__/endpoints.cpython-313.pyc
View file @
d3e145e
No preview for this file type
app/services/__pycache__/analysis_service.cpython-313.pyc
View file @
d3e145e
No preview for this file type
app/services/analysis_service.py
View file @
d3e145e
...
...
@@ -27,6 +27,14 @@ DATA_FONT = Font(name="微软雅黑", size=10)
RED_FILL
=
PatternFill
(
"solid"
,
fgColor
=
"FFC7CE"
)
YELLOW_FILL
=
PatternFill
(
"solid"
,
fgColor
=
"FFEB9C"
)
GREEN_FILL
=
PatternFill
(
"solid"
,
fgColor
=
"C6EFCE"
)
# 数据库中的商户名 → 主机厂数据中的商户名(门店配置名称映射为 OEM 数据中的名称)
STORE_NAME_MAP
=
{
"漳州市华骏汽车销售服务有限公司"
:
"漳州市华骏天元汽车销售服务有限公司"
,
"中益德诚(河北)新能源汽车有限公司"
:
"中益德诚(河北)新能源汽车有限公司"
,
"龙海智行(上海)汽车科技有限公司"
:
"龙海智行(上海)汽车科技有限公司"
,
"海南丰盛利华汽车销售服务有限公司(鸿蒙)"
:
"海南丰盛利华汽车销售服务有限公司"
,
}
THIN_BORDER
=
Border
(
left
=
Side
(
style
=
"thin"
),
right
=
Side
(
style
=
"thin"
),
top
=
Side
(
style
=
"thin"
),
bottom
=
Side
(
style
=
"thin"
)
...
...
@@ -1198,6 +1206,10 @@ class AnalysisService:
else
:
date_range
=
main_sheet_name
.
strip
(
"()()"
)
# 将数据库中的商户名映射为主机厂数据中的商户名,确保门店与主机厂数据能正确匹配
store_df
[
"门店名"
]
=
store_df
[
"门店名"
]
.
astype
(
str
)
.
str
.
strip
()
.
replace
(
STORE_NAME_MAP
)
factory_df
[
"门店名"
]
=
factory_df
[
"门店名"
]
.
astype
(
str
)
.
str
.
strip
()
merged
=
pd
.
merge
(
store_df
,
factory_df
,
on
=
"门店名"
,
how
=
"left"
,
suffixes
=
(
""
,
"_factory"
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment