Commit 3fb34a76 by 刘鑫

refactor(时间片容量): 初始化容量时同时初始化最大剩余容量为总容量减去已用容量

1 parent 239ee0b9
......@@ -152,8 +152,9 @@ public class InitEngineerCapacityScheduler {
}
}
// 剩余可约容量
long leftUseTime = 60 - lengthOfLeave;
long leftUseTime = r.getCapTotal() - lengthOfLeave;
r.setCapLeft(leftUseTime);
r.setMaxDuration(leftUseTime);
r.setCapUsed(lengthOfLeave);
r.setCreateTime(LocalDateTime.now());
r.setUpdateTime(LocalDateTime.now());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!