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 6f2011d7
authored
May 08, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
effect添加mapping记录
1 parent
8f0f620a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
scene_refactor_data/scene_split_processor.py
scene_refactor_data/scene_split_processor.py
View file @
6f2011d
...
...
@@ -1647,6 +1647,7 @@ class SceneSplitProcessor:
continue
# 解析旧生效记录
old_effect_id
=
old_effect_record
[
0
]
merchant_id
=
old_effect_record
[
1
]
merchant_name
=
old_effect_record
[
2
]
rule_type
=
old_effect_record
[
3
]
...
...
@@ -1738,11 +1739,21 @@ class SceneSplitProcessor:
"""
if
self
.
db
.
execute_update
(
insert_sql
):
insert_count
+=
1
self
.
logger
.
info
(
f
" 插入新记录: rule_id={new_settle_rule_id}, division_rule_id={new_division_rule_id_str}, base_scene_code={base_scene_code}"
)
# 获取新插入的ID
new_id_sql
=
"SELECT LAST_INSERT_ID();"
result
=
self
.
db
.
execute_query_one
(
new_id_sql
)
if
result
:
new_id
=
result
[
0
]
# 保存ID映射关系
self
.
id_mapper
.
add_mapping
(
table_name
,
old_effect_id
,
new_id
,
base_scene_code
)
insert_count
+=
1
self
.
logger
.
debug
(
f
" 插入新记录: old_id={old_effect_id} -> new_id={new_id}, rule_id={new_settle_rule_id}, division_rule_id={new_division_rule_id_str}, base_scene_code={base_scene_code}"
)
else
:
error_count
+=
1
self
.
logger
.
error
(
f
" 获取新ID失败: rule_id={new_settle_rule_id}"
)
else
:
error_count
+=
1
self
.
logger
.
info
(
f
" 插入失败: rule_id={new_settle_rule_id}"
)
self
.
logger
.
error
(
f
" 插入失败: rule_id={new_settle_rule_id}"
)
self
.
logger
.
info
(
f
" 财务分账规则处理完成,共插入:{insert_count} 条新记录,跳过:{skip_count} 条,错误:{error_count} 条"
)
...
...
@@ -1790,6 +1801,7 @@ class SceneSplitProcessor:
continue
# 解析旧生效记录
old_effect_id
=
old_effect_record
[
0
]
merchant_id
=
old_effect_record
[
1
]
merchant_name
=
old_effect_record
[
2
]
rule_type
=
old_effect_record
[
3
]
...
...
@@ -1851,8 +1863,18 @@ class SceneSplitProcessor:
"""
if
self
.
db
.
execute_update
(
insert_sql
):
insert_count
+=
1
self
.
logger
.
info
(
f
" 插入新记录: rule_id={new_reconciliation_rule_id}, base_scene_code={base_scene_code}"
)
# 获取新插入的ID
new_id_sql
=
"SELECT LAST_INSERT_ID();"
result
=
self
.
db
.
execute_query_one
(
new_id_sql
)
if
result
:
new_id
=
result
[
0
]
# 保存ID映射关系
self
.
id_mapper
.
add_mapping
(
table_name
,
old_effect_id
,
new_id
,
base_scene_code
)
insert_count
+=
1
self
.
logger
.
debug
(
f
" 插入新记录: old_id={old_effect_id} -> new_id={new_id}, rule_id={new_reconciliation_rule_id}, base_scene_code={base_scene_code}"
)
else
:
error_count
+=
1
self
.
logger
.
error
(
f
" 获取新ID失败: rule_id={new_reconciliation_rule_id}"
)
else
:
error_count
+=
1
self
.
logger
.
error
(
f
" 插入失败: rule_id={new_reconciliation_rule_id}"
)
...
...
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