Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
dealaccountdata
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 5f342069
authored
May 10, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加注释
1 parent
141d8bb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
scene_refactor_data/scene_split_processor.py
scene_refactor_data/scene_split_processor.py
View file @
5f34206
...
...
@@ -481,6 +481,7 @@ class SceneSplitProcessor:
WHERE division_rule_id = {old_division_id}
AND deleted_flag = 'N';
"""
# 得到原来一个分账规则对应的多个分账分组(全部品类和特殊品类)
records
=
self
.
db
.
execute_query
(
query_sql
)
for
record
in
records
:
...
...
@@ -494,6 +495,7 @@ class SceneSplitProcessor:
dj_cost_convert_rate
=
record
[
8
]
third_party_cost_convert_rate
=
record
[
9
]
# 逐条插入 新的分账规则id+拷贝旧分组数据(数据量:sum( 3 * 每组条数) ),一拆为四,原来那条更新,所以每个场景多3条规则
insert_sql
=
f
"""
INSERT INTO {table_name}
(division_rule_id, group_type, goods_type_group_id, test_flag,
...
...
@@ -752,6 +754,7 @@ class SceneSplitProcessor:
self
.
logger
.
info
(
f
" 找到 {len(mappings)} 条表4的映射关系需要处理"
)
copy_count
=
0
## dj_car_life_goods_type_group,找到所有的old_id对应的多个new_id
for
mapping
in
mappings
:
old_goods_type_group_id
=
mapping
[
0
]
new_goods_type_group_id
=
mapping
[
1
]
...
...
@@ -769,6 +772,7 @@ class SceneSplitProcessor:
"""
records
=
self
.
db
.
execute_query
(
query_sql
)
# 每个old_id原来关联了哪些dj_car_life_goods_type_group
for
record
in
records
:
old_id
=
record
[
0
]
rule_type
=
record
[
1
]
...
...
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