fix: 车辆追踪补全所有492辆车的考核目标和月度奖励
通过(归属公司+车型)→考核目标映射,补全109辆无考核记录车辆的考核目标。 含全角/半角括号兼容(现代氢能科技)。 现在492辆车全部有考核目标和月度奖励金额。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -351,13 +351,26 @@ def write_vehicle_tracking_sheet(wb, settle_month, G, master_vehicles, vehicle_p
|
||||
headers += ['本月发放明细','累计已发期数','累计已发金额','剩余可发期数']
|
||||
WH(ws, headers)
|
||||
|
||||
from calc_engine import VEHICLE_TARGET_MAP, RULES
|
||||
|
||||
rn=2
|
||||
for mv in master_vehicles:
|
||||
plate=mv['车牌号']
|
||||
info=vehicle_info.get(plate, {})
|
||||
pays=vehicle_payments.get(plate, [])
|
||||
|
||||
# 补全缺失的考核目标
|
||||
target_name = info.get('考核目标','')
|
||||
monthly_bonus = info.get('月度奖励',0)
|
||||
if not target_name:
|
||||
company = mv.get('归属公司','')
|
||||
vtype = mv.get('车型确定','')
|
||||
mapped = VEHICLE_TARGET_MAP.get((company, vtype))
|
||||
if mapped:
|
||||
target_name, _, monthly_bonus = mapped
|
||||
|
||||
row=[plate,mv.get('车架号',''),mv.get('归属公司',''),mv.get('车型确定',''),
|
||||
info.get('考核目标',''),info.get('月度奖励',0) or '']
|
||||
target_name or '',monthly_bonus or '']
|
||||
|
||||
cum_t=0; cum_a=0
|
||||
for m in range(1, settle_month+1):
|
||||
|
||||
Reference in New Issue
Block a user