Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f24e6c276 | |||
| fb5467e553 | |||
| dbf56ff957 | |||
| 67a59e5214 | |||
|
|
8022b12b4c | ||
| 945ae25c07 | |||
| 789ebff40b | |||
|
|
8122c7569d | ||
|
|
58d635f1a5 | ||
|
|
cbf1f14780 | ||
|
|
a44b8f2348 | ||
| a739eed039 | |||
|
|
76d4f61670 | ||
| 3f98482833 | |||
|
|
a530e9fa08 | ||
|
|
67d6b245d6 | ||
|
|
7c7c66280d | ||
| b45fe4c040 | |||
|
|
48e602ce25 | ||
| 0201cbe948 | |||
| 7862b29a18 | |||
| 856042feee | |||
| 6ffcd6e092 | |||
| f8e28fc4b1 | |||
|
|
c682b7f198 | ||
|
|
5577757d2e | ||
| ebc623ff1d | |||
| 337cadc6b8 | |||
|
|
ea6b951b11 | ||
| dcdc23feea | |||
|
|
6ab679caf2 | ||
|
|
7c278892a3 | ||
| 38ccaf4336 | |||
| 1765cd62c8 | |||
| 17ef2d5272 | |||
|
|
32b736e651 | ||
|
|
995a267ea7 | ||
| 46268894f1 | |||
|
|
70b1e81dd4 | ||
|
|
4b75070d07 | ||
| 8baa523008 | |||
|
|
3249634bf5 | ||
|
|
9db6ebf441 | ||
|
|
4a964c82c7 | ||
|
|
3121df839d | ||
|
|
2d77e44795 | ||
| 7f3ae60701 | |||
|
|
f31302c96e | ||
|
|
cfe80684f8 | ||
|
|
5d1f138784 | ||
|
|
e03c0d164c | ||
|
|
0bee509621 | ||
|
|
06c2cf095c | ||
|
|
3148a84444 | ||
|
|
68b7425a4e | ||
| c8525f477a | |||
| 4d070f93c6 | |||
| 714c82c45e |
@@ -23,7 +23,7 @@ import java.util.*;
|
|||||||
public class DrawPicUtil {
|
public class DrawPicUtil {
|
||||||
|
|
||||||
//目前写死,后续作为配置
|
//目前写死,后续作为配置
|
||||||
private final String URL = "http://192.168.1.18:5174/picture";
|
private final String URL = "http://192.168.1.24:5174/picture";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
|||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
@@ -37,6 +38,8 @@ public interface CommLedgerDeptClient {
|
|||||||
HttpResult<Object> update(@RequestBody Dept dept);
|
HttpResult<Object> update(@RequestBody Dept dept);
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/existMonitorDeptTree")
|
||||||
|
public HttpResult<List<String>> existMonitorDeptTree();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.device.biz.commApi;
|
|||||||
|
|
||||||
import com.njcn.common.pojo.constant.ServerInfo;
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.commApi.fallback.CommLineClientFallbackFactory;
|
||||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
@@ -21,7 +22,7 @@ import java.util.List;
|
|||||||
value = ServerInfo.DEVICE,
|
value = ServerInfo.DEVICE,
|
||||||
path = "commLine",
|
path = "commLine",
|
||||||
contextId = "commLine",
|
contextId = "commLine",
|
||||||
fallbackFactory = CommTerminalGeneralClientFallbackFactory.class)
|
fallbackFactory = CommLineClientFallbackFactory.class)
|
||||||
public interface CommLineClient {
|
public interface CommLineClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
import com.njcn.device.biz.commApi.fallback.CommTerminalGeneralClientFallbackFactory;
|
||||||
import com.njcn.device.biz.pojo.dto.*;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
|
import com.njcn.device.biz.pojo.param.MonitorGetParam;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@@ -63,6 +64,13 @@ public interface CommTerminalGeneralClient {
|
|||||||
@PostMapping("deptGetSubStation")
|
@PostMapping("deptGetSubStation")
|
||||||
HttpResult<List<DeptGetSubStationDTO>> deptSubStation(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
HttpResult<List<DeptGetSubStationDTO>> deptSubStation(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据单位获取所有变电站详细信息
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@PostMapping("/deptGetSubStationInfo")
|
||||||
|
HttpResult<List<DeptGetSubStationDTO.Info>> deptGetSubStationInfo(@RequestBody @Validated DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有母线
|
* 根据单位获取所有母线
|
||||||
*
|
*
|
||||||
@@ -174,11 +182,17 @@ public interface CommTerminalGeneralClient {
|
|||||||
@GetMapping("/getCustomDetailByLineId")
|
@GetMapping("/getCustomDetailByLineId")
|
||||||
HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id);
|
HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pms获取指定单位下面的母线以及母线下面的监测点信息
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/1/26
|
||||||
|
*/
|
||||||
@GetMapping("/getBusBarAndHisMonitor")
|
@GetMapping("/getBusBarAndHisMonitor")
|
||||||
HttpResult<List<BusBarAndHisMonitorDTO>> getBusBarAndHisMonitor();
|
HttpResult<List<BusBarAndHisMonitorDTO>> getBusBarAndHisMonitor();
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/tagOrIdGetMonitorList")
|
||||||
|
HttpResult<List<CommMonitorInfoDTO>> tagOrIdGetMonitorList(@RequestBody MonitorGetParam monitorGetParam);
|
||||||
/**
|
/**
|
||||||
* 用于返回pq 还是pms系统
|
* 用于返回pq 还是pms系统
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ public class CommLedgerDeptClientFallbackFactory implements FallbackFactory<Comm
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<String>> existMonitorDeptTree() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取存在投运监测点的部门id集合", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||||
import com.njcn.device.biz.pojo.dto.*;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
|
import com.njcn.device.biz.pojo.param.MonitorGetParam;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
@@ -53,6 +54,12 @@ public class CommTerminalGeneralClientFallbackFactory implements FallbackFactory
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<DeptGetSubStationDTO.Info>> deptGetSubStationInfo(DeptGetLineParam deptGetLineParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有变电站详细信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<DeptGetBusBarDTO>> deptBusBar(DeptGetLineParam deptGetLineParam) {
|
public HttpResult<List<DeptGetBusBarDTO>> deptBusBar(DeptGetLineParam deptGetLineParam) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有母线", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "根据单位获取所有母线", throwable.toString());
|
||||||
@@ -145,7 +152,14 @@ public class CommTerminalGeneralClientFallbackFactory implements FallbackFactory
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<BusBarAndHisMonitorDTO>> getBusBarAndHisMonitor() {
|
public HttpResult<List<BusBarAndHisMonitorDTO>> getBusBarAndHisMonitor() {
|
||||||
return null;
|
log.error("{}异常,降级处理,异常为:{}", "pms获取指定单位下面的母线以及母线下面的监测点信息", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<CommMonitorInfoDTO>> tagOrIdGetMonitorList(MonitorGetParam monitorGetParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "根据对象标签,监测点,获取主网监测点", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.njcn.device.biz.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class CommMonitorInfoDTO {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String powerStationName;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -24,4 +24,14 @@ public class DeptGetSubStationDTO extends DeptGetBase {
|
|||||||
|
|
||||||
@ApiModelProperty(name = "stationIds",value = "变电站/监测点信息")
|
@ApiModelProperty(name = "stationIds",value = "变电站/监测点信息")
|
||||||
private List<String> stationAndMonitorIDs;
|
private List<String> stationAndMonitorIDs;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Info extends DeptGetBase{
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "stationIds",value = "电站信息")
|
||||||
|
private List<SubGetBase> stationIds;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "pwStationIds",value = "配网电站信息")
|
||||||
|
private List<SubGetBase> pwStationIds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,11 @@ public class LineDevGetDTO {
|
|||||||
*/
|
*/
|
||||||
private String lineTag;
|
private String lineTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点对象类型
|
||||||
|
*/
|
||||||
|
private String objType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 装置通讯状态
|
* 装置通讯状态
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.njcn.device.biz.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 变电站详细信息
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2024/2/27 11:33
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class SubGetBase implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站电压等级
|
||||||
|
*/
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有子级监测点信息
|
||||||
|
*/
|
||||||
|
private List<String> unitChildrenList;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -22,4 +22,12 @@ public class TerminalGetBase {
|
|||||||
private String ledgerId;
|
private String ledgerId;
|
||||||
|
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class Extend extends TerminalGetBase {
|
||||||
|
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
private String voltageLevel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.device.biz.pojo.param;
|
||||||
|
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MonitorGetParam {
|
||||||
|
|
||||||
|
private List<String> tagList;
|
||||||
|
|
||||||
|
|
||||||
|
private List<String> monitorIds;
|
||||||
|
|
||||||
|
private List<String> deptIds;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,241 @@
|
|||||||
|
package com.njcn.device.pms.pojo.excel;
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import cn.afterturn.easypoi.handler.inter.IExcelModel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
|
||||||
|
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/1
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Deprecated
|
||||||
|
public class PmsLedgerExcel implements Serializable, IExcelModel {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点名称", width = 30)
|
||||||
|
@NotBlank(message = "监测点名称不能为空")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织机构名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "组织机构名称", width = 30)
|
||||||
|
@NotBlank(message = "组织机构名称不能为空")
|
||||||
|
private String orgName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维单位名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "运维单位名称", width = 30)
|
||||||
|
@NotBlank(message = "运维单位名称不能为空")
|
||||||
|
private String operationName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变电站名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "变电站名称", width = 30)
|
||||||
|
@NotBlank(message = "变电站名称不能为空")
|
||||||
|
private String powerrName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装置的ip
|
||||||
|
*/
|
||||||
|
@Excel(name = "装置IP", width = 30)
|
||||||
|
@NotBlank(message = "装置的ip不能为空")
|
||||||
|
private String devIp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否是上送国网监测点,0-否 1-是
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否具备上送国网条件", width = 30,replace = {"是_1","否_0"})
|
||||||
|
private Integer isUpToGrid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中台母线ID
|
||||||
|
*/
|
||||||
|
@Excel(name = "母线/线路编号", width = 30)
|
||||||
|
private String busId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测母线名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "母线/线路名称", width = 30)
|
||||||
|
@NotBlank(message = "监测母线名称不能为空")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压等级(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压等级", width = 30)
|
||||||
|
@NotBlank(message = "电压等级不能为空")
|
||||||
|
private String voltageLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点状态(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点状态", width = 30)
|
||||||
|
@NotBlank(message = "监测点状态不能为空")
|
||||||
|
private String monitorState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点类型(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测点类型", width = 30)
|
||||||
|
@NotBlank(message = "监测点类型不能为空")
|
||||||
|
private String monitorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小短路容量
|
||||||
|
*/
|
||||||
|
@Excel(name = "最小短路容量", width = 30)
|
||||||
|
@NotNull(message = "最小短路容量不能为空")
|
||||||
|
private Float minShortCircuitCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 供电设备容量
|
||||||
|
*/
|
||||||
|
@Excel(name = "供电设备容量", width = 30)
|
||||||
|
@NotNull(message = "供电设备容量不能为空")
|
||||||
|
private Float powerSupplyEqCapacity;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户协议容量
|
||||||
|
*/
|
||||||
|
@Excel(name = "用户协议容量", width = 30)
|
||||||
|
@NotNull(message = "用户协议容量不能为空")
|
||||||
|
private Float userAgreementCapacity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差限值(上)
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压偏差限值(上)", width = 30)
|
||||||
|
@NotNull(message = "电压偏差限值(上)不能为空")
|
||||||
|
private Float voltageDeviationUpperLimit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差限值(下)
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压偏差限值(下)", width = 30)
|
||||||
|
@NotNull(message = "电压偏差限值(下)不能为空")
|
||||||
|
private Float voltageDeviationLowerLimit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压互感器类型(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "电压互感器类型", width = 30)
|
||||||
|
@NotBlank(message = "电压互感器类型不能为空")
|
||||||
|
private String potentialTransFormerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中性点接地方式(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "中性点接地方式", width = 30)
|
||||||
|
@NotBlank(message = "中性点接地方式不能为空")
|
||||||
|
private String neutralGroundingMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否用户专线(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否用户专线", width = 30,replace = {"是_1","否_0"})
|
||||||
|
@NotNull(message = "是否用户专线不能为空")
|
||||||
|
private Integer isSpecialSupplyElectricity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点标签
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测对象标签", width = 30)
|
||||||
|
@NotBlank(message = "监测点标签不能为空")
|
||||||
|
private String monitorTag;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三级级监测对象类型
|
||||||
|
*/
|
||||||
|
@Excel(name = "对象类型", width = 30)
|
||||||
|
@NotBlank(message = "监测对象类型不能为空")
|
||||||
|
private String objType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行业类型
|
||||||
|
*/
|
||||||
|
@Excel(name = "行业分类编码", width = 30)
|
||||||
|
private String tradeCode;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测对象名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测对象名称", width = 30)
|
||||||
|
private String monitorObjectName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测终端接线方式(字典)
|
||||||
|
*/
|
||||||
|
@Excel(name = "监测终端接线方式", width = 30)
|
||||||
|
@NotBlank(message = "监测终端接线方式不能为空")
|
||||||
|
private String terminalWiringMethod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计间隔
|
||||||
|
*/
|
||||||
|
@Excel(name = "统计间隔(min)", width = 30)
|
||||||
|
@NotNull(message = "统计间隔不能为空")
|
||||||
|
private Integer statisticalInterval;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的监测终端同源编号(外键)
|
||||||
|
*/
|
||||||
|
@Excel(name = "关联的监测终端编号", width = 30)
|
||||||
|
private String terminalCode;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场站属性
|
||||||
|
*/
|
||||||
|
@Excel(name = "新能源场", width = 30)
|
||||||
|
private String fieldStation;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 牵引站id
|
||||||
|
*/
|
||||||
|
@Excel(name = "关联牵引站编号", width = 30)
|
||||||
|
private String tractionId;
|
||||||
|
|
||||||
|
@Excel(name = "错误信息", width = 30)
|
||||||
|
private String errorMsg;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -45,6 +45,10 @@ public class TractionStationParam {
|
|||||||
@NotBlank(message = "铁路线路名称不可为空")
|
@NotBlank(message = "铁路线路名称不可为空")
|
||||||
private String railwayLineName;
|
private String railwayLineName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "railwayType", value = "铁路线路类型")
|
||||||
|
@NotBlank(message = "铁路线路类型不可为空")
|
||||||
|
private String railwayType;
|
||||||
|
|
||||||
@ApiModelProperty(name = "connetGroupWay", value = "牵引站变压器接线方式")
|
@ApiModelProperty(name = "connetGroupWay", value = "牵引站变压器接线方式")
|
||||||
@NotBlank(message = "牵引站变压器接线方式不可为空")
|
@NotBlank(message = "牵引站变压器接线方式不可为空")
|
||||||
private String connetGroupWay;
|
private String connetGroupWay;
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.device.pms.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
* 数据中心监测点与河北pms系统监测点关系实体(后期有数据需要删除)
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/1/30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("a_test_relation_monitor")
|
||||||
|
@Deprecated
|
||||||
|
public class ATestRelationMonitor {
|
||||||
|
|
||||||
|
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
private String lineVoltageLevel;
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private String monitorId;
|
||||||
|
|
||||||
|
private String monitorVoltageLevel;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -48,7 +48,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 电压偏差严重度
|
* 电压偏差严重度
|
||||||
*/
|
*/
|
||||||
private Integer vdevSeverity;
|
private Double vdevSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 频率偏差告警情况(0:否 1:是)
|
* 频率偏差告警情况(0:否 1:是)
|
||||||
@@ -58,7 +58,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 频率偏差严重度
|
* 频率偏差严重度
|
||||||
*/
|
*/
|
||||||
private Integer freqSeverity;
|
private Double freqSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三相电压不平衡度告警情况(0:否 1:是)
|
* 三相电压不平衡度告警情况(0:否 1:是)
|
||||||
@@ -68,7 +68,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 三相电压不平衡严重度
|
* 三相电压不平衡严重度
|
||||||
*/
|
*/
|
||||||
private Integer unbalanceSeverity;
|
private Double unbalanceSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谐波电压告警情况(0:否 1:是)
|
* 谐波电压告警情况(0:否 1:是)
|
||||||
@@ -78,7 +78,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 谐波电压严重度
|
* 谐波电压严重度
|
||||||
*/
|
*/
|
||||||
private Integer vSeverity;
|
private Double vSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 闪变告警情况(0:否 1:是)
|
* 闪变告警情况(0:否 1:是)
|
||||||
@@ -88,7 +88,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 闪变严重度
|
* 闪变严重度
|
||||||
*/
|
*/
|
||||||
private Integer flickerSeverity;
|
private Double flickerSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压暂降告警情况(0:否 1:是)
|
* 电压暂降告警情况(0:否 1:是)
|
||||||
@@ -98,7 +98,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 电压暂降严重度
|
* 电压暂降严重度
|
||||||
*/
|
*/
|
||||||
private Integer sagSeverity;
|
private Double sagSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短时中断告警情况(0:否 1:是)
|
* 短时中断告警情况(0:否 1:是)
|
||||||
@@ -108,7 +108,7 @@ public class RMpMonitorAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 短时中断严重度
|
* 短时中断严重度
|
||||||
*/
|
*/
|
||||||
private Integer interruptSeverity;
|
private Double interruptSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 稳态指标评级结果(0 较差 1中等 2较好)
|
* 稳态指标评级结果(0 较差 1中等 2较好)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class RStatAreaAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 电压偏差告警超标占比
|
* 电压偏差告警超标占比
|
||||||
*/
|
*/
|
||||||
private Integer vdevAlarmRatio;
|
private Double vdevAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 频率偏差告警情况(0:否 1:是)
|
* 频率偏差告警情况(0:否 1:是)
|
||||||
@@ -49,7 +49,7 @@ public class RStatAreaAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 频率偏差告警超标占比
|
* 频率偏差告警超标占比
|
||||||
*/
|
*/
|
||||||
private Integer freqAlarmRatio;
|
private Double freqAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三相电压不平衡度告警情况(0:否 1:是)
|
* 三相电压不平衡度告警情况(0:否 1:是)
|
||||||
@@ -59,7 +59,7 @@ public class RStatAreaAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 三相电压不平衡度告警超标占比
|
* 三相电压不平衡度告警超标占比
|
||||||
*/
|
*/
|
||||||
private Integer unbalanceAlarmRatio;
|
private Double unbalanceAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谐波电压告警情况(0:否 1:是)
|
* 谐波电压告警情况(0:否 1:是)
|
||||||
@@ -69,7 +69,7 @@ public class RStatAreaAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 谐波电压告警超标占比
|
* 谐波电压告警超标占比
|
||||||
*/
|
*/
|
||||||
private Integer vAlarmRatio;
|
private Double vAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 闪变告警情况(0:否 1:是)
|
* 闪变告警情况(0:否 1:是)
|
||||||
@@ -79,7 +79,7 @@ public class RStatAreaAlarmCountM implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 闪变告警超标占比
|
* 闪变告警超标占比
|
||||||
*/
|
*/
|
||||||
private Integer flickerAlarmRatio;
|
private Double flickerAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压暂降告警情况(0:否 1:是)
|
* 电压暂降告警情况(0:否 1:是)
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class TractionStation extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String railwayLineName;
|
private String railwayLineName;
|
||||||
/**
|
/**
|
||||||
* 铁路编号
|
* 铁路类型
|
||||||
*/
|
*/
|
||||||
private String railwayType;
|
private String railwayType;
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 电压偏差严重度
|
* 电压偏差严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "vdevSeverity", value = "电压偏差严重度")
|
@ApiModelProperty(name = "vdevSeverity", value = "电压偏差严重度")
|
||||||
private Integer vdevSeverity;
|
private Double vdevSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 频率偏差告警情况(0:否 1:是)
|
* 频率偏差告警情况(0:否 1:是)
|
||||||
@@ -69,7 +69,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 频率偏差严重度
|
* 频率偏差严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "freqSeverity", value = "频率偏差严重度")
|
@ApiModelProperty(name = "freqSeverity", value = "频率偏差严重度")
|
||||||
private Integer freqSeverity;
|
private Double freqSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三相电压不平衡度告警情况(0:否 1:是)
|
* 三相电压不平衡度告警情况(0:否 1:是)
|
||||||
@@ -81,7 +81,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 三相电压不平衡度严重度
|
* 三相电压不平衡度严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "unbalanceSeverity", value = "三相电压不平衡度严重度")
|
@ApiModelProperty(name = "unbalanceSeverity", value = "三相电压不平衡度严重度")
|
||||||
private Integer unbalanceSeverity;
|
private Double unbalanceSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谐波电压告警情况(0:否 1:是)
|
* 谐波电压告警情况(0:否 1:是)
|
||||||
@@ -93,7 +93,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 谐波电压严重度
|
* 谐波电压严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "vSeverity", value = "谐波电压严重度")
|
@ApiModelProperty(name = "vSeverity", value = "谐波电压严重度")
|
||||||
private Integer vSeverity;
|
private Double vSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 闪变告警情况(0:否 1:是)
|
* 闪变告警情况(0:否 1:是)
|
||||||
@@ -105,7 +105,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 闪变严重度
|
* 闪变严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "flickerSeverity", value = "闪变严重度")
|
@ApiModelProperty(name = "flickerSeverity", value = "闪变严重度")
|
||||||
private Integer flickerSeverity;
|
private Double flickerSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压暂降告警情况(0:否 1:是)
|
* 电压暂降告警情况(0:否 1:是)
|
||||||
@@ -117,7 +117,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 电压暂降告严重度
|
* 电压暂降告严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "sagSeverity", value = "电压暂降严重度")
|
@ApiModelProperty(name = "sagSeverity", value = "电压暂降严重度")
|
||||||
private Integer sagSeverity;
|
private Double sagSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 短时中断告警情况(0:否 1:是)
|
* 短时中断告警情况(0:否 1:是)
|
||||||
@@ -130,7 +130,7 @@ public class RMpMonitorAlarmCountMVO implements Serializable {
|
|||||||
* 短时中断严重度
|
* 短时中断严重度
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "interruptSeverity", value = "短时中断告严重度")
|
@ApiModelProperty(name = "interruptSeverity", value = "短时中断告严重度")
|
||||||
private Integer interruptSeverity;
|
private Double interruptSeverity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 稳态指标评级结果(0 较差 1中等 2较好)
|
* 稳态指标评级结果(0 较差 1中等 2较好)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.device.pms.pojo.vo;
|
package com.njcn.device.pms.pojo.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -85,4 +86,16 @@ public class ROperatingIndexCommonVO {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = " isUnusual", value = "数据是否异常(0:正常 1:异常)")
|
@ApiModelProperty(name = " isUnusual", value = "数据是否异常(0:正常 1:异常)")
|
||||||
private Integer isUnusual;
|
private Integer isUnusual;
|
||||||
|
|
||||||
|
public void setDataIntegrityRate(Double dataIntegrityRate) {
|
||||||
|
this.dataIntegrityRate = NumberUtil.round(dataIntegrityRate*100,2).doubleValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataRightRate(Double dataRightRate) {
|
||||||
|
this.dataRightRate = NumberUtil.round(dataRightRate*100,2).doubleValue();;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndexIntegrityRate(Double indexIntegrityRate) {
|
||||||
|
this.indexIntegrityRate = NumberUtil.round(indexIntegrityRate*100,2).doubleValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.device.pms.pojo.vo;
|
package com.njcn.device.pms.pojo.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -66,6 +67,14 @@ public class ROperatingIndexVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = " isUnusual", value = "数据是否异常(0:正常 1:异常)")
|
@ApiModelProperty(name = " isUnusual", value = "数据是否异常(0:正常 1:异常)")
|
||||||
private Integer isUnusual;
|
private Integer isUnusual;
|
||||||
|
|
||||||
|
public void setDataIntegrityRate(Double dataIntegrityRate) {
|
||||||
|
this.dataIntegrityRate = NumberUtil.round(dataIntegrityRate*100,2).doubleValue();;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndexIntegrityRate(Double indexIntegrityRate) {
|
||||||
|
this.indexIntegrityRate = NumberUtil.round(indexIntegrityRate*100,2).doubleValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class RStatAreaAlarmCountMVO implements Serializable {
|
|||||||
* 电压偏差告警超标占比
|
* 电压偏差告警超标占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "vdevAlarmRatio", value = "电压偏差告警超标占比")
|
@ApiModelProperty(name = "vdevAlarmRatio", value = "电压偏差告警超标占比")
|
||||||
private Integer vdevAlarmRatio;
|
private Double vdevAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 频率偏差告警情况(0:否 1:是)
|
* 频率偏差告警情况(0:否 1:是)
|
||||||
@@ -61,7 +61,7 @@ public class RStatAreaAlarmCountMVO implements Serializable {
|
|||||||
* 频率偏差告警超标占比
|
* 频率偏差告警超标占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "freqAlarmRatio", value = "频率偏差告警超标占比")
|
@ApiModelProperty(name = "freqAlarmRatio", value = "频率偏差告警超标占比")
|
||||||
private Integer freqAlarmRatio;
|
private Double freqAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 三相电压不平衡度告警情况(0:否 1:是)
|
* 三相电压不平衡度告警情况(0:否 1:是)
|
||||||
@@ -73,7 +73,7 @@ public class RStatAreaAlarmCountMVO implements Serializable {
|
|||||||
* 三相电压不平衡度告警超标占比
|
* 三相电压不平衡度告警超标占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "unbalanceAlarmRatio", value = "三相电压不平衡度告警超标占比")
|
@ApiModelProperty(name = "unbalanceAlarmRatio", value = "三相电压不平衡度告警超标占比")
|
||||||
private Integer unbalanceAlarmRatio;
|
private Double unbalanceAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 谐波电压告警情况(0:否 1:是)
|
* 谐波电压告警情况(0:否 1:是)
|
||||||
@@ -85,7 +85,7 @@ public class RStatAreaAlarmCountMVO implements Serializable {
|
|||||||
* 谐波电压告警超标占比
|
* 谐波电压告警超标占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "vAlarmRatio", value = "谐波电压告警超标占比")
|
@ApiModelProperty(name = "vAlarmRatio", value = "谐波电压告警超标占比")
|
||||||
private Integer vAlarmRatio;
|
private Double vAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 闪变告警情况(0:否 1:是)
|
* 闪变告警情况(0:否 1:是)
|
||||||
@@ -97,7 +97,7 @@ public class RStatAreaAlarmCountMVO implements Serializable {
|
|||||||
* 闪变告警超标占比
|
* 闪变告警超标占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "flickerAlarmRatio", value = "闪变告警超标占比")
|
@ApiModelProperty(name = "flickerAlarmRatio", value = "闪变告警超标占比")
|
||||||
private Integer flickerAlarmRatio;
|
private Double flickerAlarmRatio;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压暂降告警情况(0:否 1:是)
|
* 电压暂降告警情况(0:否 1:是)
|
||||||
|
|||||||
@@ -125,4 +125,7 @@ public class TractionStationDTO extends Unit {
|
|||||||
@ExcelProperty(value = "更新时间")
|
@ExcelProperty(value = "更新时间")
|
||||||
@JSONField(format = "yyyy-MM-dd")
|
@JSONField(format = "yyyy-MM-dd")
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "牵引站名称")
|
||||||
|
private String tractionName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.device.biz.pojo.dto.StatisticsMonitor;
|
import com.njcn.device.biz.pojo.dto.StatisticsMonitor;
|
||||||
import com.njcn.device.biz.pojo.dto.*;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
|
import com.njcn.device.biz.pojo.param.MonitorGetParam;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||||
import com.njcn.device.pms.pojo.po.Monitor;
|
import com.njcn.device.pms.pojo.po.Monitor;
|
||||||
@@ -126,6 +127,19 @@ public class CommTerminalController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据单位获取所有变电站详细信息
|
||||||
|
* @param deptGetLineParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/deptGetSubStationInfo")
|
||||||
|
@ApiOperation("根据单位获取所有变电站详细信息")
|
||||||
|
@ApiImplicitParam(name = "deptGetLineParam", value = "请求体", required = true)
|
||||||
|
public HttpResult<List<DeptGetSubStationDTO.Info>> deptGetSubStationInfo(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("deptGetSubStationInfo");
|
||||||
|
List<DeptGetSubStationDTO.Info> result = commTerminalService.deptSubStationInfo(deptGetLineParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有母线
|
* 根据单位获取所有母线
|
||||||
* @author cdf
|
* @author cdf
|
||||||
@@ -378,6 +392,21 @@ public class CommTerminalController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据对象标签,监测点,获取主网监测点
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/28
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/tagOrIdGetMonitorList")
|
||||||
|
@ApiOperation("根据对象标签,监测点,获取主网监测点")
|
||||||
|
public HttpResult<List<CommMonitorInfoDTO>> tagOrIdGetMonitorList(@RequestBody MonitorGetParam monitorGetParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("tagOrIdGetMonitorList");
|
||||||
|
List<CommMonitorInfoDTO> busBarAndHisMonitorDTOList = commTerminalService.tagOrIdGetMonitorList(monitorGetParam.getTagList(),monitorGetParam.getMonitorIds(),monitorGetParam.getDeptIds());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, busBarAndHisMonitorDTOList, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于返回pq 还是pms系统
|
* 用于返回pq 还是pms系统
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -2,7 +2,9 @@ package com.njcn.device.pms.controller.ledgerManger;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
@@ -10,14 +12,13 @@ import com.njcn.device.pms.mapper.majornetwork.StatationStatMapper;
|
|||||||
import com.njcn.device.pms.pojo.po.*;
|
import com.njcn.device.pms.pojo.po.*;
|
||||||
import com.njcn.device.pms.service.majornetwork.*;
|
import com.njcn.device.pms.service.majornetwork.*;
|
||||||
import com.njcn.user.pojo.po.Dept;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
|
import com.njcn.user.pojo.vo.DeptTreeVO;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -153,5 +154,22 @@ public class PmsLedgerDeptController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取部门树(存在监测点的)
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/26
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@GetMapping("/existMonitorDeptTree")
|
||||||
|
@ApiOperation("获取部门树(存在监测点的)")
|
||||||
|
public HttpResult<List<String>> existMonitorDeptTree() {
|
||||||
|
String methodDescribe = getMethodDescribe("existMonitorDeptTree");
|
||||||
|
List<String> result = iMonitorService.existMonitorDeptTree();
|
||||||
|
//删除返回失败,查不到数据返回空数组,兼容治理项目没有部门直接报错的bug
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -291,8 +291,28 @@ public class PmsMonitorController extends BaseController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件批量修改台账信息(地市核验过的台账信息excel通过此接口导入表中,后续3.0完善后需要删除)
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/26
|
||||||
|
*/
|
||||||
|
@PostMapping("/importUpdateLedger")
|
||||||
|
@ApiOperation("附件批量修改台账信息")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.UPLOAD)
|
||||||
|
public HttpResult<Object> importUpdateLedger(@ApiParam(value = "文件", required = true) @RequestPart("file") MultipartFile file, HttpServletResponse response) {
|
||||||
|
String methodDescribe = getMethodDescribe("importUpdateLedger");
|
||||||
|
String result = monitorService.importUpdateLedger(file,response);
|
||||||
|
|
||||||
|
if (Objects.isNull(result)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
try {
|
/*try {
|
||||||
// 创建一个临时文件,前缀为"temp_",后缀为".txt",存储在默认的临时文件夹中
|
// 创建一个临时文件,前缀为"temp_",后缀为".txt",存储在默认的临时文件夹中
|
||||||
File tempFile = File.createTempFile("temp_", ".txt");
|
File tempFile = File.createTempFile("temp_", ".txt");
|
||||||
|
|
||||||
@@ -303,7 +323,7 @@ public class PmsMonitorController extends BaseController {
|
|||||||
tempFile.deleteOnExit();
|
tempFile.deleteOnExit();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -164,12 +164,8 @@ public class PmsStatationStatController extends BaseController {
|
|||||||
public HttpResult<List<StatationStat>> getPowerInfo(@RequestBody PmsStatationStatInfoParam param) {
|
public HttpResult<List<StatationStat>> getPowerInfo(@RequestBody PmsStatationStatInfoParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getStatationStatInfo");
|
String methodDescribe = getMethodDescribe("getStatationStatInfo");
|
||||||
List<StatationStat> powerInfo = statationStatService.getPowerInfo(param);
|
List<StatationStat> powerInfo = statationStatService.getPowerInfo(param);
|
||||||
if (CollectionUtil.isEmpty(powerInfo)) {
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.NO_DATA, null, methodDescribe);
|
|
||||||
} else {
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, powerInfo, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, powerInfo, methodDescribe);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过isc单位获取该组织下的电站信息
|
* 通过isc单位获取该组织下的电站信息
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.device.pms.mapper.majornetwork;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.device.pms.pojo.po.ATestRelationMonitor;
|
||||||
|
import com.njcn.device.pq.pojo.po.LineBak;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
* 数据中心监测点与河北pms系统监测点关系实体(后期有数据需要删除)
|
||||||
|
* @author cdf
|
||||||
|
* @since 2022-01-04
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public interface ATestRelationMonitorMapper extends BaseMapper<ATestRelationMonitor> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -27,6 +27,8 @@ import com.njcn.system.enums.DicDataEnum;
|
|||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.system.pojo.po.SysDicTreePO;
|
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||||
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.enums.GWSendEnum;
|
import com.njcn.web.enums.GWSendEnum;
|
||||||
import com.njcn.web.factory.PageFactory;
|
import com.njcn.web.factory.PageFactory;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
@@ -60,6 +62,8 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
private final DicDataFeignClient dicDataFeignClient;
|
private final DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
private final DictTreeFeignClient dictTreeFeignClient;
|
private final DictTreeFeignClient dictTreeFeignClient;
|
||||||
|
|
||||||
private final StatationStatMapper statationStatMapper;
|
private final StatationStatMapper statationStatMapper;
|
||||||
@@ -73,9 +77,9 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
@Override
|
@Override
|
||||||
public String pushMonitor(List<String> ids) {
|
public String pushMonitor(List<String> ids) {
|
||||||
|
|
||||||
if (ids.size() > 100) {
|
/*if (ids.size() > 100) {
|
||||||
throw new BusinessException("一次最多上送100条数据");
|
throw new BusinessException("一次最多上送100条数据");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
List<PushMonitorDTO> pushResult = new ArrayList<>();
|
List<PushMonitorDTO> pushResult = new ArrayList<>();
|
||||||
|
|
||||||
@@ -105,7 +109,7 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(CollUtil.isEmpty(ids)){
|
if(CollUtil.isEmpty(ids)){
|
||||||
lambdaQueryWrapper.in(Monitor::getMonitorUploadStatus, Stream.of(0,3).collect(Collectors.toList())).eq(Monitor::getMonitorState,monitorStateDic.getId())
|
lambdaQueryWrapper.eq(Monitor::getMonitorState,monitorStateDic.getId())
|
||||||
.eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode()).eq(Monitor::getIsUpToGrid,1);
|
.eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode()).eq(Monitor::getIsUpToGrid,1);
|
||||||
}else {
|
}else {
|
||||||
lambdaQueryWrapper.in(Monitor::getId, ids).eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode());
|
lambdaQueryWrapper.in(Monitor::getId, ids).eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode());
|
||||||
@@ -139,12 +143,19 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
Map<String,PmsTerminal> mapTerminal = pmsTerminalList.stream().collect(Collectors.toMap(PmsTerminal::getId,Function.identity()));
|
Map<String,PmsTerminal> mapTerminal = pmsTerminalList.stream().collect(Collectors.toMap(PmsTerminal::getId,Function.identity()));
|
||||||
Map<String,GeneratrixWire> mapBus = GeneratrixWireList.stream().collect(Collectors.toMap(GeneratrixWire::getId,Function.identity()));
|
Map<String,GeneratrixWire> mapBus = GeneratrixWireList.stream().collect(Collectors.toMap(GeneratrixWire::getId,Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
//获取母线中台信息
|
//获取母线中台信息
|
||||||
List<PmsMidLedger> pmsMidLedgers = pmsMidLedgerMapper.selectList(new LambdaQueryWrapper<PmsMidLedger>()
|
List<PmsMidLedger> pmsMidLedgers = pmsMidLedgerMapper.selectList(new LambdaQueryWrapper<PmsMidLedger>()
|
||||||
.in(PmsMidLedger::getId, mapBus.keySet())
|
.in(PmsMidLedger::getId, GeneratrixWireList.stream().map(GeneratrixWire::getMidBusId).distinct().collect(Collectors.toList()))
|
||||||
);
|
);
|
||||||
Map<String,PmsMidLedger> mapMidLedger = pmsMidLedgers.stream().collect(Collectors.toMap(PmsMidLedger::getId,Function.identity()));
|
Map<String,PmsMidLedger> mapMidLedger = pmsMidLedgers.stream().collect(Collectors.toMap(PmsMidLedger::getId,Function.identity()));
|
||||||
|
|
||||||
|
//单位处理
|
||||||
|
List<Dept> deptList = deptFeignClient.getAllDept().getData();
|
||||||
|
Map<String,Dept> deptMap = deptList.stream().collect(Collectors.toMap(Dept::getCode,Function.identity()));
|
||||||
|
Map<String,Dept> deptIdMap = deptList.stream().collect(Collectors.toMap(Dept::getId,Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
for (Monitor item : monitorList) {
|
for (Monitor item : monitorList) {
|
||||||
PushMonitorDTO pushMonitorDTO = new PushMonitorDTO();
|
PushMonitorDTO pushMonitorDTO = new PushMonitorDTO();
|
||||||
@@ -152,7 +163,7 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
pushMonitorDTO.setMonitorId(item.getMonitorId());
|
pushMonitorDTO.setMonitorId(item.getMonitorId());
|
||||||
pushMonitorDTO.setMonitorName(item.getName());
|
pushMonitorDTO.setMonitorName(item.getName());
|
||||||
pushMonitorDTO.setTerminalCode(item.getTerminalId());
|
pushMonitorDTO.setTerminalCode(item.getTerminalId());
|
||||||
pushMonitorDTO.setCityId(item.getOrgId());
|
pushMonitorDTO.setCityId(deptIdMap.get(deptMap.get(item.getOrgId()).getPid()).getCode());
|
||||||
pushMonitorDTO.setIsMajorNet("1");
|
pushMonitorDTO.setIsMajorNet("1");
|
||||||
|
|
||||||
pushMonitorDTO.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
pushMonitorDTO.setProvinceId("13B9B47F1E483324E05338297A0A0595");
|
||||||
@@ -225,9 +236,9 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
/*if (StrUtil.isNotBlank(item.getOperationId())) {
|
if (StrUtil.isNotBlank(item.getOrgName())) {
|
||||||
pushMonitorDTO.setMaintOrg(item.getOperationId());
|
pushMonitorDTO.setMaintOrg(item.getOrgName());
|
||||||
}*/
|
}
|
||||||
if (Objects.nonNull(item.getStatisticalInterval())) {
|
if (Objects.nonNull(item.getStatisticalInterval())) {
|
||||||
pushMonitorDTO.setStatisticalInterval(item.getStatisticalInterval().toString());
|
pushMonitorDTO.setStatisticalInterval(item.getStatisticalInterval().toString());
|
||||||
}
|
}
|
||||||
@@ -243,6 +254,9 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(pushResult.size()>100){
|
if(pushResult.size()>100){
|
||||||
List<List<PushMonitorDTO>> pushMonitorDTOList = ListUtil.split(pushResult,100);
|
List<List<PushMonitorDTO>> pushMonitorDTOList = ListUtil.split(pushResult,100);
|
||||||
|
|
||||||
@@ -292,9 +306,9 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String pushMonitorOverLimit(List<String> ids) {
|
public String pushMonitorOverLimit(List<String> ids) {
|
||||||
if (ids.size() > 100) {
|
/* if (ids.size() > 100) {
|
||||||
throw new BusinessException("一次最多上送100条数据");
|
throw new BusinessException("一次最多上送100条数据");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
List<MonitorLimitDTO> pushResult = new ArrayList<>();
|
List<MonitorLimitDTO> pushResult = new ArrayList<>();
|
||||||
|
|
||||||
@@ -307,10 +321,10 @@ public class GwMonitorPushServiceImpl implements GwMonitorPushService {
|
|||||||
|
|
||||||
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
if(CollUtil.isEmpty(ids)){
|
if(CollUtil.isEmpty(ids)){
|
||||||
lambdaQueryWrapper.in(Monitor::getMonitorUploadStatus, Stream.of(0,3).collect(Collectors.toList())).eq(Monitor::getMonitorState,monitorStateDic.getId())
|
lambdaQueryWrapper.eq(Monitor::getMonitorState,monitorStateDic.getId())
|
||||||
.eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode()).eq(Monitor::getIsUpToGrid,1);
|
.eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode()).eq(Monitor::getIsUpToGrid,1);
|
||||||
}else {
|
}else {
|
||||||
lambdaQueryWrapper.in(Monitor::getId, ids).eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode());
|
lambdaQueryWrapper.in(Monitor::getId, ids).eq(Monitor::getMonitorState,monitorStateDic.getId()).eq(Monitor::getIsUpToGrid,1).eq(Monitor::getStatus, DataStateEnum.ENABLE.getCode());
|
||||||
}
|
}
|
||||||
List<Monitor> monitorList = monitorService.list(lambdaQueryWrapper);
|
List<Monitor> monitorList = monitorService.list(lambdaQueryWrapper);
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import com.njcn.system.api.DicDataFeignClient;
|
|||||||
import com.njcn.system.api.DictTreeFeignClient;
|
import com.njcn.system.api.DictTreeFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.enums.DicTreeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.system.pojo.po.SysDicTreePO;
|
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||||
import com.njcn.system.pojo.vo.DictTreeVO;
|
import com.njcn.system.pojo.vo.DictTreeVO;
|
||||||
@@ -40,6 +41,7 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -65,29 +67,55 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String sendType(MonitorParam.Info param) {
|
public String sendType(MonitorParam.Info param) {
|
||||||
SysDicTreePO dicTree = dictTreeFeignClient.queryById(param.getObjType()).getData();
|
SysDicTreePO dicTree = null;
|
||||||
|
List<String> objTypeIds=new ArrayList<>();
|
||||||
|
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if(param.getObjType().equals("987654321")){
|
||||||
|
dicTree = new SysDicTreePO();
|
||||||
|
dicTree.setCode("987654321");
|
||||||
|
dicTree.setName("其他");
|
||||||
|
|
||||||
|
//特殊处理
|
||||||
|
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
||||||
|
List<SysDicTreePO> typicDic =sysDicTreePOList.stream().filter(item-> Objects.equals(DicTreeEnum.Power_Station.getCode(),item.getCode())||Objects.equals(DicTreeEnum.Ele_Railways.getCode(),item.getCode())||
|
||||||
|
Objects.equals(DicTreeEnum.Wind_Farms.getCode(),item.getCode())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for(SysDicTreePO sysDicTreePO : typicDic){
|
||||||
|
List<DictTreeVO> temList = dictTreeFeignClient.query(sysDicTreePO.getId()).getData();
|
||||||
|
List<String> ids = temList.stream().map(DictTreeVO::getId).collect(Collectors.toList());
|
||||||
|
objTypeIds.addAll(ids);
|
||||||
|
objTypeIds.add(sysDicTreePO.getId());
|
||||||
|
}
|
||||||
|
lambdaQueryWrapper.notIn(Monitor::getObjType, objTypeIds);
|
||||||
|
}else {
|
||||||
|
dicTree = dictTreeFeignClient.queryById(param.getObjType()).getData();
|
||||||
if(ObjectUtil.isNull(dicTree)){
|
if(ObjectUtil.isNull(dicTree)){
|
||||||
throw new BusinessException("请检查监测对象类型是否存在");
|
throw new BusinessException("请检查监测对象类型是否存在");
|
||||||
}
|
}
|
||||||
List<DictTreeVO> objType = dictTreeFeignClient.query(param.getObjType()).getData();
|
List<DictTreeVO> objType = dictTreeFeignClient.query(param.getObjType()).getData();
|
||||||
//运行状态
|
|
||||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
|
||||||
List<DictData> run = lineState.stream().filter(x -> DicDataEnum.RUN.getCode()
|
|
||||||
.equals(x.getCode())).collect(Collectors.toList());
|
|
||||||
List<String> objTypeIds=new ArrayList<>();
|
|
||||||
objTypeIds.add(param.getObjType());
|
objTypeIds.add(param.getObjType());
|
||||||
if(CollUtil.isNotEmpty(objType)){
|
if(CollUtil.isNotEmpty(objType)){
|
||||||
objTypeIds.addAll(objType.stream().map(DictTreeVO::getId).collect(Collectors.toList()));
|
objTypeIds.addAll(objType.stream().map(DictTreeVO::getId).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
lambdaQueryWrapper.in(Monitor::getObjType, objTypeIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//运行状态
|
||||||
|
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
|
List<DictData> run = lineState.stream().filter(x -> DicDataEnum.RUN.getCode()
|
||||||
|
.equals(x.getCode())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
||||||
//获取监测点信息
|
//获取监测点信息
|
||||||
List<Monitor> monitorList = monitorService.list(new LambdaQueryWrapper<Monitor>()
|
|
||||||
.in(StrUtil.isNotBlank(param.getMonitorTag()),Monitor::getMonitorTag, param.getMonitorTag())
|
lambdaQueryWrapper.in(StrUtil.isNotBlank(param.getMonitorTag()),Monitor::getMonitorTag, param.getMonitorTag())
|
||||||
.in(Monitor::getObjType, objTypeIds)
|
|
||||||
.eq(Monitor::getIsUpToGrid,1)
|
.eq(Monitor::getIsUpToGrid,1)
|
||||||
.eq(Monitor::getMonitorState,run.get(0).getId())
|
.eq(Monitor::getMonitorState,run.get(0).getId())
|
||||||
.ne(param.getFiy(),Monitor::getIsUploadHead,1)
|
.ne(param.getFiy(),Monitor::getIsUploadHead,1)
|
||||||
.in(CollUtil.isNotEmpty(param.getIds()),Monitor::getId, param.getIds())
|
.in(CollUtil.isNotEmpty(param.getIds()),Monitor::getId, param.getIds());
|
||||||
);
|
|
||||||
|
List<Monitor> monitorList = monitorService.list(lambdaQueryWrapper);
|
||||||
if(CollUtil.isEmpty(monitorList)){
|
if(CollUtil.isEmpty(monitorList)){
|
||||||
return "国网上送监测点为空,请检查是否存在上送国网监测点";
|
return "国网上送监测点为空,请检查是否存在上送国网监测点";
|
||||||
}
|
}
|
||||||
@@ -156,7 +184,8 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
str.append("第"+(i+1)+"次循环:"+ returnInformation(1, trIds, trMap)+";</br>");
|
str.append("第"+(i+1)+"次循环:"+ returnInformation(1, trIds, trMap)+";</br>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "2300":
|
// case "2300":
|
||||||
|
default:
|
||||||
List<OtherUserDto> other = this.otherUserSend(monitorList);
|
List<OtherUserDto> other = this.otherUserSend(monitorList);
|
||||||
sendSize(other);
|
sendSize(other);
|
||||||
List<List<OtherUserDto>> otSplit = ListUtil.split(other, 100);
|
List<List<OtherUserDto>> otSplit = ListUtil.split(other, 100);
|
||||||
@@ -168,8 +197,6 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
str.append("第"+(i++)+"循环:"+ returnInformation(1, otIds, otMap)+";</br>");
|
str.append("第"+(i++)+"循环:"+ returnInformation(1, otIds, otMap)+";</br>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
throw new BusinessException("请选择国网上送的监测点标签上送");
|
|
||||||
}
|
}
|
||||||
return str.toString();
|
return str.toString();
|
||||||
}
|
}
|
||||||
@@ -191,8 +218,8 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
//运行状态
|
//运行状态
|
||||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
// List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
// Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
List<WindSourceDto> info = new ArrayList<>();
|
List<WindSourceDto> info = new ArrayList<>();
|
||||||
WindSourceDto sendVO;
|
WindSourceDto sendVO;
|
||||||
@@ -216,11 +243,11 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
sendVO.setFcId(monitor.getMonitorObjectId());
|
sendVO.setFcId(monitor.getMonitorObjectId());
|
||||||
sendVO.setFcNo(monitor.getMonitorObjectId());
|
sendVO.setFcNo(monitor.getMonitorObjectId());
|
||||||
sendVO.setMonitorObjectType(monitor.getFieldStation());
|
sendVO.setMonitorObjectType(monitor.getFieldStation());
|
||||||
|
sendVO.setRunStatus("20");
|
||||||
//运行状态
|
//运行状态
|
||||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
// if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||||
sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
// sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||||
}
|
// }
|
||||||
sendVO.setCreateTime(monitor.getCreateTime());
|
sendVO.setCreateTime(monitor.getCreateTime());
|
||||||
sendVO.setUpdateTime(monitor.getUpdateTime());
|
sendVO.setUpdateTime(monitor.getUpdateTime());
|
||||||
|
|
||||||
@@ -275,11 +302,11 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
sendVO.setFcId(monitor.getMonitorObjectId());
|
sendVO.setFcId(monitor.getMonitorObjectId());
|
||||||
sendVO.setFcNo(monitor.getMonitorObjectId());
|
sendVO.setFcNo(monitor.getMonitorObjectId());
|
||||||
sendVO.setMonitorObjectType(monitor.getFieldStation());
|
sendVO.setMonitorObjectType(monitor.getFieldStation());
|
||||||
|
sendVO.setRunStatus("20");
|
||||||
//运行状态
|
//运行状态
|
||||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
// if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||||
sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
// sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||||
}
|
// }
|
||||||
sendVO.setCreateTime(monitor.getCreateTime());
|
sendVO.setCreateTime(monitor.getCreateTime());
|
||||||
sendVO.setUpdateTime(monitor.getUpdateTime());
|
sendVO.setUpdateTime(monitor.getUpdateTime());
|
||||||
|
|
||||||
@@ -335,9 +362,9 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
//重要性等级
|
//重要性等级
|
||||||
List<DictData> importanceLevel = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.IMPORTANCE_LEVEL.getCode()).getData();
|
List<DictData> importanceLevel = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.IMPORTANCE_LEVEL.getCode()).getData();
|
||||||
Map<String, DictData> mapImportanceLevel = importanceLevel.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapImportanceLevel = importanceLevel.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
//运行状态
|
// //运行状态
|
||||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
// List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
// Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
|
|
||||||
List<SensitiveUserDto> info = new ArrayList<>();
|
List<SensitiveUserDto> info = new ArrayList<>();
|
||||||
SensitiveUserDto sendVO;
|
SensitiveUserDto sendVO;
|
||||||
@@ -362,10 +389,11 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
sendVO.setStationId(monitor.getPowerrId());
|
sendVO.setStationId(monitor.getPowerrId());
|
||||||
sendVO.setStationName(monitor.getPowerrName());
|
sendVO.setStationName(monitor.getPowerrName());
|
||||||
sendVO.setPubPrivFlag(monitor.getIsSpecialMonitor() + "");
|
sendVO.setPubPrivFlag(monitor.getIsSpecialMonitor() + "");
|
||||||
|
sendVO.setRunStatus("20");
|
||||||
//运行状态
|
//运行状态
|
||||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
// if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||||
sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
// sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||||
}
|
// }
|
||||||
sendVO.setCreateTime(monitor.getCreateTime());
|
sendVO.setCreateTime(monitor.getCreateTime());
|
||||||
sendVO.setUpdateTime(monitor.getUpdateTime());
|
sendVO.setUpdateTime(monitor.getUpdateTime());
|
||||||
if (mapVoltage.containsKey(monitor.getVoltageLevel())) {
|
if (mapVoltage.containsKey(monitor.getVoltageLevel())) {
|
||||||
@@ -434,8 +462,8 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
List<DictData> connetGroupWay = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.CONNET_GROUP_WAY.getCode()).getData();
|
List<DictData> connetGroupWay = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.CONNET_GROUP_WAY.getCode()).getData();
|
||||||
Map<String, DictData> mapConnetGroupWay = connetGroupWay.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapConnetGroupWay = connetGroupWay.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
//运行状态
|
//运行状态
|
||||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
// List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
// Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
//电压等级
|
//电压等级
|
||||||
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
@@ -454,7 +482,7 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
sendVO.setConnetGroupWay(dictData.getValue());
|
sendVO.setConnetGroupWay(dictData.getValue());
|
||||||
}
|
}
|
||||||
sendVO.setIfSpecial(traction.getIfSpecial() + "");
|
sendVO.setIfSpecial(traction.getIfSpecial() + "");
|
||||||
|
sendVO.setTractionName(traction.getName());
|
||||||
sendVO.setRailwayName(traction.getRailwayLineName());
|
sendVO.setRailwayName(traction.getRailwayLineName());
|
||||||
sendVO.setRailwayType(traction.getRailwayType());
|
sendVO.setRailwayType(traction.getRailwayType());
|
||||||
sendVO.setTractionCode(traction.getId());
|
sendVO.setTractionCode(traction.getId());
|
||||||
@@ -483,11 +511,11 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
sendVO.setId(monitor.getId());
|
sendVO.setId(monitor.getId());
|
||||||
sendVO.setMonitorName(monitor.getName());
|
sendVO.setMonitorName(monitor.getName());
|
||||||
sendVO.setMonitorNumber(monitor.getMonitorId());
|
sendVO.setMonitorNumber(monitor.getMonitorId());
|
||||||
|
sendVO.setRunStatus("20");
|
||||||
//运行状态
|
//运行状态
|
||||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
// if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||||
sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
// sendVO.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
// sendVO.setAuxiliarySubstationId();
|
// sendVO.setAuxiliarySubstationId();
|
||||||
@@ -520,8 +548,8 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
List<DictData> voltage = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapVoltage = voltage.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
//运行状态
|
//运行状态
|
||||||
List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
// List<DictData> lineState = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
// Map<String, DictData> mapLineState = lineState.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
//行业分类
|
//行业分类
|
||||||
List<DictData> industryType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDUSTRY_TYPE.getCode()).getData();
|
List<DictData> industryType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDUSTRY_TYPE.getCode()).getData();
|
||||||
Map<String, DictData> mapIndustryType = industryType.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapIndustryType = industryType.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
@@ -558,11 +586,11 @@ public class MonitorSendServiceImpl implements MonitorSendService {
|
|||||||
// dto.setDeviceType();
|
// dto.setDeviceType();
|
||||||
// dto.setDeviceVoltageLevel();
|
// dto.setDeviceVoltageLevel();
|
||||||
// dto.setDeviceCapacity();
|
// dto.setDeviceCapacity();
|
||||||
|
dto.setRunStatus("20");
|
||||||
//运行状态
|
//运行状态
|
||||||
if (mapLineState.containsKey(monitor.getMonitorState())) {
|
// if (mapLineState.containsKey(monitor.getMonitorState())) {
|
||||||
dto.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
// dto.setRunStatus(mapLineState.get(monitor.getMonitorState()).getValue());
|
||||||
}
|
// }
|
||||||
dto.setCreateTime(monitor.getCreateTime());
|
dto.setCreateTime(monitor.getCreateTime());
|
||||||
dto.setUpdateTime(monitor.getUpdateTime());
|
dto.setUpdateTime(monitor.getUpdateTime());
|
||||||
info.add(dto);
|
info.add(dto);
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.device.biz.pojo.dto.StatisticsMonitor;
|
import com.njcn.device.biz.pojo.dto.StatisticsMonitor;
|
||||||
import com.njcn.device.biz.pojo.dto.*;
|
import com.njcn.device.biz.pojo.dto.*;
|
||||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||||
|
import com.njcn.device.pms.pojo.po.Monitor;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -108,4 +109,14 @@ public interface CommTerminalService {
|
|||||||
|
|
||||||
|
|
||||||
List<BusBarAndHisMonitorDTO> getBusBarAndHisMonitor();
|
List<BusBarAndHisMonitorDTO> getBusBarAndHisMonitor();
|
||||||
|
|
||||||
|
|
||||||
|
List<CommMonitorInfoDTO> tagOrIdGetMonitorList(List<String> tagList,List<String> monitorIds,List<String> deptIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据部门获取各变电站信息
|
||||||
|
* @param deptGetLineParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<DeptGetSubStationDTO.Info> deptSubStationInfo(DeptGetLineParam deptGetLineParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,11 @@ import com.njcn.device.pq.pojo.po.LineBak;
|
|||||||
import com.njcn.system.api.DicDataFeignClient;
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.Dic;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -157,6 +159,7 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
lineDevGetDTO.setType(1);
|
lineDevGetDTO.setType(1);
|
||||||
lineDevGetDTO.setLineType(1);
|
lineDevGetDTO.setLineType(1);
|
||||||
lineDevGetDTO.setLineTag(it.getMonitorTag());
|
lineDevGetDTO.setLineTag(it.getMonitorTag());
|
||||||
|
lineDevGetDTO.setObjType(it.getObjType());
|
||||||
//预处理模块需要的id修改value为id
|
//预处理模块需要的id修改value为id
|
||||||
lineDevGetDTO.setVoltageLevel(it.getVoltageLevel());
|
lineDevGetDTO.setVoltageLevel(it.getVoltageLevel());
|
||||||
lineDevGetDTO.setIsUpToGrid(it.getIsUpToGrid());
|
lineDevGetDTO.setIsUpToGrid(it.getIsUpToGrid());
|
||||||
@@ -789,4 +792,85 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CommMonitorInfoDTO> tagOrIdGetMonitorList(List<String> tagList, List<String> monitorIds,List<String> deptIds) {
|
||||||
|
List<CommMonitorInfoDTO> result = new ArrayList<>();
|
||||||
|
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.RUN.getCode(),DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
|
|
||||||
|
List<Dept> deptList = deptFeignClient.getDeptInfoListByIds(deptIds).getData();
|
||||||
|
List<Monitor> monitorList = monitorMapper.selectList(new LambdaQueryWrapper<Monitor>()
|
||||||
|
|
||||||
|
.eq(Monitor::getStatus,DataStateEnum.ENABLE.getCode()).in(Monitor::getOrgId,deptList.stream().map(Dept::getCode).collect(Collectors.toList()))
|
||||||
|
.eq(Monitor::getMonitorState,dictData.getId())
|
||||||
|
.in(Monitor::getMonitorTag,tagList)
|
||||||
|
.or(item->item.in(Monitor::getId,monitorIds)));
|
||||||
|
monitorList.forEach(item->result.add(CommMonitorInfoDTO.builder().id(item.getId()).name(item.getName()).powerStationName(item.getPowerrName()).build()));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeptGetSubStationDTO.Info> deptSubStationInfo(DeptGetLineParam deptGetLineParam) {
|
||||||
|
List<DeptGetSubStationDTO.Info> result = new ArrayList<>();
|
||||||
|
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
||||||
|
|
||||||
|
//获取监测点信息
|
||||||
|
List<PmsStatationStatInfoDTO> statationStatInfo = statationStatMapper.getStatationStatInfo(new PmsStatationStatInfoParam());
|
||||||
|
Map<String, List<PmsStatationStatInfoDTO>> statationAndMonitorMap = statationStatInfo.stream().collect(Collectors.groupingBy(PmsStatationStatInfoDTO::getOrgId));
|
||||||
|
|
||||||
|
// List<PmsMonitorBaseDTO> pmsMonitorBaseDTOList = distributionMonitorMapper.getDisMonitorAllList(null, 0);
|
||||||
|
// Map<String, List<PmsMonitorBaseDTO>> mapPms = pmsMonitorBaseDTOList.stream().collect(Collectors.groupingBy(PmsMonitorBaseDTO::getOrgId));
|
||||||
|
|
||||||
|
temDept.forEach(item -> {
|
||||||
|
DeptGetSubStationDTO.Info deptGetSubStationDTO = new DeptGetSubStationDTO.Info();
|
||||||
|
deptGetSubStationDTO.setUnitId(item.getUnitId());
|
||||||
|
deptGetSubStationDTO.setUnitName(item.getUnitName());
|
||||||
|
deptGetSubStationDTO.setUnitChildrenList(item.getUnitChildrenList());
|
||||||
|
deptGetSubStationDTO.setDeptLevel(item.getDeptLevel());
|
||||||
|
List<String> deptIds = item.getUnitChildrenList();
|
||||||
|
if (CollectionUtil.isNotEmpty(deptIds)) {
|
||||||
|
List<SubGetBase> subList = new ArrayList<>();
|
||||||
|
List<SubGetBase> subListPw = new ArrayList<>();
|
||||||
|
SubGetBase subGetBase;
|
||||||
|
for (String deptId : deptIds) {
|
||||||
|
if (statationAndMonitorMap.containsKey(deptId)) {
|
||||||
|
//获取部门下变电信息
|
||||||
|
List<PmsStatationStatInfoDTO> sub = statationAndMonitorMap.get(deptId);
|
||||||
|
Map<String, List<PmsStatationStatInfoDTO>> subMap = sub.stream()
|
||||||
|
.collect(Collectors.groupingBy(x->x.getPowerId()+"_"+x.getPowerName()+"_"+x.getPowerVoltageLevel()));
|
||||||
|
for (Map.Entry<String, List<PmsStatationStatInfoDTO>> stringListEntry : subMap.entrySet()) {
|
||||||
|
String[] split = stringListEntry.getKey().split("_");
|
||||||
|
subGetBase=new SubGetBase();
|
||||||
|
subGetBase.setId(split[0]);
|
||||||
|
subGetBase.setName(split[1]);
|
||||||
|
subGetBase.setVoltageLevel(split[2]);
|
||||||
|
List<String> monitorIds = stringListEntry.getValue().stream().map(PmsStatationStatInfoDTO::getMonitorId).distinct().collect(Collectors.toList());
|
||||||
|
subGetBase.setUnitChildrenList(monitorIds);
|
||||||
|
subList.add(subGetBase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (mapPms.containsKey(deptId)) {
|
||||||
|
// //获取部门下变电信息
|
||||||
|
// List<PmsMonitorBaseDTO> sub = mapPms.get(deptId);
|
||||||
|
// Map<String, List<PmsMonitorBaseDTO>> subMap = sub.stream()
|
||||||
|
// .collect(Collectors.groupingBy(x->x.getPowerrId()+"_"+x.getVoltageLevel()));
|
||||||
|
// for (Map.Entry<String, List<PmsMonitorBaseDTO>> stringListEntry : subMap.entrySet()) {
|
||||||
|
// String[] split = stringListEntry.getKey().split("_");
|
||||||
|
// subGetBase=new SubGetBase();
|
||||||
|
// subGetBase.setId(split[0]);
|
||||||
|
// subGetBase.setVoltageLevel(split[1]);
|
||||||
|
// List<String> monitorIds = stringListEntry.getValue().stream().map(PmsMonitorBaseDTO::getMonitorId).distinct().collect(Collectors.toList());
|
||||||
|
// subGetBase.setUnitChildrenList(monitorIds);
|
||||||
|
// subListPw.add(subGetBase);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
deptGetSubStationDTO.setStationIds(subList);
|
||||||
|
}
|
||||||
|
result.add(deptGetSubStationDTO);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,6 +156,9 @@ public interface IMonitorService extends IService<Monitor> {
|
|||||||
String importOracleLedgerToMysql(MultipartFile file, HttpServletResponse response);
|
String importOracleLedgerToMysql(MultipartFile file, HttpServletResponse response);
|
||||||
|
|
||||||
|
|
||||||
|
String importUpdateLedger(MultipartFile file, HttpServletResponse response);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 获取所有监测点限值
|
* @Description: 获取所有监测点限值
|
||||||
* @param
|
* @param
|
||||||
@@ -185,4 +188,12 @@ public interface IMonitorService extends IService<Monitor> {
|
|||||||
* 批量根据监测点id获取监测点信息
|
* 批量根据监测点id获取监测点信息
|
||||||
*/
|
*/
|
||||||
List<LineDTO> getLineDetailBatch(List<String> ids);
|
List<LineDTO> getLineDetailBatch(List<String> ids);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取部门树(存在监测点的)
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/26
|
||||||
|
*/
|
||||||
|
List<String> existMonitorDeptTree();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,12 +109,6 @@ public class DataQualityStatServiceImpl implements DataQualityStatService {
|
|||||||
@Override
|
@Override
|
||||||
public List<ROperatingIndexVO> getMonitoringIndexDataQualityStat(StatisticsBizBaseParam param) {
|
public List<ROperatingIndexVO> getMonitoringIndexDataQualityStat(StatisticsBizBaseParam param) {
|
||||||
|
|
||||||
|
|
||||||
// // 获取当前用户的部门的子部门信息
|
|
||||||
// List<PmsGeneralDeviceDTO> data = getPmsGeneralDeviceDTOList(param);
|
|
||||||
// // 取出单位id
|
|
||||||
// List<String> deptIdList = data.stream().map(PmsGeneralDeviceDTO::getIndex).collect(Collectors.toList());
|
|
||||||
//单位code集合
|
|
||||||
/*获取下级子部门信息*/
|
/*获取下级子部门信息*/
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (param.getId ()).getData ( );
|
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (param.getId ()).getData ( );
|
||||||
if (CollUtil.isEmpty(deptDTOList)) {
|
if (CollUtil.isEmpty(deptDTOList)) {
|
||||||
|
|||||||
@@ -29,13 +29,13 @@ import com.njcn.device.pms.mapper.majornetwork.*;
|
|||||||
import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO;
|
import com.njcn.device.pms.pojo.dto.PmsMonitorBaseDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
||||||
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
||||||
|
import com.njcn.device.pms.pojo.excel.PmsLedgerExcel;
|
||||||
import com.njcn.device.pms.pojo.param.*;
|
import com.njcn.device.pms.pojo.param.*;
|
||||||
import com.njcn.device.pms.pojo.po.*;
|
import com.njcn.device.pms.pojo.po.*;
|
||||||
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
import com.njcn.device.pms.pojo.vo.MonitorVO;
|
||||||
import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
|
import com.njcn.device.pms.pojo.vo.PmsMonitorVO;
|
||||||
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
import com.njcn.device.pms.service.majornetwork.IDistributionMonitorService;
|
||||||
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
import com.njcn.device.pms.service.majornetwork.IMonitorService;
|
||||||
import com.njcn.device.pms.service.majornetwork.ITractionStationService;
|
|
||||||
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
import com.njcn.device.pq.pojo.bo.excel.OracleTerminalExcel;
|
||||||
import com.njcn.device.pq.pojo.po.LineBak;
|
import com.njcn.device.pq.pojo.po.LineBak;
|
||||||
import com.njcn.poi.excel.ExcelUtil;
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
@@ -43,6 +43,7 @@ import com.njcn.poi.util.PoiUtil;
|
|||||||
import com.njcn.system.api.DictTreeFeignClient;
|
import com.njcn.system.api.DictTreeFeignClient;
|
||||||
import com.njcn.system.enums.DicDataEnum;
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.enums.DicTreeEnum;
|
||||||
import com.njcn.system.pojo.po.SysDicTreePO;
|
import com.njcn.system.pojo.po.SysDicTreePO;
|
||||||
import com.njcn.system.pojo.vo.DictTreeVO;
|
import com.njcn.system.pojo.vo.DictTreeVO;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
@@ -182,9 +183,27 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<Monitor> getAllMonitorPageList(TerminalQueryParam baseParam) {
|
public Page<Monitor> getAllMonitorPageList(TerminalQueryParam baseParam) {
|
||||||
|
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
List<String> objTypeIds = new ArrayList<>();
|
List<String> objTypeIds = new ArrayList<>();
|
||||||
if(StrUtil.isNotBlank(baseParam.getObjType())){
|
if(StrUtil.isNotBlank(baseParam.getObjType())){
|
||||||
|
if(baseParam.getObjType().equals("987654321")){
|
||||||
|
//特殊处理
|
||||||
|
List<SysDicTreePO> sysDicTreePOList = dictTreeFeignClient.queryAll().getData();
|
||||||
|
List<SysDicTreePO> typicDic =sysDicTreePOList.stream().filter(item->Objects.equals(DicTreeEnum.Power_Station.getCode(),item.getCode())||Objects.equals(DicTreeEnum.Ele_Railways.getCode(),item.getCode())||
|
||||||
|
Objects.equals(DicTreeEnum.Wind_Farms.getCode(),item.getCode())).collect(Collectors.toList());
|
||||||
|
|
||||||
|
for(SysDicTreePO sysDicTreePO : typicDic){
|
||||||
|
List<DictTreeVO> temList = dictTreeFeignClient.query(sysDicTreePO.getId()).getData();
|
||||||
|
List<String> ids = temList.stream().map(DictTreeVO::getId).collect(Collectors.toList());
|
||||||
|
objTypeIds.addAll(ids);
|
||||||
|
objTypeIds.add(sysDicTreePO.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
lambdaQueryWrapper.notIn(Monitor::getObjType,objTypeIds);
|
||||||
|
|
||||||
|
|
||||||
|
}else {
|
||||||
SysDicTreePO sysDicTreePO = dictTreeFeignClient.queryById(baseParam.getObjType()).getData();
|
SysDicTreePO sysDicTreePO = dictTreeFeignClient.queryById(baseParam.getObjType()).getData();
|
||||||
if(sysDicTreePO.getPid().equals("0")){
|
if(sysDicTreePO.getPid().equals("0")){
|
||||||
List<DictTreeVO> temList = dictTreeFeignClient.query(sysDicTreePO.getId()).getData();
|
List<DictTreeVO> temList = dictTreeFeignClient.query(sysDicTreePO.getId()).getData();
|
||||||
@@ -192,14 +211,17 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
objTypeIds.addAll(ids);
|
objTypeIds.addAll(ids);
|
||||||
}
|
}
|
||||||
objTypeIds.add(sysDicTreePO.getId());
|
objTypeIds.add(sysDicTreePO.getId());
|
||||||
|
lambdaQueryWrapper.in(CollUtil.isNotEmpty(objTypeIds),Monitor::getObjType,objTypeIds);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LambdaQueryWrapper<Monitor> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
lambdaQueryWrapper
|
lambdaQueryWrapper
|
||||||
.eq(StrUtil.isNotBlank(baseParam.getMonitorState()), Monitor::getMonitorState, baseParam.getMonitorState())
|
.eq(StrUtil.isNotBlank(baseParam.getMonitorState()), Monitor::getMonitorState, baseParam.getMonitorState())
|
||||||
.eq(StrUtil.isNotBlank(baseParam.getMonitorTag()), Monitor::getMonitorTag, baseParam.getMonitorTag())
|
.eq(StrUtil.isNotBlank(baseParam.getMonitorTag()), Monitor::getMonitorTag, baseParam.getMonitorTag())
|
||||||
.eq(Objects.nonNull(baseParam.getIsUpToGrid()), Monitor::getIsUpToGrid, baseParam.getIsUpToGrid())
|
.eq(Objects.nonNull(baseParam.getIsUpToGrid()), Monitor::getIsUpToGrid, baseParam.getIsUpToGrid())
|
||||||
.in(StrUtil.isNotBlank(baseParam.getObjType()),Monitor::getObjType,objTypeIds)
|
|
||||||
.and(StrUtil.isNotBlank(baseParam.getSearchValue()), i -> i.like(Monitor::getName, baseParam.getSearchValue())
|
.and(StrUtil.isNotBlank(baseParam.getSearchValue()), i -> i.like(Monitor::getName, baseParam.getSearchValue())
|
||||||
.or()
|
.or()
|
||||||
.like(Monitor::getId, baseParam.getSearchValue())
|
.like(Monitor::getId, baseParam.getSearchValue())
|
||||||
@@ -314,9 +336,18 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
BeanUtils.copyProperties(monitorParam, monitor);
|
BeanUtils.copyProperties(monitorParam, monitor);
|
||||||
checkOther(monitorParam, monitor, true);
|
checkOther(monitorParam, monitor, true);
|
||||||
|
|
||||||
|
|
||||||
|
Monitor tem = this.getById(monitorParam.getId());
|
||||||
|
if(tem.getIsUploadHead() == 1){
|
||||||
monitor.setIsUploadHead(3);
|
monitor.setIsUploadHead(3);
|
||||||
|
}
|
||||||
|
if(tem.getMonitorUploadStatus() == 1){
|
||||||
monitor.setMonitorUploadStatus(3);
|
monitor.setMonitorUploadStatus(3);
|
||||||
|
}
|
||||||
|
if(tem.getMonitorOverlimitStatus() == 1){
|
||||||
monitor.setMonitorOverlimitStatus(3);
|
monitor.setMonitorOverlimitStatus(3);
|
||||||
|
}
|
||||||
|
|
||||||
this.updateById(monitor);
|
this.updateById(monitor);
|
||||||
|
|
||||||
//修改监测点同时修改pms_special_monitor
|
//修改监测点同时修改pms_special_monitor
|
||||||
@@ -487,6 +518,30 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String importUpdateLedger(MultipartFile file, HttpServletResponse response) {
|
||||||
|
ImportParams importParams = new ImportParams();
|
||||||
|
importParams.setHeadRows(1);
|
||||||
|
importParams.setTitleRows(1);
|
||||||
|
importParams.setNeedVerify(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
ExcelImportResult<PmsLedgerExcel> terminalExcelExcelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), PmsLedgerExcel.class, importParams);
|
||||||
|
|
||||||
|
//如果存在非法数据,将不合格的数据导出
|
||||||
|
if (terminalExcelExcelImportResult.isVerifyFail()) {
|
||||||
|
PoiUtil.exportFileByWorkbook(terminalExcelExcelImportResult.getFailWorkbook(), "非法台账信息.xlsx", response);
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
//执行台账信息导入(不考虑,存在监测点却不存在限值信息)
|
||||||
|
return dealDataBatchUpdate(terminalExcelExcelImportResult.getList());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
throw new BusinessException(DeviceResponseEnum.IMPORT_ORACLE_EXCEPTION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Overlimit> getAllLineOverLimit() {
|
public List<Overlimit> getAllLineOverLimit() {
|
||||||
return overlimitMapper.selectList(null);
|
return overlimitMapper.selectList(null);
|
||||||
@@ -546,6 +601,206 @@ public class MonitorServiceImpl extends ServiceImpl<MonitorMapper, Monitor> impl
|
|||||||
return lineDTOS;
|
return lineDTOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> existMonitorDeptTree() {
|
||||||
|
DictData dictData = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_STATE.getName(), DicDataEnum.RUN.getName()).getData();
|
||||||
|
List<Dept> deptList = deptFeignClient.getAllDept().getData();
|
||||||
|
List<String> monitorList = this.lambdaQuery().select(Monitor::getOrgId).eq(Monitor::getMonitorState,dictData.getId()).list().stream().map(Monitor::getOrgId).distinct().collect(Collectors.toList());
|
||||||
|
List<Dept> deptTem = deptList.stream().filter(it->monitorList.contains(it.getCode())).collect(Collectors.toList());
|
||||||
|
List<String> resultDeptId = deptTem.stream().map(item->item.getPids().split(",")).flatMap(Arrays::stream).distinct().collect(Collectors.toList());
|
||||||
|
resultDeptId.addAll(deptTem.stream().map(Dept::getId).collect(Collectors.toList()));
|
||||||
|
return resultDeptId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private String dealDataBatchUpdate(List<PmsLedgerExcel> pmsLedgerExcelList) {
|
||||||
|
List<PmsLedgerExcel> oracleTerminalExcelMsg = new ArrayList<>();
|
||||||
|
|
||||||
|
List<DeptDTO> allDept = deptFeignClient.getDeptDescendantIndexes(deptFeignClient.getRootDept().getData().getId(), Stream.of(0, 1, 2).collect(Collectors.toList())).getData();
|
||||||
|
Map<String, DeptDTO> mapDept = allDept.stream().collect(Collectors.toMap(DeptDTO::getName, Function.identity()));
|
||||||
|
|
||||||
|
List<DictData> voltageLevelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
|
Map<String, DictData> voltageLevelMap = voltageLevelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//装置型号
|
||||||
|
List<DictData> devTypelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_TYPE.getCode()).getData();
|
||||||
|
Map<String, DictData> devTypelDicMap = devTypelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//装置类别
|
||||||
|
DictData devCategoryDic = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_CATEGORY.getName(), DicDataEnum.Monitor_Terminals.getName()).getData();
|
||||||
|
|
||||||
|
//装置状态
|
||||||
|
List<DictData> devStatelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_STATUS.getCode()).getData();
|
||||||
|
Map<String, DictData> devStateDicMap = devStatelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//监测点状态
|
||||||
|
List<DictData> monitorStatelDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.LINE_STATE.getCode()).getData();
|
||||||
|
Map<String, DictData> monitorStateDicMap = monitorStatelDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//检测点对象类型(原监测点标签)
|
||||||
|
List<DictData> objTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.MONITORING_LABELS.getCode()).getData();
|
||||||
|
Map<String, DictData> objTypeDicMap = objTypeList.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//装置厂家
|
||||||
|
List<DictData> manList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_MANUFACTURER.getCode()).getData();
|
||||||
|
Map<String, DictData> manDicMap = manList.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//装作等级
|
||||||
|
DictData devGrade = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.DEV_GRADE.getName(), DicDataEnum.MOST_IMPORMENT.getName()).getData();
|
||||||
|
|
||||||
|
//
|
||||||
|
DictData devInputType = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.INPUT_SIGNAL.getName(), DicDataEnum.SIMULATION_SIGNAL.getName()).getData();
|
||||||
|
|
||||||
|
//监测点类型
|
||||||
|
DictData monitorType = dicDataFeignClient.getDicDataByNameAndTypeName(DicDataTypeEnum.LINE_TYPE.getName(), DicDataEnum.Power_Supply_Point.getName()).getData();
|
||||||
|
|
||||||
|
//接线方式
|
||||||
|
List<DictData> wireList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_CONNECT.getCode()).getData();
|
||||||
|
Map<String, DictData> wireListMap = wireList.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//电压互感器类型
|
||||||
|
List<DictData> potentialDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.VOLTAGE_TRANSFORMER.getCode()).getData();
|
||||||
|
Map<String, DictData> potentialDicMap = potentialDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
//中性点接地方式
|
||||||
|
List<DictData> neutralDic = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.Neutral_Point.getCode()).getData();
|
||||||
|
Map<String, DictData> neutralDicMap = neutralDic.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
//行业分类
|
||||||
|
List<DictData> businessType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.INDUSTRY_TYPE.getCode()).getData();
|
||||||
|
Map<String, DictData> businessDicMap = businessType.stream().collect(Collectors.toMap(DictData::getName, Function.identity()));
|
||||||
|
|
||||||
|
|
||||||
|
//TODO 零时处理
|
||||||
|
List<SysDicTreePO> dicTree = dictTreeFeignClient.queryAll().getData();
|
||||||
|
dicTree = dicTree.stream().filter(item->item.getCode()!="Device_Unit" && !item.getCode().contains("@")).collect(Collectors.toList());
|
||||||
|
Map<String,SysDicTreePO> objTypeMap = dicTree.stream().collect(Collectors.toMap(SysDicTreePO::getName,Function.identity()));
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (PmsLedgerExcel pmsLedgerExcel : pmsLedgerExcelList) {
|
||||||
|
|
||||||
|
|
||||||
|
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
monitorLambdaQueryWrapper.eq(Monitor::getName,pmsLedgerExcel.getName()).eq(Monitor::getPowerrName,pmsLedgerExcel.getPowerrName());
|
||||||
|
|
||||||
|
Monitor monitor = this.getOne(monitorLambdaQueryWrapper);
|
||||||
|
if(Objects.nonNull(monitor)){
|
||||||
|
|
||||||
|
Monitor po = new Monitor();
|
||||||
|
po.setId(monitor.getId());
|
||||||
|
po.setMinShortCircuitCapacity(pmsLedgerExcel.getMinShortCircuitCapacity());
|
||||||
|
po.setPowerSupplyEqCapacity(pmsLedgerExcel.getPowerSupplyEqCapacity());
|
||||||
|
po.setUserAgreementCapacity(pmsLedgerExcel.getUserAgreementCapacity());
|
||||||
|
|
||||||
|
|
||||||
|
String monitorStateId= monitorStateDicMap.get(pmsLedgerExcel.getMonitorState()).getId();
|
||||||
|
if(StrUtil.isBlank(monitorStateId)){
|
||||||
|
throw new BusinessException("监测点状态为空");
|
||||||
|
}
|
||||||
|
po.setMonitorState(monitorStateId);
|
||||||
|
|
||||||
|
String getPotentialTransFormerTypeId= potentialDicMap.get(pmsLedgerExcel.getPotentialTransFormerType()).getId();
|
||||||
|
|
||||||
|
if(StrUtil.isBlank(getPotentialTransFormerTypeId)){
|
||||||
|
throw new BusinessException("电压互感器类型缺失");
|
||||||
|
}
|
||||||
|
po.setPotentialTransFormerType(getPotentialTransFormerTypeId);
|
||||||
|
|
||||||
|
|
||||||
|
String neutralDicMapId= neutralDicMap.get(pmsLedgerExcel.getNeutralGroundingMode()).getId();
|
||||||
|
|
||||||
|
if(StrUtil.isBlank(neutralDicMapId)){
|
||||||
|
throw new BusinessException("中性点接地方式缺失");
|
||||||
|
}
|
||||||
|
po.setPotentialTransFormerType(getPotentialTransFormerTypeId);
|
||||||
|
po.setIsSpecialSupplyElectricity(pmsLedgerExcel.getIsSpecialSupplyElectricity());
|
||||||
|
|
||||||
|
String getMonitorTagId = objTypeDicMap.get(pmsLedgerExcel.getMonitorTag()).getId();
|
||||||
|
if(StrUtil.isBlank(getMonitorTagId)){
|
||||||
|
throw new BusinessException("监测点标签缺失");
|
||||||
|
}
|
||||||
|
po.setMonitorTag(getMonitorTagId);
|
||||||
|
|
||||||
|
|
||||||
|
String getObjTypeId = objTypeMap.get(pmsLedgerExcel.getObjType()).getId();
|
||||||
|
if(StrUtil.isBlank(getObjTypeId)){
|
||||||
|
throw new BusinessException("对象类型缺少");
|
||||||
|
}
|
||||||
|
po.setObjType(getObjTypeId);
|
||||||
|
|
||||||
|
|
||||||
|
//行业分类
|
||||||
|
if(businessDicMap.containsKey(pmsLedgerExcel.getTradeCode())){
|
||||||
|
String getTradeCodeId = businessDicMap.get(pmsLedgerExcel.getTradeCode()).getId();
|
||||||
|
po.setTradeCode(getTradeCodeId);
|
||||||
|
}else {
|
||||||
|
po.setTradeCode("");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//监测对象名称
|
||||||
|
po.setMonitorObjectName(pmsLedgerExcel.getMonitorObjectName());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//装置
|
||||||
|
/* PmsTerminal pmsTerminal = terminalMapper.selectOne(new LambdaQueryWrapper<PmsTerminal>().eq(PmsTerminal::getId,monitor.getTerminalId()));
|
||||||
|
|
||||||
|
if(Objects.nonNull(pmsTerminal)){
|
||||||
|
PmsTerminal t = new PmsTerminal();
|
||||||
|
t.setId(pmsTerminal.getId());
|
||||||
|
t.setTerminalCode(pmsLedgerExcel.getTerminalCode());
|
||||||
|
t.setIp(pmsLedgerExcel.getDevIp());
|
||||||
|
terminalMapper.updateById(t);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
po.setTerminalCode(pmsLedgerExcel.getTerminalCode());
|
||||||
|
|
||||||
|
|
||||||
|
if(StrUtil.isNotBlank(po.getTerminalCode())){
|
||||||
|
po.setIsUpToGrid(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(StrUtil.isBlank(pmsLedgerExcel.getBusId())){
|
||||||
|
po.setIsUpToGrid(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.updateById(po);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
count++;
|
||||||
|
}else {
|
||||||
|
|
||||||
|
System.out.println("4444444444444444");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtil.isNotEmpty(oracleTerminalExcelMsg)) {
|
||||||
|
ExcelUtil.exportExcel("失败列表.xlsx", OracleTerminalExcel.OracleTerminalExcelMsg.class, oracleTerminalExcelMsg);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return CommonResponseEnum.SUCCESS.getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取主配网监测点id集合
|
* 获取主配网监测点id集合
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.njcn.device.pms.service.majornetwork.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||||
@@ -104,10 +105,11 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
|||||||
//封装返回数据
|
//封装返回数据
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
DecimalFormat df = new DecimalFormat("###.00");
|
||||||
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
||||||
|
String time = time(startTime, rMpDevEvaluateDetailParam.getType());
|
||||||
terminalListMapByOrgId.forEach((key, terminalListByOrg) -> {
|
terminalListMapByOrgId.forEach((key, terminalListByOrg) -> {
|
||||||
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
||||||
|
|
||||||
rMpDevEvaluateDetailVO.setDataDate(startTime); //日期(前端传递的时间)
|
rMpDevEvaluateDetailVO.setDataDate(time); //日期(前端传递的时间)
|
||||||
rMpDevEvaluateDetailVO.setOrgId(key); //单位id(字段是id实际数据是单位code)
|
rMpDevEvaluateDetailVO.setOrgId(key); //单位id(字段是id实际数据是单位code)
|
||||||
rMpDevEvaluateDetailVO.setOrgName(terminalListByOrg.get(0).getOrgName()); //单位名称
|
rMpDevEvaluateDetailVO.setOrgName(terminalListByOrg.get(0).getOrgName()); //单位名称
|
||||||
|
|
||||||
@@ -179,10 +181,11 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
|||||||
//封装返回数据
|
//封装返回数据
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
DecimalFormat df = new DecimalFormat("###.00");
|
||||||
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
||||||
|
String time = time(startTime, rMpDevEvaluateDetailParam.getType());
|
||||||
terminalListMapByManufacture.forEach((key, terminalListByManufacture) -> {
|
terminalListMapByManufacture.forEach((key, terminalListByManufacture) -> {
|
||||||
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
||||||
|
|
||||||
rMpDevEvaluateDetailVO.setDataDate(startTime); //日期(前端传递的时间)
|
rMpDevEvaluateDetailVO.setDataDate(time); //日期(前端传递的时间)
|
||||||
rMpDevEvaluateDetailVO.setManufactureId(key); //厂商id
|
rMpDevEvaluateDetailVO.setManufactureId(key); //厂商id
|
||||||
|
|
||||||
//终端有效接入率
|
//终端有效接入率
|
||||||
@@ -248,10 +251,11 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
|||||||
//封装返回数据
|
//封装返回数据
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
DecimalFormat df = new DecimalFormat("###.00");
|
||||||
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
List<RMpDevEvaluateDetailVO> resultList = new ArrayList<>();
|
||||||
|
String time = time(startTime, rMpDevEvaluateDetailParam.getType());
|
||||||
terminalListMapByModel.forEach((key, terminalListByModel) -> {
|
terminalListMapByModel.forEach((key, terminalListByModel) -> {
|
||||||
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
RMpDevEvaluateDetailVO rMpDevEvaluateDetailVO = new RMpDevEvaluateDetailVO();
|
||||||
|
|
||||||
rMpDevEvaluateDetailVO.setDataDate(startTime); //日期(前端传递的时间)
|
rMpDevEvaluateDetailVO.setDataDate(time); //日期(前端传递的时间)
|
||||||
rMpDevEvaluateDetailVO.setDeviceModel(key); //终端型号
|
rMpDevEvaluateDetailVO.setDeviceModel(key); //终端型号
|
||||||
|
|
||||||
//终端有效接入率
|
//终端有效接入率
|
||||||
@@ -277,6 +281,17 @@ public class RMpDevEvaluateDetailServiceImpl extends ServiceImpl<RMpDevEvaluateD
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String time(String starTime,Integer type){
|
||||||
|
if(ObjectUtil.isNull(type)){
|
||||||
|
return starTime;
|
||||||
|
}else{
|
||||||
|
if(type==1){
|
||||||
|
return starTime.substring(0,4);
|
||||||
|
}else {
|
||||||
|
return starTime.substring(0,7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.device.pms.service.majornetwork.impl;
|
package com.njcn.device.pms.service.majornetwork.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
@@ -59,9 +60,7 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
|||||||
String endTime = rMpDevAbnormalManageParam.getEndTime(); //结束时间
|
String endTime = rMpDevAbnormalManageParam.getEndTime(); //结束时间
|
||||||
|
|
||||||
//获取所有子部门信息
|
//获取所有子部门信息
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(id).getData();
|
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
|
||||||
/*获取下一级子部门信息*/
|
|
||||||
// List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
|
|
||||||
if (CollUtil.isEmpty(deptDTOList)) {
|
if (CollUtil.isEmpty(deptDTOList)) {
|
||||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||||
}
|
}
|
||||||
@@ -95,10 +94,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
|||||||
//封装返回数据
|
//封装返回数据
|
||||||
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
DecimalFormat df = new DecimalFormat("###.00");
|
||||||
|
String time = time(startTime, rMpDevAbnormalManageParam.getType());
|
||||||
terminalListMapByOrgId.forEach((key, terminalListByOrg) -> {
|
terminalListMapByOrgId.forEach((key, terminalListByOrg) -> {
|
||||||
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
||||||
|
|
||||||
rMpDevSolveVO.setDataDate(startTime);
|
rMpDevSolveVO.setDataDate(time);
|
||||||
rMpDevSolveVO.setOrgId(key); //单位id
|
rMpDevSolveVO.setOrgId(key); //单位id
|
||||||
rMpDevSolveVO.setOrgName(terminalListByOrg.get(0).getOrgName()); //单位名称
|
rMpDevSolveVO.setOrgName(terminalListByOrg.get(0).getOrgName()); //单位名称
|
||||||
|
|
||||||
@@ -177,10 +177,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
|||||||
//封装返回数据
|
//封装返回数据
|
||||||
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
DecimalFormat df = new DecimalFormat("###.00");
|
||||||
|
String time = time(startTime, rMpDevAbnormalManageParam.getType());
|
||||||
terminalListMapByManufacture.forEach((key, terminalListByOrg) -> {
|
terminalListMapByManufacture.forEach((key, terminalListByOrg) -> {
|
||||||
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
||||||
|
|
||||||
rMpDevSolveVO.setDataDate(startTime);
|
rMpDevSolveVO.setDataDate(time);
|
||||||
rMpDevSolveVO.setManufactureId(key); //厂商id
|
rMpDevSolveVO.setManufactureId(key); //厂商id
|
||||||
|
|
||||||
rMpDevSolveVO.setTerminalCount(terminalListByOrg.size()); //终端数量
|
rMpDevSolveVO.setTerminalCount(terminalListByOrg.size()); //终端数量
|
||||||
@@ -247,10 +248,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
|||||||
//封装返回数据
|
//封装返回数据
|
||||||
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
||||||
DecimalFormat df = new DecimalFormat("###.00");
|
DecimalFormat df = new DecimalFormat("###.00");
|
||||||
|
String time = time(startTime, rMpDevAbnormalManageParam.getType());
|
||||||
solveMap.forEach((key, RMpDevSolveDetailList) -> {
|
solveMap.forEach((key, RMpDevSolveDetailList) -> {
|
||||||
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
||||||
|
|
||||||
rMpDevSolveVO.setDataDate(startTime);
|
rMpDevSolveVO.setDataDate(time);
|
||||||
rMpDevSolveVO.setBreakDownType(key); //故障类型
|
rMpDevSolveVO.setBreakDownType(key); //故障类型
|
||||||
|
|
||||||
rMpDevSolveVO.setTerminalCount(null); //终端数量(故障类型的终端数量前端展示'/')
|
rMpDevSolveVO.setTerminalCount(null); //终端数量(故障类型的终端数量前端展示'/')
|
||||||
@@ -344,6 +346,18 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
|||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String time(String starTime,Integer type){
|
||||||
|
if(ObjectUtil.isNull(type)){
|
||||||
|
return starTime;
|
||||||
|
}else{
|
||||||
|
if(type==1){
|
||||||
|
return starTime.substring(0,4);
|
||||||
|
}else {
|
||||||
|
return starTime.substring(0,7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,13 +25,11 @@ import com.njcn.system.enums.DicDataTypeEnum;
|
|||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
import com.njcn.web.utils.WebUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -84,7 +82,6 @@ implements RStatZwAlarmCountWService {
|
|||||||
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> orgCodeList = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
//将单位信息转为map集合 key: 单位id value: 单位实体
|
//将单位信息转为map集合 key: 单位id value: 单位实体
|
||||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, deptDTO -> deptDTO));
|
||||||
|
|
||||||
LambdaQueryWrapper<RStatZwAlarmCountW> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RStatZwAlarmCountW> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
//条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime
|
//条件组装: where org_no in (orgNoList) and data_date >= startTime and data_date <= endTime
|
||||||
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgCodeList), RStatZwAlarmCountW::getOrgNo, orgCodeList)
|
lambdaQueryWrapper.in(CollUtil.isNotEmpty(orgCodeList), RStatZwAlarmCountW::getOrgNo, orgCodeList)
|
||||||
@@ -99,28 +96,31 @@ implements RStatZwAlarmCountWService {
|
|||||||
BeanUtils.copyProperties(item, rStatZwAlarmCountWVO);
|
BeanUtils.copyProperties(item, rStatZwAlarmCountWVO);
|
||||||
//单位名称
|
//单位名称
|
||||||
rStatZwAlarmCountWVO.setOrgName(deptDTOMap.get(rStatZwAlarmCountWVO.getOrgNo()).getName());
|
rStatZwAlarmCountWVO.setOrgName(deptDTOMap.get(rStatZwAlarmCountWVO.getOrgNo()).getName());
|
||||||
// DecimalFormat df = new DecimalFormat("###.00");
|
|
||||||
//获取有效监测点数量
|
//获取有效监测点数量
|
||||||
Integer monitorEffectiveCount = item.getMonitorEffectiveCount();
|
Integer monitorEffectiveCount = item.getMonitorEffectiveCount();
|
||||||
//todo 有效监测点数量在实际环境中是可能为0的,不需要做异常处理
|
//todo 有效监测点数量在实际环境中是可能为0的,不需要做异常处理
|
||||||
// if (monitorEffectiveCount == null || monitorEffectiveCount <= 0) {
|
Double warnMonitorRate = 0.0 ;
|
||||||
// throw new BusinessException(CommonResponseEnum.NO_DATA, "有效监测点数量异常");
|
Double monitorGradeRate = 0.0;
|
||||||
// }
|
if(monitorEffectiveCount<=0){
|
||||||
|
if(item.getWarnMonitorCount()>0){
|
||||||
|
warnMonitorRate=100.0;
|
||||||
|
}
|
||||||
|
if(item.getMonitorGradeCount()>0){
|
||||||
|
monitorGradeRate=100.0;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
//计算告警四次及以上监测点占比( * 100 是直接取到百分比)
|
//计算告警四次及以上监测点占比( * 100 是直接取到百分比)
|
||||||
// Double warnMonitorRate = Double.parseDouble(df.format(item.getWarnMonitorCount() / (monitorEffectiveCount * 1.0) * 100));
|
warnMonitorRate = Double.parseDouble(String.format("%.2f",item.getWarnMonitorCount() / (monitorEffectiveCount * 1.0) * 100));
|
||||||
Double warnMonitorRate = monitorEffectiveCount<=0 ? 0.0 : Double.parseDouble(String.format("%.2f",item.getWarnMonitorCount() / (monitorEffectiveCount * 1.0) * 100));
|
|
||||||
rStatZwAlarmCountWVO.setWarnMonitorRate(warnMonitorRate);
|
|
||||||
//级别'较差'监测点占比( * 100 是直接取到百分比)
|
//级别'较差'监测点占比( * 100 是直接取到百分比)
|
||||||
// Double monitorGradeRate = Double.parseDouble(df.format(item.getMonitorGradeCount() / (monitorEffectiveCount * 1.0) * 100));
|
monitorGradeRate = Double.parseDouble(String.format("%.2f",item.getMonitorGradeCount() / (monitorEffectiveCount * 1.0) * 100));
|
||||||
Double monitorGradeRate = monitorEffectiveCount<=0 ? 0.0 : Double.parseDouble(String.format("%.2f",item.getMonitorGradeCount() / (monitorEffectiveCount * 1.0) * 100));
|
}
|
||||||
|
rStatZwAlarmCountWVO.setWarnMonitorRate(warnMonitorRate);
|
||||||
rStatZwAlarmCountWVO.setMonitorGradeRate(monitorGradeRate);
|
rStatZwAlarmCountWVO.setMonitorGradeRate(monitorGradeRate);
|
||||||
|
|
||||||
return rStatZwAlarmCountWVO;
|
return rStatZwAlarmCountWVO;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
resultList = new ArrayList<>();
|
resultList = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,9 +143,10 @@ implements RStatZwAlarmCountWService {
|
|||||||
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
List<DictData> voltageLevelList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.DEV_VOLTAGE.getCode()).getData();
|
||||||
//将电压信息转成map,key:id value:name
|
//将电压信息转成map,key:id value:name
|
||||||
Map<String, String> voltageLevelMap = voltageLevelList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
Map<String, String> voltageLevelMap = voltageLevelList.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||||
|
List<String> data = deptFeignClient.getDepSonSelfCodetByCode(id).getData();
|
||||||
//查询当前单位下监测点idList
|
//查询当前单位下监测点idList
|
||||||
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Monitor> monitorLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
monitorLambdaQueryWrapper.eq(Monitor::getOrgId, id);
|
monitorLambdaQueryWrapper.in(Monitor::getOrgId, data);
|
||||||
List<String> orgMeasurementPointIdList = iMonitorService.list(monitorLambdaQueryWrapper).stream().map(Monitor::getId).collect(Collectors.toList());
|
List<String> orgMeasurementPointIdList = iMonitorService.list(monitorLambdaQueryWrapper).stream().map(Monitor::getId).collect(Collectors.toList());
|
||||||
//如果单位下没有监测点,直接返回空集合
|
//如果单位下没有监测点,直接返回空集合
|
||||||
if (CollUtil.isEmpty(orgMeasurementPointIdList)) {
|
if (CollUtil.isEmpty(orgMeasurementPointIdList)) {
|
||||||
@@ -153,117 +154,43 @@ implements RStatZwAlarmCountWService {
|
|||||||
}
|
}
|
||||||
//以周为时间段,查询告警超过四次的监测点信息
|
//以周为时间段,查询告警超过四次的监测点信息
|
||||||
LambdaQueryWrapper<RMpTargetWarnD> targetWarnWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<RMpTargetWarnD> targetWarnWrapper = new LambdaQueryWrapper<>();
|
||||||
targetWarnWrapper.select(RMpTargetWarnD::getMeasurementPointId)
|
targetWarnWrapper
|
||||||
.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList)
|
.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList)
|
||||||
.ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTime)
|
.ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTime)
|
||||||
.le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTime)
|
.le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTime)
|
||||||
.groupBy(RMpTargetWarnD::getMeasurementPointId)
|
.eq(RMpTargetWarnD::getIsEffective,1);
|
||||||
//拼接条件
|
List<RMpTargetWarnD> measurementPointIdList = rMpTargetWarnDService.list(targetWarnWrapper);
|
||||||
.and(qw ->
|
|
||||||
qw.eq(RMpTargetWarnD::getIsEffective, 0)//是否是有效接入监测点(0:否 1:是)
|
|
||||||
.or() //开始拼接or条件
|
|
||||||
.eq(RMpTargetWarnD::getIsHarmonic, 1)//是否是稳态超标监测点(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsEvent, 1) //是否是发生暂态的监测点(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsWarn, 1) //是否是告警监测点数(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsVDevWarn, 1) //电压偏差是否告警(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsFreqWarn, 1) //频率偏差是否告警(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsUnbalanceWarn, 1) //三相电压不平衡度是否告警(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsVWarn, 1) //谐波电压是否告警(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsFlickerWarn, 1) //闪变是否告警(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsSagWarn, 1) //电压暂降是否告警(0:否 1:是)
|
|
||||||
.or()
|
|
||||||
.eq(RMpTargetWarnD::getIsInterruptWarn, 1) //短时中断是否告警(0:否 1:是)
|
|
||||||
)
|
|
||||||
.having("count(measurement_point_id) >= {0}", 4);
|
|
||||||
|
|
||||||
// LambdaQueryWrapper<RMpPwAlarmDetailD> alarmDetailWrapper = new LambdaQueryWrapper<>();
|
//获取大于四次的监测点集合
|
||||||
/*
|
List<String> MonitorIdsQuartic = measurementPointIdList.stream()
|
||||||
组装查询条件:select count(1) from r_mp_pw_alarm_detail_d where data_date <= '2022-10-23'
|
.filter(obj -> obj.getIsWarn() == 1)
|
||||||
and data_date >= '2022-10-17' and measurement_point_id in (orgMeasurementPointIdList)
|
.collect(Collectors.groupingBy(RMpTargetWarnD::getMeasurementPointId, Collectors.counting()))
|
||||||
group by measurement_point_id having count(measurement_point_id) >= 4
|
.entrySet().stream()
|
||||||
*/
|
.filter(e -> e.getValue() >= 4).map(x->x.getKey()).collect(Collectors.toList());
|
||||||
// alarmDetailWrapper.select(RMpPwAlarmDetailD::getMeasurementPointId)
|
|
||||||
// .in(RMpPwAlarmDetailD::getMeasurementPointId, orgMeasurementPointIdList)
|
|
||||||
// .ge(StringUtils.isNotBlank(startTime), RMpPwAlarmDetailD::getDataDate, startTime)
|
|
||||||
// .le(StringUtils.isNotBlank(endTime), RMpPwAlarmDetailD::getDataDate, endTime)
|
|
||||||
// .groupBy(RMpPwAlarmDetailD::getMeasurementPointId)
|
|
||||||
// .having("count(measurement_point_id) >= {0}", 4);
|
|
||||||
//告警超过四次的监测点idList
|
|
||||||
List<String> measurementPointIdList = rMpTargetWarnDService.listObjs(targetWarnWrapper, Object::toString);
|
|
||||||
|
|
||||||
// 计算问题严重的监测点
|
// 计算问题严重的监测点
|
||||||
// 获取查询条件:月份开始时间、结束时间
|
Map<String, Double> avgStatusOneCountByAlarmId = measurementPointIdList.stream()
|
||||||
Date date = DateUtil.parse(startTime);
|
.filter(alarm -> alarm.getIsWarn() == 1)
|
||||||
String startTimeOfMonth = DateUtil.format(DateUtil.beginOfMonth(date), "yyyy-MM-dd");
|
.collect(Collectors.groupingBy(RMpTargetWarnD::getMeasurementPointId, Collectors.counting()))
|
||||||
String endTimeOfMonth = DateUtil.format(DateUtil.endOfMonth(date), "yyyy-MM-dd");
|
.entrySet().stream()
|
||||||
//获取查询月份的自然月天数
|
.collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue() / 7.0));
|
||||||
int monthDay = Month.of(DateUtil.month(date)).getLastDay(DateUtil.isLeapYear(DateUtil.year(date)));
|
|
||||||
|
|
||||||
//根据单位下监测点idList、月份条件查询监测点告警信息
|
// 对 map 中的 value 进行从大到小的排序,并且排除 value 为 0 的元素
|
||||||
List<RMpTargetWarnD> targetWarnDList;
|
List<String> sortedAvgStatusOneCountByAlarmId = avgStatusOneCountByAlarmId.entrySet().stream()
|
||||||
|
.filter(e -> e.getValue() != 0)
|
||||||
|
.sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
|
||||||
|
.map(Map.Entry::getKey)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if(CollUtil.isNotEmpty(sortedAvgStatusOneCountByAlarmId)){
|
||||||
|
// 获取前 30% 的告警 id 数量
|
||||||
|
double v = sortedAvgStatusOneCountByAlarmId.size() * 0.3;
|
||||||
|
int top30PercentCount = (int) (v<1?Math.ceil(v):v);
|
||||||
|
MonitorIdsQuartic.addAll(sortedAvgStatusOneCountByAlarmId.subList(0,top30PercentCount));
|
||||||
|
}
|
||||||
|
|
||||||
targetWarnWrapper.clear();
|
|
||||||
//组装查询条件:
|
|
||||||
targetWarnWrapper.in(RMpTargetWarnD::getMeasurementPointId, orgMeasurementPointIdList)
|
|
||||||
.ge(StringUtils.isNotBlank(startTime), RMpTargetWarnD::getDataDate, startTimeOfMonth)
|
|
||||||
.le(StringUtils.isNotBlank(endTime), RMpTargetWarnD::getDataDate, endTimeOfMonth);
|
|
||||||
targetWarnDList = rMpTargetWarnDService.list(targetWarnWrapper);
|
|
||||||
|
|
||||||
//使用stream的分组方法(Collectors.partitioningBy())对告警记录和没有告警的记录进行分组 true:有告警的记录 false:没有告警的记录
|
|
||||||
// Map<Boolean, List<RMpTargetWarnD>> booleanListMap = targetWarnDList.stream().collect(Collectors.groupingBy(
|
|
||||||
// item -> item.getIsEffective() == 1 || item.getIsHarmonic() == 1 || item.getIsEvent() == 1 || item.getIsWarn() == 1
|
|
||||||
// || item.getIsVDevWarn() == 1 || item.getIsFreqWarn() == 1 || item.getIsUnbalanceWarn() == 1 || item.getIsVWarn() == 1
|
|
||||||
// || item.getIsFlickerWarn() == 1 || item.getIsSagWarn() == 1 || item.getIsInterruptWarn() == 1));
|
|
||||||
//提取有告警情况的记录
|
|
||||||
// List<RMpTargetWarnD> rMpTargetWarnDS4Warn = booleanListMap.get(true);
|
|
||||||
//提取没有告警情况的记录
|
|
||||||
// List<RMpTargetWarnD> rMpTargetWarnDS4Normal = booleanListMap.get(true);
|
|
||||||
//过滤出有告警信息的记录
|
|
||||||
List<RMpTargetWarnD> rMpTargetWarnDS4Warn = targetWarnDList.stream().filter(
|
|
||||||
item -> item.getIsEffective() == 1 || item.getIsHarmonic() == 1 || item.getIsEvent() == 1 || item.getIsWarn() == 1
|
|
||||||
|| item.getIsVDevWarn() == 1 || item.getIsFreqWarn() == 1 || item.getIsUnbalanceWarn() == 1 || item.getIsVWarn() == 1
|
|
||||||
|| item.getIsFlickerWarn() == 1 || item.getIsSagWarn() == 1 || item.getIsInterruptWarn() == 1).collect(Collectors.toList());
|
|
||||||
//创建map集合,用于统计某个监测点的记录条数
|
|
||||||
HashMap<String, Integer> monitorCountMap = new HashMap<>();
|
|
||||||
for (RMpTargetWarnD item : rMpTargetWarnDS4Warn) {
|
|
||||||
if (monitorCountMap.containsKey(item.getMeasurementPointId())) {
|
|
||||||
monitorCountMap.put(item.getMeasurementPointId(), monitorCountMap.get(item.getMeasurementPointId()) + 1);
|
|
||||||
} else {
|
|
||||||
monitorCountMap.put(item.getMeasurementPointId(), 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//创建map集合,key:监测点id value:严重程度
|
|
||||||
HashMap<String, Double> severityMap = new HashMap<>();
|
|
||||||
for (String measurementPointId : monitorCountMap.keySet()) {
|
|
||||||
Integer integer = monitorCountMap.get(measurementPointId); //当前遍历的监测点告警天数
|
|
||||||
double severity = integer / (monthDay * 1.0); //严重程度
|
|
||||||
severityMap.put(measurementPointId, severity);
|
|
||||||
}
|
|
||||||
//给严重程度从大到小排序,并将严重程度前【30%】的监测点id放到List集合中
|
|
||||||
// List<String> severity = new ArrayList<>();
|
|
||||||
// severityMap.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder())).collect(Collectors.toList())
|
|
||||||
// .subList(0, (int)(severityMap.size() * 0.3)).forEach(item -> severity.add(item.getKey()));
|
|
||||||
List<String> severity = severityMap.entrySet().stream().sorted(Map.Entry.comparingByValue(Comparator.reverseOrder()))
|
|
||||||
.limit((int)Math.ceil(severityMap.size() * 0.3)).map(Map.Entry::getKey).collect(Collectors.toList());
|
|
||||||
//合并告警超过四次的监测点ids和严重程度前30%监测点dis
|
|
||||||
measurementPointIdList.addAll(severity);
|
|
||||||
//如果问题严重监测点id集合是空的,那直接返回空集合
|
|
||||||
if (CollUtil.isEmpty(measurementPointIdList)) {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
//去除集合中重复的监测点id,得到最终的有严重问题的监测点id集合
|
//去除集合中重复的监测点id,得到最终的有严重问题的监测点id集合
|
||||||
List<String> lastMeasurementPointList = measurementPointIdList.stream().distinct().collect(Collectors.toList());
|
|
||||||
//根据监测点ids查询监测点信息
|
|
||||||
monitorLambdaQueryWrapper.clear();
|
monitorLambdaQueryWrapper.clear();
|
||||||
monitorLambdaQueryWrapper.in(Monitor::getId, lastMeasurementPointList);
|
monitorLambdaQueryWrapper.in(Monitor::getId, MonitorIdsQuartic);
|
||||||
List<Monitor> monitorList = iMonitorService.list(monitorLambdaQueryWrapper);
|
List<Monitor> monitorList = iMonitorService.list(monitorLambdaQueryWrapper);
|
||||||
//提取出监测点相关的变电站id,获取变电站电压等级map(key: 变电站id value: 电压等级)
|
//提取出监测点相关的变电站id,获取变电站电压等级map(key: 变电站id value: 电压等级)
|
||||||
List<String> powerIdList = monitorList.stream().map(Monitor::getPowerrId).collect(Collectors.toList());
|
List<String> powerIdList = monitorList.stream().map(Monitor::getPowerrId).collect(Collectors.toList());
|
||||||
@@ -281,7 +208,6 @@ implements RStatZwAlarmCountWService {
|
|||||||
problemMonitorDetailVO.setPowerName(item.getPowerrName()); //变电站名称
|
problemMonitorDetailVO.setPowerName(item.getPowerrName()); //变电站名称
|
||||||
problemMonitorDetailVO.setVoltageLevel(stationVoltageLevelMap.get(item.getPowerrId())); //变电站电压等级id
|
problemMonitorDetailVO.setVoltageLevel(stationVoltageLevelMap.get(item.getPowerrId())); //变电站电压等级id
|
||||||
problemMonitorDetailVO.setVoltageLevelName(voltageLevelMap.get(stationVoltageLevelMap.get(item.getPowerrId()))); //变电站电压等级
|
problemMonitorDetailVO.setVoltageLevelName(voltageLevelMap.get(stationVoltageLevelMap.get(item.getPowerrId()))); //变电站电压等级
|
||||||
|
|
||||||
return problemMonitorDetailVO;
|
return problemMonitorDetailVO;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
return resultList;
|
return resultList;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class SpecialAnalysisServiceImpl implements SpecialAnalysisService {
|
|||||||
switch (param.getType()) {
|
switch (param.getType()) {
|
||||||
//光伏电站
|
//光伏电站
|
||||||
case 1:
|
case 1:
|
||||||
data = dicDataFeignClient.getDicDataByCode(DicDataEnum.POWER_STATION.getCode()).getData();
|
data = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.POWER_STATION.getCode(),DicDataTypeEnum.MONITORING_LABELS.getCode()).getData();
|
||||||
break;
|
break;
|
||||||
//冶炼负荷
|
//冶炼负荷
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
@@ -127,8 +127,21 @@ public class CommTerminalController extends BaseController {
|
|||||||
List<DeptGetSubStationDTO> result = commTerminalService.deptSubStation(deptGetLineParam);
|
List<DeptGetSubStationDTO> result = commTerminalService.deptSubStation(deptGetLineParam);
|
||||||
log.info("运行时长" + timer.intervalSecond());
|
log.info("运行时长" + timer.intervalSecond());
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
} /**
|
||||||
|
* 根据单位获取所有变电站详细信息
|
||||||
|
* @param deptGetLineParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/deptGetSubStationInfo")
|
||||||
|
@ApiOperation("根据单位获取所有变电站详细信息")
|
||||||
|
@ApiImplicitParam(name = "deptGetLineParam", value = "请求体", required = true)
|
||||||
|
public HttpResult<List<DeptGetSubStationDTO.Info>> deptGetSubStationInfo(@RequestBody @Validated DeptGetLineParam deptGetLineParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("deptGetSubStationInfo");
|
||||||
|
List<DeptGetSubStationDTO.Info> result = commTerminalService.deptSubStationInfo(deptGetLineParam);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据单位获取所有变电站
|
* 根据单位获取所有变电站
|
||||||
* @author cdf
|
* @author cdf
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
|||||||
|
|
||||||
List<TerminalGetBase> orgSubStationGet(@Param("list")List<Integer> devType);
|
List<TerminalGetBase> orgSubStationGet(@Param("list")List<Integer> devType);
|
||||||
|
|
||||||
|
List<TerminalGetBase.Extend> orgSubStationInfoGet(@Param("list")List<Integer> devType);
|
||||||
|
|
||||||
List<String> getLineIdByDeptIds(@Param("deptIds")List<String> deptIds,@Param("runFlag")List<Integer> runFlag,@Param("dataType")List<Integer> dataType);
|
List<String> getLineIdByDeptIds(@Param("deptIds")List<String> deptIds,@Param("runFlag")List<Integer> runFlag,@Param("dataType")List<Integer> dataType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,7 +90,29 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="orgSubStationInfoGet" resultType="com.njcn.device.biz.pojo.dto.TerminalGetBase$Extend">
|
||||||
|
select
|
||||||
|
DISTINCT
|
||||||
|
pq_dept_line.id unitId,
|
||||||
|
substation.id ledgerId,
|
||||||
|
substation.name subName,
|
||||||
|
sub.Scale voltageLevel,
|
||||||
|
point.id lineId
|
||||||
|
from pq_dept_line pq_dept_line
|
||||||
|
inner join pq_line point on pq_dept_line.line_id = point.id
|
||||||
|
inner join pq_line_detail lineDetail on point.id = lineDetail.id
|
||||||
|
inner join pq_line voltage on point.pid = voltage.id
|
||||||
|
inner join pq_line dev on voltage.pid = dev.id
|
||||||
|
inner join pq_device device on dev.id = device.id
|
||||||
|
inner join pq_line substation on dev.pid = substation.id
|
||||||
|
inner join pq_substation sub on sub.id = substation.id
|
||||||
|
where device.Dev_Model = 1
|
||||||
|
and point.state = 1
|
||||||
|
and device.Dev_Data_Type in
|
||||||
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
<select id="getLineIdByDeptIds" resultType="string">
|
<select id="getLineIdByDeptIds" resultType="string">
|
||||||
select
|
select
|
||||||
DISTINCT
|
DISTINCT
|
||||||
|
|||||||
@@ -82,8 +82,5 @@ public interface CommTerminalService {
|
|||||||
Map<String,String> getCustomDetailByLineId(String id);
|
Map<String,String> getCustomDetailByLineId(String id);
|
||||||
|
|
||||||
|
|
||||||
|
List<DeptGetSubStationDTO.Info> deptSubStationInfo(DeptGetLineParam deptGetLineParam);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ public interface DeptLineService extends IService<DeptLine> {
|
|||||||
Map<String, List<TerminalGetBase>> orgSubStationGet(List<Integer> devType);
|
Map<String, List<TerminalGetBase>> orgSubStationGet(List<Integer> devType);
|
||||||
|
|
||||||
|
|
||||||
|
List<TerminalGetBase.Extend> orgSubStationInfoGet(List<Integer> devType);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据监测点id集合查询部门信息id
|
* 根据监测点id集合查询部门信息id
|
||||||
* @param ids 部门ids
|
* @param ids 部门ids
|
||||||
|
|||||||
@@ -207,6 +207,49 @@ public class CommTerminalServiceImpl implements CommTerminalService {
|
|||||||
return lineMapper.getCustomDetailByLineId(id);
|
return lineMapper.getCustomDetailByLineId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DeptGetSubStationDTO.Info> deptSubStationInfo(DeptGetLineParam deptGetLineParam) {
|
||||||
|
List<DeptGetSubStationDTO.Info> result = new ArrayList<>();
|
||||||
|
List<DeptGetBase> temDept = getDeptChildrenByParent(deptGetLineParam);
|
||||||
|
List<TerminalGetBase.Extend> anExtends = deptLineService.orgSubStationInfoGet(filterDataTypeNew(deptGetLineParam.getServerName()));
|
||||||
|
Map<String, List<TerminalGetBase.Extend>> orgSub = anExtends.stream().collect(Collectors.groupingBy(TerminalGetBase::getUnitId));
|
||||||
|
|
||||||
|
temDept.forEach(item -> {
|
||||||
|
DeptGetSubStationDTO.Info deptGetSubStationDTO = new DeptGetSubStationDTO.Info();
|
||||||
|
deptGetSubStationDTO.setUnitId(item.getUnitId());
|
||||||
|
deptGetSubStationDTO.setUnitName(item.getUnitName());
|
||||||
|
deptGetSubStationDTO.setUnitChildrenList(item.getUnitChildrenList());
|
||||||
|
deptGetSubStationDTO.setDeptLevel(item.getDeptLevel());
|
||||||
|
List<String> deptIds = item.getUnitChildrenList();
|
||||||
|
if (CollectionUtil.isNotEmpty(deptIds)) {
|
||||||
|
List<SubGetBase> subList = new ArrayList<>();
|
||||||
|
SubGetBase subGetBase;
|
||||||
|
for (String deptId : deptIds) {
|
||||||
|
if (orgSub.containsKey(deptId)) {
|
||||||
|
//获取部门下变电信息
|
||||||
|
List<TerminalGetBase.Extend> sub = orgSub.get(deptId);
|
||||||
|
Map<String, List<TerminalGetBase.Extend>> subMap = sub.stream()
|
||||||
|
.collect(Collectors.groupingBy(x->x.getLedgerId()+"_"+x.getSubName()+"_"+x.getVoltageLevel()));
|
||||||
|
for (Map.Entry<String, List<TerminalGetBase.Extend>> stringListEntry : subMap.entrySet()) {
|
||||||
|
String[] split = stringListEntry.getKey().split("_");
|
||||||
|
subGetBase=new SubGetBase();
|
||||||
|
subGetBase.setId(split[0]);
|
||||||
|
subGetBase.setName(split[1]);
|
||||||
|
subGetBase.setVoltageLevel(split[2]);
|
||||||
|
List<String> monitorIds = stringListEntry.getValue().stream().map(TerminalGetBase.Extend::getLineId).distinct().collect(Collectors.toList());
|
||||||
|
subGetBase.setUnitChildrenList(monitorIds);
|
||||||
|
subList.add(subGetBase);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
deptGetSubStationDTO.setStationIds(subList);
|
||||||
|
}
|
||||||
|
result.add(deptGetSubStationDTO);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<Integer> filterDataTypeNew(String serverName) {
|
private List<Integer> filterDataTypeNew(String serverName) {
|
||||||
List<Integer> devType = new ArrayList<>();
|
List<Integer> devType = new ArrayList<>();
|
||||||
|
|||||||
@@ -119,6 +119,11 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
|||||||
return deptLines.stream ().collect (Collectors.groupingBy (TerminalGetBase::getUnitId));
|
return deptLines.stream ().collect (Collectors.groupingBy (TerminalGetBase::getUnitId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TerminalGetBase.Extend> orgSubStationInfoGet(List<Integer> devType) {
|
||||||
|
return deptLineMapper.orgSubStationInfoGet(devType);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeptLine getLineByLineIds(String ids) {
|
public DeptLine getLineByLineIds(String ids) {
|
||||||
return this.getOne(new LambdaQueryWrapper<DeptLine>()
|
return this.getOne(new LambdaQueryWrapper<DeptLine>()
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.event.pojo.po;
|
package com.njcn.event.pojo.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
@@ -58,5 +59,11 @@ public class RStatEventOrgM implements Serializable {
|
|||||||
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
|
public void setEventMeasurementRatioAverage(Float eventMeasurementRatioAverage) {
|
||||||
|
this.eventMeasurementRatioAverage = NumberUtil.round(eventMeasurementRatioAverage*100,2).floatValue();;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventMeasurementRatioAccrued(Float eventMeasurementRatioAccrued) {
|
||||||
|
this.eventMeasurementRatioAccrued = NumberUtil.round(eventMeasurementRatioAccrued*100,2).floatValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class RStatEventOrgPO implements Serializable {
|
|||||||
* 日均有效接入监测点数
|
* 日均有效接入监测点数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "effectiveMeasurementAverage", value = "日均有效接入监测点数")
|
@ApiModelProperty(name = "effectiveMeasurementAverage", value = "日均有效接入监测点数")
|
||||||
private Integer effectiveMeasurementAverage;
|
private Double effectiveMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计有效接入监测点数
|
* 累计有效接入监测点数
|
||||||
@@ -52,7 +52,7 @@ public class RStatEventOrgPO implements Serializable {
|
|||||||
* 日均监测到暂态指标的监测点数
|
* 日均监测到暂态指标的监测点数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementAverage", value = "日均监测到暂态指标的监测点数")
|
@ApiModelProperty(name = "eventMeasurementAverage", value = "日均监测到暂态指标的监测点数")
|
||||||
private Integer eventMeasurementAverage;
|
private Double eventMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计监测到暂态指标的监测点数
|
* 累计监测到暂态指标的监测点数
|
||||||
@@ -81,7 +81,7 @@ public class RStatEventOrgPO implements Serializable {
|
|||||||
* 日均发生暂态监测点数(根据 发生暂态监测点数 取平均值)
|
* 日均发生暂态监测点数(根据 发生暂态监测点数 取平均值)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eEventMeasurementAverage", value = "日均发生暂态监测点数(根据 发生暂态监测点数 取平均值)")
|
@ApiModelProperty(name = "eEventMeasurementAverage", value = "日均发生暂态监测点数(根据 发生暂态监测点数 取平均值)")
|
||||||
private Integer eEventMeasurementAverage;
|
private Double eEventMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计发生暂态监测点数(监测点暂态指标超标明细日表
|
* 累计发生暂态监测点数(监测点暂态指标超标明细日表
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.event.pojo.po;
|
package com.njcn.event.pojo.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -57,5 +58,11 @@ public class RStatEventOrgQ implements Serializable {
|
|||||||
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
|
public void setEventMeasurementRatioAverage(Float eventMeasurementRatioAverage) {
|
||||||
|
this.eventMeasurementRatioAverage = NumberUtil.round(eventMeasurementRatioAverage*100,2).floatValue();;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventMeasurementRatioAccrued(Float eventMeasurementRatioAccrued) {
|
||||||
|
this.eventMeasurementRatioAccrued = NumberUtil.round(eventMeasurementRatioAccrued*100,2).floatValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.event.pojo.po;
|
package com.njcn.event.pojo.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
@@ -57,5 +58,12 @@ public class RStatEventOrgY implements Serializable {
|
|||||||
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
@ApiModelProperty(value = "数据类型,字典表(01:主网测点 02:配网测点)")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
|
public void setEventMeasurementRatioAverage(Float eventMeasurementRatioAverage) {
|
||||||
|
this.eventMeasurementRatioAverage = NumberUtil.round(eventMeasurementRatioAverage*100,2).floatValue();;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEventMeasurementRatioAccrued(Float eventMeasurementRatioAccrued) {
|
||||||
|
this.eventMeasurementRatioAccrued = NumberUtil.round(eventMeasurementRatioAccrued*100,2).floatValue();;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class PwRStatEventOrgVO implements Serializable {
|
|||||||
* 日均有效接入监测点数
|
* 日均有效接入监测点数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "effectiveMeasurementAverage", value = "日均有效接入监测点数")
|
@ApiModelProperty(name = "effectiveMeasurementAverage", value = "日均有效接入监测点数")
|
||||||
private Integer effectiveMeasurementAverage;
|
private Double effectiveMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计有效接入监测点数
|
* 累计有效接入监测点数
|
||||||
@@ -59,7 +59,7 @@ public class PwRStatEventOrgVO implements Serializable {
|
|||||||
* 日均监测到暂态指标的监测点数
|
* 日均监测到暂态指标的监测点数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementAverage", value = "日均监测到暂态指标的监测点数")
|
@ApiModelProperty(name = "eventMeasurementAverage", value = "日均监测到暂态指标的监测点数")
|
||||||
private Integer eventMeasurementAverage;
|
private Double eventMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计监测到暂态指标的监测点数
|
* 累计监测到暂态指标的监测点数
|
||||||
@@ -94,7 +94,7 @@ public class PwRStatEventOrgVO implements Serializable {
|
|||||||
* 日均短时中断
|
* 日均短时中断
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "dayShortInterruptions", value = "日均短时中断")
|
@ApiModelProperty(name = "dayShortInterruptions", value = "日均短时中断")
|
||||||
private Integer dayShortInterruptions;
|
private Double dayShortInterruptions;
|
||||||
/**
|
/**
|
||||||
* 累计短时中断
|
* 累计短时中断
|
||||||
*/
|
*/
|
||||||
@@ -128,7 +128,7 @@ public class PwRStatEventOrgVO implements Serializable {
|
|||||||
* 日均电压暂升
|
* 日均电压暂升
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "dayVoltageRise", value = "日均电压暂升")
|
@ApiModelProperty(name = "dayVoltageRise", value = "日均电压暂升")
|
||||||
private Integer dayVoltageRise;
|
private Double dayVoltageRise;
|
||||||
/**
|
/**
|
||||||
* 累计电压暂升
|
* 累计电压暂升
|
||||||
*/
|
*/
|
||||||
@@ -163,7 +163,7 @@ public class PwRStatEventOrgVO implements Serializable {
|
|||||||
* 日均电压暂降
|
* 日均电压暂降
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "dayVoltageDip", value = "日均电压暂降")
|
@ApiModelProperty(name = "dayVoltageDip", value = "日均电压暂降")
|
||||||
private Integer dayVoltageDip;
|
private Double dayVoltageDip;
|
||||||
/**
|
/**
|
||||||
* 累计电压暂降
|
* 累计电压暂降
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -41,11 +41,17 @@ public class RStatEventOrgVO implements Serializable {
|
|||||||
@ApiModelProperty(name = "dataDate", value = "生成数据的时间,每年统计一次")
|
@ApiModelProperty(name = "dataDate", value = "生成数据的时间,每年统计一次")
|
||||||
private Date dataDate;
|
private Date dataDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "monitorType", value = "监测点类型")
|
||||||
|
private String monitorType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日均有效接入监测点数
|
* 日均有效接入监测点数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "effectiveMeasurementAverage", value = "日均有效接入监测点数")
|
@ApiModelProperty(name = "effectiveMeasurementAverage", value = "日均有效接入监测点数")
|
||||||
private Integer effectiveMeasurementAverage;
|
private Double effectiveMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计有效接入监测点数
|
* 累计有效接入监测点数
|
||||||
@@ -57,7 +63,7 @@ public class RStatEventOrgVO implements Serializable {
|
|||||||
* 日均监测到暂态指标的监测点数
|
* 日均监测到暂态指标的监测点数
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementAverage", value = "日均监测到暂态指标的监测点数")
|
@ApiModelProperty(name = "eventMeasurementAverage", value = "日均监测到暂态指标的监测点数")
|
||||||
private Integer eventMeasurementAverage;
|
private Double eventMeasurementAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计监测到暂态指标的监测点数
|
* 累计监测到暂态指标的监测点数
|
||||||
@@ -81,7 +87,7 @@ public class RStatEventOrgVO implements Serializable {
|
|||||||
* 日均短时中断
|
* 日均短时中断
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "dayShortInterruptions", value = "日均短时中断")
|
@ApiModelProperty(name = "dayShortInterruptions", value = "日均短时中断")
|
||||||
private Integer dayShortInterruptions;
|
private Double dayShortInterruptions;
|
||||||
/**
|
/**
|
||||||
* 累计短时中断
|
* 累计短时中断
|
||||||
*/
|
*/
|
||||||
@@ -103,7 +109,7 @@ public class RStatEventOrgVO implements Serializable {
|
|||||||
* 日均电压暂升
|
* 日均电压暂升
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "dayVoltageRise", value = "日均电压暂升")
|
@ApiModelProperty(name = "dayVoltageRise", value = "日均电压暂升")
|
||||||
private Integer dayVoltageRise;
|
private Double dayVoltageRise;
|
||||||
/**
|
/**
|
||||||
* 累计电压暂升
|
* 累计电压暂升
|
||||||
*/
|
*/
|
||||||
@@ -125,7 +131,7 @@ public class RStatEventOrgVO implements Serializable {
|
|||||||
* 日均电压暂降
|
* 日均电压暂降
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "dayVoltageDip", value = "日均电压暂降")
|
@ApiModelProperty(name = "dayVoltageDip", value = "日均电压暂降")
|
||||||
private Integer dayVoltageDip;
|
private Double dayVoltageDip;
|
||||||
/**
|
/**
|
||||||
* 累计电压暂降
|
* 累计电压暂降
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public interface PwRStatOrgClassifiedMapper {
|
|||||||
* @return 配网区域暂态事件分类统计(年)
|
* @return 配网区域暂态事件分类统计(年)
|
||||||
*/
|
*/
|
||||||
List<RStatEventOrgPO> getYearInfo(@Param("deptIdList") List<String> deptIdList,
|
List<RStatEventOrgPO> getYearInfo(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("distributionPoint")String distributionPoint);
|
@Param("distributionPoint")String distributionPoint);
|
||||||
@@ -40,6 +41,7 @@ public interface PwRStatOrgClassifiedMapper {
|
|||||||
* @return 配网区域暂态事件分类统计(月)
|
* @return 配网区域暂态事件分类统计(月)
|
||||||
*/
|
*/
|
||||||
List<RStatEventOrgPO> getQuarterInfo(@Param("deptIdList") List<String> deptIdList,
|
List<RStatEventOrgPO> getQuarterInfo(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("distributionPoint") String distributionPoint);
|
@Param("distributionPoint") String distributionPoint);
|
||||||
@@ -54,6 +56,7 @@ public interface PwRStatOrgClassifiedMapper {
|
|||||||
* @return 配网区域暂态事件分类统计(月)
|
* @return 配网区域暂态事件分类统计(月)
|
||||||
*/
|
*/
|
||||||
List<RStatEventOrgPO> getMonthInfo(@Param("deptIdList") List<String> deptIdList,
|
List<RStatEventOrgPO> getMonthInfo(@Param("deptIdList") List<String> deptIdList,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("distributionPoint") String distributionPoint);
|
@Param("distributionPoint") String distributionPoint);
|
||||||
|
|||||||
@@ -24,6 +24,12 @@
|
|||||||
<sql id="query_where">
|
<sql id="query_where">
|
||||||
rso.data_type = #{distributionPoint}
|
rso.data_type = #{distributionPoint}
|
||||||
AND rseo.data_type = #{distributionPoint}
|
AND rseo.data_type = #{distributionPoint}
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND rso.measurement_type_class IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
AND rso.org_no IN
|
AND rso.org_no IN
|
||||||
<foreach collection="deptIdList" item="item" open="(" close=")" separator=",">
|
<foreach collection="deptIdList" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
@@ -43,7 +49,9 @@
|
|||||||
<include refid="query_field"></include>
|
<include refid="query_field"></include>
|
||||||
FROM
|
FROM
|
||||||
r_stat_org_y AS rso
|
r_stat_org_y AS rso
|
||||||
LEFT JOIN r_stat_event_org_y AS rseo ON rso.org_no = rseo.org_no
|
LEFT JOIN r_stat_event_y AS rseo ON rso.org_no = rseo.org_no
|
||||||
|
and rso.data_date = rseo.data_date
|
||||||
|
and rso.measurement_type_class = rseo.measurement_type_class
|
||||||
WHERE
|
WHERE
|
||||||
<include refid="query_where"></include>
|
<include refid="query_where"></include>
|
||||||
</select>
|
</select>
|
||||||
@@ -54,7 +62,9 @@
|
|||||||
<include refid="query_field"></include>
|
<include refid="query_field"></include>
|
||||||
FROM
|
FROM
|
||||||
r_stat_org_q AS rso
|
r_stat_org_q AS rso
|
||||||
LEFT JOIN r_stat_event_org_q AS rseo ON rso.org_no = rseo.org_no
|
LEFT JOIN r_stat_event_q AS rseo ON rso.org_no = rseo.org_no
|
||||||
|
and rso.data_date = rseo.data_date
|
||||||
|
and rso.measurement_type_class = rseo.measurement_type_class
|
||||||
WHERE
|
WHERE
|
||||||
<include refid="query_where"></include>
|
<include refid="query_where"></include>
|
||||||
</select>
|
</select>
|
||||||
@@ -65,7 +75,9 @@
|
|||||||
<include refid="query_field"></include>
|
<include refid="query_field"></include>
|
||||||
FROM
|
FROM
|
||||||
r_stat_org_m AS rso
|
r_stat_org_m AS rso
|
||||||
LEFT JOIN r_stat_event_org_m AS rseo ON rso.org_no = rseo.org_no
|
LEFT JOIN r_stat_event_m AS rseo ON rso.org_no = rseo.org_no
|
||||||
|
and rso.data_date = rseo.data_date
|
||||||
|
and rso.measurement_type_class = rseo.measurement_type_class
|
||||||
WHERE
|
WHERE
|
||||||
<include refid="query_where"></include>
|
<include refid="query_where"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ public interface RStatEventOrgMapper {
|
|||||||
* @return 年区域暂态指标分类统计表
|
* @return 年区域暂态指标分类统计表
|
||||||
*/
|
*/
|
||||||
List<RStatEventOrgPO> getYearRStatEventOrgInfo(@Param("deptCode") List<String> deptCode,
|
List<RStatEventOrgPO> getYearRStatEventOrgInfo(@Param("deptCode") List<String> deptCode,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("mainnetPointId") String mainnetPointId);
|
@Param("mainnetPointId") String mainnetPointId);
|
||||||
@@ -39,6 +40,7 @@ public interface RStatEventOrgMapper {
|
|||||||
* @return 季区域暂态指标分类统计表
|
* @return 季区域暂态指标分类统计表
|
||||||
*/
|
*/
|
||||||
List<RStatEventOrgPO> getQuarterRStatEventOrgInfo(@Param("deptCode") List<String> deptCode,
|
List<RStatEventOrgPO> getQuarterRStatEventOrgInfo(@Param("deptCode") List<String> deptCode,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("mainnetPointId") String mainnetPointId);
|
@Param("mainnetPointId") String mainnetPointId);
|
||||||
@@ -53,6 +55,7 @@ public interface RStatEventOrgMapper {
|
|||||||
* @return 月区域暂态指标分类统计表
|
* @return 月区域暂态指标分类统计表
|
||||||
*/
|
*/
|
||||||
List<RStatEventOrgPO> getMonthRStatEventOrgInfoInfo(@Param("deptCode") List<String> deptCode,
|
List<RStatEventOrgPO> getMonthRStatEventOrgInfoInfo(@Param("deptCode") List<String> deptCode,
|
||||||
|
@Param("ids") List<String> ids,
|
||||||
@Param("startTime") String startTime,
|
@Param("startTime") String startTime,
|
||||||
@Param("endTime") String endTime,
|
@Param("endTime") String endTime,
|
||||||
@Param("mainnetPointId") String mainnetPointId);
|
@Param("mainnetPointId") String mainnetPointId);
|
||||||
|
|||||||
@@ -206,8 +206,8 @@
|
|||||||
SELECT
|
SELECT
|
||||||
measurement_point_id as measurementPointId,
|
measurement_point_id as measurementPointId,
|
||||||
start_time AS startTime,
|
start_time AS startTime,
|
||||||
duration AS duration,
|
duration*1000 AS duration,
|
||||||
feature_amplitude AS featureAmplitude
|
feature_amplitude*100 AS featureAmplitude
|
||||||
FROM
|
FROM
|
||||||
`r_mp_event_detail`
|
`r_mp_event_detail`
|
||||||
WHERE
|
WHERE
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
SELECT
|
SELECT
|
||||||
measurement_type_class,
|
measurement_type_class,
|
||||||
event_type,
|
event_type,
|
||||||
sum(event_measurement_average)/count(*) as eventMeasurementAverage ,
|
ROUND( sum(event_measurement_average)/count(*),2) as eventMeasurementAverage ,
|
||||||
sum(event_measurement_accrued) as eventMeasurementAccrued,
|
sum(event_measurement_accrued) as eventMeasurementAccrued,
|
||||||
sum(event_freq)/count(*) as eventFreq,
|
ROUND( sum(event_freq)/count(*),2)as eventFreq,
|
||||||
sum(event_count) as eventCount,
|
sum(event_count) as eventCount,
|
||||||
sum(event_measurement_ratio_average)/count(*) as eventMeasurementRatioAverage,
|
ROUND( sum(event_measurement_ratio_average)*100/count(*),2) as eventMeasurementRatioAverage,
|
||||||
sum(event_measurement_ratio_accrued) as eventMeasurementRatioAccrued
|
ROUND( sum(event_measurement_ratio_accrued)*100,2) as eventMeasurementRatioAccrued
|
||||||
FROM
|
FROM
|
||||||
r_stat_event_m
|
r_stat_event_m
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
<sql id="query_rStatEventOrg_field">
|
<sql id="query_rStatEventOrg_field">
|
||||||
rso.org_no AS orgNo,
|
rso.org_no AS orgNo,
|
||||||
rso.data_date AS dataDate,
|
rso.data_date AS dataDate,
|
||||||
|
rso.measurement_type_class AS measurementTypeClass,
|
||||||
rso.effective_measurement_average AS effectiveMeasurementAverage,
|
rso.effective_measurement_average AS effectiveMeasurementAverage,
|
||||||
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
||||||
rso.event_measurement_average AS eventMeasurementAverage,
|
rso.event_measurement_average AS eventMeasurementAverage,
|
||||||
@@ -22,6 +23,12 @@
|
|||||||
<sql id="query_rStatEventOrg_where">
|
<sql id="query_rStatEventOrg_where">
|
||||||
rso.data_type = #{mainnetPointId}
|
rso.data_type = #{mainnetPointId}
|
||||||
AND rseo.data_type = #{mainnetPointId}
|
AND rseo.data_type = #{mainnetPointId}
|
||||||
|
<if test="ids != null and ids.size > 0">
|
||||||
|
AND rso.measurement_type_class IN
|
||||||
|
<foreach collection='ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
AND rso.org_no IN
|
AND rso.org_no IN
|
||||||
<foreach collection="deptCode" item="item" open="(" close=")" separator=",">
|
<foreach collection="deptCode" item="item" open="(" close=")" separator=",">
|
||||||
#{item}
|
#{item}
|
||||||
@@ -40,7 +47,9 @@
|
|||||||
<include refid="query_rStatEventOrg_field"></include>
|
<include refid="query_rStatEventOrg_field"></include>
|
||||||
FROM
|
FROM
|
||||||
r_stat_org_y AS rso
|
r_stat_org_y AS rso
|
||||||
LEFT JOIN r_stat_event_org_y AS rseo ON rso.org_no = rseo.org_no
|
LEFT JOIN r_stat_event_y AS rseo ON rso.org_no = rseo.org_no
|
||||||
|
and rso.data_date = rseo.data_date
|
||||||
|
and rso.measurement_type_class = rseo.measurement_type_class
|
||||||
WHERE
|
WHERE
|
||||||
<include refid="query_rStatEventOrg_where"></include>
|
<include refid="query_rStatEventOrg_where"></include>
|
||||||
</select>
|
</select>
|
||||||
@@ -52,7 +61,9 @@
|
|||||||
<include refid="query_rStatEventOrg_field"></include>
|
<include refid="query_rStatEventOrg_field"></include>
|
||||||
FROM
|
FROM
|
||||||
r_stat_org_q AS rso
|
r_stat_org_q AS rso
|
||||||
LEFT JOIN r_stat_event_org_q AS rseo ON rso.org_no = rseo.org_no
|
LEFT JOIN r_stat_event_q AS rseo ON rso.org_no = rseo.org_no
|
||||||
|
and rso.data_date = rseo.data_date
|
||||||
|
and rso.measurement_type_class = rseo.measurement_type_class
|
||||||
WHERE
|
WHERE
|
||||||
<include refid="query_rStatEventOrg_where"></include>
|
<include refid="query_rStatEventOrg_where"></include>
|
||||||
</select>
|
</select>
|
||||||
@@ -64,7 +75,9 @@
|
|||||||
<include refid="query_rStatEventOrg_field"></include>
|
<include refid="query_rStatEventOrg_field"></include>
|
||||||
FROM
|
FROM
|
||||||
r_stat_org_m AS rso
|
r_stat_org_m AS rso
|
||||||
LEFT JOIN r_stat_event_org_m AS rseo ON rso.org_no = rseo.org_no
|
LEFT JOIN r_stat_event_m AS rseo ON rso.org_no = rseo.org_no
|
||||||
|
and rso.data_date = rseo.data_date
|
||||||
|
and rso.measurement_type_class = rseo.measurement_type_class
|
||||||
WHERE
|
WHERE
|
||||||
<include refid="query_rStatEventOrg_where"></include>
|
<include refid="query_rStatEventOrg_where"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
SELECT
|
SELECT
|
||||||
measurement_type_class,
|
measurement_type_class,
|
||||||
event_type,
|
event_type,
|
||||||
sum(event_measurement_average)/count(*) as eventMeasurementAverage ,
|
ROUND( sum(event_measurement_average)/count(*),2) as eventMeasurementAverage ,
|
||||||
sum(event_measurement_accrued) as eventMeasurementAccrued,
|
sum(event_measurement_accrued) as eventMeasurementAccrued,
|
||||||
sum(event_freq)/count(*) as eventFreq,
|
ROUND( sum(event_freq)/count(*),2) as eventFreq,
|
||||||
sum(event_count) as eventCount,
|
sum(event_count) as eventCount,
|
||||||
sum(event_measurement_ratio_average)/count(*) as eventMeasurementRatioAverage,
|
ROUND( sum(event_measurement_ratio_average)*100/count(*),2) as eventMeasurementRatioAverage,
|
||||||
sum(event_measurement_ratio_accrued) as eventMeasurementRatioAccrued
|
ROUND( sum(event_measurement_ratio_accrued)*100,2) as eventMeasurementRatioAccrued
|
||||||
FROM
|
FROM
|
||||||
r_stat_event_q
|
r_stat_event_q
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -20,12 +20,12 @@
|
|||||||
SELECT
|
SELECT
|
||||||
measurement_type_class,
|
measurement_type_class,
|
||||||
event_type,
|
event_type,
|
||||||
sum(event_measurement_average)/count(*) as eventMeasurementAverage ,
|
ROUND( sum(event_measurement_average)/count(*),2) as eventMeasurementAverage ,
|
||||||
sum(event_measurement_accrued) as eventMeasurementAccrued,
|
sum(event_measurement_accrued) as eventMeasurementAccrued,
|
||||||
sum(event_freq)/count(*) as eventFreq,
|
ROUND( sum(event_freq)/count(*),2) as eventFreq,
|
||||||
sum(event_count) as eventCount,
|
sum(event_count) as eventCount,
|
||||||
sum(event_measurement_ratio_average)/count(*) as eventMeasurementRatioAverage,
|
ROUND( sum(event_measurement_ratio_average)*100/count(*),2) as eventMeasurementRatioAverage,
|
||||||
sum(event_measurement_ratio_accrued) as eventMeasurementRatioAccrued
|
ROUND( sum(event_measurement_ratio_accrued)*100,2) as eventMeasurementRatioAccrued
|
||||||
FROM
|
FROM
|
||||||
r_stat_event_y
|
r_stat_event_y
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -79,13 +79,15 @@ public class PwEventMonitorReportServiceImpl implements PwEventMonitorReportServ
|
|||||||
// Map<String, DictData> eventStatisMapByCode = eventStatisList.stream().collect(Collectors.toMap(DictData::getCode, data -> data));
|
// Map<String, DictData> eventStatisMapByCode = eventStatisList.stream().collect(Collectors.toMap(DictData::getCode, data -> data));
|
||||||
|
|
||||||
//查询暂态事件明细
|
//查询暂态事件明细
|
||||||
List<RmpEventDetailPO> detailList;
|
List<RmpEventDetailPO> detailList = new ArrayList<>();
|
||||||
|
List<List<String>> partition = ListUtils.partition(monitorIdList, 20000);
|
||||||
|
for (List<String> list : partition) {
|
||||||
if (BizParamConstant.STAT_BIZ_MONTH.equals(type + "")) { //按月查
|
if (BizParamConstant.STAT_BIZ_MONTH.equals(type + "")) { //按月查
|
||||||
detailList = rmpEventDetailMapper.getDetailsOfTransientEventsByMonth(monitorIdList, null, startTime, endTime);
|
detailList.addAll(rmpEventDetailMapper.getDetailsOfTransientEventsByMonth(list, null, startTime, endTime));
|
||||||
} else { //按日查
|
} else { //按日查
|
||||||
detailList = rmpEventDetailMapper.getDetailsOfTransientEvents(monitorIdList, null, startTime, endTime);
|
detailList.addAll( rmpEventDetailMapper.getDetailsOfTransientEvents(list, null, startTime, endTime));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(detailList)) {
|
if (CollUtil.isNotEmpty(detailList)) {
|
||||||
//todo 获取监测点信息接口
|
//todo 获取监测点信息接口
|
||||||
pwPmsMonitorParam.setMonitorName(eventMonitorReportParam.getMonitorName());
|
pwPmsMonitorParam.setMonitorName(eventMonitorReportParam.getMonitorName());
|
||||||
|
|||||||
@@ -148,7 +148,12 @@ public class PwRStatOrgServiceImpl implements PwRStatOrgService {
|
|||||||
@Override
|
@Override
|
||||||
public List<PwRStatEventOrgVO> getPwRStatOrgClassified(PwUniversalFrontEndParam param) {
|
public List<PwRStatEventOrgVO> getPwRStatOrgClassified(PwUniversalFrontEndParam param) {
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
||||||
|
if(CollUtil.isEmpty(param.getMonitorSort())){
|
||||||
|
//监测点对象标签
|
||||||
|
List<DictData> dataList = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.MONITORING_LABELS.getCode()).getData();
|
||||||
|
param.setMonitorSort(dataList.stream().map(DictData::getId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
// 创建集合封装返回数据
|
// 创建集合封装返回数据
|
||||||
List<PwRStatEventOrgVO> result = new ArrayList<>();
|
List<PwRStatEventOrgVO> result = new ArrayList<>();
|
||||||
// 取出单位id
|
// 取出单位id
|
||||||
@@ -163,6 +168,7 @@ public class PwRStatOrgServiceImpl implements PwRStatOrgService {
|
|||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
rStatEventOrgVOList = pwRStatOrgClassifiedMapper.getYearInfo(
|
rStatEventOrgVOList = pwRStatOrgClassifiedMapper.getYearInfo(
|
||||||
deptIdList,
|
deptIdList,
|
||||||
|
param.getMonitorSort(),
|
||||||
param.getStartTime(),
|
param.getStartTime(),
|
||||||
param.getEndTime(),
|
param.getEndTime(),
|
||||||
distributionPoint);
|
distributionPoint);
|
||||||
@@ -171,6 +177,7 @@ public class PwRStatOrgServiceImpl implements PwRStatOrgService {
|
|||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
rStatEventOrgVOList = pwRStatOrgClassifiedMapper.getQuarterInfo(
|
rStatEventOrgVOList = pwRStatOrgClassifiedMapper.getQuarterInfo(
|
||||||
deptIdList,
|
deptIdList,
|
||||||
|
param.getMonitorSort(),
|
||||||
param.getStartTime(),
|
param.getStartTime(),
|
||||||
param.getEndTime(),
|
param.getEndTime(),
|
||||||
distributionPoint);
|
distributionPoint);
|
||||||
@@ -179,6 +186,7 @@ public class PwRStatOrgServiceImpl implements PwRStatOrgService {
|
|||||||
case BizParamConstant.STAT_BIZ_MONTH:
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
rStatEventOrgVOList = pwRStatOrgClassifiedMapper.getMonthInfo(
|
rStatEventOrgVOList = pwRStatOrgClassifiedMapper.getMonthInfo(
|
||||||
deptIdList,
|
deptIdList,
|
||||||
|
param.getMonitorSort(),
|
||||||
param.getStartTime(),
|
param.getStartTime(),
|
||||||
param.getEndTime(),
|
param.getEndTime(),
|
||||||
distributionPoint);
|
distributionPoint);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import cn.hutool.core.date.LocalDateTimeUtil;
|
|||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.event.mapper.majornetwork.RStatEventDMapper;
|
import com.njcn.event.mapper.majornetwork.RStatEventDMapper;
|
||||||
@@ -23,9 +22,7 @@ import com.njcn.system.enums.DicDataEnum;
|
|||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
|
||||||
import com.njcn.web.utils.WebUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -70,12 +67,10 @@ public class RStatEventMServiceImpl extends ServiceImpl<RStatEventMMapper, RStat
|
|||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventM> list = rStatEventMMapper.selectInfoList(baseParam,mainnetData.getId());
|
List<RStatEventM> list = rStatEventMMapper.selectInfoList(baseParam,mainnetData.getId());
|
||||||
|
|
||||||
@@ -161,11 +156,9 @@ public class RStatEventMServiceImpl extends ServiceImpl<RStatEventMMapper, RStat
|
|||||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门下所有部门信息
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventM> list = rStatEventMMapper.selectInfoList(baseParam,distributionData.getId());
|
List<RStatEventM> list = rStatEventMMapper.selectInfoList(baseParam,distributionData.getId());
|
||||||
|
|
||||||
@@ -257,12 +250,10 @@ public class RStatEventMServiceImpl extends ServiceImpl<RStatEventMMapper, RStat
|
|||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventVoltageM> rStatHarmonicVoltageMS = rStatEventVoltageMMapper
|
List<RStatEventVoltageM> rStatHarmonicVoltageMS = rStatEventVoltageMMapper
|
||||||
.selectInfoList(baseParam,mainnetData.getId(), measurementData.getId(),eventData.getId());
|
.selectInfoList(baseParam,mainnetData.getId(), measurementData.getId(),eventData.getId());
|
||||||
@@ -345,13 +336,10 @@ public class RStatEventMServiceImpl extends ServiceImpl<RStatEventMMapper, RStat
|
|||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
|
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventD> rStatHarmonicVoltageMS = rStatEventDMapper
|
List<RStatEventD> rStatHarmonicVoltageMS = rStatEventDMapper
|
||||||
.selectInfoList(baseParam,mainnetData.getId(), measurementDate.getId(),harmonicDate.getId());
|
.selectInfoList(baseParam,mainnetData.getId(), measurementDate.getId(),harmonicDate.getId());
|
||||||
@@ -430,11 +418,9 @@ public class RStatEventMServiceImpl extends ServiceImpl<RStatEventMMapper, RStat
|
|||||||
//获取配网信息
|
//获取配网信息
|
||||||
DictData distributionData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
DictData distributionData = dicDataFeignClient.getDicDataByCode(DicDataEnum.DISTRIBUTION_POINT.getCode()).getData();
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门下所有部门信息
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventD> rStatHarmonicVoltageMS = rStatEventDMapper
|
List<RStatEventD> rStatHarmonicVoltageMS = rStatEventDMapper
|
||||||
.selectInfoList(baseParam,distributionData.getId(), measurementData.getId(),eventData.getId());
|
.selectInfoList(baseParam,distributionData.getId(), measurementData.getId(),eventData.getId());
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ package com.njcn.event.service.majornetwork.Impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
import com.njcn.common.pojo.param.StatisticsBizBaseParam;
|
||||||
import com.njcn.event.mapper.majornetwork.RStatEventQMapper;
|
import com.njcn.event.mapper.majornetwork.RStatEventQMapper;
|
||||||
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
import com.njcn.event.pojo.param.StatSubstationBizBaseParam;
|
||||||
import com.njcn.event.pojo.po.RStatEventQ;
|
import com.njcn.event.pojo.po.RStatEventQ;
|
||||||
import com.njcn.event.pojo.po.RStatEventY;
|
|
||||||
import com.njcn.event.pojo.vo.RArrayVO;
|
import com.njcn.event.pojo.vo.RArrayVO;
|
||||||
import com.njcn.event.pojo.vo.RStatEventMVO;
|
import com.njcn.event.pojo.vo.RStatEventMVO;
|
||||||
import com.njcn.event.service.majornetwork.RStatEventQService;
|
import com.njcn.event.service.majornetwork.RStatEventQService;
|
||||||
@@ -17,9 +15,7 @@ import com.njcn.system.enums.DicDataEnum;
|
|||||||
import com.njcn.system.enums.DicDataTypeEnum;
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
|
||||||
import com.njcn.web.utils.WebUtil;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -58,12 +54,10 @@ public class RStatEventQServiceImpl extends ServiceImpl<RStatEventQMapper, RStat
|
|||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventQ> list = rStatEventQMapper.selectInfoList(baseParam,mainnetData.getId());
|
List<RStatEventQ> list = rStatEventQMapper.selectInfoList(baseParam,mainnetData.getId());
|
||||||
|
|
||||||
@@ -150,11 +144,9 @@ public class RStatEventQServiceImpl extends ServiceImpl<RStatEventQMapper, RStat
|
|||||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门下所有部门信息
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventQ> list = rStatEventQMapper.selectInfoList(baseParam,distributionData.getId());
|
List<RStatEventQ> list = rStatEventQMapper.selectInfoList(baseParam,distributionData.getId());
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.njcn.system.enums.DicDataTypeEnum;
|
|||||||
import com.njcn.system.pojo.po.DictData;
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import com.njcn.user.api.DeptFeignClient;
|
import com.njcn.user.api.DeptFeignClient;
|
||||||
import com.njcn.user.pojo.dto.DeptDTO;
|
import com.njcn.user.pojo.dto.DeptDTO;
|
||||||
|
import com.njcn.user.pojo.po.Dept;
|
||||||
import com.njcn.web.utils.WebUtil;
|
import com.njcn.web.utils.WebUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -55,12 +56,10 @@ public class RStatEventYServiceImpl extends ServiceImpl<RStatEventYMapper, RStat
|
|||||||
//获取主网id信息
|
//获取主网id信息
|
||||||
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
DictData mainnetData = dicDataFeignClient.getDicDataByCode(DicDataEnum.MAINNET_POINT.getCode()).getData();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventY> list = rStatEventYMapper.selectInfoList(baseParam,mainnetData.getId());
|
List<RStatEventY> list = rStatEventYMapper.selectInfoList(baseParam,mainnetData.getId());
|
||||||
|
|
||||||
@@ -147,11 +146,9 @@ public class RStatEventYServiceImpl extends ServiceImpl<RStatEventYMapper, RStat
|
|||||||
List<RArrayVO> arrayVOList = new ArrayList<>();
|
List<RArrayVO> arrayVOList = new ArrayList<>();
|
||||||
|
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门下所有部门信息
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
Dept dept = deptFeignClient.getDeptById(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
|
baseParam.setIds(Collections.singletonList(dept.getCode()));
|
||||||
StatSubstationBizBaseParam baseParam=BeanUtil.copyProperties(param,StatSubstationBizBaseParam.class);
|
|
||||||
baseParam.setIds(deptIds);
|
|
||||||
//数据库查询
|
//数据库查询
|
||||||
List<RStatEventY> list = rStatEventYMapper.selectInfoList(baseParam,distributionData.getId());
|
List<RStatEventY> list = rStatEventYMapper.selectInfoList(baseParam,distributionData.getId());
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class RStatSubstationVoltageMServiceImpl extends ServiceImpl<RStatSubstat
|
|||||||
@Override
|
@Override
|
||||||
public List<RVoltageIconVO> getStatSubstationIcon(StatisticsBizBaseParam param) {
|
public List<RVoltageIconVO> getStatSubstationIcon(StatisticsBizBaseParam param) {
|
||||||
//获取当前部门下所有部门信息
|
//获取当前部门下所有部门信息
|
||||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(param.getId(), WebUtil.filterDeptType()).getData();
|
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(param.getId()).getData();
|
||||||
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptIds = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||||
baseParam.setIds(deptIds);
|
baseParam.setIds(deptIds);
|
||||||
|
|||||||
@@ -2437,9 +2437,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
//进行for循环获取所有事件的时间
|
//进行for循环获取所有事件的时间
|
||||||
for (EventDetailNew eventDetail : eventDetailList) {
|
for (EventDetailNew eventDetail : eventDetailList) {
|
||||||
//获取暂降事件时间
|
//获取暂降事件时间
|
||||||
/* String timeId = eventDetail.getTimeId();
|
|
||||||
Date date1 = DateUtil.parse(timeId);
|
|
||||||
int day = Integer.parseInt(String.format("%td",date1));*/
|
|
||||||
|
|
||||||
dayCount.add(DateUtil.format(DateUtil.parse(eventDetail.getStartTime()), fmt));
|
dayCount.add(DateUtil.format(DateUtil.parse(eventDetail.getStartTime()), fmt));
|
||||||
|
|
||||||
@@ -2526,6 +2523,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -2639,6 +2637,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString());
|
timeVO.setFulltime(beginTime.toString());
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -5449,6 +5448,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
timeVO.setFulltime(beginTime.toString().substring(0, 7));
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -5565,6 +5565,7 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
timeVO.setMonth(beginTime.getMonthValue() + "");
|
timeVO.setMonth(beginTime.getMonthValue() + "");
|
||||||
}
|
}
|
||||||
|
timeVO.setEventAssIndex(0);
|
||||||
timeVO.setFulltime(beginTime.toString());
|
timeVO.setFulltime(beginTime.toString());
|
||||||
timeSVoList.add(timeVO);
|
timeSVoList.add(timeVO);
|
||||||
}
|
}
|
||||||
@@ -7854,8 +7855,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
if (areaReportParam.isEventTypeTable()) {
|
if (areaReportParam.isEventTypeTable()) {
|
||||||
twoCount3++;
|
twoCount3++;
|
||||||
createTitle(doc, "4." + oneCount6 + "." + twoCount3 + " 类型统计图", "标题 3", 400, 11);
|
createTitle(doc, "4." + oneCount6 + "." + twoCount3 + " 类型统计图", "标题 3", 400, 11);
|
||||||
|
|
||||||
|
|
||||||
//创建x,y参数
|
//创建x,y参数
|
||||||
List<String> xdata = new ArrayList<>();
|
List<String> xdata = new ArrayList<>();
|
||||||
List<Map<String, Object>> reasonList = new ArrayList<>();
|
List<Map<String, Object>> reasonList = new ArrayList<>();
|
||||||
@@ -7875,8 +7874,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
} else {
|
} else {
|
||||||
//创建表题计数
|
//创建表题计数
|
||||||
int twoCount = 1;
|
int twoCount = 1;
|
||||||
|
|
||||||
|
|
||||||
createTitle(doc, "4." + oneCount + " 类型统计", "标题 2", 200, 11);
|
createTitle(doc, "4." + oneCount + " 类型统计", "标题 2", 200, 11);
|
||||||
|
|
||||||
p = doc.createParagraph();// 新建一个段落
|
p = doc.createParagraph();// 新建一个段落
|
||||||
@@ -7913,7 +7910,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
//11.暂降热力图
|
//11.暂降热力图
|
||||||
if (areaReportParam.isThermodynamicChart()) {
|
if (areaReportParam.isThermodynamicChart()) {
|
||||||
//暂降热力图
|
//暂降热力图
|
||||||
|
|
||||||
createTitle(doc, "4." + oneCount + " " + typeName + "热力图", "标题 2", 200, 11);
|
createTitle(doc, "4." + oneCount + " " + typeName + "热力图", "标题 2", 200, 11);
|
||||||
|
|
||||||
p = doc.createParagraph();// 新建一个段落
|
p = doc.createParagraph();// 新建一个段落
|
||||||
@@ -7939,27 +7935,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
Integer eventDetailCount = getEventDetailCount(areaReportParam, lineIndexes);
|
Integer eventDetailCount = getEventDetailCount(areaReportParam, lineIndexes);
|
||||||
areaCount1.put(generalDeviceDTO.getName(), eventDetailCount);
|
areaCount1.put(generalDeviceDTO.getName(), eventDetailCount);
|
||||||
|
|
||||||
// StringBuilder stringBuilder = InfluxDBCommUtils.assToInfluxParam(lineIndexes);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// //查询sql语句总条数
|
|
||||||
// StringBuilder stringTotal = new StringBuilder("SELECT COUNT(num) as aa FROM ").append(Param.EVENT_DETAIL).append(" WHERE ").append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(areaReportParam.getSearchBeginTime()))).append("' and ")
|
|
||||||
// .append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(areaReportParam.getSearchEndTime()))).append("' and ");
|
|
||||||
// stringTotal.append(stringBuilder).append(" and ").append("(wave_type = 0 or wave_type = 1 or wave_type = 2 or wave_type = 3 or wave_type = 4)").append(" tz('Asia/Shanghai')");
|
|
||||||
//
|
|
||||||
// //总条数
|
|
||||||
// QueryResult resultTotal = influxDbUtils.query(stringTotal.toString());
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// if (ObjectUtil.isNull(resultTotal.getResults().get(0).getSeries())) {
|
|
||||||
// areaCount1.put(generalDeviceDTO.getName(), 0);
|
|
||||||
//
|
|
||||||
// } else {
|
|
||||||
// double count = Double.valueOf(resultTotal.getResults().get(0).getSeries().get(0).getValues().get(0).get(1).toString());
|
|
||||||
//
|
|
||||||
// areaCount1.put(generalDeviceDTO.getName(), Integer.valueOf((int) count));
|
|
||||||
// }
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//为空put 0
|
//为空put 0
|
||||||
areaCount1.put(generalDeviceDTO.getName(), 0);
|
areaCount1.put(generalDeviceDTO.getName(), 0);
|
||||||
@@ -7967,7 +7942,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// System.out.println(areaCount1);
|
|
||||||
//转为List对象集合
|
//转为List对象集合
|
||||||
List<ReportCountParam> areaCountList1 = new ArrayList<>();
|
List<ReportCountParam> areaCountList1 = new ArrayList<>();
|
||||||
for (String s : areaCount1.keySet()) {
|
for (String s : areaCount1.keySet()) {
|
||||||
@@ -7976,14 +7950,9 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
reportCountParam.setCount(areaCount1.get(s).toString());
|
reportCountParam.setCount(areaCount1.get(s).toString());
|
||||||
areaCountList1.add(reportCountParam);
|
areaCountList1.add(reportCountParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
// System.out.println(areaCountList1);
|
|
||||||
|
|
||||||
//序号计数进行++
|
//序号计数进行++
|
||||||
oneCount++;
|
oneCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//文件下载
|
//文件下载
|
||||||
ServletOutputStream outputStream = response.getOutputStream();
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
String fileName = URLEncoder.encode(deptName + "热力图.docx", "UTF-8");
|
String fileName = URLEncoder.encode(deptName + "热力图.docx", "UTF-8");
|
||||||
@@ -7991,8 +7960,6 @@ public class ReportServiceImpl implements ReportService {
|
|||||||
response.setContentType("application/octet-stream;charset=UTF-8");
|
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||||
doc.write(outputStream);
|
doc.write(outputStream);
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
//暂降事件
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -51,9 +51,6 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
private final RStatEventOrgMapper rStatEventOrgMapper;
|
private final RStatEventOrgMapper rStatEventOrgMapper;
|
||||||
|
|
||||||
private final RStatSubstationMapper rStatSubstationMapper;
|
private final RStatSubstationMapper rStatSubstationMapper;
|
||||||
|
|
||||||
private final DecimalFormat df = new DecimalFormat("###.0000");
|
|
||||||
|
|
||||||
private final DeptFeignClient deptFeignClient;
|
private final DeptFeignClient deptFeignClient;
|
||||||
|
|
||||||
private final PmsGeneralDeviceInfoClient pmsGeneralDeviceInfoClient;
|
private final PmsGeneralDeviceInfoClient pmsGeneralDeviceInfoClient;
|
||||||
@@ -108,17 +105,13 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
}
|
}
|
||||||
for (RStatOrgVO rStatOrgVO : result) {
|
for (RStatOrgVO rStatOrgVO : result) {
|
||||||
if(rStatOrgVO.getEventMeasurementAverage()!=0&&rStatOrgVO.getEffectiveMeasurementAverage()!=0){
|
if(rStatOrgVO.getEventMeasurementAverage()!=0&&rStatOrgVO.getEffectiveMeasurementAverage()!=0){
|
||||||
double v = Double.parseDouble(
|
BigDecimal round = NumberUtil.round(((rStatOrgVO.getEventMeasurementAverage() * 1.0) / (rStatOrgVO.getAllCount() * 1.0)) * 100, 2);
|
||||||
df.format(((rStatOrgVO.getEventMeasurementAverage() * 1.0) / (rStatOrgVO.getAllCount() * 1.0)) * 100));
|
|
||||||
BigDecimal round = NumberUtil.round(v, 2);
|
|
||||||
rStatOrgVO.setEventMeasurementRatioAverage(round.toString());
|
rStatOrgVO.setEventMeasurementRatioAverage(round.toString());
|
||||||
}else{
|
}else{
|
||||||
rStatOrgVO.setEventMeasurementRatioAverage("0");
|
rStatOrgVO.setEventMeasurementRatioAverage("0");
|
||||||
}
|
}
|
||||||
if(rStatOrgVO.getEventMeasurementAccrued()!=0&&rStatOrgVO.getEffectiveMeasurementAccrued()!=0){
|
if(rStatOrgVO.getEventMeasurementAccrued()!=0&&rStatOrgVO.getEffectiveMeasurementAccrued()!=0){
|
||||||
double v = Double.parseDouble(
|
BigDecimal round = NumberUtil.round(((rStatOrgVO.getEventMeasurementAccrued() * 1.0) / (rStatOrgVO.getAllCount() * 1.0)) * 100, 2);
|
||||||
df.format(((rStatOrgVO.getEventMeasurementAccrued() * 1.0) / (rStatOrgVO.getAllCount() * 1.0)) * 100));
|
|
||||||
BigDecimal round = NumberUtil.round(v, 2);
|
|
||||||
rStatOrgVO.setEventMeasurementRatioAccrued(round.toString());
|
rStatOrgVO.setEventMeasurementRatioAccrued(round.toString());
|
||||||
}else{
|
}else{
|
||||||
rStatOrgVO.setEventMeasurementRatioAccrued("0");
|
rStatOrgVO.setEventMeasurementRatioAccrued("0");
|
||||||
@@ -147,6 +140,12 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
if (CollectionUtil.isEmpty(deptDTOList)) {
|
if (CollectionUtil.isEmpty(deptDTOList)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
if(CollUtil.isEmpty(param.getMonitorSort())){
|
||||||
|
//监测点对象标签
|
||||||
|
List<DictData> dataList = dicDataFeignClient.getDicDataByTypeCode(
|
||||||
|
DicDataTypeEnum.MONITORING_LABELS.getCode()).getData();
|
||||||
|
param.setMonitorSort(dataList.stream().map(DictData::getId).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
// 取出单位code
|
// 取出单位code
|
||||||
List<String> deptCode = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
List<String> deptCode = deptDTOList.stream().map(DeptDTO::getCode).collect(Collectors.toList());
|
||||||
if (CollectionUtil.isEmpty(deptCode)) {
|
if (CollectionUtil.isEmpty(deptCode)) {
|
||||||
@@ -162,15 +161,15 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
switch (param.getType().toString()) {
|
switch (param.getType().toString()) {
|
||||||
case BizParamConstant.STAT_BIZ_YEAR:
|
case BizParamConstant.STAT_BIZ_YEAR:
|
||||||
// 获取年区域暂态指标分类统计表
|
// 获取年区域暂态指标分类统计表
|
||||||
temp = rStatEventOrgMapper.getYearRStatEventOrgInfo(deptCode, param.getStartTime(), param.getEndTime(), mainnetPointId);
|
temp = rStatEventOrgMapper.getYearRStatEventOrgInfo(deptCode,param.getMonitorSort(), param.getStartTime(), param.getEndTime(), mainnetPointId);
|
||||||
break;
|
break;
|
||||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||||
// 获取季区域暂态指标分类统计表
|
// 获取季区域暂态指标分类统计表
|
||||||
temp = rStatEventOrgMapper.getQuarterRStatEventOrgInfo(deptCode, param.getStartTime(), param.getEndTime(), mainnetPointId);
|
temp = rStatEventOrgMapper.getQuarterRStatEventOrgInfo(deptCode, param.getMonitorSort(),param.getStartTime(), param.getEndTime(), mainnetPointId);
|
||||||
break;
|
break;
|
||||||
case BizParamConstant.STAT_BIZ_MONTH:
|
case BizParamConstant.STAT_BIZ_MONTH:
|
||||||
// 获取月区域暂态指标分类统计表
|
// 获取月区域暂态指标分类统计表
|
||||||
temp = rStatEventOrgMapper.getMonthRStatEventOrgInfoInfo(deptCode, param.getStartTime(), param.getEndTime(), mainnetPointId);
|
temp = rStatEventOrgMapper.getMonthRStatEventOrgInfoInfo(deptCode,param.getMonitorSort(), param.getStartTime(), param.getEndTime(), mainnetPointId);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -184,7 +183,7 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
// 根据暂态指标code转换成map
|
// 根据暂态指标code转换成map
|
||||||
Map<String, DictData> eventStatisMap = eventStatis.stream().collect(Collectors.toMap(DictData::getId, DictData -> DictData));
|
Map<String, DictData> eventStatisMap = eventStatis.stream().collect(Collectors.toMap(DictData::getId, DictData -> DictData));
|
||||||
// 通过单位code将集合转换为map集合
|
// 通过单位code将集合转换为map集合
|
||||||
Map<String, List<RStatEventOrgPO>> tempMap = temp.stream().collect(Collectors.groupingBy(RStatEventOrgPO::getOrgNo));
|
Map<String, List<RStatEventOrgPO>> tempMap = temp.stream().collect(Collectors.groupingBy(x->x.getOrgNo()+"_"+x.getMeasurementTypeClass()));
|
||||||
// 匹配单位名称
|
// 匹配单位名称
|
||||||
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, DeptDTO -> DeptDTO));
|
Map<String, DeptDTO> deptDTOMap = deptDTOList.stream().collect(Collectors.toMap(DeptDTO::getCode, DeptDTO -> DeptDTO));
|
||||||
// 属性赋值
|
// 属性赋值
|
||||||
@@ -192,21 +191,25 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
RStatEventOrgVO rStatEventOrgVO = new RStatEventOrgVO();
|
RStatEventOrgVO rStatEventOrgVO = new RStatEventOrgVO();
|
||||||
// 基础属性赋值
|
// 基础属性赋值
|
||||||
if (rStatEventOrgVO.getOrgNo() == null) {
|
if (rStatEventOrgVO.getOrgNo() == null) {
|
||||||
|
String[] split = orgOn.split("_");
|
||||||
rStatEventOrgVO.setOrgNo(pos.get(0).getOrgNo());
|
rStatEventOrgVO.setOrgNo(pos.get(0).getOrgNo());
|
||||||
rStatEventOrgVO.setOrgName(deptDTOMap.get(pos.get(0).getOrgNo()).getName());
|
rStatEventOrgVO.setOrgName(deptDTOMap.get(split[0]).getName());
|
||||||
rStatEventOrgVO.setDataDate(pos.get(0).getDataDate());
|
rStatEventOrgVO.setDataDate(pos.get(0).getDataDate());
|
||||||
|
rStatEventOrgVO.setMonitorType(split[1]);
|
||||||
rStatEventOrgVO.setEffectiveMeasurementAverage(pos.get(0).getEffectiveMeasurementAverage());
|
rStatEventOrgVO.setEffectiveMeasurementAverage(pos.get(0).getEffectiveMeasurementAverage());
|
||||||
rStatEventOrgVO.setEffectiveMeasurementAccrued(pos.get(0).getEffectiveMeasurementAccrued());
|
rStatEventOrgVO.setEffectiveMeasurementAccrued(pos.get(0).getEffectiveMeasurementAccrued());
|
||||||
rStatEventOrgVO.setEventMeasurementAverage(pos.get(0).getEventMeasurementAverage());
|
rStatEventOrgVO.setEventMeasurementAverage(pos.get(0).getEventMeasurementAverage());
|
||||||
rStatEventOrgVO.setEventMeasurementAccrued(pos.get(0).getEventMeasurementAccrued());
|
rStatEventOrgVO.setEventMeasurementAccrued(pos.get(0).getEventMeasurementAccrued());
|
||||||
|
|
||||||
if(rStatEventOrgVO.getEventMeasurementAverage()!=0&&rStatEventOrgVO.getEffectiveMeasurementAverage()!=0){
|
if(rStatEventOrgVO.getEventMeasurementAverage()!=0&&rStatEventOrgVO.getEffectiveMeasurementAverage()!=0){
|
||||||
rStatEventOrgVO.setEventMeasurementRatioAverage(Double.parseDouble(df.format((pos.get(0).getEventMeasurementAverage() * 1.0) / (pos.get(0).getEffectiveMeasurementAverage() * 1.0))) * 100);
|
double v = (pos.get(0).getEventMeasurementAverage() * 1.0) / (pos.get(0).getEffectiveMeasurementAverage() * 1.0)*100;
|
||||||
|
rStatEventOrgVO.setEventMeasurementRatioAverage(NumberUtil.round(v,2).doubleValue());
|
||||||
}else{
|
}else{
|
||||||
rStatEventOrgVO.setEventMeasurementRatioAverage(0.0);
|
rStatEventOrgVO.setEventMeasurementRatioAverage(0.0);
|
||||||
}
|
}
|
||||||
if(rStatEventOrgVO.getEventMeasurementAccrued()!=0&&rStatEventOrgVO.getEffectiveMeasurementAccrued()!=0){
|
if(rStatEventOrgVO.getEventMeasurementAccrued()!=0&&rStatEventOrgVO.getEffectiveMeasurementAccrued()!=0){
|
||||||
rStatEventOrgVO.setEventMeasurementRatioAccrued(Double.parseDouble(df.format((pos.get(0).getEventMeasurementAccrued() * 1.0) / (pos.get(0).getEffectiveMeasurementAccrued() * 1.0))) * 100);
|
double v = (pos.get(0).getEventMeasurementAccrued() * 1.0) / (pos.get(0).getEffectiveMeasurementAccrued() * 1.0) * 100;
|
||||||
|
rStatEventOrgVO.setEventMeasurementRatioAccrued(NumberUtil.round(v,2).doubleValue());
|
||||||
}else{
|
}else{
|
||||||
rStatEventOrgVO.setEventMeasurementRatioAccrued(0.0);
|
rStatEventOrgVO.setEventMeasurementRatioAccrued(0.0);
|
||||||
}
|
}
|
||||||
@@ -248,6 +251,9 @@ public class StatisticsOfTransientIndicatorssServiceImpl implements StatisticsOf
|
|||||||
}
|
}
|
||||||
result.add(rStatEventOrgVO);
|
result.add(rStatEventOrgVO);
|
||||||
});
|
});
|
||||||
|
if(CollUtil.isNotEmpty(result)){
|
||||||
|
result.sort(Comparator.comparing(x->x.getOrgName()));
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.njcn.harmonic.annotaion;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Documented
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.FIELD)
|
||||||
|
public @interface HarCurrent {
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.njcn.harmonic.annotaion;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Documented
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.FIELD)
|
||||||
|
public @interface HarVoltage {
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.njcn.harmonic.annotaion;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Documented
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.FIELD)
|
||||||
|
public @interface InterharVoltage {
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.njcn.harmonic.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.harmonic.api.fallback.HarmDataFeignClientFallbackFactory;
|
||||||
|
import com.njcn.harmonic.api.fallback.RStatLimitRateDFeignClientFallbackFactory;
|
||||||
|
import com.njcn.harmonic.pojo.param.HistoryHarmParam;
|
||||||
|
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@FeignClient(
|
||||||
|
value = ServerInfo.HARMONIC,
|
||||||
|
path = "/limitRateD",
|
||||||
|
fallbackFactory = RStatLimitRateDFeignClientFallbackFactory.class,
|
||||||
|
contextId = "limitRateD")
|
||||||
|
public interface RStatLimitRateDClient {
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/monitorIdsGetLimitRateInfo")
|
||||||
|
HttpResult<List<RStatLimitRateDPO>> monitorIdsGetLimitInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/monitorIdsGetLimitTargetInfo")
|
||||||
|
HttpResult<List<RStatLimitTargetDPO>> monitorIdsGetLimitTargetInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.njcn.harmonic.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
|
import com.njcn.harmonic.api.HarmDataFeignClient;
|
||||||
|
import com.njcn.harmonic.api.RStatLimitRateDClient;
|
||||||
|
import com.njcn.harmonic.pojo.param.HistoryHarmParam;
|
||||||
|
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
||||||
|
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||||
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.influx.pojo.dto.HarmHistoryDataDTO;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2023年07月21日 14:31
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class RStatLimitRateDFeignClientFallbackFactory implements FallbackFactory<RStatLimitRateDClient> {
|
||||||
|
@Override
|
||||||
|
public RStatLimitRateDClient create(Throwable throwable) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if (throwable.getCause() instanceof BusinessException) {
|
||||||
|
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||||
|
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new RStatLimitRateDClient() {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<RStatLimitRateDPO>> monitorIdsGetLimitInfo(RStatLimitQueryParam rStatLimitQueryParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取指定日期超标监测点详细信息", throwable.toString());
|
||||||
|
return new HttpResult<>(CommonResponseEnum.FAIL.getCode(),CommonResponseEnum.FAIL.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<RStatLimitTargetDPO>> monitorIdsGetLimitTargetInfo(RStatLimitQueryParam rStatLimitQueryParam) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "获取指定日期超标监测点详细信息", throwable.toString());
|
||||||
|
return new HttpResult<>(CommonResponseEnum.FAIL.getCode(),CommonResponseEnum.FAIL.getMessage());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.harmonic.pojo.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RStatLimitQueryParam {
|
||||||
|
|
||||||
|
private List<String> ids;
|
||||||
|
|
||||||
|
private String date;
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ import org.influxdb.annotation.Measurement;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 类的介绍:
|
* 类的介绍:
|
||||||
*
|
* 已经废弃需要删除。。。。。。。。。。。。。。
|
||||||
* @author xuyang
|
* @author xuyang
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @createTime 2022/5/7 10:41
|
* @createTime 2022/5/7 10:41
|
||||||
@@ -14,6 +14,7 @@ import org.influxdb.annotation.Measurement;
|
|||||||
@Data
|
@Data
|
||||||
@Measurement(name = "limit_rate")
|
@Measurement(name = "limit_rate")
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Deprecated
|
||||||
public class LimitRate extends LimitTarget{
|
public class LimitRate extends LimitTarget{
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,7 +34,7 @@ public class RMpEventDetailQPO {
|
|||||||
* 时间
|
* 时间
|
||||||
*/
|
*/
|
||||||
@MppMultiId(value = "data_date")
|
@MppMultiId(value = "data_date")
|
||||||
private Date dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压暂升发生次数
|
* 电压暂升发生次数
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,7 +34,7 @@ public class RMpEventDetailYPO {
|
|||||||
* 时间
|
* 时间
|
||||||
*/
|
*/
|
||||||
@MppMultiId(value = "data_date")
|
@MppMultiId(value = "data_date")
|
||||||
private Date dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 电压暂升发生次数
|
* 电压暂升发生次数
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import java.time.LocalDate;
|
|||||||
@TableName(value = "r_operating_index_d")
|
@TableName(value = "r_operating_index_d")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
@Deprecated
|
||||||
public class ROperatingIndexDPO {
|
public class ROperatingIndexDPO {
|
||||||
/**
|
/**
|
||||||
* 单位ID
|
* 单位ID
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.harmonic.pojo.po;
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -52,5 +53,12 @@ public class RStatHarmonicOrgM implements Serializable {
|
|||||||
* 数据类型,字典表(01:主网测点 02:配网测点)
|
* 数据类型,字典表(01:主网测点 02:配网测点)
|
||||||
*/
|
*/
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
public void setOverLimitMeasurementRatioAverage(Float overLimitMeasurementRatioAverage) {
|
||||||
|
this.overLimitMeasurementRatioAverage = NumberUtil.round(overLimitMeasurementRatioAverage*100,2).floatValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOverLimitMeasurementRatioAccrued(Float overLimitMeasurementRatioAccrued) {
|
||||||
|
this.overLimitMeasurementRatioAccrued = NumberUtil.round(overLimitMeasurementRatioAccrued*100,2).floatValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.harmonic.pojo.po;
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -52,6 +53,12 @@ public class RStatHarmonicOrgQ implements Serializable {
|
|||||||
* 数据类型,字典表(01:主网测点 02:配网测点)
|
* 数据类型,字典表(01:主网测点 02:配网测点)
|
||||||
*/
|
*/
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
public void setOverLimitMeasurementRatioAverage(Float overLimitMeasurementRatioAverage) {
|
||||||
|
this.overLimitMeasurementRatioAverage = NumberUtil.round(overLimitMeasurementRatioAverage*100,2).floatValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOverLimitMeasurementRatioAccrued(Float overLimitMeasurementRatioAccrued) {
|
||||||
|
this.overLimitMeasurementRatioAccrued = NumberUtil.round(overLimitMeasurementRatioAccrued*100,2).floatValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.harmonic.pojo.po;
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -53,5 +54,12 @@ public class RStatHarmonicOrgY implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
|
public void setOverLimitMeasurementRatioAverage(Float overLimitMeasurementRatioAverage) {
|
||||||
|
this.overLimitMeasurementRatioAverage = NumberUtil.round(overLimitMeasurementRatioAverage*100,2).floatValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOverLimitMeasurementRatioAccrued(Float overLimitMeasurementRatioAccrued) {
|
||||||
|
this.overLimitMeasurementRatioAccrued = NumberUtil.round(overLimitMeasurementRatioAccrued*100,2).floatValue();;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.njcn.harmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.db.bo.BaseEntity;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @since 2024-01-25
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("r_stat_org_busbar_voltage_d")
|
||||||
|
public class RStatOrgBusbarVoltageD {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位ID
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
private String orgNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成数据的时间,每日统计一次
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
private LocalDate dataDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 母线ID
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
private String busbarId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有效接入监测点总数量
|
||||||
|
*/
|
||||||
|
private Integer measurementCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电压超标点数
|
||||||
|
*/
|
||||||
|
private Integer vCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电压超标占比
|
||||||
|
*/
|
||||||
|
private Float vRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三相电压不平衡超标点数
|
||||||
|
*/
|
||||||
|
private Integer unbalanceCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三相电压不平衡超标占比
|
||||||
|
*/
|
||||||
|
private Float unbalanceRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变超标点数
|
||||||
|
*/
|
||||||
|
private Integer flickerCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变超标占比
|
||||||
|
*/
|
||||||
|
private Float flickerRatio;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package com.njcn.harmonic.pojo.po;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -28,13 +29,16 @@ public class RStatOrgBusbarVoltageM implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "单位ID")
|
@ApiModelProperty(value = "单位ID")
|
||||||
@TableId(value = "org_no", type = IdType.ASSIGN_ID)
|
// @TableId(value = "org_no", type = IdType.ASSIGN_ID)
|
||||||
|
@MppMultiId(value = "org_no")
|
||||||
private String orgNo;
|
private String orgNo;
|
||||||
|
|
||||||
@ApiModelProperty(value = "生成数据的时间,每日统计一次")
|
@ApiModelProperty(value = "生成数据的时间,每日统计一次")
|
||||||
|
@MppMultiId
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "母线ID")
|
@ApiModelProperty(value = "母线ID")
|
||||||
|
@MppMultiId
|
||||||
private String busbarId;
|
private String busbarId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "有效接入监测点总数量")
|
@ApiModelProperty(value = "有效接入监测点总数量")
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.harmonic.pojo.po;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -28,13 +29,16 @@ public class RStatOrgBusbarVoltageQ implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "单位ID")
|
@ApiModelProperty(value = "单位ID")
|
||||||
@TableId(value = "org_no", type = IdType.ASSIGN_ID)
|
// @TableId(value = "org_no", type = IdType.ASSIGN_ID)
|
||||||
|
@MppMultiId
|
||||||
private String orgNo;
|
private String orgNo;
|
||||||
|
|
||||||
@ApiModelProperty(value = "生成数据的时间,每日统计一次")
|
@ApiModelProperty(value = "生成数据的时间,每日统计一次")
|
||||||
|
@MppMultiId
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "母线ID")
|
@ApiModelProperty(value = "母线ID")
|
||||||
|
@MppMultiId
|
||||||
private String busbarId;
|
private String busbarId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "有效接入监测点总数量")
|
@ApiModelProperty(value = "有效接入监测点总数量")
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.harmonic.pojo.po;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -28,13 +29,16 @@ public class RStatOrgBusbarVoltageY implements Serializable {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ApiModelProperty(value = "单位ID")
|
@ApiModelProperty(value = "单位ID")
|
||||||
@TableId(value = "org_no", type = IdType.ASSIGN_ID)
|
// @TableId(value = "org_no", type = IdType.ASSIGN_ID)
|
||||||
|
@MppMultiId
|
||||||
private String orgNo;
|
private String orgNo;
|
||||||
|
|
||||||
@ApiModelProperty(value = "生成数据的时间,每日统计一次")
|
@ApiModelProperty(value = "生成数据的时间,每日统计一次")
|
||||||
|
@MppMultiId
|
||||||
private LocalDate dataDate;
|
private LocalDate dataDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "母线ID")
|
@ApiModelProperty(value = "母线ID")
|
||||||
|
@MppMultiId
|
||||||
private String busbarId;
|
private String busbarId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "有效接入监测点总数量")
|
@ApiModelProperty(value = "有效接入监测点总数量")
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import com.njcn.harmonic.annotaion.HarCurrent;
|
||||||
|
import com.njcn.harmonic.annotaion.HarVoltage;
|
||||||
|
import com.njcn.harmonic.annotaion.InterharVoltage;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -88,288 +91,336 @@ public class RStatLimitRateDPO {
|
|||||||
/**
|
/**
|
||||||
* 2次电压谐波含有率越限次数
|
* 2次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_2_overtime")
|
@TableField(value = "uharm_2_overtime")
|
||||||
private Integer uharm2Overtime;
|
private Integer uharm2Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3次电压谐波含有率越限次数
|
* 3次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_3_overtime")
|
@TableField(value = "uharm_3_overtime")
|
||||||
private Integer uharm3Overtime;
|
private Integer uharm3Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4次电压谐波含有率越限次数
|
* 4次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_4_overtime")
|
@TableField(value = "uharm_4_overtime")
|
||||||
private Integer uharm4Overtime;
|
private Integer uharm4Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 5次电压谐波含有率越限次数
|
* 5次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_5_overtime")
|
@TableField(value = "uharm_5_overtime")
|
||||||
private Integer uharm5Overtime;
|
private Integer uharm5Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 6次电压谐波含有率越限次数
|
* 6次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_6_overtime")
|
@TableField(value = "uharm_6_overtime")
|
||||||
private Integer uharm6Overtime;
|
private Integer uharm6Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 7次电压谐波含有率越限次数
|
* 7次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_7_overtime")
|
@TableField(value = "uharm_7_overtime")
|
||||||
private Integer uharm7Overtime;
|
private Integer uharm7Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 8次电压谐波含有率越限次数
|
* 8次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_8_overtime")
|
@TableField(value = "uharm_8_overtime")
|
||||||
private Integer uharm8Overtime;
|
private Integer uharm8Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 9次电压谐波含有率越限次数
|
* 9次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_9_overtime")
|
@TableField(value = "uharm_9_overtime")
|
||||||
private Integer uharm9Overtime;
|
private Integer uharm9Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 10次电压谐波含有率越限次数
|
* 10次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_10_overtime")
|
@TableField(value = "uharm_10_overtime")
|
||||||
private Integer uharm10Overtime;
|
private Integer uharm10Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 11次电压谐波含有率越限次数
|
* 11次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_11_overtime")
|
@TableField(value = "uharm_11_overtime")
|
||||||
private Integer uharm11Overtime;
|
private Integer uharm11Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 12次电压谐波含有率越限次数
|
* 12次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_12_overtime")
|
@TableField(value = "uharm_12_overtime")
|
||||||
private Integer uharm12Overtime;
|
private Integer uharm12Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 13次电压谐波含有率越限次数
|
* 13次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_13_overtime")
|
@TableField(value = "uharm_13_overtime")
|
||||||
private Integer uharm13Overtime;
|
private Integer uharm13Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 14次电压谐波含有率越限次数
|
* 14次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_14_overtime")
|
@TableField(value = "uharm_14_overtime")
|
||||||
private Integer uharm14Overtime;
|
private Integer uharm14Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 15次电压谐波含有率越限次数
|
* 15次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_15_overtime")
|
@TableField(value = "uharm_15_overtime")
|
||||||
private Integer uharm15Overtime;
|
private Integer uharm15Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 16次电压谐波含有率越限次数
|
* 16次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_16_overtime")
|
@TableField(value = "uharm_16_overtime")
|
||||||
private Integer uharm16Overtime;
|
private Integer uharm16Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 17次电压谐波含有率越限次数
|
* 17次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_17_overtime")
|
@TableField(value = "uharm_17_overtime")
|
||||||
private Integer uharm17Overtime;
|
private Integer uharm17Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 18次电压谐波含有率越限次数
|
* 18次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_18_overtime")
|
@TableField(value = "uharm_18_overtime")
|
||||||
private Integer uharm18Overtime;
|
private Integer uharm18Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 19次电压谐波含有率越限次数
|
* 19次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_19_overtime")
|
@TableField(value = "uharm_19_overtime")
|
||||||
private Integer uharm19Overtime;
|
private Integer uharm19Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 20次电压谐波含有率越限次数
|
* 20次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_20_overtime")
|
@TableField(value = "uharm_20_overtime")
|
||||||
private Integer uharm20Overtime;
|
private Integer uharm20Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 21次电压谐波含有率越限次数
|
* 21次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_21_overtime")
|
@TableField(value = "uharm_21_overtime")
|
||||||
private Integer uharm21Overtime;
|
private Integer uharm21Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 22次电压谐波含有率越限次数
|
* 22次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_22_overtime")
|
@TableField(value = "uharm_22_overtime")
|
||||||
private Integer uharm22Overtime;
|
private Integer uharm22Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 23次电压谐波含有率越限次数
|
* 23次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_23_overtime")
|
@TableField(value = "uharm_23_overtime")
|
||||||
private Integer uharm23Overtime;
|
private Integer uharm23Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 24次电压谐波含有率越限次数
|
* 24次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_24_overtime")
|
@TableField(value = "uharm_24_overtime")
|
||||||
private Integer uharm24Overtime;
|
private Integer uharm24Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 25次电压谐波含有率越限次数
|
* 25次电压谐波含有率越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarVoltage
|
||||||
@TableField(value = "uharm_25_overtime")
|
@TableField(value = "uharm_25_overtime")
|
||||||
private Integer uharm25Overtime;
|
private Integer uharm25Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2次电流谐波幅值越限次数
|
* 2次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_2_overtime")
|
@TableField(value = "iharm_2_overtime")
|
||||||
private Integer iharm2Overtime;
|
private Integer iharm2Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3次电流谐波幅值越限次数
|
* 3次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_3_overtime")
|
@TableField(value = "iharm_3_overtime")
|
||||||
private Integer iharm3Overtime;
|
private Integer iharm3Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4次电流谐波幅值越限次数
|
* 4次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_4_overtime")
|
@TableField(value = "iharm_4_overtime")
|
||||||
private Integer iharm4Overtime;
|
private Integer iharm4Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 5次电流谐波幅值越限次数
|
* 5次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_5_overtime")
|
@TableField(value = "iharm_5_overtime")
|
||||||
private Integer iharm5Overtime;
|
private Integer iharm5Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 6次电流谐波幅值越限次数
|
* 6次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_6_overtime")
|
@TableField(value = "iharm_6_overtime")
|
||||||
private Integer iharm6Overtime;
|
private Integer iharm6Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 7次电流谐波幅值越限次数
|
* 7次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_7_overtime")
|
@TableField(value = "iharm_7_overtime")
|
||||||
private Integer iharm7Overtime;
|
private Integer iharm7Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 8次电流谐波幅值越限次数
|
* 8次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_8_overtime")
|
@TableField(value = "iharm_8_overtime")
|
||||||
private Integer iharm8Overtime;
|
private Integer iharm8Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 9次电流谐波幅值越限次数
|
* 9次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_9_overtime")
|
@TableField(value = "iharm_9_overtime")
|
||||||
private Integer iharm9Overtime;
|
private Integer iharm9Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 10次电流谐波幅值越限次数
|
* 10次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_10_overtime")
|
@TableField(value = "iharm_10_overtime")
|
||||||
private Integer iharm10Overtime;
|
private Integer iharm10Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 11次电流谐波幅值越限次数
|
* 11次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_11_overtime")
|
@TableField(value = "iharm_11_overtime")
|
||||||
private Integer iharm11Overtime;
|
private Integer iharm11Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 12次电流谐波幅值越限次数
|
* 12次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_12_overtime")
|
@TableField(value = "iharm_12_overtime")
|
||||||
private Integer iharm12Overtime;
|
private Integer iharm12Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 13次电流谐波幅值越限次数
|
* 13次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_13_overtime")
|
@TableField(value = "iharm_13_overtime")
|
||||||
private Integer iharm13Overtime;
|
private Integer iharm13Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 14次电流谐波幅值越限次数
|
* 14次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_14_overtime")
|
@TableField(value = "iharm_14_overtime")
|
||||||
private Integer iharm14Overtime;
|
private Integer iharm14Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 15次电流谐波幅值越限次数
|
* 15次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_15_overtime")
|
@TableField(value = "iharm_15_overtime")
|
||||||
private Integer iharm15Overtime;
|
private Integer iharm15Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 16次电流谐波幅值越限次数
|
* 16次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_16_overtime")
|
@TableField(value = "iharm_16_overtime")
|
||||||
private Integer iharm16Overtime;
|
private Integer iharm16Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 17次电流谐波幅值越限次数
|
* 17次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_17_overtime")
|
@TableField(value = "iharm_17_overtime")
|
||||||
private Integer iharm17Overtime;
|
private Integer iharm17Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 18次电流谐波幅值越限次数
|
* 18次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_18_overtime")
|
@TableField(value = "iharm_18_overtime")
|
||||||
private Integer iharm18Overtime;
|
private Integer iharm18Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 19次电流谐波幅值越限次数
|
* 19次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_19_overtime")
|
@TableField(value = "iharm_19_overtime")
|
||||||
private Integer iharm19Overtime;
|
private Integer iharm19Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 20次电流谐波幅值越限次数
|
* 20次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_20_overtime")
|
@TableField(value = "iharm_20_overtime")
|
||||||
private Integer iharm20Overtime;
|
private Integer iharm20Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 21次电流谐波幅值越限次数
|
* 21次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_21_overtime")
|
@TableField(value = "iharm_21_overtime")
|
||||||
private Integer iharm21Overtime;
|
private Integer iharm21Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 22次电流谐波幅值越限次数
|
* 22次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_22_overtime")
|
@TableField(value = "iharm_22_overtime")
|
||||||
private Integer iharm22Overtime;
|
private Integer iharm22Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 23次电流谐波幅值越限次数
|
* 23次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_23_overtime")
|
@TableField(value = "iharm_23_overtime")
|
||||||
private Integer iharm23Overtime;
|
private Integer iharm23Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 24次电流谐波幅值越限次数
|
* 24次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_24_overtime")
|
@TableField(value = "iharm_24_overtime")
|
||||||
private Integer iharm24Overtime;
|
private Integer iharm24Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 25次电流谐波幅值越限次数
|
* 25次电流谐波幅值越限次数
|
||||||
*/
|
*/
|
||||||
|
@HarCurrent
|
||||||
@TableField(value = "iharm_25_overtime")
|
@TableField(value = "iharm_25_overtime")
|
||||||
private Integer iharm25Overtime;
|
private Integer iharm25Overtime;
|
||||||
|
|
||||||
@@ -377,95 +428,111 @@ public class RStatLimitRateDPO {
|
|||||||
* 0.5次间谐波电压限值次数
|
* 0.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
@TableField(value = "inuharm_1_overtime")
|
@TableField(value = "inuharm_1_overtime")
|
||||||
|
@InterharVoltage
|
||||||
private Integer inuharm1Overtime;
|
private Integer inuharm1Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1.5次间谐波电压限值次数
|
* 1.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_2_overtime")
|
@TableField(value = "inuharm_2_overtime")
|
||||||
private Integer inuharm2Overtime;
|
private Integer inuharm2Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 2.5次间谐波电压限值次数
|
* 2.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_3_overtime")
|
@TableField(value = "inuharm_3_overtime")
|
||||||
private Integer inuharm3Overtime;
|
private Integer inuharm3Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 3.5次间谐波电压限值次数
|
* 3.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_4_overtime")
|
@TableField(value = "inuharm_4_overtime")
|
||||||
private Integer inuharm4Overtime;
|
private Integer inuharm4Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 4.5次间谐波电压限值次数
|
* 4.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_5_overtime")
|
@TableField(value = "inuharm_5_overtime")
|
||||||
private Integer inuharm5Overtime;
|
private Integer inuharm5Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 5.5次间谐波电压限值次数
|
* 5.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_6_overtime")
|
@TableField(value = "inuharm_6_overtime")
|
||||||
private Integer inuharm6Overtime;
|
private Integer inuharm6Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 6.5次间谐波电压限值次数
|
* 6.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_7_overtime")
|
@TableField(value = "inuharm_7_overtime")
|
||||||
private Integer inuharm7Overtime;
|
private Integer inuharm7Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 7.5次间谐波电压限值次数
|
* 7.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_8_overtime")
|
@TableField(value = "inuharm_8_overtime")
|
||||||
private Integer inuharm8Overtime;
|
private Integer inuharm8Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 8.5次间谐波电压限值次数
|
* 8.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_9_overtime")
|
@TableField(value = "inuharm_9_overtime")
|
||||||
private Integer inuharm9Overtime;
|
private Integer inuharm9Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 9.5次间谐波电压限值次数
|
* 9.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_10_overtime")
|
@TableField(value = "inuharm_10_overtime")
|
||||||
private Integer inuharm10Overtime;
|
private Integer inuharm10Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 10.5次间谐波电压限值次数
|
* 10.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_11_overtime")
|
@TableField(value = "inuharm_11_overtime")
|
||||||
private Integer inuharm11Overtime;
|
private Integer inuharm11Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 11.5次间谐波电压限值次数
|
* 11.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_12_overtime")
|
@TableField(value = "inuharm_12_overtime")
|
||||||
private Integer inuharm12Overtime;
|
private Integer inuharm12Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 12.5次间谐波电压限值次数
|
* 12.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_13_overtime")
|
@TableField(value = "inuharm_13_overtime")
|
||||||
private Integer inuharm13Overtime;
|
private Integer inuharm13Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 13.5次间谐波电压限值次数
|
* 13.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_14_overtime")
|
@TableField(value = "inuharm_14_overtime")
|
||||||
private Integer inuharm14Overtime;
|
private Integer inuharm14Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 14.5次间谐波电压限值次数
|
* 14.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_15_overtime")
|
@TableField(value = "inuharm_15_overtime")
|
||||||
private Integer inuharm15Overtime;
|
private Integer inuharm15Overtime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 15.5次间谐波电压限值次数
|
* 15.5次间谐波电压限值次数
|
||||||
*/
|
*/
|
||||||
|
@InterharVoltage
|
||||||
@TableField(value = "inuharm_16_overtime")
|
@TableField(value = "inuharm_16_overtime")
|
||||||
private Integer inuharm16Overtime;
|
private Integer inuharm16Overtime;
|
||||||
}
|
}
|
||||||
@@ -94,6 +94,7 @@ public class RUploadPointStatisticalDataD {
|
|||||||
/**
|
/**
|
||||||
* 所属站别
|
* 所属站别
|
||||||
*/
|
*/
|
||||||
|
@MppMultiId
|
||||||
private String stationType;
|
private String stationType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ package com.njcn.harmonic.pojo.vo;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类的介绍:
|
* 类的介绍:
|
||||||
@@ -32,4 +34,9 @@ public class PollutionVO {
|
|||||||
@ApiModelProperty("子级")
|
@ApiModelProperty("子级")
|
||||||
private List<PollutionVO> children;
|
private List<PollutionVO> children;
|
||||||
|
|
||||||
|
public void setChildren(List<PollutionVO> children) {
|
||||||
|
List<PollutionVO> listSort = children.stream().filter(x -> x.getData() != 3.14159).sorted(Comparator.comparing(PollutionVO::getData).reversed().thenComparing(PollutionVO::getName)).collect(Collectors.toList());
|
||||||
|
listSort.addAll(children.stream().filter(x -> x.getData() == 3.14159).collect(Collectors.toList()));
|
||||||
|
this.children = listSort;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,13 +74,13 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
* 日均暂态超标监测点数占比
|
* 日均暂态超标监测点数占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementRatioAverage", value = "日均暂态超标监测点数占比")
|
@ApiModelProperty(name = "eventMeasurementRatioAverage", value = "日均暂态超标监测点数占比")
|
||||||
private Integer harmonicMeasurementRatioAverage;
|
private Float harmonicMeasurementRatioAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计暂态超标监测点数占比
|
* 累计暂态超标监测点数占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementRatioAccrued", value = "累计暂态超标监测点数占比")
|
@ApiModelProperty(name = "eventMeasurementRatioAccrued", value = "累计暂态超标监测点数占比")
|
||||||
private Integer harmonicMeasurementRatioAccrued;
|
private Float harmonicMeasurementRatioAccrued;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -91,10 +91,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued;
|
private Integer tAccrued;
|
||||||
private Float oAverage;
|
private Float oAverage;
|
||||||
private Float oAccrued;
|
private Float oAccrued;
|
||||||
private Integer chainAverage;
|
private Float chainAverage;
|
||||||
private Integer chainAccrued;
|
private Float chainAccrued;
|
||||||
private Integer sameAverage;
|
private Float sameAverage;
|
||||||
private Integer sameAccrued;
|
private Float sameAccrued;
|
||||||
private Float averageOverDay;
|
private Float averageOverDay;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -104,10 +104,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued1;
|
private Integer tAccrued1;
|
||||||
private Float oAverage1;
|
private Float oAverage1;
|
||||||
private Float oAccrued1;
|
private Float oAccrued1;
|
||||||
private Integer chainAverage1;
|
private Float chainAverage1;
|
||||||
private Integer chainAccrued1;
|
private Float chainAccrued1;
|
||||||
private Integer sameAverage1;
|
private Float sameAverage1;
|
||||||
private Integer sameAccrued1;
|
private Float sameAccrued1;
|
||||||
private Float averageOverDay1;
|
private Float averageOverDay1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,10 +117,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued2;
|
private Integer tAccrued2;
|
||||||
private Float oAverage2;
|
private Float oAverage2;
|
||||||
private Float oAccrued2;
|
private Float oAccrued2;
|
||||||
private Integer chainAverage2;
|
private Float chainAverage2;
|
||||||
private Integer chainAccrued2;
|
private Float chainAccrued2;
|
||||||
private Integer sameAverage2;
|
private Float sameAverage2;
|
||||||
private Integer sameAccrued2;
|
private Float sameAccrued2;
|
||||||
private Float averageOverDay2;
|
private Float averageOverDay2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -130,10 +130,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued3;
|
private Integer tAccrued3;
|
||||||
private Float oAverage3;
|
private Float oAverage3;
|
||||||
private Float oAccrued3;
|
private Float oAccrued3;
|
||||||
private Integer chainAverage3;
|
private Float chainAverage3;
|
||||||
private Integer chainAccrued3;
|
private Float chainAccrued3;
|
||||||
private Integer sameAverage3;
|
private Float sameAverage3;
|
||||||
private Integer sameAccrued3;
|
private Float sameAccrued3;
|
||||||
private Float averageOverDay3;
|
private Float averageOverDay3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -143,10 +143,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued4;
|
private Integer tAccrued4;
|
||||||
private Float oAverage4;
|
private Float oAverage4;
|
||||||
private Float oAccrued4;
|
private Float oAccrued4;
|
||||||
private Integer chainAverage4;
|
private Float chainAverage4;
|
||||||
private Integer chainAccrued4;
|
private Float chainAccrued4;
|
||||||
private Integer sameAverage4;
|
private Float sameAverage4;
|
||||||
private Integer sameAccrued4;
|
private Float sameAccrued4;
|
||||||
private Float averageOverDay4;
|
private Float averageOverDay4;
|
||||||
|
|
||||||
|
|
||||||
@@ -157,10 +157,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued5;
|
private Integer tAccrued5;
|
||||||
private Float oAverage5;
|
private Float oAverage5;
|
||||||
private Float oAccrued5;
|
private Float oAccrued5;
|
||||||
private Integer chainAverage5;
|
private Float chainAverage5;
|
||||||
private Integer chainAccrued5;
|
private Float chainAccrued5;
|
||||||
private Integer sameAverage5;
|
private Float sameAverage5;
|
||||||
private Integer sameAccrued5;
|
private Float sameAccrued5;
|
||||||
private Float averageOverDay5;
|
private Float averageOverDay5;
|
||||||
|
|
||||||
|
|
||||||
@@ -171,10 +171,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued6;
|
private Integer tAccrued6;
|
||||||
private Float oAverage6;
|
private Float oAverage6;
|
||||||
private Float oAccrued6;
|
private Float oAccrued6;
|
||||||
private Integer chainAverage6;
|
private Float chainAverage6;
|
||||||
private Integer chainAccrued6;
|
private Float chainAccrued6;
|
||||||
private Integer sameAverage6;
|
private Float sameAverage6;
|
||||||
private Integer sameAccrued6;
|
private Float sameAccrued6;
|
||||||
private Float averageOverDay6;
|
private Float averageOverDay6;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -184,10 +184,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued7;
|
private Integer tAccrued7;
|
||||||
private Float oAverage7;
|
private Float oAverage7;
|
||||||
private Float oAccrued7;
|
private Float oAccrued7;
|
||||||
private Integer chainAverage7;
|
private Float chainAverage7;
|
||||||
private Integer chainAccrued7;
|
private Float chainAccrued7;
|
||||||
private Integer sameAverage7;
|
private Float sameAverage7;
|
||||||
private Integer sameAccrued7;
|
private Float sameAccrued7;
|
||||||
private Float averageOverDay7;
|
private Float averageOverDay7;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -197,10 +197,10 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
private Integer tAccrued8;
|
private Integer tAccrued8;
|
||||||
private Float oAverage8;
|
private Float oAverage8;
|
||||||
private Float oAccrued8;
|
private Float oAccrued8;
|
||||||
private Integer chainAverage8;
|
private Float chainAverage8;
|
||||||
private Integer chainAccrued8;
|
private Float chainAccrued8;
|
||||||
private Integer sameAverage8;
|
private Float sameAverage8;
|
||||||
private Integer sameAccrued8;
|
private Float sameAccrued8;
|
||||||
private Float averageOverDay8;
|
private Float averageOverDay8;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@@ -211,6 +211,13 @@ public class RStatSubstationOrg2VO implements Serializable {
|
|||||||
@ApiModelProperty(name = "monitorSort", value = "监测点类别")
|
@ApiModelProperty(name = "monitorSort", value = "监测点类别")
|
||||||
private String monitorSort;
|
private String monitorSort;
|
||||||
}
|
}
|
||||||
|
@Data
|
||||||
|
public static class MonitorType extends RStatSubstationOrg2VO {
|
||||||
|
/**
|
||||||
|
* 监测点类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "monitorType", value = "监测点类型")
|
||||||
|
private String monitorType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,13 +80,13 @@ public class RStatSubstationOrgVO implements Serializable {
|
|||||||
* 日均暂态超标监测点数占比
|
* 日均暂态超标监测点数占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementRatioAverage", value = "日均暂态超标监测点数占比")
|
@ApiModelProperty(name = "eventMeasurementRatioAverage", value = "日均暂态超标监测点数占比")
|
||||||
private Integer harmonicMeasurementRatioAverage;
|
private Float harmonicMeasurementRatioAverage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 累计暂态超标监测点数占比
|
* 累计暂态超标监测点数占比
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(name = "eventMeasurementRatioAccrued", value = "累计暂态超标监测点数占比")
|
@ApiModelProperty(name = "eventMeasurementRatioAccrued", value = "累计暂态超标监测点数占比")
|
||||||
private Integer harmonicMeasurementRatioAccrued;
|
private Float harmonicMeasurementRatioAccrued;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 暂态指标类型Id,字典表ID
|
* 暂态指标类型Id,字典表ID
|
||||||
@@ -114,11 +114,16 @@ public class RStatSubstationOrgVO implements Serializable {
|
|||||||
* 累计超标监测点数占比(此表的累计超标监测点数/区域统计表中的区域分类统计月表中的累计有效接入监测点数)
|
* 累计超标监测点数占比(此表的累计超标监测点数/区域统计表中的区域分类统计月表中的累计有效接入监测点数)
|
||||||
*/
|
*/
|
||||||
private Float overLimitMeasurementRatioAccrued;
|
private Float overLimitMeasurementRatioAccrued;
|
||||||
//同比,环比,平均天数
|
|
||||||
private Integer chainAverage;
|
//同比日均
|
||||||
private Integer chainAccrued;
|
private Float chainAverage;
|
||||||
private Integer sameAverage;
|
//同比累计
|
||||||
private Integer sameAccrued;
|
private Float chainAccrued;
|
||||||
|
//环比日均
|
||||||
|
private Float sameAverage;
|
||||||
|
//环比累计
|
||||||
|
private Float sameAccrued;
|
||||||
|
//平均天数
|
||||||
private Float averageOverDay;
|
private Float averageOverDay;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,5 @@ public class SourceSteadyIndicator {
|
|||||||
* 类型(0:预警;1:告警)
|
* 类型(0:预警;1:告警)
|
||||||
*/
|
*/
|
||||||
private Integer type;
|
private Integer type;
|
||||||
/**
|
|
||||||
* 监测点id
|
|
||||||
*/
|
|
||||||
private String monitorId;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public class RStatHarmonicController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/getRStatHarmonicIconDate")
|
@GetMapping("/getRStatHarmonicIconDate")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("稳态电铁-频率偏差-越线日期统计图")
|
@ApiOperation("主网稳态指标每日统计图")
|
||||||
public HttpResult<List<RHarmonicPolylineVO>> getRStatHarmonicIconDate(RStatHarmonicMParam param) {
|
public HttpResult<List<RHarmonicPolylineVO>> getRStatHarmonicIconDate(RStatHarmonicMParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getRStatHarmonicIconDate");
|
String methodDescribe = getMethodDescribe("getRStatHarmonicIconDate");
|
||||||
List<RHarmonicPolylineVO> rStatHarmonicIcon = rStatHarmonicMService.getRStatHarmonicIconDate(param);
|
List<RHarmonicPolylineVO> rStatHarmonicIcon = rStatHarmonicMService.getRStatHarmonicIconDate(param);
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.njcn.harmonic.controller.majornetwork;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.harmonic.pojo.param.RStatLimitQueryParam;
|
||||||
|
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||||
|
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||||
|
import com.njcn.harmonic.service.majornetwork.RStatLimitService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/2/28
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "主网指标检测点超标明细")
|
||||||
|
@RequestMapping("/limitRateD")
|
||||||
|
public class RStatLimitController extends BaseController {
|
||||||
|
|
||||||
|
private final RStatLimitService rStatLimitService;
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/monitorIdsGetLimitRateInfo")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("获取指定日期超标监测点详细信息")
|
||||||
|
public HttpResult<List<RStatLimitRateDPO>> monitorIdsGetLimitRateInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("monitorIdsGetLimitRateInfo");
|
||||||
|
List<RStatLimitRateDPO> result = rStatLimitService.monitorIdsGetLimitRateInfo(rStatLimitQueryParam.getDate(),rStatLimitQueryParam.getIds());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/monitorIdsGetLimitTargetInfo")
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@ApiOperation("获取指定日期超标监测点详细信息")
|
||||||
|
public HttpResult<List<RStatLimitTargetDPO>> monitorIdsGetLimitTargetInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("monitorIdsGetLimitTargetInfo");
|
||||||
|
List<RStatLimitTargetDPO> result = rStatLimitService.monitorIdsGetLimitTargetInfo(rStatLimitQueryParam.getDate(),rStatLimitQueryParam.getIds());
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -79,12 +79,12 @@ public class RStatOrgController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 区域稳态指标超标分类统计表
|
* 区域稳态指标超标分类统计表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/getRStatSubstation")
|
@PostMapping("/getRStatSubstation")
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("区域稳态指标超标分类统计表")
|
@ApiOperation("区域稳态指标超标分类统计表")
|
||||||
public HttpResult<List<RStatSubstationOrg2VO>> getRStatSubstation(StatisticsBizBaseParam param) {
|
public HttpResult<List<RStatSubstationOrg2VO.MonitorType>> getRStatSubstation(@RequestBody StatSubstationBizBaseParam param) {
|
||||||
String methodDescribe = getMethodDescribe("getRStatSubstation");
|
String methodDescribe = getMethodDescribe("getRStatSubstation");
|
||||||
List<RStatSubstationOrg2VO> statSubstationIcon = rStatOrgYService.getRStatSubstationOrg(param);
|
List<RStatSubstationOrg2VO.MonitorType> statSubstationIcon = rStatOrgYService.getRStatSubstationOrg(param);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, statSubstationIcon, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
ROUND( sum( over_limit_measurement_average )/ count(*), 2 ) AS overLimitMeasurementAverage,
|
ROUND( sum( over_limit_measurement_average )/ count(*), 2 ) AS overLimitMeasurementAverage,
|
||||||
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
||||||
sum( over_Day ) AS overDay,
|
sum( over_Day ) AS overDay,
|
||||||
ROUND( sum( over_limit_measurement_ratio_average )/ count(*), 2 ) AS overLimitMeasurementRatioAverage,
|
ROUND( (sum( over_limit_measurement_ratio_average )/ count(*))*100, 2 ) AS overLimitMeasurementRatioAverage,
|
||||||
sum( over_limit_measurement_ratio_accrued ) AS overLimitMeasurementRatioAccrued
|
ROUND(sum( over_limit_measurement_ratio_accrued )*100,2) AS overLimitMeasurementRatioAccrued
|
||||||
FROM
|
FROM
|
||||||
r_stat_harmonic_m
|
r_stat_harmonic_m
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
ROUND( sum( over_limit_measurement_average )/ count(*), 2 ) AS overLimitMeasurementAverage,
|
ROUND( sum( over_limit_measurement_average )/ count(*), 2 ) AS overLimitMeasurementAverage,
|
||||||
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
||||||
ROUND( sum( average_over_day )/ count(*), 2 ) AS averageOverDay,
|
ROUND( sum( average_over_day )/ count(*), 2 ) AS averageOverDay,
|
||||||
ROUND( sum( over_limit_measurement_ratio_average )/ count(*), 2 ) AS overLimitMeasurementRatioAverage,
|
ROUND( (sum( over_limit_measurement_ratio_average )/ count(*))*100, 2 ) AS overLimitMeasurementRatioAverage,
|
||||||
sum( over_limit_measurement_ratio_accrued ) AS overLimitMeasurementRatioAccrued
|
ROUND(sum( over_limit_measurement_ratio_accrued )*100,2) AS overLimitMeasurementRatioAccrued
|
||||||
FROM
|
FROM
|
||||||
r_stat_harmonic_q
|
r_stat_harmonic_q
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
ROUND( sum( over_limit_measurement_average )/ count(*), 2 ) AS overLimitMeasurementAverage,
|
ROUND( sum( over_limit_measurement_average )/ count(*), 2 ) AS overLimitMeasurementAverage,
|
||||||
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
sum( over_limit_measurement_accrued ) AS overLimitMeasurementAccrued,
|
||||||
ROUND( sum( average_over_day )/ count(*), 2 ) AS averageOverDay,
|
ROUND( sum( average_over_day )/ count(*), 2 ) AS averageOverDay,
|
||||||
ROUND( sum( over_limit_measurement_ratio_average )/ count(*), 2 ) AS overLimitMeasurementRatioAverage,
|
ROUND( (sum( over_limit_measurement_ratio_average )/ count(*))*100, 2 ) AS overLimitMeasurementRatioAverage,
|
||||||
sum( over_limit_measurement_ratio_accrued ) AS overLimitMeasurementRatioAccrued
|
ROUND((sum( over_limit_measurement_ratio_accrued ))*100,2) AS overLimitMeasurementRatioAccrued
|
||||||
FROM
|
FROM
|
||||||
r_stat_harmonic_y
|
r_stat_harmonic_y
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@@ -35,96 +35,17 @@
|
|||||||
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
||||||
rso.harmonic_measurement_average AS harmonicMeasurementAverage,
|
rso.harmonic_measurement_average AS harmonicMeasurementAverage,
|
||||||
rso.harmonic_measurement_accrued AS harmonicMeasurementAccrued,
|
rso.harmonic_measurement_accrued AS harmonicMeasurementAccrued,
|
||||||
rso.harmonic_measurement_ratio_average as harmonicMeasurementRatioAverage,
|
TRUNCATE(rso.harmonic_measurement_ratio_average,2) as harmonicMeasurementRatioAverage,
|
||||||
TRUNCATE(rso.event_measurement_accrued/rso.effective_measurement_accrued ,2)as harmonicMeasurementRatioAccrued,
|
TRUNCATE(rso.harmonic_measurement_accrued*100/rso.effective_measurement_accrued ,2)as harmonicMeasurementRatioAccrued,
|
||||||
c.harmonic_type,
|
c.harmonic_type,
|
||||||
c.over_limit_measurement_average,
|
TRUNCATE(c.over_limit_measurement_average,2) as overLimitMeasurementAverage,
|
||||||
c.over_limit_measurement_accrued,
|
c.over_limit_measurement_accrued,
|
||||||
c.over_limit_measurement_ratio_average,
|
TRUNCATE(c.over_limit_measurement_ratio_average*100,2) as overLimitMeasurementRatioAverage,
|
||||||
c.over_limit_measurement_ratio_accrued,
|
TRUNCATE(c.over_limit_measurement_ratio_accrued*100,2) as overLimitMeasurementRatioAccrued,
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_average
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_m a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
|
|
||||||
) chainAverage ,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_accrued
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_m a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
) chainAccrued ,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_average
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_m a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 MONTH )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 MONTH )))
|
|
||||||
</if>
|
|
||||||
) sameAverage,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_accrued
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_m a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 MONTH )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 MONTH )))
|
|
||||||
</if>
|
|
||||||
|
|
||||||
) sameAccrued ,
|
|
||||||
TRUNCATE( c.over_day / c.over_limit_measurement_accrued, 2)as averageOverDay
|
TRUNCATE( c.over_day / c.over_limit_measurement_accrued, 2)as averageOverDay
|
||||||
FROM
|
FROM
|
||||||
r_stat_harmonic_org_m c
|
r_stat_harmonic_m c
|
||||||
RIGHT JOIN r_stat_org_m AS rso ON rso.org_no = c.org_no
|
RIGHT JOIN r_stat_org_m AS rso ON rso.org_no = c.org_no and c.measurement_type_class = rso.measurement_type_class
|
||||||
<where>
|
<where>
|
||||||
c.data_Type=#{dataType} and rso.data_Type=#{dataType}
|
c.data_Type=#{dataType} and rso.data_Type=#{dataType}
|
||||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
|||||||
@@ -35,95 +35,17 @@
|
|||||||
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
||||||
rso.harmonic_measurement_average AS harmonicMeasurementAverage,
|
rso.harmonic_measurement_average AS harmonicMeasurementAverage,
|
||||||
rso.harmonic_measurement_accrued AS harmonicMeasurementAccrued,
|
rso.harmonic_measurement_accrued AS harmonicMeasurementAccrued,
|
||||||
rso.harmonic_measurement_ratio_average as harmonicMeasurementRatioAverage,
|
TRUNCATE(rso.harmonic_measurement_ratio_average,2) as harmonicMeasurementRatioAverage,
|
||||||
TRUNCATE(rso.event_measurement_accrued/rso.effective_measurement_accrued ,2)as harmonicMeasurementRatioAccrued,
|
TRUNCATE(rso.harmonic_measurement_accrued*100/rso.effective_measurement_accrued ,2)as harmonicMeasurementRatioAccrued,
|
||||||
c.harmonic_type,
|
c.harmonic_type,
|
||||||
c.over_limit_measurement_average,
|
TRUNCATE(c.over_limit_measurement_average,2) as overLimitMeasurementAverage,
|
||||||
c.over_limit_measurement_accrued,
|
c.over_limit_measurement_accrued,
|
||||||
c.over_limit_measurement_ratio_average,
|
TRUNCATE(c.over_limit_measurement_ratio_average*100,2) as overLimitMeasurementRatioAverage,
|
||||||
c.over_limit_measurement_ratio_accrued,
|
TRUNCATE(c.over_limit_measurement_ratio_accrued*100,2) as overLimitMeasurementRatioAccrued,
|
||||||
(
|
TRUNCATE( c.average_over_day, 2)as averageOverDay
|
||||||
SELECT
|
|
||||||
over_limit_measurement_average
|
|
||||||
FROM
|
FROM
|
||||||
r_stat_harmonic_org_q a
|
r_stat_harmonic_q c
|
||||||
WHERE
|
RIGHT JOIN r_stat_org_q AS rso ON rso.org_no = c.org_no and c.measurement_type_class = rso.measurement_type_class
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
|
|
||||||
) chainAverage ,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_accrued
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_q a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
) chainAccrued ,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_average
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_q a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 3 MONTH )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 3 MONTH )))
|
|
||||||
</if>
|
|
||||||
) sameAverage,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_accrued
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_q a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 3 MONTH )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 3 MONTH )))
|
|
||||||
</if>
|
|
||||||
|
|
||||||
) sameAccrued,
|
|
||||||
c.average_over_day
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_q c
|
|
||||||
RIGHT JOIN r_stat_org_q AS rso ON rso.org_no = c.org_no
|
|
||||||
<where>
|
<where>
|
||||||
c.data_Type=#{dataType} and rso.data_Type=#{dataType}
|
c.data_Type=#{dataType} and rso.data_Type=#{dataType}
|
||||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
|||||||
@@ -35,95 +35,17 @@
|
|||||||
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
rso.effective_measurement_accrued AS effectiveMeasurementAccrued,
|
||||||
rso.over_limit_measurement_average AS harmonicMeasurementAverage,
|
rso.over_limit_measurement_average AS harmonicMeasurementAverage,
|
||||||
rso.over_limit_measurement_accrued AS harmonicMeasurementAccrued,
|
rso.over_limit_measurement_accrued AS harmonicMeasurementAccrued,
|
||||||
rso.harmonic_measurement_ratio_average as harmonicMeasurementRatioAverage,
|
TRUNCATE( rso.harmonic_measurement_ratio_average,2) as harmonicMeasurementRatioAverage,
|
||||||
TRUNCATE(rso.event_measurement_accrued/rso.effective_measurement_accrued ,2)as harmonicMeasurementRatioAccrued,
|
TRUNCATE((rso.over_limit_measurement_accrued/rso.effective_measurement_accrued)*100 ,2)as harmonicMeasurementRatioAccrued,
|
||||||
c.harmonic_type,
|
c.harmonic_type,
|
||||||
c.over_limit_measurement_average,
|
TRUNCATE(c.over_limit_measurement_average,2) as overLimitMeasurementAverage,
|
||||||
c.over_limit_measurement_accrued,
|
c.over_limit_measurement_accrued,
|
||||||
c.over_limit_measurement_ratio_average,
|
TRUNCATE(c.over_limit_measurement_ratio_average*100,2) as overLimitMeasurementRatioAverage,
|
||||||
c.over_limit_measurement_ratio_accrued,
|
TRUNCATE(c.over_limit_measurement_ratio_accrued*100,2) as overLimitMeasurementRatioAccrued,
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_average
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_y a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
|
|
||||||
) chainAverage ,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_accrued
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_y a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
) chainAccrued ,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_average
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_y a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
) sameAverage,
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
over_limit_measurement_accrued
|
|
||||||
FROM
|
|
||||||
r_stat_harmonic_org_y a
|
|
||||||
WHERE
|
|
||||||
a.org_no=c.org_no
|
|
||||||
and a.data_Type = #{dataType}
|
|
||||||
and
|
|
||||||
a.harmonic_type=c.harmonic_type
|
|
||||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
|
||||||
AND (data_date >= date(
|
|
||||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
|
||||||
AND (data_date <= date(
|
|
||||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
|
||||||
</if>
|
|
||||||
|
|
||||||
) sameAccrued,
|
|
||||||
c.average_over_day
|
c.average_over_day
|
||||||
FROM
|
FROM
|
||||||
r_stat_harmonic_org_y c
|
r_stat_harmonic_y c
|
||||||
RIGHT JOIN r_stat_org_y AS rso ON rso.org_no = c.org_no
|
RIGHT JOIN r_stat_org_y AS rso ON rso.org_no = c.org_no and c.measurement_type_class = rso.measurement_type_class
|
||||||
<where>
|
<where>
|
||||||
c.data_Type=#{dataType} and rso.data_Type=#{dataType}
|
c.data_Type=#{dataType} and rso.data_Type=#{dataType}
|
||||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user