fix: 修正共享报工段工时归属拆分

This commit is contained in:
souplearn
2026-07-25 03:05:53 +08:00
parent b0be660999
commit e4dd01bc72
3 changed files with 78 additions and 7 deletions
+3 -1
View File
@@ -188,7 +188,9 @@ def build_report_allocation_drafts(report, schedule: WorkScheduleConfig | None =
target = minutes_by_item.setdefault(item_key, defaultdict(lambda: {key: 0.0 for key in SHIFT_BUCKETS}))
for allocation_date, minutes in _range_allocation_minutes(item_range.start_at, item_range.end_at, schedule).items():
for key in SHIFT_BUCKETS:
target[allocation_date][key] += minutes.get(key, 0.0)
target[allocation_date][key] += minutes.get(key, 0.0) * as_float(
getattr(item_range, "allocation_weight", 1.0)
)
rows: list[ReportAllocationDraft] = []
for item in items: