fix: 修正共享报工段工时归属拆分
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user