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 @@