From 01174c0cee45202e7b343cf12a39d9c7e8a6f6f1 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Fri, 31 May 2024 12:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=8A=E6=B8=B8=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=95=B0=E9=87=8F=EF=BC=8C=E4=B8=8D=E8=B6=B3=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E8=AE=BE=E5=A4=87=E6=95=B0=E9=87=8F=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/service/impl/DcEmergencyPlansServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 { // 下行 取最小的几个