| | |
| | | Date actionAt = new Date(); |
| | | if (testMapper.updateReceptionPaused(testId, updateBy, actionAt) != 1) |
| | | throw new ServiceException("测试状态已变更,请刷新后重试"); |
| | | // 暂停边界不属于本次测试的确认接收区间,继续时由新的区间重新开始计时。 |
| | | testMapper.closeOpenReceptionIntervals(testId, actionAt, "RECEPTION_PAUSED"); |
| | | testMapper.insertTestAudit(testId, "RECEPTION_PAUSED", operatorId, updateBy, null, |
| | | JSON.toJSONString(Map.of("receptionStatus", "PAUSED", "polling", "STOPPED"))); |
| | | return 1; |
| | |
| | | Date actionAt = new Date(); |
| | | if (testMapper.updateReceptionResumed(testId, updateBy, actionAt) != 1) |
| | | throw new ServiceException("测试状态已变更,请刷新后重试"); |
| | | for (TTestBattery battery : current.getBatteries()) |
| | | { |
| | | TTestChannelBinding binding = battery.getBinding(); |
| | | testMapper.insertReceptionInterval(testId, binding.getBindingId(), "CABINET_CHANNEL", |
| | | binding.getChannelId(), null, actionAt, "RECEPTION_RESUMED"); |
| | | for (TTestCollectorChannel mapping : mutable(battery.getCollectorChannels())) |
| | | testMapper.insertReceptionInterval(testId, binding.getBindingId(), "COLLECTOR_CHANNEL", |
| | | battery.getCollectorId(), mapping.getChannelCode(), actionAt, "RECEPTION_RESUMED"); |
| | | } |
| | | testMapper.insertTestAudit(testId, "RECEPTION_RESUMED", operatorId, updateBy, null, |
| | | JSON.toJSONString(Map.of("receptionStatus", "RECEIVING", "polling", "RESUMED"))); |
| | | return 1; |