Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
data-report
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 f74eb5ae
authored
Aug 14, 2026
by
周立明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
日志
1 parent
41f63cbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
.workbuddy/memory/2026-08-14.md
.workbuddy/memory/2026-08-14.md
View file @
f74eb5a
...
...
@@ -32,3 +32,9 @@
-
验证:
`py_compile`
SYNTAX OK;合成测试门店耗材 G 池净 270.00 ✓。
-
数据影响:2026-06 门店耗材明细 1314 行中
**负数 0 行**
,故重跑 Task #16 门窗耗材值不变;该修复对将来含负数耗材金额的月份/任务统一生效。
`distribute_by_weight`
/
`reconcile_total`
本就支持负 total,无需改。
-
仍提醒:改 .py 后需
`rm -rf __pycache__`
或重启 app.py 进程,否则长运行进程仍用旧字节码。
## 全局"负数金额丢弃"审计(用户问"是否还有其他费用把负数金额丢弃了")
-
全代码仅
`clean_budget_achievement.py`
的 装修摊销 / 门店耗材 两个池(
`compute_renovation_amounts`
/
`compute_consumables_amounts`
)曾用
`if amt <= 0: continue`
整条丢弃负数,均已改
`if amt == 0`
。其余无负数丢弃。
-
`processor.py`
四项成本解析器均只用
`== 0`
跳过(零值),
**负数保留并参与 GMV 占比分摊**
:
`_parse_market_fee`
(
`if fee==0`
)、
`_parse_external_worker_fee`
(
`if fee==0`
)、
`_parse_utility_fee`
(
`if total_fee==0`
)、
`_parse_labor_cost`
(
`if salary==0`
)。下游
`total*ratio`
自然得负份额,不清零。
-
GMV 占比计算
`denom<=0→None`
、
`last_val<0`
回退自身占比:均为占比列正确保护,非丢弃费用金额。
-
**相关口径(未改,供知悉)**
:
`processor.py`
`calc_ratio`
(占比/毛利率百分比列,约281行)
`if result<0: result=0`
把占比下限封 0——负数成本时原始费用金额仍为负,但对应"占比%"列显示为 0。若用户要占比也展示负值需另改此处。
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