Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a3329be788 | |||
| 0ecb8e1585 | |||
| cc1dd4f470 | |||
| 2caeb0c264 | |||
| 500b6c66bb |
@@ -70,4 +70,6 @@ public interface DeviceMapper extends Mapper<Device>{
|
||||
List<Integer> getDevIndex(@Param("list") List<Integer> dataType);
|
||||
|
||||
DeviceDetail getDevAndParent(@Param("devIndex")String devIndex);
|
||||
|
||||
String findMaxDeviceName(@Param("gdIndex")Long gdIndex);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ public interface LineMapper extends Mapper<Line> {
|
||||
//根据现有的监测点筛选出国网监测点
|
||||
List<Integer> getGWLines(@Param("list") List<Integer> subList);
|
||||
|
||||
List<Integer> getAllGWLines(@Param("list") List<Integer> subList);
|
||||
|
||||
String selectLineName(String name);
|
||||
|
||||
//获取该表所有数据,提供excel导出
|
||||
@@ -103,11 +105,11 @@ public interface LineMapper extends Mapper<Line> {
|
||||
|
||||
List<Legder.Data> getMonitorData(@Param("list") List<Integer> list, @Param("appear") String appear, @Param("nature") Integer nature);
|
||||
|
||||
List<Integer> siftLineIndexs(@Param("list") List<Integer> list, @Param("scale") String scale, @Param("manc") String manc, @Param("loadtype") String loadtype);
|
||||
List<Integer> siftLineIndexs(@Param("list") List<Integer> list, @Param("scale") String scale, @Param("manc") String manc, @Param("loadtype") String loadtype, @Param("monitorNature") Integer monitorNature);
|
||||
|
||||
List<Integer> siftLineIndexsByLineGrade(@Param("list") List<Integer> list, @Param("scale") String scale, @Param("manc") String manc, @Param("loadtype") String loadtype,@Param("lineGrade") Integer lineGrade);
|
||||
|
||||
List<IndexsCount> siftAllIndexs(@Param("list") List<Integer> list, @Param("scale") String scale, @Param("manc") String manc, @Param("loadtype") String loadtype);
|
||||
List<IndexsCount> siftAllIndexs(@Param("list") List<Integer> list, @Param("scale") String scale, @Param("manc") String manc, @Param("loadtype") String loadtype, @Param("devLocation") String devLocation);
|
||||
|
||||
List<IndexsCount> siftAllIndexsByLineGrade(@Param("list") List<Integer> list, @Param("scale") String scale, @Param("manc") String manc, @Param("loadtype") String loadtype,@Param("lineGrade") Integer lineGrade);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.mapper.data;
|
||||
|
||||
import com.njcn.pojo.commons.SimpleValue;
|
||||
import com.njcn.pojo.commons.device.LineInfo;
|
||||
import com.njcn.pojo.commons.runmanage.IntergralityTable;
|
||||
import com.njcn.pojo.data.Integrity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -27,4 +28,6 @@ public interface IntegrityMapper extends Mapper<Integrity> {
|
||||
List<IntergralityTable> selectIntegrityData(@Param("list") List<Integer> tempIndexs,@Param("startTime")Date startTime,@Param("endTime") Date endTime);
|
||||
|
||||
List<IntergralityTable> selectGWIntegrityData(@Param("list") List<Integer> tempIndexs,@Param("startTime")Date startTime,@Param("endTime") Date endTime);
|
||||
|
||||
List<LineInfo> getLineInfo(@Param("list") List<Integer> tempIndexs,@Param("postType") Integer postType, @Param("powerId") Integer powerId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
package com.njcn.pojo.commons.runmanage;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @date: 2024/07/25
|
||||
*/
|
||||
public class IntegrityAnalysisData implements Serializable {
|
||||
|
||||
private String deptIndex;
|
||||
|
||||
private String deptName;
|
||||
|
||||
private List<TypeList> typeLists;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public static class TypeList {
|
||||
|
||||
private String name;
|
||||
|
||||
List<DataList> dataLists;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<DataList> getDataLists() {
|
||||
return dataLists;
|
||||
}
|
||||
|
||||
public void setDataLists(List<DataList> dataLists) {
|
||||
this.dataLists = dataLists;
|
||||
}
|
||||
}
|
||||
|
||||
public static class DataList {
|
||||
//分类型名称
|
||||
private String name;
|
||||
|
||||
//总监测点个数
|
||||
private Integer allLineCount;
|
||||
|
||||
//投运监测点个数
|
||||
private Integer runLineCount;
|
||||
|
||||
//检修监测点个数
|
||||
private Integer checkLineCount;
|
||||
|
||||
//退运监测点个数
|
||||
private Integer backLineCount;
|
||||
|
||||
|
||||
public Integer getAllLineCount() {
|
||||
return allLineCount;
|
||||
}
|
||||
|
||||
public void setAllLineCount(Integer allLineCount) {
|
||||
this.allLineCount = allLineCount;
|
||||
}
|
||||
|
||||
public Integer getRunLineCount() {
|
||||
return runLineCount;
|
||||
}
|
||||
|
||||
public void setRunLineCount(Integer runLineCount) {
|
||||
this.runLineCount = runLineCount;
|
||||
}
|
||||
|
||||
public Integer getCheckLineCount() {
|
||||
return checkLineCount;
|
||||
}
|
||||
|
||||
public void setCheckLineCount(Integer checkLineCount) {
|
||||
this.checkLineCount = checkLineCount;
|
||||
}
|
||||
|
||||
public Integer getBackLineCount() {
|
||||
return backLineCount;
|
||||
}
|
||||
|
||||
public void setBackLineCount(Integer backLineCount) {
|
||||
this.backLineCount = backLineCount;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDeptIndex() {
|
||||
return deptIndex;
|
||||
}
|
||||
|
||||
public void setDeptIndex(String deptIndex) {
|
||||
this.deptIndex = deptIndex;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public List<TypeList> getTypeLists() {
|
||||
return typeLists;
|
||||
}
|
||||
|
||||
public void setTypeLists(List<TypeList> typeLists) {
|
||||
this.typeLists = typeLists;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IntegrityAnalysisData{" +
|
||||
"deptIndex='" + deptIndex + '\'' +
|
||||
", deptName='" + deptName + '\'' +
|
||||
", typeLists=" + typeLists +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,14 @@ import java.util.List;
|
||||
*/
|
||||
public class IntergralityData implements Serializable {
|
||||
|
||||
private Integer allOnlineNum;
|
||||
|
||||
private Integer allOfflineNum;
|
||||
|
||||
private Integer countryOnlineNum;
|
||||
|
||||
private Integer countryOfflineNum;
|
||||
|
||||
//全网数据完整性数据
|
||||
private List<IntergralityTable> allNets= new ArrayList<>();
|
||||
|
||||
@@ -32,10 +40,46 @@ public class IntergralityData implements Serializable {
|
||||
this.countryNets = countryNets;
|
||||
}
|
||||
|
||||
public Integer getAllOnlineNum() {
|
||||
return allOnlineNum;
|
||||
}
|
||||
|
||||
public void setAllOnlineNum(Integer allOnlineNum) {
|
||||
this.allOnlineNum = allOnlineNum;
|
||||
}
|
||||
|
||||
public Integer getAllOfflineNum() {
|
||||
return allOfflineNum;
|
||||
}
|
||||
|
||||
public void setAllOfflineNum(Integer allOfflineNum) {
|
||||
this.allOfflineNum = allOfflineNum;
|
||||
}
|
||||
|
||||
public Integer getCountryOnlineNum() {
|
||||
return countryOnlineNum;
|
||||
}
|
||||
|
||||
public void setCountryOnlineNum(Integer countryOnlineNum) {
|
||||
this.countryOnlineNum = countryOnlineNum;
|
||||
}
|
||||
|
||||
public Integer getCountryOfflineNum() {
|
||||
return countryOfflineNum;
|
||||
}
|
||||
|
||||
public void setCountryOfflineNum(Integer countryOfflineNum) {
|
||||
this.countryOfflineNum = countryOfflineNum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IntergralityData{" +
|
||||
"allNets=" + allNets +
|
||||
"allOnlineNum=" + allOnlineNum +
|
||||
", allOfflineNum=" + allOfflineNum +
|
||||
", countryOnlineNum=" + countryOnlineNum +
|
||||
", countryOfflineNum=" + countryOfflineNum +
|
||||
", allNets=" + allNets +
|
||||
", countryNets=" + countryNets +
|
||||
'}';
|
||||
}
|
||||
|
||||
@@ -24,6 +24,9 @@ public class IntergralityTable extends OnlineRateData{
|
||||
|
||||
private Integer devId;
|
||||
|
||||
//所属前置机
|
||||
private String frontDev;
|
||||
|
||||
public Integer getDevId() {
|
||||
return devId;
|
||||
}
|
||||
@@ -96,6 +99,14 @@ public class IntergralityTable extends OnlineRateData{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public String getFrontDev() {
|
||||
return frontDev;
|
||||
}
|
||||
|
||||
public void setFrontDev(String frontDev) {
|
||||
this.frontDev = frontDev;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "IntergralityTable{" +
|
||||
@@ -106,6 +117,9 @@ public class IntergralityTable extends OnlineRateData{
|
||||
", devFlag='" + devFlag + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", updateTime='" + updateTime + '\'' +
|
||||
", devType='" + devType + '\'' +
|
||||
", devId=" + devId +
|
||||
", frontDev='" + frontDev + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.njcn.pojo.commons.device.LineInfo;
|
||||
import com.njcn.pojo.commons.device.SubInfo;
|
||||
import com.njcn.pojo.commons.device.Tree;
|
||||
import com.njcn.pojo.commons.device.ValueOfTargetanaly;
|
||||
import com.njcn.pojo.commons.runmanage.IntegrityAnalysisData;
|
||||
import com.njcn.pojo.commons.runmanage.IntergralityData;
|
||||
import com.njcn.pojo.commons.runmanage.IntergralityTable;
|
||||
import com.njcn.pojo.commons.runmanage.OnlineRateData;
|
||||
@@ -69,20 +70,20 @@ public interface DeviceService {
|
||||
DeviceGeneral getDeviceData(String overview, String area, Date startTime, Date endTime);
|
||||
|
||||
//区域统计---》终端状态(筛)
|
||||
DeviceGeneral getDeviceSiftData(String overview, String area, String scale, String manc, String loadtype, Date startTime, Date endTime);
|
||||
DeviceGeneral getDeviceSiftData(String overview, String area, String scale, String manc, String loadtype, Integer monitorNature, Date startTime, Date endTime);
|
||||
|
||||
//区域统计---》在线率
|
||||
DeviceGeneral getDeviceOnlineRate(Date startTime, Date endTime, String overview, String area);
|
||||
|
||||
//区域统计---》数据完整性
|
||||
DeviceGeneral getDataIntegrality(Date startTime, Date endTime, String overview, String area,
|
||||
String scale, String manc, String loadtype);
|
||||
String scale, String manc, String loadtype, Integer monitorNature);
|
||||
|
||||
//运行管理---》终端在线率数据查询展示
|
||||
List<OnlineRateData> getOnlineRate(Date startTime, Date endTime, String area);
|
||||
|
||||
//运行管理--》监测点数据完整性
|
||||
IntergralityData getDataIntegralityTable(Date startTime, Date endTime, String area,Integer devflag,Integer powerId);
|
||||
IntergralityData getDataIntegralityTable(Date startTime, Date endTime, String area,Integer devflag,Integer powerId,Integer runFlag);
|
||||
|
||||
String getDeviceOnline(Date startTime, Date endTime, Long lineIndex);
|
||||
|
||||
@@ -279,5 +280,5 @@ public interface DeviceService {
|
||||
|
||||
int updatEventPushLog(String eventDetailIndex,Integer lineId);
|
||||
|
||||
|
||||
List<IntegrityAnalysisData> getStatisticalAnalysis(String startTime, String endTime, String area, Integer postType, Integer powerId);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
package com.njcn.serviceimpl.configuration;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.njcn.enums.TerminalLogsEnum;
|
||||
import com.njcn.mapper.configuration.*;
|
||||
import com.njcn.mapper.data.*;
|
||||
import com.njcn.mapper.user.DeptsGdMapper;
|
||||
import com.njcn.mapper.user.DeptsMapper;
|
||||
import com.njcn.mapper.user.TransFormerMapper;
|
||||
import com.njcn.mapper.user.UserMapper;
|
||||
import com.njcn.pojo.commons.*;
|
||||
import com.njcn.pojo.commons.area.*;
|
||||
import com.njcn.pojo.commons.device.*;
|
||||
import com.njcn.pojo.commons.runmanage.IntegrityAnalysisData;
|
||||
import com.njcn.pojo.commons.runmanage.IntergralityData;
|
||||
import com.njcn.pojo.commons.runmanage.IntergralityTable;
|
||||
import com.njcn.pojo.commons.runmanage.OnlineRateData;
|
||||
@@ -45,7 +48,6 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@@ -155,7 +157,6 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
@Resource
|
||||
private EventPushLogsDetailMapper eventPushLogsDetailMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 概览--》终端运行状态
|
||||
*/
|
||||
@@ -201,8 +202,9 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
* @param area 区域
|
||||
*/
|
||||
@Override
|
||||
public DeviceGeneral getDeviceSiftData(String overview, String area, String scale, String manc, String loadtype,
|
||||
public DeviceGeneral getDeviceSiftData(String overview, String area, String scale, String manc, String loadtype, Integer monitorNature,
|
||||
Date startTime, Date endTime) {
|
||||
String devLocation = null;
|
||||
DeviceGeneral deviceGeneral;
|
||||
List<AreaGeneralData> areaGeneralDatasTemp;
|
||||
if ("overview".equalsIgnoreCase(area)) {
|
||||
@@ -210,7 +212,12 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
} else {
|
||||
areaGeneralDatasTemp = userUtil.getAreaDataByInfo(area);
|
||||
}
|
||||
areaGeneralDatasTemp = userUtil.siftAreaGeneralData(areaGeneralDatasTemp, scale, manc, loadtype);
|
||||
if (!Objects.isNull(monitorNature) && monitorNature == 0) {
|
||||
devLocation = "电网侧";
|
||||
} else if (!Objects.isNull(monitorNature) && monitorNature == 1) {
|
||||
devLocation = "用户侧";
|
||||
}
|
||||
areaGeneralDatasTemp = userUtil.siftAreaGeneralData(areaGeneralDatasTemp, scale, manc, loadtype, devLocation);
|
||||
if (CollectionUtils.isEmpty(areaGeneralDatasTemp)) {
|
||||
return null;
|
||||
}
|
||||
@@ -312,7 +319,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
* @param area 区域
|
||||
*/
|
||||
@Override
|
||||
public IntergralityData getDataIntegralityTable(Date startTime, Date endTime, String area,Integer devflag,Integer powerId) {
|
||||
public IntergralityData getDataIntegralityTable(Date startTime, Date endTime, String area,Integer devflag,Integer powerId,Integer runFlag) {
|
||||
IntergralityData intergralityData = new IntergralityData();
|
||||
|
||||
List<AreaGeneralData> areaGeneralDataList = userUtil.getAreaGeneralRun(devflag,area,powerId);
|
||||
@@ -321,11 +328,31 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
return null;
|
||||
}
|
||||
//全网监测点的数据完整性
|
||||
intergralityData.setAllNets(getIntegralityTable(startTime, endTime, lineIndexs));
|
||||
List<IntergralityTable> list1 = getIntegralityTable(startTime, endTime, lineIndexs);
|
||||
if (CollUtil.isNotEmpty(list1)){
|
||||
List<IntergralityTable> offline = list1.stream().filter(item->Objects.equals(Integer.parseInt(item.getStatus()),0)).collect(Collectors.toList());
|
||||
List<IntergralityTable> online = list1.stream().filter(item->Objects.equals(Integer.parseInt(item.getStatus()),1)).collect(Collectors.toList());
|
||||
intergralityData.setAllOfflineNum(CollUtil.isNotEmpty(offline)?offline.size():0);
|
||||
intergralityData.setAllOnlineNum(CollUtil.isNotEmpty(online)?online.size():0);
|
||||
if (!Objects.isNull(runFlag)){
|
||||
list1 = Objects.equals(runFlag,0) ? offline : online;
|
||||
}
|
||||
}
|
||||
intergralityData.setAllNets(list1);
|
||||
//国网监测点
|
||||
List<Integer> countryLineIndexs = getGwLine(lineIndexs);
|
||||
List<Integer> countryLineIndexs = getAllGwLine(lineIndexs);
|
||||
if (!CollectionUtils.isEmpty(countryLineIndexs)) {
|
||||
intergralityData.setCountryNets(getGWIntegralityTable(startTime, endTime, countryLineIndexs));
|
||||
List<IntergralityTable> list2 = getGWIntegralityTable(startTime, endTime, countryLineIndexs);
|
||||
if (CollUtil.isNotEmpty(list2)){
|
||||
List<IntergralityTable> offline = list2.stream().filter(item->Objects.equals(Integer.parseInt(item.getStatus()),0)).collect(Collectors.toList());
|
||||
List<IntergralityTable> online = list2.stream().filter(item->Objects.equals(Integer.parseInt(item.getStatus()),1)).collect(Collectors.toList());
|
||||
intergralityData.setCountryOfflineNum(CollUtil.isNotEmpty(offline)?offline.size():0);
|
||||
intergralityData.setCountryOnlineNum(CollUtil.isNotEmpty(online)?online.size():0);
|
||||
if (!Objects.isNull(runFlag)){
|
||||
list2 = Objects.equals(runFlag,0) ? offline : online;
|
||||
}
|
||||
}
|
||||
intergralityData.setCountryNets(list2);
|
||||
}
|
||||
return intergralityData;
|
||||
}
|
||||
@@ -611,41 +638,44 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
*/
|
||||
@Override
|
||||
public DeviceGeneral getDataIntegrality(Date startTime, Date endTime, String overview, String area,
|
||||
String scale, String manc, String loadtype) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature) {
|
||||
DeviceGeneral deviceGeneral;
|
||||
List<AreaGeneralData> areaGeneralDatasTemp = userUtil.getAreaDataByInfoRun(area);
|
||||
if (CollectionUtils.isEmpty(areaGeneralDatasTemp)) {
|
||||
return null;
|
||||
}
|
||||
deviceGeneral = getDataIntegrality(startTime, endTime, overview, areaGeneralDatasTemp, scale, manc, loadtype);
|
||||
deviceGeneral = getDataIntegrality(startTime, endTime, overview, areaGeneralDatasTemp, scale, manc, loadtype, monitorNature);
|
||||
|
||||
return deviceGeneral;
|
||||
}
|
||||
|
||||
private DeviceGeneral getDataIntegrality(Date startTime, Date endTime, String overview, List<AreaGeneralData> areaGeneralDatas,
|
||||
String scale, String manc, String loadtype) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature) {
|
||||
DeviceGeneral deviceGeneral = new DeviceGeneral();
|
||||
List<DeviceValue> area = new ArrayList<>();
|
||||
List<Integer> deviceLindexs = new ArrayList<>();
|
||||
if (CollectionUtils.isEmpty(areaGeneralDatas)) {
|
||||
return null;
|
||||
}
|
||||
if (!Objects.isNull(monitorNature) && monitorNature == -1) {
|
||||
monitorNature = null;
|
||||
}
|
||||
//区域
|
||||
for (AreaGeneralData areaGeneralData : areaGeneralDatas) {
|
||||
if (CollectionUtils.isEmpty(areaGeneralData.getLineIndexs())) {
|
||||
continue;
|
||||
}
|
||||
area.add(getDataIntegralityArea(areaGeneralData, startTime, endTime, scale, manc, loadtype));
|
||||
area.add(getDataIntegralityArea(areaGeneralData, startTime, endTime, scale, manc, loadtype, monitorNature));
|
||||
deviceLindexs.addAll(areaGeneralData.getDeviceIndexs());
|
||||
}
|
||||
deviceGeneral.setArea(area);
|
||||
if (StringUtils.isEmpty(overview)) {
|
||||
//电压等级
|
||||
deviceGeneral.setVol(getDataIntegralityVol(deviceLindexs, startTime, endTime, scale, manc, loadtype));
|
||||
deviceGeneral.setVol(getDataIntegralityVol(deviceLindexs, startTime, endTime, scale, manc, loadtype, monitorNature));
|
||||
//终端厂家
|
||||
deviceGeneral.setInterval(getDataIntegralityCompany(deviceLindexs, startTime, endTime, scale, manc, loadtype));
|
||||
deviceGeneral.setInterval(getDataIntegralityCompany(deviceLindexs, startTime, endTime, scale, manc, loadtype, monitorNature));
|
||||
//干扰源类型终
|
||||
deviceGeneral.setLoadtype(getDataIntegralityLoadType(deviceLindexs, startTime, endTime, scale, manc, loadtype));
|
||||
deviceGeneral.setLoadtype(getDataIntegralityLoadType(deviceLindexs, startTime, endTime, scale, manc, loadtype, monitorNature));
|
||||
}
|
||||
return deviceGeneral;
|
||||
}
|
||||
@@ -848,7 +878,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
private List<DeviceValue> getDataIntegralityCompany(List<Integer> deviceLindexs, Date startTime, Date endTime,
|
||||
String scale, String manc, String loadtype) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature) {
|
||||
List<DeviceValue> deviceValues = new ArrayList<>();
|
||||
List<CompanyValue> companyValues = userUtil.getCompanyData(deviceLindexs);
|
||||
if (CollectionUtils.isEmpty(companyValues)) {
|
||||
@@ -861,7 +891,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
if (CollectionUtils.isEmpty(lineIndexs)) {
|
||||
continue;
|
||||
}
|
||||
lineIndexs = lineMapper.siftLineIndexs(lineIndexs, scale, manc, loadtype);
|
||||
lineIndexs = lineMapper.siftLineIndexs(lineIndexs, scale, manc, loadtype, monitorNature);
|
||||
if (CollectionUtils.isEmpty(lineIndexs)) {
|
||||
deviceValue.setAmounts("0");
|
||||
deviceValue.setDataIntegrity("3.1415");
|
||||
@@ -917,7 +947,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
private List<DeviceValue> getDataIntegralityVol(List<Integer> deviceLindexs, Date startTime, Date endTime,
|
||||
String scale, String manc, String loadtype) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature) {
|
||||
List<DeviceValue> deviceValues = new ArrayList<>();
|
||||
List<VoltageData> voltageDatas = userUtil.getVoltageData(deviceLindexs);
|
||||
if (CollectionUtils.isEmpty(voltageDatas)) {
|
||||
@@ -926,7 +956,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
for (VoltageData voltageData : voltageDatas) {
|
||||
List<Integer> lines = voltageData.getLineIndexs();
|
||||
if (!CollectionUtils.isEmpty(lines)) {
|
||||
lines = lineMapper.siftLineIndexs(lines, scale, manc, loadtype);
|
||||
lines = lineMapper.siftLineIndexs(lines, scale, manc, loadtype, monitorNature);
|
||||
DeviceValue deviceValue = new DeviceValue();
|
||||
deviceValue.setName(voltageData.getVol());
|
||||
deviceValue.setAmounts(String.valueOf(lines.size()));
|
||||
@@ -952,7 +982,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
* 根据用户当前的身份,获取按电压等级的数据完整性
|
||||
*/
|
||||
private List<DeviceValue> getDataIntegralityLoadType(List<Integer> deviceLindexs, Date startTime, Date endTime,
|
||||
String scale, String manc, String loadtype) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature) {
|
||||
List<DeviceValue> deviceValues = new ArrayList<>();
|
||||
List<LoadTypeValue> loadtypes = userUtil.getLoadTypeValue(deviceLindexs);
|
||||
if (CollectionUtils.isEmpty(loadtypes)) {
|
||||
@@ -961,7 +991,7 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
for (LoadTypeValue type : loadtypes) {
|
||||
List<Integer> lines = type.getLineIndexs();
|
||||
if (!CollectionUtils.isEmpty(lines)) {
|
||||
lines = lineMapper.siftLineIndexs(lines, scale, manc, loadtype);
|
||||
lines = lineMapper.siftLineIndexs(lines, scale, manc, loadtype, monitorNature);
|
||||
DeviceValue deviceValue = new DeviceValue();
|
||||
deviceValue.setName(type.getType());
|
||||
deviceValue.setAmounts(String.valueOf(lines.size()));
|
||||
@@ -1008,10 +1038,10 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
}
|
||||
|
||||
private DeviceValue getDataIntegralityArea(AreaGeneralData areaGeneralData, Date startTime, Date endTime,
|
||||
String scale, String manc, String loadtype) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature) {
|
||||
DeviceValue deviceValue = new DeviceValue();
|
||||
List<Integer> lines = areaGeneralData.getLineIndexs();
|
||||
lines = lineMapper.siftLineIndexs(lines, scale, manc, loadtype);
|
||||
lines = lineMapper.siftLineIndexs(lines, scale, manc, loadtype, monitorNature);
|
||||
String name = areaGeneralData.getName();
|
||||
deviceValue.setName(name);
|
||||
deviceValue.setAmounts(lines.size() + "");
|
||||
@@ -1055,6 +1085,30 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
return tempLine;
|
||||
}
|
||||
|
||||
private List<Integer> getAllGwLine(List<Integer> lines) {
|
||||
if (CollectionUtils.isEmpty(lines)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<Integer> lineTemp = new ArrayList<>(lines);
|
||||
List<Integer> 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<Integer> subList = lineTemp.subList(0, 1000);
|
||||
List<Integer> temp = lineMapper.getAllGWLines(subList);
|
||||
subList.clear();
|
||||
tempLine.addAll(temp);
|
||||
} else {
|
||||
tempLine.addAll(lineMapper.getAllGWLines(lineTemp));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tempLine.addAll(lineMapper.getAllGWLines(lineTemp));
|
||||
}
|
||||
return tempLine;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据监测点索引获取当前的数据完整性
|
||||
*
|
||||
@@ -7025,6 +7079,96 @@ public class DeviceServiceImpl implements DeviceService {
|
||||
return eventPushLogsDetailMapper.updatEventPushLog(eventDetailIndex, lineId, new Date());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IntegrityAnalysisData> getStatisticalAnalysis(String startTime, String endTime, String area, Integer postType, Integer powerId) {
|
||||
List<IntegrityAnalysisData> list = new ArrayList<>();
|
||||
List<LineInfo> allArea = new ArrayList<>();
|
||||
List<AreaGeneralData> ag = userUtil.getAreaDataByInfo(area);
|
||||
for (AreaGeneralData item : ag) {
|
||||
IntegrityAnalysisData data = new IntegrityAnalysisData();
|
||||
data.setDeptName(item.getName());
|
||||
data.setDeptIndex(item.getDeptIndex());
|
||||
data.setSort(1);
|
||||
if (CollUtil.isNotEmpty(item.getLineIndexs())) {
|
||||
List<LineInfo> lineInfos = integrityMapper.getLineInfo(item.getLineIndexs(),postType,powerId);
|
||||
allArea.addAll(lineInfos);
|
||||
List<IntegrityAnalysisData.TypeList> typeList = new ArrayList<>();
|
||||
IntegrityAnalysisData.TypeList type = new IntegrityAnalysisData.TypeList();
|
||||
type.setName("所属前置机");
|
||||
type.setDataLists(getFrontList(lineInfos));
|
||||
|
||||
IntegrityAnalysisData.TypeList type2 = new IntegrityAnalysisData.TypeList();
|
||||
type2.setName("监测点状态");
|
||||
type2.setDataLists(getLineStatusList(lineInfos));
|
||||
|
||||
typeList.add(type);
|
||||
typeList.add(type2);
|
||||
data.setTypeLists(typeList);
|
||||
}
|
||||
list.add(data);
|
||||
}
|
||||
//新增冀北省
|
||||
Depts depts = userUtil.getDeptsByIndex(area);
|
||||
if (Objects.equals(depts.getParentNodeId(),"10001")) {
|
||||
IntegrityAnalysisData data = new IntegrityAnalysisData();
|
||||
data.setDeptName("冀北省");
|
||||
data.setDeptIndex(area);
|
||||
List<IntegrityAnalysisData.TypeList> typeList = new ArrayList<>();
|
||||
IntegrityAnalysisData.TypeList type = new IntegrityAnalysisData.TypeList();
|
||||
type.setName("所属前置机");
|
||||
type.setDataLists(getFrontList(allArea));
|
||||
IntegrityAnalysisData.TypeList type2 = new IntegrityAnalysisData.TypeList();
|
||||
type2.setName("监测点状态");
|
||||
type2.setDataLists(getLineStatusList(allArea));
|
||||
typeList.add(type);
|
||||
typeList.add(type2);
|
||||
data.setTypeLists(typeList);
|
||||
data.setSort(0);
|
||||
list.add(data);
|
||||
}
|
||||
return list.stream().sorted(Comparator.comparing(IntegrityAnalysisData::getSort)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<IntegrityAnalysisData.DataList> getFrontList(List<LineInfo> lineInfos) {
|
||||
List<IntegrityAnalysisData.DataList> result = new ArrayList<>();
|
||||
Map<String,List<LineInfo>> frontMap = lineInfos.stream().collect(Collectors.groupingBy(LineInfo::getDevName));
|
||||
if (CollectionUtils.isEmpty(frontMap)) {
|
||||
IntegrityAnalysisData.DataList dataList = new IntegrityAnalysisData.DataList();
|
||||
dataList.setName("/");
|
||||
dataList.setAllLineCount(0);
|
||||
dataList.setRunLineCount(0);
|
||||
dataList.setCheckLineCount(0);
|
||||
dataList.setBackLineCount(0);
|
||||
result.add(dataList);
|
||||
} else {
|
||||
frontMap.forEach((k,v)->{
|
||||
IntegrityAnalysisData.DataList dataList = new IntegrityAnalysisData.DataList();
|
||||
dataList.setName(k);
|
||||
Map<Long,List<LineInfo>> statusMap = v.stream().collect(Collectors.groupingBy(LineInfo::getStatus));
|
||||
dataList.setAllLineCount(v.size());
|
||||
dataList.setRunLineCount(CollUtil.isNotEmpty(statusMap.get(0L))?statusMap.get(0L).size():0);
|
||||
dataList.setCheckLineCount(CollUtil.isNotEmpty(statusMap.get(1L))?statusMap.get(1L).size():0);
|
||||
dataList.setBackLineCount(CollUtil.isNotEmpty(statusMap.get(2L))?statusMap.get(2L).size():0);
|
||||
result.add(dataList);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<IntegrityAnalysisData.DataList> getLineStatusList(List<LineInfo> lineInfos) {
|
||||
List<IntegrityAnalysisData.DataList> result = new ArrayList<>();
|
||||
Map<Long,List<LineInfo>> statusMap = lineInfos.stream().collect(Collectors.groupingBy(LineInfo::getStatus));
|
||||
IntegrityAnalysisData.DataList dataList = new IntegrityAnalysisData.DataList();
|
||||
dataList.setName("/");
|
||||
dataList.setAllLineCount(lineInfos.size());
|
||||
dataList.setRunLineCount(CollUtil.isNotEmpty(statusMap.get(0L))?statusMap.get(0L).size():0);
|
||||
dataList.setCheckLineCount(CollUtil.isNotEmpty(statusMap.get(1L))?statusMap.get(1L).size():0);
|
||||
dataList.setBackLineCount(CollUtil.isNotEmpty(statusMap.get(2L))?statusMap.get(2L).size():0);
|
||||
result.add(dataList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据电压等级返回基准容量
|
||||
*
|
||||
|
||||
@@ -50,36 +50,57 @@ public class COverlimitUtil {
|
||||
return overlimit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 电压偏差限值
|
||||
*
|
||||
* 电压偏差限值-冀北现场
|
||||
* 220V 上偏差 +7% 下偏差 -10%
|
||||
* 220V以上35kV以下 上偏差 +7% 下偏差 -7%
|
||||
* 35kV及以上 上偏差 +7% 下偏差 -3%
|
||||
*/
|
||||
public static void voltageDeviation(OverLimit overlimit,Float voltageLevel) {
|
||||
float voltageDev = 3.14159f,uvoltageDev = 3.14159f;
|
||||
if(voltageLevel <= Float.parseFloat(DicDataEnum.V220.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.V220.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.V220.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV35.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-7.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV20.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV35.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-7.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV35.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
voltageDev = 10.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV66.getCode())&&voltageLevel<=Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
}else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV35.getCode())){
|
||||
voltageDev = 7.0f;
|
||||
uvoltageDev=-3.0f;
|
||||
}else if(voltageLevel>Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
voltageDev = 10.0f;
|
||||
uvoltageDev=-10.0f;
|
||||
}
|
||||
overlimit.setVoltageDev(voltageDev);
|
||||
overlimit.setUvoltageDev(uvoltageDev);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 电压偏差限值
|
||||
// *
|
||||
// */
|
||||
// public static void voltageDeviation(OverLimit overlimit,Float voltageLevel) {
|
||||
// float voltageDev = 3.14159f,uvoltageDev = 3.14159f;
|
||||
// if(voltageLevel <= Float.parseFloat(DicDataEnum.V220.getCode())){
|
||||
// voltageDev = 7.0f;
|
||||
// uvoltageDev=-10.0f;
|
||||
// }else if(voltageLevel>Float.parseFloat(DicDataEnum.V220.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV20.getCode())){
|
||||
// voltageDev = 7.0f;
|
||||
// uvoltageDev=-7.0f;
|
||||
// }else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV20.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV35.getCode())){
|
||||
// voltageDev = 7.0f;
|
||||
// uvoltageDev=-7.0f;
|
||||
// }else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV35.getCode())&&voltageLevel<Float.parseFloat(DicDataEnum.KV66.getCode())){
|
||||
// voltageDev = 10.0f;
|
||||
// uvoltageDev=-10.0f;
|
||||
// }else if(voltageLevel>=Float.parseFloat(DicDataEnum.KV66.getCode())&&voltageLevel<=Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
// voltageDev = 7.0f;
|
||||
// uvoltageDev=-3.0f;
|
||||
// }else if(voltageLevel>Float.parseFloat(DicDataEnum.KV110.getCode())){
|
||||
// voltageDev = 10.0f;
|
||||
// uvoltageDev=-10.0f;
|
||||
// }
|
||||
// overlimit.setVoltageDev(voltageDev);
|
||||
// overlimit.setUvoltageDev(uvoltageDev);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 频率偏差
|
||||
|
||||
@@ -1961,7 +1961,7 @@ public class UserUtil {
|
||||
/**
|
||||
* 根据电压等级、干扰源类型、终端厂家筛选
|
||||
*/
|
||||
public List<AreaGeneralData> siftAreaGeneralData(List<AreaGeneralData> areaGeneralDatas, String scale, String manc, String loadType) {
|
||||
public List<AreaGeneralData> siftAreaGeneralData(List<AreaGeneralData> areaGeneralDatas, String scale, String manc, String loadType, String devLocation) {
|
||||
List<AreaGeneralData> result = new ArrayList<>();
|
||||
|
||||
for (AreaGeneralData areaGeneralData : areaGeneralDatas) {
|
||||
@@ -1970,7 +1970,7 @@ public class UserUtil {
|
||||
if (CollectionUtils.isEmpty(lineIndexs)) {
|
||||
continue;
|
||||
}
|
||||
List<IndexsCount> indexs = lineMapper.siftAllIndexs(lineIndexs, scale, manc, loadType);
|
||||
List<IndexsCount> indexs = lineMapper.siftAllIndexs(lineIndexs, scale, manc, loadType, devLocation);
|
||||
if (CollectionUtils.isEmpty(indexs)) {
|
||||
areaGeneralDataTmp.setMonitors(0);
|
||||
} else {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class DeviceStatusController {
|
||||
*/
|
||||
@PostMapping("deviceStatus")
|
||||
@ResponseBody
|
||||
public HttpResult getDeviceStatus(String overview, String area,String scale,String manc,String loadtype,
|
||||
public HttpResult getDeviceStatus(String overview, String area,String scale,String manc,String loadtype,Integer monitorNature,
|
||||
HttpServletRequest request,String startTime,String endTime) {
|
||||
HttpResult result=PubUtils.initResult(TokenManager.getToken().getLoginName(),request,LogTypeEnum.BUSSINESS.toString(),0);
|
||||
DeviceGeneral data ;
|
||||
@@ -64,7 +64,7 @@ public class DeviceStatusController {
|
||||
return result;
|
||||
}
|
||||
try {
|
||||
data=deviceService.getDeviceSiftData(overview,area,scale,manc,loadtype,datePojo.getStartTime(),datePojo.getEndTime());
|
||||
data=deviceService.getDeviceSiftData(overview,area,scale,manc,loadtype,monitorNature,datePojo.getStartTime(),datePojo.getEndTime());
|
||||
if(null==data){
|
||||
result = PubUtils.assignmentResultLog(null, 500, "获取终端运行数据为空","查询稳态终端状态","成功",result);
|
||||
}else{
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.njcn.pojo.commons.DatePojo;
|
||||
import com.njcn.pojo.commons.HttpResult;
|
||||
import com.njcn.pojo.commons.device.DeviceGeneral;
|
||||
import com.njcn.pojo.commons.device.LineDetailInfo;
|
||||
import com.njcn.pojo.commons.runmanage.IntegrityAnalysisData;
|
||||
import com.njcn.pojo.commons.runmanage.IntergralityData;
|
||||
import com.njcn.pojo.configuration.*;
|
||||
import com.njcn.service.configuration.DeviceService;
|
||||
@@ -37,6 +38,7 @@ import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.Socket;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -115,7 +117,7 @@ public class IntegralityController {
|
||||
*/
|
||||
@PostMapping("getIntegrityData")
|
||||
@ResponseBody
|
||||
public HttpResult getIntegrityData(String startTime, String endTime, String area,Integer devflag,Integer powerId, HttpServletRequest request) {
|
||||
public HttpResult getIntegrityData(String startTime, String endTime, String area,Integer devflag,Integer powerId, Integer runFlag, HttpServletRequest request) {
|
||||
HttpResult result = PubUtils.initResult(TokenManager.getToken().getLoginName(), request, LogTypeEnum.BUSSINESS.toString(), 0);
|
||||
DatePojo datePojo;
|
||||
datePojo = PubUtils.validateDate(startTime, endTime, "getIntegrityData");
|
||||
@@ -125,7 +127,7 @@ public class IntegralityController {
|
||||
}
|
||||
IntergralityData intergralityData;
|
||||
try {
|
||||
intergralityData = deviceService.getDataIntegralityTable(datePojo.getStartTime(), datePojo.getEndTime(), area,devflag,powerId);
|
||||
intergralityData = deviceService.getDataIntegralityTable(datePojo.getStartTime(), datePojo.getEndTime(), area,devflag,powerId,runFlag);
|
||||
if (null == intergralityData) {
|
||||
result = PubUtils.assignmentResultLog(null, 500, "获取监测点数据完整性数据为空", "查询完整性列表", "成功", result);
|
||||
} else {
|
||||
@@ -150,7 +152,7 @@ public class IntegralityController {
|
||||
@PostMapping("dataIntegrality")
|
||||
@ResponseBody
|
||||
public HttpResult dataIntegrality(String startTime, String endTime, String overview, String area,
|
||||
String scale, String manc, String loadtype, HttpServletRequest request) {
|
||||
String scale, String manc, String loadtype, Integer monitorNature, HttpServletRequest request) {
|
||||
HttpResult result = PubUtils.initResult(TokenManager.getToken().getLoginName(), request, LogTypeEnum.BUSSINESS.toString(), 0);
|
||||
DatePojo datePojo;
|
||||
datePojo = PubUtils.validateDate(startTime, endTime, "dataIntegrality");
|
||||
@@ -160,7 +162,7 @@ public class IntegralityController {
|
||||
}
|
||||
DeviceGeneral data;
|
||||
try {
|
||||
data = deviceService.getDataIntegrality(datePojo.getStartTime(), datePojo.getEndTime(), overview, area, scale, manc, loadtype);
|
||||
data = deviceService.getDataIntegrality(datePojo.getStartTime(), datePojo.getEndTime(), overview, area, scale, manc, loadtype, monitorNature);
|
||||
if (null == data) {
|
||||
result = PubUtils.assignmentResultLog(null, 500, "获取数据完整性数据为空", "查询数据完整性", "成功", result);
|
||||
} else {
|
||||
@@ -327,4 +329,35 @@ public class IntegralityController {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 数据完整性列表-》统计分析
|
||||
*/
|
||||
@PostMapping("statisticalAnalysis")
|
||||
@ResponseBody
|
||||
public HttpResult statisticalAnalysis(String startTime, String endTime, String area,Integer postType, Integer powerId, HttpServletRequest request) {
|
||||
HttpResult result = PubUtils.initResult(TokenManager.getToken().getLoginName(), request, LogTypeEnum.BUSSINESS.toString(), 0);
|
||||
DatePojo datePojo;
|
||||
datePojo = PubUtils.validateDate(startTime, endTime, "statisticalAnalysis");
|
||||
if (!StringUtils.isEmpty(datePojo.getMsg())) {
|
||||
result = PubUtils.assignmentResult(null, 500, datePojo.getMsg());
|
||||
return result;
|
||||
}
|
||||
try {
|
||||
List<IntegrityAnalysisData> data = deviceService.getStatisticalAnalysis(startTime,endTime,area,powerId,postType);
|
||||
if (null == data) {
|
||||
result = PubUtils.assignmentResultLog(null, 500, "获取统计分析数据为空", "查看统计分析", "成功", result);
|
||||
} else {
|
||||
result = PubUtils.assignmentResultLog(data, 200, "获取统计分析数据成功", "查看统计分析", "成功", result);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查看统计分析数据异常,异常为:" + e.toString());
|
||||
userLog.getLog("查看统计分析数据异常", "失败", PubUtils.getIpAddr(request), LogTypeEnum.BUSSINESS.toString(), 0);
|
||||
result = PubUtils.assignmentResultLog(null, 500, "查看统计分析数据异常", "查看统计分析", "失败", result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -458,4 +458,12 @@ public class BusinessController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转按地市统计监测点运行状态、前置机统计
|
||||
*/
|
||||
@RequestMapping("statisticalAnalysis")
|
||||
public String statisticalAnalysis() {
|
||||
return "business/manage/statisticalAnalysis";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1171,29 +1171,6 @@ public class DeviceController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据监测点的电压等级获取电压偏差的下限,因为目前oracle库中只有上限的值
|
||||
*/
|
||||
public Float getDevLowLimit(Integer line,Float upLimit) {
|
||||
float low = 0.0f;
|
||||
MachineAccount machineAccount = lineService.getLineName(line);
|
||||
if (!Objects.isNull(machineAccount.getScale()) || !"".equals(machineAccount.getScale())) {
|
||||
float nScale = Float.parseFloat(machineAccount.getScale().substring(0, machineAccount.getScale().length() - 2));
|
||||
if (Objects.equals(nScale,220.0f) || nScale <= 20.0f) {
|
||||
low = 0.0f;
|
||||
} else if (nScale >= 66.0f && nScale <= 110.0f) {
|
||||
low = -3.0f;
|
||||
} else if (Objects.equals(nScale,35.0f)) {
|
||||
if (upLimit >= 0.0f) {
|
||||
low = -(10.0f - upLimit);
|
||||
} else {
|
||||
low = 10.0f - Math.abs(upLimit);
|
||||
}
|
||||
}
|
||||
}
|
||||
return low;
|
||||
}
|
||||
|
||||
@PostMapping("getHistoryTableData")
|
||||
@ResponseBody
|
||||
public HttpResult getHistoryTableData(String startTime, String endTime, String lineId, String type, String index, String harmonicInHarms) {
|
||||
@@ -1292,7 +1269,8 @@ public class DeviceController {
|
||||
tempCondition.setPltCount(overLimitInfo.getPltCount());
|
||||
tempCondition.setPstCount(overLimitInfo.getPstCount());
|
||||
saveConditionData(tempCondition, key);
|
||||
Float low = getDevLowLimit(lineIds[j],new Pass(overLimitInfo.getOverLimitRate().get(0).getVoltageDev(), EnumPass.MAX_AND_MIN.getCode()).getOverLimit());
|
||||
//电压下偏差
|
||||
Float low = overLimitInfo.getOverLimitRate().get(0).getUvoltageDev();
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
HistoryTableData.data data;
|
||||
List<ReportTarget> list1;
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ResponsibilityAreaOverNormalController {
|
||||
|
||||
@PostMapping("/overLimitData")
|
||||
@ResponseBody
|
||||
public HttpResult overLimit(String startTime, String endTime, String type, int statistic, boolean statFlag){
|
||||
public HttpResult overLimit(String startTime, String endTime, String type, int statistic, boolean statFlag, Integer monitorNature){
|
||||
HttpResult result;
|
||||
DatePojo datePojo;
|
||||
datePojo = PubUtils.validateDate(startTime, endTime, "overLimitData");
|
||||
@@ -64,7 +64,7 @@ public class ResponsibilityAreaOverNormalController {
|
||||
}
|
||||
List<AreaOverNoraml> list;
|
||||
try {
|
||||
list = areaOverNoramlService.getOverLimitData(startTime,endTime,type,statistic,statFlag);
|
||||
list = areaOverNoramlService.getOverLimitData(startTime,endTime,type,statistic,statFlag,monitorNature);
|
||||
result = PubUtils.assignmentResult(list, 200, "获取区域稳态指标超标成功");
|
||||
} catch (Exception e) {
|
||||
result = PubUtils.assignmentResult(null, 500, "获取区域稳态指标超标异常");
|
||||
|
||||
@@ -57,5 +57,5 @@ public interface AreaOverNormalMapper {
|
||||
*/
|
||||
AreaOverNoraml getAvg(@Param("list") List<Integer> list, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
|
||||
List<Integer> getMonitorNature(@Param("list") List<Integer> list,@Param("powerId") Integer powerId);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,12 @@ public interface OverLimitMonitorMapper {
|
||||
List<String> getLineList(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 电压偏差、电压总谐波畸变率、三相电压不平衡度、频率偏差 幅值&&限值&&差值
|
||||
* 电压偏差 幅值&&限值&&差值
|
||||
*/
|
||||
List<TargetDetailDto> getData0(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("list") List<String> lineList);
|
||||
|
||||
/**
|
||||
* 电压总谐波畸变率、三相电压不平衡度、频率偏差 幅值&&限值&&差值
|
||||
*/
|
||||
List<TargetDetailDto> getData1(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("list") List<String> lineList);
|
||||
|
||||
@@ -26,7 +31,7 @@ public interface OverLimitMonitorMapper {
|
||||
List<TargetDetailDto> getData2(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("list") List<String> lineList);
|
||||
|
||||
/**
|
||||
* 负序电流 幅值&&限值&&差值
|
||||
* 长时闪变 幅值&&限值&&差值
|
||||
*/
|
||||
List<TargetDetailDto> getData3(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("list") List<String> lineList);
|
||||
|
||||
|
||||
@@ -15,8 +15,14 @@ public class TargetDetailDto {
|
||||
//电压偏差最大幅值
|
||||
private Double maxVoltageDeviationData;
|
||||
|
||||
//电压偏差限值
|
||||
private Double limitVoltageDeviationData;
|
||||
//电压偏差最小幅值
|
||||
private Double minVoltageDeviationData;
|
||||
|
||||
//电压上偏差限值
|
||||
private Double limitUpVoltageDeviationData;
|
||||
|
||||
//电压下偏差限值
|
||||
private Double limitLowVoltageDeviationData;
|
||||
|
||||
//电压偏差差值
|
||||
private Double diffVoltageDeviationData;
|
||||
@@ -115,12 +121,28 @@ public class TargetDetailDto {
|
||||
this.maxVoltageDeviationData = maxVoltageDeviationData;
|
||||
}
|
||||
|
||||
public Double getLimitVoltageDeviationData() {
|
||||
return limitVoltageDeviationData;
|
||||
public Double getMinVoltageDeviationData() {
|
||||
return minVoltageDeviationData;
|
||||
}
|
||||
|
||||
public void setLimitVoltageDeviationData(Double limitVoltageDeviationData) {
|
||||
this.limitVoltageDeviationData = limitVoltageDeviationData;
|
||||
public void setMinVoltageDeviationData(Double minVoltageDeviationData) {
|
||||
this.minVoltageDeviationData = minVoltageDeviationData;
|
||||
}
|
||||
|
||||
public Double getLimitUpVoltageDeviationData() {
|
||||
return limitUpVoltageDeviationData;
|
||||
}
|
||||
|
||||
public void setLimitUpVoltageDeviationData(Double limitUpVoltageDeviationData) {
|
||||
this.limitUpVoltageDeviationData = limitUpVoltageDeviationData;
|
||||
}
|
||||
|
||||
public Double getLimitLowVoltageDeviationData() {
|
||||
return limitLowVoltageDeviationData;
|
||||
}
|
||||
|
||||
public void setLimitLowVoltageDeviationData(Double limitLowVoltageDeviationData) {
|
||||
this.limitLowVoltageDeviationData = limitLowVoltageDeviationData;
|
||||
}
|
||||
|
||||
public Double getDiffVoltageDeviationData() {
|
||||
@@ -472,7 +494,9 @@ public class TargetDetailDto {
|
||||
return "TargetDetailDto{" +
|
||||
"monitorId=" + monitorId +
|
||||
", maxVoltageDeviationData=" + maxVoltageDeviationData +
|
||||
", limitVoltageDeviationData=" + limitVoltageDeviationData +
|
||||
", minVoltageDeviationData=" + minVoltageDeviationData +
|
||||
", limitUpVoltageDeviationData=" + limitUpVoltageDeviationData +
|
||||
", limitLowVoltageDeviationData=" + limitLowVoltageDeviationData +
|
||||
", diffVoltageDeviationData=" + diffVoltageDeviationData +
|
||||
", maxVoltageDistortionData=" + maxVoltageDistortionData +
|
||||
", limitVoltageDistortionData=" + limitVoltageDistortionData +
|
||||
|
||||
@@ -8,5 +8,5 @@ import java.util.List;
|
||||
public interface AreaOverNoramlService {
|
||||
|
||||
//获取区域稳态指标超标分类数据
|
||||
List<AreaOverNoraml> getOverLimitData(String startTime, String endTime,String type,int statistic,boolean statFlag);
|
||||
List<AreaOverNoraml> getOverLimitData(String startTime, String endTime,String type,int statistic,boolean statFlag, Integer monitorNature);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.pqs9000.pojo.responsibility.OverLimitByDays;
|
||||
import com.pqs9000.service.responsibility.AreaOverNoramlService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.awt.geom.Arc2D;
|
||||
import java.math.BigDecimal;
|
||||
@@ -45,7 +46,7 @@ public class AreaOverNormalServiceImpl implements AreaOverNoramlService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<AreaOverNoraml> getOverLimitData(String startTime, String endTime,String type,int statistic,boolean statFlag) {
|
||||
public List<AreaOverNoraml> getOverLimitData(String startTime, String endTime,String type,int statistic,boolean statFlag, Integer monitorNature) {
|
||||
List<Integer> allMonitors = new ArrayList<>();
|
||||
List<Integer> normalMonitors = new ArrayList<>();
|
||||
List<Integer> monitor = new ArrayList<>();
|
||||
@@ -64,6 +65,19 @@ public class AreaOverNormalServiceImpl implements AreaOverNoramlService {
|
||||
//排除不需要计算的监测点
|
||||
ag =userUtil.getAreaDataByStatFlagAll(deptsIndex);
|
||||
}
|
||||
//新增电网侧\用户侧判断
|
||||
if (!Objects.isNull(monitorNature) && monitorNature != -1) {
|
||||
ag.forEach(item->{
|
||||
List<Integer> line = areaOverNormalMapper.getMonitorNature(item.getLineIndexs(),monitorNature);
|
||||
if (CollectionUtils.isEmpty(line)) {
|
||||
item.setMonitors(0);
|
||||
item.setLineIndexs(line);
|
||||
} else {
|
||||
item.setMonitors(line.size());
|
||||
item.setLineIndexs(line);
|
||||
}
|
||||
});
|
||||
}
|
||||
String typename ="";
|
||||
Theme theme = new Theme();
|
||||
theme.setState(1);
|
||||
|
||||
@@ -147,6 +147,10 @@ public class OverLimitMonitorServiceImpl implements OverLimitMonitorService {
|
||||
|
||||
public void addHarmonicDetail(String startTime, String endTime, List<String> lineList) throws Exception {
|
||||
List<DataHarmonicDetail> result = new ArrayList<>();
|
||||
/**
|
||||
* 获取电压偏差的最大幅值绝对值、限值、差值
|
||||
*/
|
||||
List<TargetDetailDto> list0 = overLimitMonitorMapper.getData0(startTime,endTime,lineList);
|
||||
/**
|
||||
* 获取电压偏差、电压总谐波畸变率、三相电压不平衡度、频率偏差 的 最大幅值、限值、差值
|
||||
*/
|
||||
@@ -257,17 +261,26 @@ public class OverLimitMonitorServiceImpl implements OverLimitMonitorService {
|
||||
//组装数据
|
||||
//type数据类型
|
||||
//0:电压偏差 1:谐波电流 2:谐波电压 3:电压总谐波畸变率 4:谐波电压含有率 5:频率偏差 6:间谐波电压含有率 7:三相电压不平衡度 8:负序电流 9:闪变
|
||||
if (CollUtil.isNotEmpty(list1)){
|
||||
list1.forEach(item->{
|
||||
if (CollUtil.isNotEmpty(list0)){
|
||||
list0.forEach(item->{
|
||||
DataHarmonicDetail pojo = new DataHarmonicDetail();
|
||||
pojo.setTimeId(date);
|
||||
pojo.setLineId(item.getMonitorId());
|
||||
pojo.setTargetType(0);
|
||||
if (Math.abs(item.getMaxVoltageDeviationData()) >= Math.abs(item.getMinVoltageDeviationData())) {
|
||||
pojo.setMaxData(item.getMaxVoltageDeviationData());
|
||||
pojo.setLimitData(item.getLimitVoltageDeviationData());
|
||||
pojo.setDiffData(item.getDiffVoltageDeviationData());
|
||||
pojo.setLimitData(item.getLimitUpVoltageDeviationData());
|
||||
pojo.setDiffData(item.getMaxVoltageDeviationData()-item.getLimitUpVoltageDeviationData());
|
||||
} else {
|
||||
pojo.setMaxData(item.getMinVoltageDeviationData());
|
||||
pojo.setLimitData(item.getLimitLowVoltageDeviationData());
|
||||
pojo.setDiffData(item.getMinVoltageDeviationData()-item.getLimitLowVoltageDeviationData());
|
||||
}
|
||||
result.add(pojo);
|
||||
|
||||
});
|
||||
}
|
||||
if (CollUtil.isNotEmpty(list1)){
|
||||
list1.forEach(item->{
|
||||
DataHarmonicDetail pojo2 = new DataHarmonicDetail();
|
||||
pojo2.setTimeId(date);
|
||||
pojo2.setLineId(item.getMonitorId());
|
||||
|
||||
@@ -181,6 +181,24 @@
|
||||
AND T2.MONITOR_ID IS NOT NULL
|
||||
</select>
|
||||
|
||||
<select id="getAllGWLines" resultType="Integer">
|
||||
SELECT
|
||||
T2.LINE_INDEX
|
||||
FROM
|
||||
PQ_LINE t1,
|
||||
PQ_LINEDETAIL t2,
|
||||
PQ_DEVICE t3
|
||||
WHERE
|
||||
T1.LINE_INDEX = T2.LINE_INDEX
|
||||
AND T1.DEV_INDEX=T3.DEV_INDEX
|
||||
AND T1.LINE_INDEX IN
|
||||
<foreach collection="list" item="item" open="(" close=")"
|
||||
separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
AND T2.MONITOR_ID IS NOT NULL
|
||||
</select>
|
||||
|
||||
<select id="getLineByEventDetailIndex" resultType="line">
|
||||
select t1.*
|
||||
from PQ_LINE t1,
|
||||
@@ -776,6 +794,9 @@
|
||||
and b.loadtype = #{loadtype}
|
||||
</if>
|
||||
</if>
|
||||
<if test="monitorNature != null">
|
||||
and b.POWERID = #{monitorNature}
|
||||
</if>
|
||||
and a.line_index in
|
||||
<foreach collection="list" item="item" separator="," open="("
|
||||
close=")">
|
||||
@@ -807,6 +828,9 @@
|
||||
and b.loadtype = #{loadtype}
|
||||
</if>
|
||||
</if>
|
||||
<if test="devLocation != null and devLocation != ''">
|
||||
and d.DEV_LOCATION = #{devLocation}
|
||||
</if>
|
||||
and a.line_index in
|
||||
<foreach collection="list" item="item" separator="," open="("
|
||||
close=")">
|
||||
|
||||
@@ -83,7 +83,8 @@
|
||||
T2.NAME lineName,
|
||||
T2.line_index lineId,
|
||||
T1.integrity integrity,
|
||||
T9.dic_name devType
|
||||
T9.dic_name devType,
|
||||
T10.NODE_NAME frontDev
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@@ -109,7 +110,8 @@
|
||||
PQ_GDINFORMATION T6,
|
||||
PQ_SUBSTATION T7,
|
||||
PQS_DICDATA T8,
|
||||
PQS_DICDATA T9
|
||||
PQS_DICDATA T9,
|
||||
NODEINFORMATION T10
|
||||
WHERE
|
||||
T1.LINE_INDEX = T2.LINE_INDEX
|
||||
AND T2.DEV_INDEX = T3.DEV_INDEX
|
||||
@@ -119,6 +121,7 @@
|
||||
AND T2.SUB_INDEX=T7.SUB_INDEX
|
||||
AND T2.SCALE=T8.DIC_INDEX
|
||||
AND T9.DIC_INDEX = T3.DEVTYPE
|
||||
AND T3.NODE_INDEX = T10.NODE_INDEX
|
||||
</select>
|
||||
|
||||
<select id="selectGWIntegrityData" resultType="intergralityTable" >
|
||||
@@ -136,7 +139,8 @@
|
||||
T2.NAME lineName,
|
||||
T2.line_index lineId,
|
||||
T1.integrity integrity,
|
||||
T9.dic_name devType
|
||||
T9.dic_name devType,
|
||||
T10.NODE_NAME frontDev
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@@ -162,7 +166,8 @@
|
||||
PQ_GDINFORMATION T6,
|
||||
PQ_SUBSTATION T7,
|
||||
PQS_DICDATA T8,
|
||||
PQS_DICDATA T9
|
||||
PQS_DICDATA T9,
|
||||
NODEINFORMATION T10
|
||||
WHERE
|
||||
T1.LINE_INDEX = T2.LINE_INDEX
|
||||
AND T2.DEV_INDEX = T3.DEV_INDEX
|
||||
@@ -172,6 +177,33 @@
|
||||
AND T2.SUB_INDEX=T7.SUB_INDEX
|
||||
AND T2.SCALE=T8.DIC_INDEX
|
||||
AND T9.DIC_INDEX = T3.DEVTYPE
|
||||
AND T3.NODE_INDEX = T10.NODE_INDEX
|
||||
</select>
|
||||
|
||||
<select id="getLineInfo" resultType="com.njcn.pojo.commons.device.LineInfo">
|
||||
SELECT
|
||||
PL.LINE_INDEX AS line_index,
|
||||
PL.NAME AS lineName,
|
||||
n.NODE_NAME AS devName,
|
||||
PL.STATUS AS status
|
||||
FROM
|
||||
PQ_LINE PL
|
||||
JOIN PQ_DEVICE pd ON PL.DEV_INDEX = pd.DEV_INDEX
|
||||
JOIN NODEINFORMATION n ON pd.NODE_INDEX = n.NODE_INDEX
|
||||
JOIN PQ_LINEDETAIL pl2 ON PL.LINE_INDEX = pl2.LINE_INDEX
|
||||
<where>
|
||||
PL.LINE_INDEX IN <foreach collection="list" item="item" open="(" close=")" separator=",">#{item}</foreach>
|
||||
<if test="postType != null and postType != ' '">
|
||||
<if test="postType == 0">
|
||||
AND pl2.MONITOR_ID IS NOT NULL
|
||||
</if>
|
||||
<if test="postType == 1">
|
||||
AND pl2.MONITOR_ID IS NULL
|
||||
</if>
|
||||
</if>
|
||||
<if test="powerId != null and powerId != ' '">
|
||||
AND pl2.POWERID = #{powerId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -655,5 +655,11 @@
|
||||
ON A.TIMEID = I.TIMEID
|
||||
</select>
|
||||
|
||||
<select id="getMonitorNature" resultType="int">
|
||||
SELECT LINE_INDEX FROM PQ_LINEDETAIL WHERE POWERID = #{powerId} AND LINE_INDEX IN
|
||||
<foreach collection="list" item="totalList" open="(" close=")" separator=",">
|
||||
#{totalList}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -81,6 +81,14 @@
|
||||
<label >干扰源类型:</label>
|
||||
<select class="width3 form-control" id="loadtype"></select>
|
||||
</div>
|
||||
<div class="form-group has-feedback mr10" >
|
||||
<label >监测性质:</label>
|
||||
<select class="width3 form-control" id="monitorNature">
|
||||
<option selected value="-1">全部</option>
|
||||
<option value="0">电网侧</option>
|
||||
<option value="1">非电网侧</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -94,6 +94,14 @@
|
||||
<label >干扰源类型:</label>
|
||||
<select class="width3 form-control" id="loadtype"></select>
|
||||
</div>
|
||||
<div class="form-group has-feedback mr10" >
|
||||
<label >监测性质:</label>
|
||||
<select class="width3 form-control" id="monitorNature">
|
||||
<option selected value="-1">全部</option>
|
||||
<option value="0">电网侧</option>
|
||||
<option value="1">非电网侧</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt5">
|
||||
<%--区域模块--%>
|
||||
@@ -227,52 +235,59 @@
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
|
||||
showtype = 0;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype)
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature)
|
||||
}else if($("option:selected",this).val() == 1){
|
||||
loadselect("电压等级","scale");
|
||||
$("#area").attr("disabled",false);
|
||||
$("#scale").attr("disabled",true);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
$("#area").css("background-color","#fff");
|
||||
showtype = 1;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
}else if($("option:selected",this).val() == 2){
|
||||
loadselect("制造厂商","manc");
|
||||
$("#area").attr("disabled",false);
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",true);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
$("#area").css("background-color","#fff");
|
||||
showtype = 2;
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
}else if($("option:selected",this).val() == 3){
|
||||
loadselect("干扰源类型","loadtype");
|
||||
$("#area").attr("disabled",false);
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",true);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
$("#area").css("background-color","#fff");
|
||||
showtype = 3;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -343,11 +358,12 @@
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
//初始化页面内容
|
||||
var area = $area.eq(0).attr("index");
|
||||
var startTime = $startTime.eq(0).val();
|
||||
var endTime = $endTime.eq(0).val();
|
||||
refresh(startTime, endTime, area);
|
||||
refresh(startTime,endTime,area);
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -359,10 +375,11 @@
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
});
|
||||
|
||||
function refresh(startTime, endTime,area,scale,manc,loadtype) {
|
||||
function refresh(startTime, endTime,area,scale,manc,loadtype,monitorNature) {
|
||||
var i;
|
||||
$.ajax({
|
||||
url: '/pqs9000/area/deviceStatus',
|
||||
@@ -373,7 +390,8 @@
|
||||
area: area,
|
||||
scale:scale,
|
||||
manc:manc,
|
||||
loadtype:loadtype
|
||||
loadtype:loadtype,
|
||||
monitorNature: monitorNature
|
||||
},
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
|
||||
@@ -79,6 +79,13 @@
|
||||
<option value="2">退运</option>
|
||||
</select> <label class="form-group">
|
||||
|
||||
<label class="form-group">通讯状态:</label>
|
||||
<select class="form-control" id="runFlag">
|
||||
<option value="">全部</option>
|
||||
<option value="0">中断</option>
|
||||
<option value="1">正常</option>
|
||||
</select> <label class="form-group">
|
||||
|
||||
<div class="form-inline disinlineb wanzhengdiv">
|
||||
<div class="form-group has-feedback mr10">
|
||||
<label>统计类型:</label>
|
||||
@@ -101,10 +108,22 @@
|
||||
<button id="helper" type="button" class="btn btn-primary tip tip-bottom" data-tip="数据完整性详解">
|
||||
<i class="glyphicon glyphicon-info-sign" style="margin-left: -3px;margin-right: -3px;"></i>
|
||||
</button>
|
||||
<div id="onlineNumber" type="button" class="btn themeBGColor">
|
||||
在线数:
|
||||
<div style="float: right" id="online"></div>
|
||||
</div>
|
||||
<div id="offlineNumber" type="button" class="btn themeBGColor">
|
||||
离线数:
|
||||
<div style="float: right" id="offline"></div>
|
||||
</div>
|
||||
<div id="analysis" type="button" class="btn themeBGColor" onclick="showAnalysis()">
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<div style="float: right;margin-left: 5px">统计分析</div>
|
||||
</div>
|
||||
<div class="form-group fr mr10" id="fliteData">
|
||||
<label>筛选数据:</label>
|
||||
<input type="text" class="form-control" onkeyup="searchResult(this.value)"
|
||||
placeholder="空格分开多条件筛选数据">
|
||||
placeholder="多条件筛选数据" style="width: 120px">
|
||||
</div>
|
||||
</div>
|
||||
<table id="integritylist" class="table table-striped table-bordered dataTable no-footer width100">
|
||||
@@ -115,6 +134,7 @@
|
||||
<th>变电站</th>
|
||||
<th>监测点名称</th>
|
||||
<th>终端IP</th>
|
||||
<th>所属前置机</th>
|
||||
<th>终端状态</th>
|
||||
<th>通讯状态</th>
|
||||
<th>最新数据时间</th>
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: 徐扬
|
||||
Date: 2024/7/25
|
||||
Time: 18:50
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
|
||||
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<title>监测点分类统计</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/bootstrap/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/datatables/buttons.dataTables.min.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/datatables/datatables.bootstrap.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/datatimepicker/bootstrap-datetimepicker.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/basicButton.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/bootstrapSwitch/bootstrap-switch.min.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/ztree/zTreeStyle.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/fontawesome/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/basic.css">
|
||||
<link rel="stylesheet" href="${ctx}/css/plugin/datatables/bootstrap-select.css"/>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #F9F9F9 !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="form-inline header mt10">
|
||||
<label class="form-group">区域:</label>
|
||||
<div class="form-group has-feedback mr10">
|
||||
<div class="disinlineb">
|
||||
<input id="area" class="form-control" style="width: 140px" readonly>
|
||||
<i class="fa fa-caret-down areaicon"></i>
|
||||
<i class="fa fa-caret-up treeUpIcon disnone"
|
||||
style="color: #C9CBCE;position: absolute;left: 60px;font-size: 18px;z-index: 9999;top: 20px"></i>
|
||||
<div class=" ztree treeUpDiv disnone " id="areaTree"
|
||||
style="position: absolute;width: 140px;height: 147px;border: 2px solid #C9CBCE;overflow: auto;top: 32px;background: #fff;z-index: 100;border-radius: 2px">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@include file="../../include/time.jsp"%>
|
||||
<label class="form-group">上报类型:</label>
|
||||
<select class="form-control" id="postType">
|
||||
<option value="">全部</option>
|
||||
<option value="0">国网上报</option>
|
||||
<option value="1">非国网上报</option>
|
||||
</select>
|
||||
<label class="form-group">监测点性质:</label>
|
||||
<select class="form-control" id="powerId">
|
||||
<option value="">全部</option>
|
||||
<option value="0">电网侧</option>
|
||||
<option value="1">非电网侧</option>
|
||||
</select>
|
||||
<label class="form-group">
|
||||
<button id="query" type="button" class="btn btn-primary ml5">
|
||||
<i class="glyphicon glyphicon-search"></i>
|
||||
</button>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-inline mt5">
|
||||
<table id="tongji" style="text-align: center" class="table table-striped table-bordered dataTable no-footer">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="${ctx}/js/plugin/jquery/jquery.min.js"></script>
|
||||
<script src="${ctx}/js/plugin/bootstrap/bootstrap.min.js"></script>
|
||||
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.js"></script>
|
||||
<script src="${ctx}/js/plugin/bootstrap/bootstrap-datetimepicker.zh-CN.js"></script>
|
||||
<script src="${ctx}/js/plugin/datatables/datatables.jquery.js"></script>
|
||||
<script src="${ctx}/js/plugin/datatables/dataTables.buttons.min.js"></script>
|
||||
<script src="${ctx}/js/plugin/datatables/datatables.bootstrap.js"></script>
|
||||
<script src="${ctx}/js/plugin/datatables/buttons.html5.min.js"></script>
|
||||
<script src="${ctx}/js/plugin/layui/layer.js"></script>
|
||||
<script src="${ctx}/jspJS/utils/loading.js"></script>
|
||||
<script src="${ctx}/jspJS/utils/timeControl.js"></script>
|
||||
<script src="${ctx}/jspJS/utils/judgeAjaxStatus.js"></script>
|
||||
<script src="${ctx}/js/plugin/bootstrapSwitch/bootstrap-switch.min.js"></script>
|
||||
<script src="${ctx}/js/plugin/ztree/jquery.ztree.core.js"></script>
|
||||
<script src="${ctx}/js/area.js"></script>
|
||||
<script src="${ctx}/js/color.js"></script>
|
||||
<script src="${ctx}/jspJS/area/statisticalAnalysis.js"></script>
|
||||
<script src="${ctx}/js/plugin/jquery/jquery.cleverTabs.js"></script>
|
||||
<script src="${ctx}/js/plugin/bootstrap/3.3.7/bootstrap.min.js"></script>
|
||||
<script src="${ctx}/js/plugin/bootstrap/bootstrap-select.js"></script>
|
||||
</html>
|
||||
|
||||
@@ -78,6 +78,14 @@
|
||||
<label>监测点:</label>
|
||||
<input type="checkbox" checked class="checkbox"/>
|
||||
</div>
|
||||
<div class="form-group has-feedback mr10" >
|
||||
<label >监测性质:</label>
|
||||
<select class="width3 form-control" id="monitorNature">
|
||||
<option selected value="-1">全部</option>
|
||||
<option value="0">电网侧</option>
|
||||
<option value="1">非电网侧</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group has-feedback ml10">
|
||||
<label style="margin-top: 3px">全部监测点:</label>
|
||||
<input type="checkbox" id="allLineCheck"/>
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">电压偏差</th>
|
||||
<th colspan="4">谐波电流</th>+
|
||||
<th colspan="4">谐波电流</th>
|
||||
<th colspan="4">谐波电压</th>
|
||||
<th colspan="4">电压总谐波畸变率</th>
|
||||
<th colspan="4">谐波电压含有率</th>
|
||||
@@ -165,7 +165,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>超标天数</th>
|
||||
<th>最大幅值(绝对值)</th>
|
||||
<th>最大幅值</th>
|
||||
<th>限值</th>
|
||||
<th>差值</th>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var $startTime=$("#startTime");
|
||||
var $endTime=$("#endTime");
|
||||
var $statistic=$("#statistic");
|
||||
var $monitorNature = $("#monitorNature")
|
||||
var tiggleValue;
|
||||
var buttonname;
|
||||
var companyname;
|
||||
@@ -11,6 +12,7 @@ $(function () {
|
||||
var startTime = $startTime.eq(0).val();
|
||||
var endTime = $endTime.eq(0).val();
|
||||
var statistic = $statistic.eq(0).val();
|
||||
var monitorNature = $monitorNature.eq(0).val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data:{
|
||||
@@ -71,6 +73,9 @@ function refresh(tiggleValue) {
|
||||
var endTime = $endTime.eq(0).val();
|
||||
var statistic = $statistic.eq(0).val();
|
||||
let statFlag = $('#allLineCheck').is(":checked")
|
||||
var monitorNature = $monitorNature.eq(0).val();
|
||||
console.log(statistic)
|
||||
console.log(monitorNature)
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/pqs9000/responsibility/overLimitData",
|
||||
@@ -80,7 +85,8 @@ function refresh(tiggleValue) {
|
||||
endTime : endTime,
|
||||
type: tiggleValue,
|
||||
statistic: statistic,
|
||||
statFlag:statFlag
|
||||
statFlag:statFlag,
|
||||
monitorNature: monitorNature
|
||||
},
|
||||
beforeSend: function () {
|
||||
i = ityzl_SHOW_LOAD_LAYER();
|
||||
|
||||
@@ -34,51 +34,59 @@ $("#datatype").on("change",function() {
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
type = 0;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype)
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature)
|
||||
}else if($("option:selected",this).val() == 1){
|
||||
loadselect("电压等级","scale");
|
||||
$("#area").attr("disabled",false);
|
||||
$("#scale").attr("disabled",true);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
$("#area").css("background-color","#fff");
|
||||
type = 1;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
}else if($("option:selected",this).val() == 2){
|
||||
loadselect("制造厂商","manc");
|
||||
$("#area").attr("disabled",false);
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",true);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
$("#area").css("background-color","#fff");
|
||||
type = 2;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
}else if($("option:selected",this).val() == 3){
|
||||
loadselect("干扰源类型","loadtype");
|
||||
$("#area").attr("disabled",false);
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",true);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
$("#area").css("background-color","#fff");
|
||||
type = 3;
|
||||
var area = $area.eq(0).attr("index");
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -150,6 +158,7 @@ $(function () {
|
||||
$("#scale").attr("disabled",false);
|
||||
$("#manc").attr("disabled",false);
|
||||
$("#loadtype").attr("disabled",false);
|
||||
$("#monitorNature").attr("disabled",false);
|
||||
//初始化页面内容
|
||||
var area = $area.eq(0).attr("index");
|
||||
var startTime = $startTime.eq(0).val();
|
||||
@@ -167,11 +176,14 @@ $("#query").click(function () {
|
||||
var scale = $("#scale").val();
|
||||
var manc = $("#manc").val();
|
||||
var loadtype = $("#loadtype").val();
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype);
|
||||
var monitorNature = $("#monitorNature").val();
|
||||
console.log(loadtype)
|
||||
console.log(monitorNature)
|
||||
refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature);
|
||||
});
|
||||
|
||||
//请求后台刷新页面数据
|
||||
function refresh(startTime, endTime, area,scale,manc,loadtype) {
|
||||
function refresh(startTime, endTime, area,scale,manc,loadtype,monitorNature) {
|
||||
var i;
|
||||
$.ajax({
|
||||
url: '/pqs9000/area/dataIntegrality',
|
||||
@@ -181,7 +193,8 @@ function refresh(startTime, endTime, area,scale,manc,loadtype) {
|
||||
area: area,
|
||||
scale:scale,
|
||||
manc:manc,
|
||||
loadtype:loadtype
|
||||
loadtype:loadtype,
|
||||
monitorNature: monitorNature
|
||||
},
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
279
pqs9000/src/main/webapp/jspJS/area/statisticalAnalysis.js
Normal file
279
pqs9000/src/main/webapp/jspJS/area/statisticalAnalysis.js
Normal file
@@ -0,0 +1,279 @@
|
||||
var $area=$("#area");
|
||||
var $startTime=$("#startTime");
|
||||
var $endTime=$("#endTime");
|
||||
var $postType = $("#postType")
|
||||
var $powerId = $("#powerId")
|
||||
$("#interval").val("月份");
|
||||
|
||||
var buttonname;
|
||||
var companyname;
|
||||
var tigName;
|
||||
var volData;
|
||||
var dataTable=null;
|
||||
var startTime,endTime,area,postType,powerId;
|
||||
|
||||
$(function () {
|
||||
startTime = $startTime.eq(0).val();
|
||||
endTime = $endTime.eq(0).val();
|
||||
area = $area.eq(0).val();
|
||||
postType = $postType.eq(0).val();
|
||||
powerId = $powerId.eq(0).val();
|
||||
loadselect("电压等级","vollevel");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data:{
|
||||
start: startTime,
|
||||
end: endTime
|
||||
},
|
||||
async:false,
|
||||
url: "/pqs9000/device/getMsgInfo",
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
buttonname = data.body.name;
|
||||
tigName = data.body.name;
|
||||
}
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/pqs9000/theme/getThemeInfo",
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
companyname = data.body.name;
|
||||
}
|
||||
})
|
||||
|
||||
//初始化按钮开关
|
||||
$(".checkbox").bootstrapSwitch({
|
||||
onText: buttonname, // 设置ON文本
|
||||
offText: companyname, // 设置OFF文本
|
||||
onColor: "primary",// 设置ON文本颜色 (info/success/warning/danger/primary)
|
||||
offColor: "primary", // 设置OFF文本颜色 (info/success/warning/danger/primary)
|
||||
size: "small", // 设置控件大小,从小到大 (mini/small/normal/large)
|
||||
handleWidth: "60",//设置控件宽度
|
||||
// 当开关状态改变时触发
|
||||
onSwitchChange: function (event, state) {
|
||||
if (state === true) {
|
||||
tigName = buttonname;
|
||||
refresh(area, startTime, endTime,postType,powerId);
|
||||
} else {
|
||||
tigName = companyname;
|
||||
refresh(area, startTime, endTime,postType,powerId);
|
||||
}
|
||||
}
|
||||
});
|
||||
//初始化区域
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/pqs9000/user/getAreasInfo",
|
||||
dataType:'json',
|
||||
success:function (data) {
|
||||
$("#area").val(data[0].name);
|
||||
$("#area").attr("index", data[0].id);
|
||||
areaTree = $.fn.zTree.init($("#areaTree"), settingAreaTree, data);
|
||||
//初始化页面内容
|
||||
area = $area.eq(0).attr("index");
|
||||
startTime = $startTime.eq(0).val();
|
||||
endTime = $endTime.eq(0).val();
|
||||
postType = $postType.eq(0).val();
|
||||
powerId = $powerId.eq(0).val();
|
||||
refresh(area, startTime, endTime,postType,powerId);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
//点击确定,去后台请求参数
|
||||
$("#query").click(function() {
|
||||
area = $area.eq(0).attr("index");
|
||||
startTime = $startTime.eq(0).val();
|
||||
endTime = $endTime.eq(0).val();
|
||||
postType = $postType.eq(0).val();
|
||||
powerId = $powerId.eq(0).val();
|
||||
refresh(area,startTime,endTime,postType,powerId);
|
||||
});
|
||||
|
||||
//获取表格数据
|
||||
function refresh(area,startTime,endTime,postType,powerId){
|
||||
var i ;
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "/pqs9000/area/statisticalAnalysis",
|
||||
dataType : "json",
|
||||
data : {
|
||||
startTime : startTime,
|
||||
endTime : endTime,
|
||||
area: area,
|
||||
postType: postType,
|
||||
powerId: powerId
|
||||
},
|
||||
beforeSend: function () {
|
||||
i = ityzl_SHOW_LOAD_LAYER();
|
||||
},
|
||||
success : function(data) {
|
||||
if (data.code === 500) {
|
||||
layer.msg(data.message,{icon:2,time:2000})
|
||||
volData=null;
|
||||
} else {
|
||||
translateData(data.body);
|
||||
}
|
||||
//***********关闭loading
|
||||
ityzl_CLOSE_LOAD_LAYER(i);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function translateData(data) {
|
||||
var tableData = '';
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
for (var j = 0; j < data[i].typeLists.length; j++) {
|
||||
for (var k = 0; k < data[i].typeLists[j].dataLists.length; k++) {
|
||||
tableData += '["","' + data[i].deptName + '", "' + data[i].typeLists[j].name + '","'
|
||||
+ data[i].typeLists[j].dataLists[k].name + '","' + data[i].typeLists[j].dataLists[k].allLineCount + '","' + data[i].typeLists[j].dataLists[k].runLineCount + '","'
|
||||
+ data[i].typeLists[j].dataLists[k].checkLineCount + '","' + data[i].typeLists[j].dataLists[k].backLineCount + '","';
|
||||
if (k === 0) {
|
||||
var n = 0;
|
||||
if (j === 0) {
|
||||
for (var l = 0; l < data[i].typeLists.length; l++) {
|
||||
for (var m = 0; m < data[i].typeLists[l].dataLists.length; m++) {
|
||||
n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
tableData += n + '","' + data[i].typeLists[j].dataLists.length + '"],';
|
||||
} else {
|
||||
tableData += '0","0"],'; //前面表示所有行,后面表示自己的行
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tableData = tableData.substring(0, tableData.lastIndexOf(','));
|
||||
tableData = eval('[' + tableData + ']');
|
||||
console.log("tableData==:" + tableData)
|
||||
initTable(tableData);
|
||||
}
|
||||
|
||||
function initTable(data) {
|
||||
$('#tongji').dataTable({
|
||||
"columns": [
|
||||
{"title": "序号"},
|
||||
{"title": "区域"},
|
||||
{"title": "类型"},
|
||||
{"title": "分类型"},
|
||||
{"title": "监测点总数"},
|
||||
{"title": "监测点投运数"},
|
||||
{"title": "监测点检修数"},
|
||||
{"title": "监测点退运数"}
|
||||
],
|
||||
paging: false,
|
||||
scrollY: ($(window).height() * 0.83),
|
||||
lengthChange: false,
|
||||
language: {
|
||||
url: '/pqs9000/json/chine.json',
|
||||
},
|
||||
searching: false,
|
||||
info: false,
|
||||
ordering: false,
|
||||
destroy: true,
|
||||
data: data,
|
||||
fnDrawCallback: function () {
|
||||
this.api().column(0).nodes().each(function (cell, i) {
|
||||
cell.innerHTML = i + 1;
|
||||
});
|
||||
},
|
||||
columnDefs: [{
|
||||
targets: 1,
|
||||
createdCell: function (td, cellData, rowData, row, col) {
|
||||
var rowspan = rowData[8];
|
||||
|
||||
if (rowspan > 1) {
|
||||
$(td).attr('rowspan', rowspan)
|
||||
}
|
||||
if (rowspan == 0) {
|
||||
$(td).remove();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
targets: 2,
|
||||
createdCell: function (td, cellData, rowData, row, col) {
|
||||
var rowspan = rowData[9];
|
||||
|
||||
if (rowspan > 1) {
|
||||
$(td).attr('rowspan', rowspan)
|
||||
}
|
||||
if (rowspan == 0) {
|
||||
$(td).remove();
|
||||
}
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function loadselect(dictypeName,div){
|
||||
var part='#'+div;
|
||||
$(part).find("option").remove();
|
||||
$.ajax({
|
||||
method : "post",
|
||||
url : "/pqs9000/device/getselect",
|
||||
data : {
|
||||
dictypeName:dictypeName
|
||||
},
|
||||
async:false,
|
||||
success : function(data) {
|
||||
if(data == null){
|
||||
var message = dictypeName + '信息加载失败';
|
||||
layer.msg(message,{icon:1,time:1000});
|
||||
}else{
|
||||
var option0 = $("<option selected value='"
|
||||
+ null + "'>"
|
||||
+ "全部" + "</option>");
|
||||
$(part).append(option0);
|
||||
$.each(data, function(i, item) {
|
||||
var option = $("<option value='"
|
||||
+ item.dicIndex + "'>"
|
||||
+ item.dicName + "</option>");
|
||||
$(part).append(option);
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//特殊处理,表头紧缩问题--start
|
||||
var it=null;
|
||||
function startQuery() {
|
||||
//实时刷新时间单位为毫秒
|
||||
it= setInterval('refreshQuery()',100);
|
||||
|
||||
}
|
||||
/* 刷新查询 */
|
||||
function refreshQuery(){
|
||||
var width=$("#vdlist").width();
|
||||
if(width>100){
|
||||
initTable(resultData);
|
||||
window.clearInterval(it)
|
||||
}
|
||||
}
|
||||
//特殊处理,表头紧缩问题--end
|
||||
|
||||
//制保留2位小数,如:2,会在2后面补上00.即2.00
|
||||
function toDecimal2(x) {
|
||||
var f = parseFloat(x);
|
||||
if (isNaN(f)) {
|
||||
return false;
|
||||
}
|
||||
var f = Math.round(x*100)/100;
|
||||
var s = f.toString();
|
||||
var rs = s.indexOf('.');
|
||||
if (rs < 0) {
|
||||
rs = s.length;
|
||||
s += '.';
|
||||
}
|
||||
while (s.length <= rs + 2) {
|
||||
s += '0';
|
||||
}
|
||||
return s;
|
||||
}
|
||||
@@ -10,6 +10,10 @@ var companyname;
|
||||
var tiggleValue = "";
|
||||
var allNetsData = [];
|
||||
var countryNetsData = [];
|
||||
var data1;
|
||||
var data2;
|
||||
var data3;
|
||||
var data4;
|
||||
$("#interval").val("月份");
|
||||
/**
|
||||
* 电压等级排序自定义比较start
|
||||
@@ -116,9 +120,13 @@ $(function () {
|
||||
if (state === true) {
|
||||
tiggleValue = buttonname;
|
||||
initTable(allNetsData);
|
||||
$('#online').text(data1===null?0:data1);
|
||||
$('#offline').text(data2===null?0:data2);
|
||||
} else {
|
||||
tiggleValue = companyname;
|
||||
initTable(countryNetsData);
|
||||
$('#online').text(data3===null?0:data3);
|
||||
$('#offline').text(data4===null?0:data4);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -132,11 +140,12 @@ $("#query").click(function () {
|
||||
var endTime = $endTime.eq(0).val();
|
||||
var devflag = $("#devflag").val();
|
||||
var powerId = $("#powerId").val();
|
||||
refresh(area, startTime, endTime,devflag,powerId);
|
||||
var runFlag = $("#runFlag").val();
|
||||
refresh(area, startTime, endTime,devflag,powerId,runFlag);
|
||||
});
|
||||
|
||||
//获取表格数据
|
||||
function refresh(area, startTime, endTime,devflag,powerId) {
|
||||
function refresh(area, startTime, endTime,devflag,powerId,runFlag) {
|
||||
var i;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -147,7 +156,8 @@ function refresh(area, startTime, endTime,devflag,powerId) {
|
||||
endTime: endTime,
|
||||
area: area,
|
||||
devflag:devflag,
|
||||
powerId:powerId
|
||||
powerId:powerId,
|
||||
runFlag:runFlag
|
||||
},
|
||||
beforeSend: function () {
|
||||
i = ityzl_SHOW_LOAD_LAYER();
|
||||
@@ -158,9 +168,17 @@ function refresh(area, startTime, endTime,devflag,powerId) {
|
||||
//没有数据
|
||||
allNetsData = null;
|
||||
countryNetsData = null;
|
||||
data1 = null;
|
||||
data2 = null;
|
||||
data3 = null;
|
||||
data4 = null;
|
||||
} else {
|
||||
allNetsData = data.body.allNets;
|
||||
countryNetsData = data.body.countryNets;
|
||||
data1 = data.body.allOnlineNum;
|
||||
data2 = data.body.allOfflineNum;
|
||||
data3 = data.body.countryOnlineNum;
|
||||
data4 = data.body.countryOfflineNum;
|
||||
}
|
||||
startQuery();
|
||||
//***********关闭loading
|
||||
@@ -219,8 +237,9 @@ function initTable(data) {
|
||||
}
|
||||
},
|
||||
{width: "8%", data: "deviceIp"},
|
||||
{width: "6%", data: "frontDev"},
|
||||
{
|
||||
width: "8%", data: "devFlag", render: function (data, type, full, meta) {
|
||||
width: "5%", data: "devFlag", render: function (data, type, full, meta) {
|
||||
var temp = Number(data);
|
||||
switch (temp) {
|
||||
case 0:
|
||||
@@ -233,7 +252,7 @@ function initTable(data) {
|
||||
}
|
||||
},
|
||||
{
|
||||
width: "8%", data: "status", render: function (data, type, full, meta) {
|
||||
width: "5%", data: "status", render: function (data, type, full, meta) {
|
||||
var temp = Number(data);
|
||||
switch (temp) {
|
||||
case 0:
|
||||
@@ -243,7 +262,7 @@ function initTable(data) {
|
||||
}
|
||||
}
|
||||
},
|
||||
{width: "8%", data: "updateTime"},
|
||||
{width: "10%", data: "updateTime"},
|
||||
{
|
||||
width: "8%", data: "integrity",
|
||||
render: function (data, type, full, meta) {
|
||||
@@ -258,7 +277,7 @@ function initTable(data) {
|
||||
}
|
||||
},
|
||||
{width: "8%", data: "device"},
|
||||
{width: "10%", data: "company"},
|
||||
{width: "8%", data: "company"},
|
||||
{width: "5%", data: "voltage", type: "number-fate"},
|
||||
{
|
||||
width: "12%", data: "", render: function (data, type, full, meta) {
|
||||
@@ -376,6 +395,18 @@ function showDetail(lineId) {
|
||||
}
|
||||
}
|
||||
|
||||
function showAnalysis() {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: '监测点统计分析',
|
||||
maxmin: false,
|
||||
shadeClose: true, // 点击遮罩关闭层
|
||||
area: ['100%', '100%'],
|
||||
content: '/pqs9000/business/statisticalAnalysis',
|
||||
scrollbar: false
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function modifyCss(dataTable) {
|
||||
@@ -407,8 +438,12 @@ function refreshQuery() {
|
||||
if (width > 100) {
|
||||
if (tiggleValue === buttonname) {
|
||||
initTable(allNetsData);
|
||||
$('#online').text(data1===null?0:data1);
|
||||
$('#offline').text(data2===null?0:data2);
|
||||
} else {
|
||||
initTable(countryNetsData);
|
||||
$('#online').text(data3===null?0:data3);
|
||||
$('#offline').text(data4===null?0:data4);
|
||||
}
|
||||
window.clearInterval(it)
|
||||
}
|
||||
|
||||
@@ -687,6 +687,7 @@ function eventTip() {
|
||||
scrollbar: false,
|
||||
content: 'tipwindow',
|
||||
shadeClose: false,
|
||||
shade: false,
|
||||
yes: function () {
|
||||
layer.closeAll();
|
||||
},
|
||||
|
||||
@@ -798,6 +798,20 @@ public class DeviceController {
|
||||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "findMaxDeviceName", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public String findMaxDeviceName(HttpServletRequest request, Long gdIndex) {
|
||||
String result;
|
||||
try {
|
||||
result = manaDevice.findMaxDeviceName(gdIndex);
|
||||
userLog.getLog("查询当前供电公司下面最大的设备名称", "成功", result, LogTypeEnum.SYSTEM.toString(), 0);
|
||||
} catch (Exception e) {
|
||||
result = null;
|
||||
userLog.getLog("查询当前供电公司下面最大的设备名称", "失败", result, LogTypeEnum.SYSTEM.toString(), 0);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "addDevice", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public HttpResult addDevice(HttpServletRequest request, HttpSession session, String devName, Long gdIndex,
|
||||
|
||||
@@ -123,4 +123,6 @@ public interface ManaDeviceService {
|
||||
*/
|
||||
int addMonitor(String monitorId);
|
||||
|
||||
String findMaxDeviceName(Long gdIndex);
|
||||
|
||||
}
|
||||
|
||||
@@ -2488,4 +2488,31 @@ public class ManaDeviceServiceImpl implements ManaDeviceService {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String findMaxDeviceName(Long gdIndex) {
|
||||
String name = deviceMapper.findMaxDeviceName(gdIndex);
|
||||
return incrementString(name);
|
||||
}
|
||||
|
||||
public String incrementString(String str) {
|
||||
// 查找最后一个非数字字符的位置
|
||||
int lastIndex = str.length() - 1;
|
||||
while (lastIndex >= 0 && Character.isDigit(str.charAt(lastIndex))) {
|
||||
lastIndex--;
|
||||
}
|
||||
// 如果没有找到非数字字符,说明整个字符串都是数字
|
||||
if (lastIndex == -1) {
|
||||
// 直接将字符串转换为整数,递增,再转回字符串
|
||||
return String.valueOf(Long.parseLong(str) + 1);
|
||||
}
|
||||
// 提取出数字部分
|
||||
String numberPart = str.substring(lastIndex + 1);
|
||||
// 将数字部分转换为整数,递增,再转回字符串
|
||||
long number = Long.parseLong(numberPart) + 1;
|
||||
String incrementedNumberPart = String.format("%0" + numberPart.length() + "d", number);
|
||||
// 将递增后的数字部分拼接到原字符串的非数字部分
|
||||
return str.substring(0, lastIndex + 1) + incrementedNumberPart;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -171,4 +171,8 @@ FROM
|
||||
WHERE
|
||||
a.dev_index = #{devIndex}
|
||||
</select>
|
||||
|
||||
<select id="findMaxDeviceName" resultType="String">
|
||||
SELECT MAX(NAME) FROM PQ_DEVICE WHERE GD_INDEX = #{gdIndex}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -49,6 +49,20 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("html").css("height", "100px");
|
||||
|
||||
//获取默认装置名称
|
||||
var gdIndex = $("#gdIndex").val();
|
||||
$.ajax({
|
||||
url: '/pqs9900/device/findMaxDeviceName',
|
||||
type: 'POST',
|
||||
dataType: "text",
|
||||
data: {
|
||||
gdIndex: gdIndex
|
||||
},
|
||||
success: function (data) {
|
||||
$('#devName').val(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
||||
|
||||
Reference in New Issue
Block a user