diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java index 0252e65f..0541ced0 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java @@ -485,7 +485,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } }); if (dcDevices.size() > 0) { - dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + if (dcExecuteAction.getNumber() > dcDevices.size()) { + dcDevices = dcDevices.subList(0, dcDevices.size()); + }else { + dcDevices = dcDevices.subList(0, dcExecuteAction.getNumber()); + } + } } else { // 下行 取最小的几个