| | |
| | | List<BtsExcelFixture.FixtureRecord> sameCycle = BtsExcelFixture.records().stream() |
| | | .filter(item -> item.cycleNo() == first.cycleNo() && item.stepNo() == first.stepNo()).toList(); |
| | | BtsExcelFixture.FixtureRecord last = sameCycle.get(sameCycle.size() - 1); |
| | | String status = playback.naturallyFinished() || playback.cycleNo() > first.cycleNo() |
| | | || (playback.cycleNo() == first.cycleNo() && playback.stepNo() > first.stepNo()) |
| | | ? "已完成" |
| | | : playback.cycleNo() == first.cycleNo() && playback.stepNo() == first.stepNo() |
| | | ? "进行中" : "待执行"; |
| | | // step 号在每个循环内重复,跨循环时必须按当前循环的工步位置判断,不能把上一循环的同号工步当成当前状态。 |
| | | String status = playback.naturallyFinished() ? "已完成" |
| | | : playback.stepNo() > first.stepNo() ? "已完成" |
| | | : playback.stepNo() == first.stepNo() ? "进行中" : "待执行"; |
| | | rows.add(new BtsTestPlanRow("STEP", first.stepNo(), first.stepName(), |
| | | Math.max(0d, last.offsetSeconds() - first.offsetSeconds()), first.voltageV(), status, |
| | | null, null)); |