0918优化-电表点位查询修改
This commit is contained in:
@ -2,6 +2,7 @@ package com.xzzn.ems.domain.vo;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -26,6 +27,87 @@ public class AmmeterDataVo {
|
|||||||
/** 表数据信息 */
|
/** 表数据信息 */
|
||||||
private List<LoadDataDetailInfo> loadDataDetailInfo;
|
private List<LoadDataDetailInfo> loadDataDetailInfo;
|
||||||
|
|
||||||
|
// 正向有功电能
|
||||||
|
private BigDecimal forwardActive;
|
||||||
|
// 反向有功电能
|
||||||
|
private BigDecimal reverseActive;
|
||||||
|
// 正向无功电能
|
||||||
|
private BigDecimal forwardReactive;
|
||||||
|
// 反向无功电能
|
||||||
|
private BigDecimal reverseReactive;
|
||||||
|
// 有功功率
|
||||||
|
private BigDecimal activePower;
|
||||||
|
// 无功功率
|
||||||
|
private BigDecimal reactivePower;
|
||||||
|
// 有功电能
|
||||||
|
private BigDecimal activeEnergy;
|
||||||
|
// 无功电能
|
||||||
|
private BigDecimal reactiveEnergy;
|
||||||
|
|
||||||
|
public BigDecimal getActiveEnergy() {
|
||||||
|
return activeEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActiveEnergy(BigDecimal activeEnergy) {
|
||||||
|
this.activeEnergy = activeEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getReactiveEnergy() {
|
||||||
|
return reactiveEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReactiveEnergy(BigDecimal reactiveEnergy) {
|
||||||
|
this.reactiveEnergy = reactiveEnergy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getForwardActive() {
|
||||||
|
return forwardActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForwardActive(BigDecimal forwardActive) {
|
||||||
|
this.forwardActive = forwardActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getReverseActive() {
|
||||||
|
return reverseActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReverseActive(BigDecimal reverseActive) {
|
||||||
|
this.reverseActive = reverseActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getForwardReactive() {
|
||||||
|
return forwardReactive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForwardReactive(BigDecimal forwardReactive) {
|
||||||
|
this.forwardReactive = forwardReactive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getReverseReactive() {
|
||||||
|
return reverseReactive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReverseReactive(BigDecimal reverseReactive) {
|
||||||
|
this.reverseReactive = reverseReactive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getActivePower() {
|
||||||
|
return activePower;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivePower(BigDecimal activePower) {
|
||||||
|
this.activePower = activePower;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getReactivePower() {
|
||||||
|
return reactivePower;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReactivePower(BigDecimal reactivePower) {
|
||||||
|
this.reactivePower = reactivePower;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDeviceName() {
|
public String getDeviceName() {
|
||||||
return deviceName;
|
return deviceName;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,13 +121,13 @@ public interface EmsPointMatchMapper
|
|||||||
// 单个站点单个设备点位查询-除了电池簇其他设备使用
|
// 单个站点单个设备点位查询-除了电池簇其他设备使用
|
||||||
public List<PointQueryResponse> getSingleSiteDevicePoints(@Param("siteId")String siteId,
|
public List<PointQueryResponse> getSingleSiteDevicePoints(@Param("siteId")String siteId,
|
||||||
@Param("deviceCategory")String deviceCategory,
|
@Param("deviceCategory")String deviceCategory,
|
||||||
@Param("dataPointName")String dataPointName,
|
@Param("pointName")String pointName,
|
||||||
@Param("dataPoint")String dataPoint);
|
@Param("dataPoint")String dataPoint);
|
||||||
// 单个站点单个设备点位查询-电池簇使用
|
// 单个站点单个设备点位查询-电池簇使用
|
||||||
public List<PointQueryResponse> getClusterDevicePoints(@Param("siteId")String siteId,
|
public List<PointQueryResponse> getClusterDevicePoints(@Param("siteId")String siteId,
|
||||||
@Param("deviceId")String deviceId,
|
@Param("deviceId")String deviceId,
|
||||||
@Param("parentDeviceId")String parentDeviceId,
|
@Param("parentDeviceId")String parentDeviceId,
|
||||||
@Param("deviceCategory")String deviceCategory,
|
@Param("deviceCategory")String deviceCategory,
|
||||||
@Param("dataPointName")String dataPointName,
|
@Param("pointName")String pointName,
|
||||||
@Param("dataPoint")String dataPoint);
|
@Param("dataPoint")String dataPoint);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -190,9 +190,13 @@ public class EmsDeviceSettingServiceImpl implements IEmsDeviceSettingService
|
|||||||
// 结果排序
|
// 结果排序
|
||||||
String sortMethod = request.getSortMethod();
|
String sortMethod = request.getSortMethod();
|
||||||
if (sortMethod==null || sortMethod.isEmpty() || "asc".equals(sortMethod)) {// 升序
|
if (sortMethod==null || sortMethod.isEmpty() || "asc".equals(sortMethod)) {// 升序
|
||||||
response = response.stream().sorted(Comparator.comparing(PointQueryResponse::getUpdateTime)).collect(Collectors.toList());
|
response = response.stream()
|
||||||
|
.filter(p -> p.getPointValue() != null)
|
||||||
|
.sorted(Comparator.comparing(PointQueryResponse::getUpdateTime)).collect(Collectors.toList());
|
||||||
} else if ("desc".equals(sortMethod)) {//降序
|
} else if ("desc".equals(sortMethod)) {//降序
|
||||||
response = response.stream().sorted(Comparator.comparing(PointQueryResponse::getUpdateTime).reversed()).collect(Collectors.toList());
|
response = response.stream()
|
||||||
|
.filter(p -> p.getPointValue() != null)
|
||||||
|
.sorted(Comparator.comparing(PointQueryResponse::getUpdateTime).reversed()).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -332,8 +332,8 @@
|
|||||||
<if test="deviceCategory != null and deviceCategory != ''">
|
<if test="deviceCategory != null and deviceCategory != ''">
|
||||||
and t.device_category = #{deviceCategory}
|
and t.device_category = #{deviceCategory}
|
||||||
</if>
|
</if>
|
||||||
<if test="dataPointName != null and dataPointName != ''">
|
<if test="pointName != null and pointName != ''">
|
||||||
and t.data_point_name like CONCAT('%', #{dataPointName}, '%')
|
and t.point_name like CONCAT('%', #{pointName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dataPoint != null and dataPoint != ''">
|
<if test="dataPoint != null and dataPoint != ''">
|
||||||
and t.data_point like CONCAT('%', #{dataPoint}, '%')
|
and t.data_point like CONCAT('%', #{dataPoint}, '%')
|
||||||
@ -362,8 +362,8 @@
|
|||||||
</if>
|
</if>
|
||||||
) as tmp
|
) as tmp
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="dataPointName != null and dataPointName != ''">
|
<if test="pointName != null and pointName != ''">
|
||||||
and tmp.dataPointName like CONCAT('%', #{dataPointName}, '%')
|
and tmp.point_name like CONCAT('%', #{pointName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="dataPoint != null and dataPoint != ''">
|
<if test="dataPoint != null and dataPoint != ''">
|
||||||
and tmp.dataPoint like CONCAT('%', #{dataPoint}, '%')
|
and tmp.dataPoint like CONCAT('%', #{dataPoint}, '%')
|
||||||
|
|||||||
Reference in New Issue
Block a user