From 0ecb8e158595c1c899e0a0308ada388d6ab47d2c Mon Sep 17 00:00:00 2001 From: xy <748613696@qq.com> Date: Thu, 1 Aug 2024 15:52:52 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=95=B0=E6=8D=AE=E5=AE=8C=E6=95=B4=E6=80=A7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=202.=E7=AE=A1=E7=90=86=E5=91=98=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=A3=85=E7=BD=AE=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E8=A3=85?= =?UTF-8?q?=E7=BD=AE=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/configuration/DeviceMapper.java | 2 ++ .../njcn/mapper/configuration/LineMapper.java | 2 ++ .../configuration/DeviceServiceImpl.java | 26 +++++++++++++++++- .../mappers/configuration/LineMapper.xml | 18 +++++++++++++ .../controller/business/DeviceController.java | 14 ++++++++++ .../configuration/ManaDeviceService.java | 2 ++ .../configuration/ManaDeviceServiceImpl.java | 27 +++++++++++++++++++ .../mappers/configuration/DeviceMapper.xml | 4 +++ .../WEB-INF/views/business/device/addDev.jsp | 14 ++++++++++ 9 files changed, 108 insertions(+), 1 deletion(-) diff --git a/comService/src/main/java/com/njcn/mapper/configuration/DeviceMapper.java b/comService/src/main/java/com/njcn/mapper/configuration/DeviceMapper.java index 1cd5b8f..4fbf83c 100644 --- a/comService/src/main/java/com/njcn/mapper/configuration/DeviceMapper.java +++ b/comService/src/main/java/com/njcn/mapper/configuration/DeviceMapper.java @@ -70,4 +70,6 @@ public interface DeviceMapper extends Mapper{ List getDevIndex(@Param("list") List dataType); DeviceDetail getDevAndParent(@Param("devIndex")String devIndex); + + String findMaxDeviceName(@Param("gdIndex")Long gdIndex); } diff --git a/comService/src/main/java/com/njcn/mapper/configuration/LineMapper.java b/comService/src/main/java/com/njcn/mapper/configuration/LineMapper.java index dddae4a..795307a 100644 --- a/comService/src/main/java/com/njcn/mapper/configuration/LineMapper.java +++ b/comService/src/main/java/com/njcn/mapper/configuration/LineMapper.java @@ -53,6 +53,8 @@ public interface LineMapper extends Mapper { //根据现有的监测点筛选出国网监测点 List getGWLines(@Param("list") List subList); + List getAllGWLines(@Param("list") List subList); + String selectLineName(String name); //获取该表所有数据,提供excel导出 diff --git a/comService/src/main/java/com/njcn/serviceimpl/configuration/DeviceServiceImpl.java b/comService/src/main/java/com/njcn/serviceimpl/configuration/DeviceServiceImpl.java index 1a4ee4f..b3183a7 100644 --- a/comService/src/main/java/com/njcn/serviceimpl/configuration/DeviceServiceImpl.java +++ b/comService/src/main/java/com/njcn/serviceimpl/configuration/DeviceServiceImpl.java @@ -340,7 +340,7 @@ public class DeviceServiceImpl implements DeviceService { } intergralityData.setAllNets(list1); //国网监测点 - List countryLineIndexs = getGwLine(lineIndexs); + List countryLineIndexs = getAllGwLine(lineIndexs); if (!CollectionUtils.isEmpty(countryLineIndexs)) { List list2 = getGWIntegralityTable(startTime, endTime, countryLineIndexs); if (CollUtil.isNotEmpty(list2)){ @@ -1085,6 +1085,30 @@ public class DeviceServiceImpl implements DeviceService { return tempLine; } + private List getAllGwLine(List lines) { + if (CollectionUtils.isEmpty(lines)) { + return new ArrayList<>(); + } + List lineTemp = new ArrayList<>(lines); + List tempLine = new ArrayList<>(); + if (lineTemp.size() > 1000) { + int times = lineTemp.size() / 1000 + 1; + for (int i = 0; i < times; i++) { + if (lineTemp.size() > 1000) { + List subList = lineTemp.subList(0, 1000); + List temp = lineMapper.getAllGWLines(subList); + subList.clear(); + tempLine.addAll(temp); + } else { + tempLine.addAll(lineMapper.getAllGWLines(lineTemp)); + } + } + } else { + tempLine.addAll(lineMapper.getAllGWLines(lineTemp)); + } + return tempLine; + } + /** * 根据监测点索引获取当前的数据完整性 * diff --git a/pqs9000/src/main/resources/mybatis/mappers/configuration/LineMapper.xml b/pqs9000/src/main/resources/mybatis/mappers/configuration/LineMapper.xml index a00edc0..0c8fdb9 100644 --- a/pqs9000/src/main/resources/mybatis/mappers/configuration/LineMapper.xml +++ b/pqs9000/src/main/resources/mybatis/mappers/configuration/LineMapper.xml @@ -181,6 +181,24 @@ AND T2.MONITOR_ID IS NOT NULL + + + + diff --git a/pqs9900/src/main/webapp/WEB-INF/views/business/device/addDev.jsp b/pqs9900/src/main/webapp/WEB-INF/views/business/device/addDev.jsp index 656368a..9cadd19 100644 --- a/pqs9900/src/main/webapp/WEB-INF/views/business/device/addDev.jsp +++ b/pqs9900/src/main/webapp/WEB-INF/views/business/device/addDev.jsp @@ -49,6 +49,20 @@