Compare commits
29 Commits
f86a3c4167
...
2025-12
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b0feb1320 | |||
| e92326c55d | |||
| 7abbfd500b | |||
| 77360ef468 | |||
| b38d3bad1b | |||
| 27aebf2ca4 | |||
| 9981b04ed6 | |||
| f8c9828369 | |||
| 0d652b9f4d | |||
| 3ea67da152 | |||
| c7dce89d36 | |||
| e7dbee2df5 | |||
| 29168bbd9f | |||
| 56d88939c4 | |||
| bc6f3dca80 | |||
| 2957188466 | |||
| 2894a4780b | |||
| 240ec304b0 | |||
| ae09cc1996 | |||
| efdb1781da | |||
|
|
46aef0d97f | ||
|
|
5539c8fed5 | ||
|
|
10d93c260c | ||
| 4ee100a72b | |||
|
|
958f1858fc | ||
|
|
791aac26c0 | ||
| 3526926034 | |||
| 3753544e5f | |||
| e6df543f1d |
@@ -4,18 +4,14 @@ import cn.hutool.core.collection.CollUtil;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.njcn.cloud.enums.app.UserCodeEnum;
|
import com.njcn.cloud.enums.app.UserCodeEnum;
|
||||||
import com.njcn.cloud.pojo.vo.AdminStatistic.Integrity;
|
import com.njcn.cloud.pojo.vo.AdminStatistic.Integrity;
|
||||||
import com.njcn.cloud.pojo.vo.AdminStatistic.StaticInfo;
|
|
||||||
import com.njcn.cloud.service.AdminStatistic.DataIntegrityService;
|
import com.njcn.cloud.service.AdminStatistic.DataIntegrityService;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
import com.njcn.device.pq.api.LineIntegrityClient;
|
import com.njcn.device.pq.api.LineIntegrityClient;
|
||||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
|
||||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
|
||||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.user.pojo.po.User;
|
import com.njcn.user.pojo.po.User;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ import com.njcn.common.pojo.exception.BusinessException;
|
|||||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||||
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
import com.njcn.device.pq.pojo.param.OnlineRateParam;
|
||||||
import com.njcn.device.pq.pojo.vo.DevDetail;
|
import com.njcn.device.pq.pojo.vo.DevDetail;
|
||||||
import com.njcn.device.pq.pojo.vo.RStatOnlinerateVO;
|
import com.njcn.device.pq.pojo.vo.RStatOnlineRateVO;
|
||||||
import com.njcn.user.api.UserFeignClient;
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.user.pojo.po.User;
|
import com.njcn.user.pojo.po.User;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -54,7 +56,7 @@ public class StaticServiceImpl implements StaticService {
|
|||||||
//获取终端信息
|
//获取终端信息
|
||||||
List<DevDetail> devDetails = generalDeviceInfoClient.getDevInfoByIds(new ArrayList<>()).getData();
|
List<DevDetail> devDetails = generalDeviceInfoClient.getDevInfoByIds(new ArrayList<>()).getData();
|
||||||
//获取终端在线率
|
//获取终端在线率
|
||||||
List<RStatOnlinerateVO> onlineRates = generalDeviceInfoClient.getOnlineRateByDevIds(param).getData();
|
List<RStatOnlineRateVO> onlineRates = generalDeviceInfoClient.getOnlineRateByDevIds(param).getData();
|
||||||
//异常终端数据
|
//异常终端数据
|
||||||
long count = devDetails.stream().filter(x -> 0==x.getComFlag()).count();
|
long count = devDetails.stream().filter(x -> 0==x.getComFlag()).count();
|
||||||
StaticInfo info=new StaticInfo();
|
StaticInfo info=new StaticInfo();
|
||||||
@@ -63,14 +65,14 @@ public class StaticServiceImpl implements StaticService {
|
|||||||
info.setOnlineRatez(data);
|
info.setOnlineRatez(data);
|
||||||
info.setComError(count);
|
info.setComError(count);
|
||||||
List<StaticInfo.DevStatic> list=new ArrayList<>();
|
List<StaticInfo.DevStatic> list=new ArrayList<>();
|
||||||
Map<String, Float> onlineRateMap = onlineRates.stream().collect(Collectors.toMap(RStatOnlinerateVO::getDevIndex, RStatOnlinerateVO::getOnlineRate));
|
Map<String, BigDecimal> onlineRateMap = onlineRates.stream().collect(Collectors.toMap(RStatOnlineRateVO::getDevIndex, RStatOnlineRateVO::getOnlineRate));
|
||||||
StaticInfo.DevStatic devStatic;
|
StaticInfo.DevStatic devStatic;
|
||||||
for (DevDetail devDetail : devDetails) {
|
for (DevDetail devDetail : devDetails) {
|
||||||
devStatic=new StaticInfo.DevStatic();
|
devStatic=new StaticInfo.DevStatic();
|
||||||
devStatic.setDevIndex(devDetail.getDevIndex());
|
devStatic.setDevIndex(devDetail.getDevIndex());
|
||||||
devStatic.setDevName(devDetail.getDevName());
|
devStatic.setDevName(devDetail.getDevName());
|
||||||
devStatic.setIp(devDetail.getIp());
|
devStatic.setIp(devDetail.getIp());
|
||||||
devStatic.setOnlineRate(onlineRateMap.get(devDetail.getDevIndex()));
|
devStatic.setOnlineRate(onlineRateMap.get(devDetail.getDevIndex()).setScale(3, RoundingMode.HALF_UP).floatValue());
|
||||||
devStatic.setGdName(devDetail.getGdName());
|
devStatic.setGdName(devDetail.getGdName());
|
||||||
devStatic.setSubName(devDetail.getBdzName());
|
devStatic.setSubName(devDetail.getBdzName());
|
||||||
devStatic.setTimeId(devDetail.getTimeID());
|
devStatic.setTimeId(devDetail.getTimeID());
|
||||||
|
|||||||
@@ -9,15 +9,18 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.csdevice.api.fallback.CsLineClientFallbackFactory;
|
import com.njcn.csdevice.api.fallback.CsLineClientFallbackFactory;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
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;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xy
|
* @author xy
|
||||||
@@ -37,6 +40,10 @@ public interface CsLineFeignClient {
|
|||||||
@PostMapping("/findByNdid")
|
@PostMapping("/findByNdid")
|
||||||
HttpResult<List<CsLinePO>> findByNdid(@RequestParam("id") String id);
|
HttpResult<List<CsLinePO>> findByNdid(@RequestParam("id") String id);
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/getCustomDetailByLineId")
|
||||||
|
HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id);
|
||||||
|
|
||||||
@PostMapping("/getPositionById")
|
@PostMapping("/getPositionById")
|
||||||
HttpResult<String> getPositionById(@RequestParam("id") String id);
|
HttpResult<String> getPositionById(@RequestParam("id") String id);
|
||||||
|
|
||||||
@@ -71,4 +78,7 @@ public interface CsLineFeignClient {
|
|||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
HttpResult<List<CsLinePO>> list(@RequestBody CsLinePO param);
|
HttpResult<List<CsLinePO>> list(@RequestBody CsLinePO param);
|
||||||
|
|
||||||
|
@PostMapping("/getLineDetailData")
|
||||||
|
HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.njcn.csdevice.api;
|
|||||||
|
|
||||||
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.csdevice.api.fallback.OverLimitFallbackFactory;
|
import com.njcn.csdevice.api.fallback.CsOverLimitFallbackFactory;
|
||||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -18,8 +18,8 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT,
|
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT,
|
||||||
path = "/overLimit",
|
path = "/overLimit",
|
||||||
fallbackFactory = OverLimitFallbackFactory.class,contextId = "overLimit")
|
fallbackFactory = CsOverLimitFallbackFactory.class,contextId = "overLimit")
|
||||||
public interface OverLimitClient {
|
public interface CsOverLimitClient {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -6,12 +6,15 @@ import com.njcn.common.pojo.response.HttpResult;
|
|||||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author xy
|
* @author xy
|
||||||
@@ -52,6 +55,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
|||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam("id") String id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","根据id查询监测点",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<String> getPositionById(String id) {
|
public HttpResult<String> getPositionById(String id) {
|
||||||
log.error("{}异常,降级处理,异常为:{}","通过id查询监测点位置",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","通过id查询监测点位置",cause.toString());
|
||||||
@@ -116,6 +125,12 @@ public class CsLineClientFallbackFactory implements FallbackFactory<CsLineFeignC
|
|||||||
log.error("{}异常,降级处理,异常为:{}","查询监测点列表异常",cause.toString());
|
log.error("{}异常,降级处理,异常为:{}","查询监测点列表异常",cause.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","查询监测点详情异常",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.njcn.csdevice.api.fallback;
|
|||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.csdevice.api.OverLimitClient;
|
import com.njcn.csdevice.api.CsOverLimitClient;
|
||||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||||
import feign.hystrix.FallbackFactory;
|
import feign.hystrix.FallbackFactory;
|
||||||
@@ -20,9 +20,9 @@ import java.util.Map;
|
|||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class OverLimitFallbackFactory implements FallbackFactory<OverLimitClient> {
|
public class CsOverLimitFallbackFactory implements FallbackFactory<CsOverLimitClient> {
|
||||||
@Override
|
@Override
|
||||||
public OverLimitClient create(Throwable throwable) {
|
public CsOverLimitClient create(Throwable throwable) {
|
||||||
//判断抛出异常是否为解码器抛出的业务异常
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
if (throwable.getCause() instanceof BusinessException) {
|
if (throwable.getCause() instanceof BusinessException) {
|
||||||
@@ -30,7 +30,7 @@ public class OverLimitFallbackFactory implements FallbackFactory<OverLimitClient
|
|||||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
}
|
}
|
||||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
return new OverLimitClient() {
|
return new CsOverLimitClient() {
|
||||||
@Override
|
@Override
|
||||||
public HttpResult<List<Overlimit>> getOverLimitByLineIds(List<String> lineIds) {
|
public HttpResult<List<Overlimit>> getOverLimitByLineIds(List<String> lineIds) {
|
||||||
log.error("{}异常,降级处理,异常为:{}", "监测点限值", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "监测点限值", throwable.toString());
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
package com.njcn.csdevice.pojo.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author denghuajun
|
||||||
|
* @date 2022/2/23
|
||||||
|
* 监测点信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel
|
||||||
|
public class LineDetailDataVO {
|
||||||
|
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "id",value = "监测点序号")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lineName",value = "监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "areaName",value = "工程名称")
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "gdName",value = "单位")
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "bdName",value = "部门")
|
||||||
|
private String bdName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "scale",value = "电压等级")
|
||||||
|
private String scale;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "manufacturer",value = "厂家")
|
||||||
|
private String manufacturer;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "devId",value = "终端Id")
|
||||||
|
private String devId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "devName",value = "终端名称")
|
||||||
|
private String devName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "ip",value = "网络参数")
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "runFlag",value = "终端运行状态")
|
||||||
|
private String runFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "comFlag",value = "通讯状态")
|
||||||
|
private String comFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "loadType",value = "干扰源类型")
|
||||||
|
private String loadType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "businessType",value = "行业类型")
|
||||||
|
private String businessType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "objName",value = "监测点对象名称")
|
||||||
|
private String objName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "ptType",value = "接线方式")
|
||||||
|
private String ptType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "pt",value = "PT变比")
|
||||||
|
private String pt;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "ct",value = "CT变比")
|
||||||
|
private String ct;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "standardCapacity",value = "基准容量(MVA)")
|
||||||
|
private Float standardCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "shortCapacity",value = "最小短路容量(MVA)")
|
||||||
|
private Float shortCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "devCapacity",value = "供电设备容量(MVA)")
|
||||||
|
private Float devCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "dealCapacity",value = "用户协议容量(MVA)")
|
||||||
|
private Float dealCapacity;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "powerFlag",value = "电网标志(0-电网侧;1-非电网侧)")
|
||||||
|
private Integer powerFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测量间隔(1-10分钟)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "timeInterval",value = "测量间隔(1-10分钟)")
|
||||||
|
private Integer timeInterval;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点拥有者
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "owner",value = "监测点拥有者")
|
||||||
|
private String owner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拥有者职务
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "ownerDuty",value = "拥有者职务")
|
||||||
|
private String ownerDuty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拥有者联系方式
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "ownerTel",value = "拥有者联系方式")
|
||||||
|
private String ownerTel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接线图
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(name = "wiringDiagram",value = "接线图")
|
||||||
|
private String wiringDiagram;
|
||||||
|
@ApiModelProperty(name = "ptPhaseType",value = "监测点接线相别(0,单相,1,三相,默认三相)")
|
||||||
|
private Integer ptPhaseType;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "投运日期")
|
||||||
|
private LocalDate loginTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "最新数据时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "监测对象信息ID")
|
||||||
|
private String objId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "对象类型大类")
|
||||||
|
private String bigObjType;
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ import com.njcn.csdevice.mapper.PqsDeviceUnitMapper;
|
|||||||
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import com.njcn.csdevice.service.CsCommTerminalService;
|
||||||
import com.njcn.csdevice.service.CsDeviceUserPOService;
|
import com.njcn.csdevice.service.CsDeviceUserPOService;
|
||||||
import com.njcn.csdevice.service.CsEquipmentDeliveryService;
|
import com.njcn.csdevice.service.CsEquipmentDeliveryService;
|
||||||
import com.njcn.csdevice.service.CsLinePOService;
|
import com.njcn.csdevice.service.CsLinePOService;
|
||||||
@@ -47,13 +48,8 @@ import java.util.stream.Collectors;
|
|||||||
@Api(tags = "通用台账查询")
|
@Api(tags = "通用台账查询")
|
||||||
public class CsCommTerminalController extends BaseController {
|
public class CsCommTerminalController extends BaseController {
|
||||||
|
|
||||||
private final PqsDeviceUnitMapper pqsDeviceUnitMapper;
|
|
||||||
|
|
||||||
private final CsDeviceUserPOService csDeviceUserPOService;
|
private final CsCommTerminalService commTerminalService;
|
||||||
|
|
||||||
private final CsLinePOService csLinePOService;
|
|
||||||
private final UserFeignClient userFeignClient;
|
|
||||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户获取设备信息
|
* 根据用户获取设备信息
|
||||||
@@ -64,7 +60,7 @@ public class CsCommTerminalController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||||
public HttpResult<List<String>> getDevIdsByUser(@RequestParam("userId") String userId) {
|
public HttpResult<List<String>> getDevIdsByUser(@RequestParam("userId") String userId) {
|
||||||
String methodDescribe = getMethodDescribe("getDevIdsByUser");
|
String methodDescribe = getMethodDescribe("getDevIdsByUser");
|
||||||
List<String> devIds = commGetDevIds(userId);
|
List<String> devIds = commTerminalService.commGetDevIds(userId);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, devIds, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, devIds, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,19 +73,8 @@ public class CsCommTerminalController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||||
public HttpResult<List<String>> getLineIdsByUser(@RequestParam("userId") String userId) {
|
public HttpResult<List<String>> getLineIdsByUser(@RequestParam("userId") String userId) {
|
||||||
String methodDescribe = getMethodDescribe("getLineIdsByUser");
|
String methodDescribe = getMethodDescribe("getLineIdsByUser");
|
||||||
List<String> devIds = commGetDevIds(userId);
|
List<String> lineIds = commTerminalService.getLineIdsByUser(userId);
|
||||||
if(CollUtil.isNotEmpty(devIds)){
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineIds, methodDescribe);
|
||||||
List<CsLinePO> poList = csLinePOService.lambdaQuery().select(CsLinePO::getLineId).in(CsLinePO::getDeviceId,devIds)
|
|
||||||
.eq(CsLinePO::getStatus,DataStateEnum.ENABLE.getCode()).list();
|
|
||||||
if(CollUtil.isEmpty(poList)){
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
|
||||||
}else {
|
|
||||||
List<String> result = poList.stream().map(CsLinePO::getLineId).distinct().collect(Collectors.toList());
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -101,37 +86,12 @@ public class CsCommTerminalController extends BaseController {
|
|||||||
@ApiOperation("根据登录用户id获取电能质量用户id集合")
|
@ApiOperation("根据登录用户id获取电能质量用户id集合")
|
||||||
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
@ApiImplicitParam(name = "userId", value = "用户id", required = true)
|
||||||
public HttpResult<List<String>> getPqUserIdsByUser(@RequestParam("userId") String userId) {
|
public HttpResult<List<String>> getPqUserIdsByUser(@RequestParam("userId") String userId) {
|
||||||
String methodDescribe = getMethodDescribe("getPqUserIdsByUser");
|
String methodDescribe = getMethodDescribe("getLineIdsByUser");
|
||||||
|
List<String> lineIds = commTerminalService.getPqUserIdsByUser(userId);
|
||||||
List<String> devIds = commGetDevIds(userId);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineIds, methodDescribe);
|
||||||
if(CollUtil.isNotEmpty(devIds)){
|
|
||||||
List<CsLinePO> poList = csLinePOService.lambdaQuery().select(CsLinePO::getLineId,CsLinePO::getMonitorUser).in(CsLinePO::getDeviceId,devIds)
|
|
||||||
.eq(CsLinePO::getStatus,DataStateEnum.ENABLE.getCode()).list();
|
|
||||||
if(CollUtil.isEmpty(poList)){
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
|
||||||
}else {
|
|
||||||
List<String> result = poList.stream().map(CsLinePO::getMonitorUser).distinct().collect(Collectors.toList());
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
|
||||||
}
|
|
||||||
}else {
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, Collections.emptyList(), methodDescribe);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private List<String> commGetDevIds(String userId){
|
|
||||||
UserVO userVO = userFeignClient.getUserById(userId).getData();
|
|
||||||
List<String> devIds;
|
|
||||||
if(userVO.getType().equals(UserType.SUPER_ADMINISTRATOR ) || userVO.getType().equals(UserType.ADMINISTRATOR )){
|
|
||||||
devIds = csEquipmentDeliveryService.getAll().stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
|
||||||
}else {
|
|
||||||
List<CsDeviceUserPO> devList = csDeviceUserPOService.lambdaQuery().select(CsDeviceUserPO::getDeviceId)
|
|
||||||
.and(w->w.eq(CsDeviceUserPO::getPrimaryUserId,userId).or().eq(CsDeviceUserPO::getSubUserId,userId))
|
|
||||||
.eq(CsDeviceUserPO::getStatus, DataStateEnum.ENABLE.getCode()).list();
|
|
||||||
devIds = devList.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
return devIds;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过监测点获取监测点数据单位
|
* 通过监测点获取监测点数据单位
|
||||||
@@ -144,11 +104,7 @@ public class CsCommTerminalController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "lineId", value = "实体", required = true)
|
@ApiImplicitParam(name = "lineId", value = "实体", required = true)
|
||||||
public HttpResult<PqsDeviceUnit> lineUnitDetail(@RequestParam("lineId") String lineId) {
|
public HttpResult<PqsDeviceUnit> lineUnitDetail(@RequestParam("lineId") String lineId) {
|
||||||
String methodDescribe = getMethodDescribe("lineUnitDetail");
|
String methodDescribe = getMethodDescribe("lineUnitDetail");
|
||||||
|
PqsDeviceUnit pqsDeviceUnit = commTerminalService.lineUnitDetail(lineId);
|
||||||
PqsDeviceUnit pqsDeviceUnit = pqsDeviceUnitMapper.selectById(lineId);
|
|
||||||
if(Objects.isNull(pqsDeviceUnit)){
|
|
||||||
pqsDeviceUnit = new PqsDeviceUnit();
|
|
||||||
}
|
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pqsDeviceUnit, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, pqsDeviceUnit, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,16 @@ public class CsLedgerController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/objTree")
|
||||||
|
@ApiOperation("三层对象用户树")
|
||||||
|
public HttpResult<List<CsLedgerVO>> objTree(){
|
||||||
|
String methodDescribe = getMethodDescribe("getProjectTree");
|
||||||
|
List<CsLedgerVO> list = csLedgerService.objTree();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增台账信息")
|
@ApiOperation("新增台账信息")
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.njcn.common.utils.HttpResultUtil;
|
|||||||
import com.njcn.csdevice.mapper.OverlimitMapper;
|
import com.njcn.csdevice.mapper.OverlimitMapper;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.csdevice.pojo.po.Overlimit;
|
import com.njcn.csdevice.pojo.po.Overlimit;
|
||||||
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
||||||
import com.njcn.csdevice.service.CsLinePOService;
|
import com.njcn.csdevice.service.CsLinePOService;
|
||||||
@@ -27,6 +28,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description:
|
* Description:
|
||||||
@@ -103,6 +105,17 @@ public class CslineController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineList, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, lineList, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@GetMapping("/getCustomDetailByLineId")
|
||||||
|
@ApiOperation("根据id查询监测点")
|
||||||
|
public HttpResult<Map<String,String>> getCustomDetailByLineId(@RequestParam String id){
|
||||||
|
String methodDescribe = getMethodDescribe("getCustomDetailByLineId");
|
||||||
|
Map<String,String> map = csLinePOService.getCustomDetailByLineId(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, map, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/updateLine")
|
@PostMapping("/updateLine")
|
||||||
@ApiOperation("修改监测点信息")
|
@ApiOperation("修改监测点信息")
|
||||||
@@ -302,4 +315,14 @@ public class CslineController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, url, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, url, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getLineDetailData")
|
||||||
|
@ApiOperation("根据监测点id获取监测点详情")
|
||||||
|
@ApiImplicitParam(name = "id", value = "监测点id", required = true)
|
||||||
|
public HttpResult<LineDetailDataVO> getLineDetailData(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("getLineDetailData");
|
||||||
|
LineDetailDataVO result = csLinePOService.getLineDetailData(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.njcn.csdevice.pojo.po.CsLinePO;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -17,4 +18,7 @@ import java.util.List;
|
|||||||
public interface CsLinePOMapper extends BaseMapper<CsLinePO> {
|
public interface CsLinePOMapper extends BaseMapper<CsLinePO> {
|
||||||
|
|
||||||
List<CsLinePO> findByNdid(@Param("id") String id);
|
List<CsLinePO> findByNdid(@Param("id") String id);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String,String> getCustomDetailByLineId(@Param("lineId")String lineId);
|
||||||
}
|
}
|
||||||
@@ -33,4 +33,22 @@
|
|||||||
where
|
where
|
||||||
t0.ndid = #{id}
|
t0.ndid = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getCustomDetailByLineId" resultType="map">
|
||||||
|
SELECT
|
||||||
|
line.line_id as lineId,
|
||||||
|
line.name as lineName,
|
||||||
|
concat(round(line.pt_ratio,0),concat(':',round(line.pt2_ratio,0))) as pt,
|
||||||
|
concat(round(line.ct_ratio,0),concat(':',round(line.ct2_ratio,0))) as ct,
|
||||||
|
line.dev_capacity as Dev_Capacity,
|
||||||
|
line.short_circuit_capacity as Short_Capacity,
|
||||||
|
line.basic_capacity as Standard_Capacity,
|
||||||
|
line.protocol_capacity as Deal_Capacity,
|
||||||
|
line.vol_grade AS voltageLevel
|
||||||
|
FROM
|
||||||
|
cs_line line
|
||||||
|
WHERE
|
||||||
|
line.line_id = #{lineId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.csdevice.service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface CsCommTerminalService {
|
||||||
|
|
||||||
|
|
||||||
|
List<String> getLineIdsByUser(String userId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<String> getPqUserIdsByUser(String userId);
|
||||||
|
|
||||||
|
|
||||||
|
PqsDeviceUnit lineUnitDetail(String lineId);
|
||||||
|
|
||||||
|
|
||||||
|
List<String> commGetDevIds(String userId);
|
||||||
|
}
|
||||||
@@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -38,6 +40,9 @@ public interface CsLinePOService extends IService<CsLinePO>{
|
|||||||
*/
|
*/
|
||||||
List<CsLinePO> findByNdid(String id);
|
List<CsLinePO> findByNdid(String id);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String,String> getCustomDetailByLineId(String lineId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新监测点信息
|
* 更新监测点信息
|
||||||
* @param csLineParam
|
* @param csLineParam
|
||||||
@@ -83,4 +88,11 @@ public interface CsLinePOService extends IService<CsLinePO>{
|
|||||||
Page<PqSensitiveUserLineVO> getSensitiveUserLineList(BaseParam param);
|
Page<PqSensitiveUserLineVO> getSensitiveUserLineList(BaseParam param);
|
||||||
boolean uploadReport(MultipartFile file, String lineId);
|
boolean uploadReport(MultipartFile file, String lineId);
|
||||||
String getReportUrl(String lineId);
|
String getReportUrl(String lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取监测点详情
|
||||||
|
* @param id 监测点id
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
LineDetailDataVO getLineDetailData(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,6 +77,9 @@ public interface ICsLedgerService extends IService<CsLedger> {
|
|||||||
|
|
||||||
List<CsLedgerVO> getztProjectTree();
|
List<CsLedgerVO> getztProjectTree();
|
||||||
|
|
||||||
|
|
||||||
|
List<CsLedgerVO> objTree();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据设备集合获取项目和工程
|
* 根据设备集合获取项目和工程
|
||||||
* @param id
|
* @param id
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package com.njcn.csdevice.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.csdevice.mapper.CsLinePOMapper;
|
||||||
|
import com.njcn.csdevice.mapper.PqsDeviceUnitMapper;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsDeviceUserPO;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||||
|
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||||
|
import com.njcn.csdevice.service.CsCommTerminalService;
|
||||||
|
import com.njcn.csdevice.service.CsDeviceUserPOService;
|
||||||
|
import com.njcn.csdevice.service.CsEquipmentDeliveryService;
|
||||||
|
import com.njcn.device.biz.pojo.po.PqsDeviceUnit;
|
||||||
|
import com.njcn.user.api.UserFeignClient;
|
||||||
|
import com.njcn.user.pojo.constant.UserType;
|
||||||
|
import com.njcn.user.pojo.vo.UserVO;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: cdf
|
||||||
|
* @CreateTime: 2025-12-23
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class CsCommTerminalServiceImpl implements CsCommTerminalService {
|
||||||
|
|
||||||
|
private final PqsDeviceUnitMapper pqsDeviceUnitMapper;
|
||||||
|
private final CsDeviceUserPOService csDeviceUserPOService;
|
||||||
|
private final CsLinePOMapper csLinePOMapper;
|
||||||
|
private final UserFeignClient userFeignClient;
|
||||||
|
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getLineIdsByUser(String userId) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
List<String> devIds = commGetDevIds(userId);
|
||||||
|
if (CollUtil.isEmpty(devIds)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
LambdaQueryWrapper<CsLinePO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.select(CsLinePO::getLineId).in(CsLinePO::getDeviceId, devIds)
|
||||||
|
.eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode());
|
||||||
|
List<CsLinePO> poList = csLinePOMapper.selectList(lambdaQueryWrapper);
|
||||||
|
if (CollUtil.isNotEmpty(poList)) {
|
||||||
|
result = poList.stream().map(CsLinePO::getLineId).distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> getPqUserIdsByUser(String userId) {
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
List<String> devIds = commGetDevIds(userId);
|
||||||
|
if (CollUtil.isEmpty(devIds)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<CsLinePO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.select(CsLinePO::getLineId, CsLinePO::getMonitorUser).in(CsLinePO::getDeviceId, devIds)
|
||||||
|
.eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode());
|
||||||
|
List<CsLinePO> poList =csLinePOMapper.selectList(lambdaQueryWrapper);
|
||||||
|
if (CollUtil.isNotEmpty(poList)) {
|
||||||
|
result = poList.stream().map(CsLinePO::getMonitorUser).distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PqsDeviceUnit lineUnitDetail(String lineId) {
|
||||||
|
PqsDeviceUnit pqsDeviceUnit = pqsDeviceUnitMapper.selectById(lineId);
|
||||||
|
if(Objects.isNull(pqsDeviceUnit)){
|
||||||
|
pqsDeviceUnit = new PqsDeviceUnit();
|
||||||
|
}
|
||||||
|
return pqsDeviceUnit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> commGetDevIds(String userId) {
|
||||||
|
UserVO userVO = userFeignClient.getUserById(userId).getData();
|
||||||
|
List<String> devIds;
|
||||||
|
if (userVO.getType().equals(UserType.SUPER_ADMINISTRATOR) || userVO.getType().equals(UserType.ADMINISTRATOR)) {
|
||||||
|
devIds = csEquipmentDeliveryService.getAll().stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
List<CsDeviceUserPO> devList = csDeviceUserPOService.lambdaQuery().select(CsDeviceUserPO::getDeviceId)
|
||||||
|
.and(w -> w.eq(CsDeviceUserPO::getPrimaryUserId, userId).or().eq(CsDeviceUserPO::getSubUserId, userId))
|
||||||
|
.eq(CsDeviceUserPO::getStatus, DataStateEnum.ENABLE.getCode()).list();
|
||||||
|
devIds = devList.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return devIds;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -50,12 +50,12 @@ public class CsDevCapacityPOServiceImpl extends ServiceImpl<CsDevCapacityPOMappe
|
|||||||
public Double getDevCapacity(String id) {
|
public Double getDevCapacity(String id) {
|
||||||
List<CsLinePO> csLinePOS = csLinePOService.queryByDevId(id);
|
List<CsLinePO> csLinePOS = csLinePOService.queryByDevId(id);
|
||||||
|
|
||||||
String areaId = dicDataFeignClient.getDicDataByCode(DicDataEnum.OUTPUT_SIDE.getCode()).getData().getId();
|
//String areaId = dicDataFeignClient.getDicDataByCode(DicDataEnum.OUTPUT_SIDE.getCode()).getData().getId();
|
||||||
|
|
||||||
Optional.ofNullable(csLinePOS).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR));
|
//Optional.ofNullable(csLinePOS).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.LINE_DATA_ERROR));
|
||||||
List<CsLinePO> collect1 = csLinePOS.stream().filter(temp -> Objects.equals(areaId, temp.getPosition())).collect(Collectors.toList());
|
//List<CsLinePO> collect1 = csLinePOS.stream().filter(temp -> Objects.equals(areaId, temp.getPosition())).collect(Collectors.toList());
|
||||||
/*治理侧监测点*/
|
/*治理侧监测点*/
|
||||||
CsLinePO csLinePO = collect1.get(0);
|
CsLinePO csLinePO = csLinePOS.get(0);
|
||||||
CsDevCapacityPO one = this.lambdaQuery().eq(CsDevCapacityPO::getLineId, csLinePO.getLineId()).eq(CsDevCapacityPO::getCldid, 0).one();
|
CsDevCapacityPO one = this.lambdaQuery().eq(CsDevCapacityPO::getLineId, csLinePO.getLineId()).eq(CsDevCapacityPO::getCldid, 0).one();
|
||||||
// Optional.ofNullable(one).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DATA_MISSING));
|
// Optional.ofNullable(one).orElseThrow(()-> new BusinessException(AlgorithmResponseEnum.DATA_MISSING));
|
||||||
if(Objects.isNull(one)){
|
if(Objects.isNull(one)){
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
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 cn.hutool.json.JSONConfig;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@@ -941,13 +942,16 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
|
|||||||
CsLinePO finalCsLinePO = csLineFeignClient.getById(fittingDataQueryParam.getLineId()).getData();
|
CsLinePO finalCsLinePO = csLineFeignClient.getById(fittingDataQueryParam.getLineId()).getData();
|
||||||
CsDataSet csDataSet = csDataSetMapper.selectOne(new LambdaQueryWrapper<CsDataSet>().eq(CsDataSet::getId,finalCsLinePO.getDataSetId()));
|
CsDataSet csDataSet = csDataSetMapper.selectOne(new LambdaQueryWrapper<CsDataSet>().eq(CsDataSet::getId,finalCsLinePO.getDataSetId()));
|
||||||
if(Objects.isNull(csDataSet) || StrUtil.isBlank(csDataSet.getDataLevel())){
|
if(Objects.isNull(csDataSet) || StrUtil.isBlank(csDataSet.getDataLevel())){
|
||||||
throw new BusinessException("当前测点数据集主要信息缺失,请联系管理员排查(测点表里面数据集id缺失)");
|
throw new BusinessException("当前测点数据集主要信息缺失,请联系管理员排查(测点表里面数据集id缺失)");
|
||||||
}
|
}
|
||||||
Double ct = finalCsLinePO.getCtRatio();
|
Double ct = finalCsLinePO.getCtRatio();
|
||||||
Double pt = finalCsLinePO.getPtRatio();
|
Double pt = finalCsLinePO.getPtRatio();
|
||||||
// String position = finalCsLinePO.getPosition();
|
// String position = finalCsLinePO.getPosition();
|
||||||
Overlimit overlimit = overlimitMapper.selectById(finalCsLinePO.getLineId());
|
Overlimit overlimit = overlimitMapper.selectById(finalCsLinePO.getLineId());
|
||||||
JSONObject entries = JSONUtil.parseObj(overlimit);
|
if (Objects.isNull(overlimit)) {
|
||||||
|
throw new BusinessException("当前测点限值信息缺失,请联系管理员排查");
|
||||||
|
}
|
||||||
|
JSONObject entries = JSONUtil.parseObj(overlimit, new JSONConfig().setIgnoreNullValue(false));
|
||||||
if(CollectionUtil.isNotEmpty(fittingDataQueryParam.getList())) {
|
if(CollectionUtil.isNotEmpty(fittingDataQueryParam.getList())) {
|
||||||
for (FittingDataQueryParam param : fittingDataQueryParam.getList()) {
|
for (FittingDataQueryParam param : fittingDataQueryParam.getList()) {
|
||||||
String dictCode = dictTreeFeignClient.queryById(param.getStatisticalId()).getData().getCode();
|
String dictCode = dictTreeFeignClient.queryById(param.getStatisticalId()).getData().getCode();
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.csdevice.constant.DataParam;
|
import com.njcn.csdevice.constant.DataParam;
|
||||||
import com.njcn.csdevice.controller.project.EngineeringController;
|
|
||||||
import com.njcn.csdevice.enums.LineBaseEnum;
|
import com.njcn.csdevice.enums.LineBaseEnum;
|
||||||
import com.njcn.csdevice.mapper.*;
|
import com.njcn.csdevice.mapper.*;
|
||||||
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
import com.njcn.csdevice.pojo.dto.DevDetailDTO;
|
||||||
@@ -18,13 +19,18 @@ import com.njcn.csdevice.pojo.param.CsLedgerParam;
|
|||||||
import com.njcn.csdevice.pojo.po.*;
|
import com.njcn.csdevice.pojo.po.*;
|
||||||
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
|
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
|
||||||
import com.njcn.csdevice.service.*;
|
import com.njcn.csdevice.service.*;
|
||||||
|
import com.njcn.csharmonic.api.PqSensitiveUserFeignClient;
|
||||||
|
import com.njcn.csharmonic.pojo.po.PqSensitiveUser;
|
||||||
import com.njcn.redis.utils.RedisUtil;
|
import com.njcn.redis.utils.RedisUtil;
|
||||||
import com.njcn.system.api.AreaFeignClient;
|
import com.njcn.system.api.AreaFeignClient;
|
||||||
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.pojo.po.Area;
|
import com.njcn.system.pojo.po.Area;
|
||||||
import com.njcn.system.pojo.vo.DictTreeVO;
|
import com.njcn.system.pojo.vo.DictTreeVO;
|
||||||
|
import com.njcn.user.api.UserFeignClient;
|
||||||
import com.njcn.user.enums.AppRoleEnum;
|
import com.njcn.user.enums.AppRoleEnum;
|
||||||
|
import com.njcn.user.pojo.constant.UserType;
|
||||||
|
import com.njcn.user.pojo.vo.UserVO;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@@ -57,8 +63,10 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
private final CsEquipmentDeliveryMapper csEquipmentDeliveryMapper;
|
private final CsEquipmentDeliveryMapper csEquipmentDeliveryMapper;
|
||||||
private final ICsDataSetService csDataSetService;
|
private final ICsDataSetService csDataSetService;
|
||||||
private final DictTreeFeignClient dictTreeFeignClient;
|
private final DictTreeFeignClient dictTreeFeignClient;
|
||||||
private final EngineeringController engineeringController;
|
|
||||||
private final CsDeviceUserPOMapper csDeviceUserPOMapper;
|
private final CsDeviceUserPOMapper csDeviceUserPOMapper;
|
||||||
|
private final PqSensitiveUserFeignClient pqSensitiveUserFeignClient;
|
||||||
|
private final UserFeignClient userFeignClient;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CsLedgerVO> getLedgerTree() {
|
public List<CsLedgerVO> getLedgerTree() {
|
||||||
@@ -104,7 +112,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
.forEach(zhiLianDevice::add)
|
.forEach(zhiLianDevice::add)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
engineeringList = allList.stream().filter(item->roleengineer.contains(item.getId())).collect(Collectors.toList());
|
engineeringList = allList.stream().filter(item -> roleengineer.contains(item.getId())).collect(Collectors.toList());
|
||||||
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
||||||
|
|
||||||
Map<String, CsEquipmentDeliveryPO> poMap = allList.stream()
|
Map<String, CsEquipmentDeliveryPO> poMap = allList.stream()
|
||||||
@@ -148,14 +156,14 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
.peek(
|
.peek(
|
||||||
item -> {
|
item -> {
|
||||||
item.setType("line");
|
item.setType("line");
|
||||||
String index = item.getId().substring(item.getId().length()-1);
|
String index = item.getId().substring(item.getId().length() - 1);
|
||||||
if (Objects.equals(index,"0")) {
|
if (Objects.equals(index, "0")) {
|
||||||
item.setLineType(0);
|
item.setLineType(0);
|
||||||
} else {
|
} else {
|
||||||
item.setLineType(1);
|
item.setLineType(1);
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<CsLinePO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CsLinePO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(CsLinePO::getLineId,item.getId()).eq(CsLinePO::getStatus,1);
|
queryWrapper.eq(CsLinePO::getLineId, item.getId()).eq(CsLinePO::getStatus, 1);
|
||||||
CsLinePO po = csLinePOService.getOne(queryWrapper);
|
CsLinePO po = csLinePOService.getOne(queryWrapper);
|
||||||
item.setConType(po.getConType());
|
item.setConType(po.getConType());
|
||||||
}
|
}
|
||||||
@@ -201,16 +209,16 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
List<CsLedgerVO> ledger;
|
List<CsLedgerVO> ledger;
|
||||||
String role = RequestUtil.getUserRole();
|
String role = RequestUtil.getUserRole();
|
||||||
List<String> roles = JSONArray.parseArray(role, String.class);
|
List<String> roles = JSONArray.parseArray(role, String.class);
|
||||||
if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode())){
|
if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode()) || roles.contains(AppRoleEnum.REGULAR_USER.getCode())){
|
||||||
ledger = allList.stream()
|
ledger = allList.stream()
|
||||||
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
|
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId,RequestUtil.getUserIndex());
|
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId, RequestUtil.getUserIndex());
|
||||||
List<CsDeviceUserPO> list1 = csDeviceUserPOMapper.selectList(queryWrapper);
|
List<CsDeviceUserPO> list1 = csDeviceUserPOMapper.selectList(queryWrapper);
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
if (CollectionUtil.isNotEmpty(list1)){
|
if (CollectionUtil.isNotEmpty(list1)) {
|
||||||
result = list1.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
|
result = list1.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
//针对未启用的装置判断
|
//针对未启用的装置判断
|
||||||
@@ -269,6 +277,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
}
|
}
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
//剔除未接入的设备(根据status判断不太稳,所有这里直接判断该设备有没有对应的模板指标)
|
//剔除未接入的设备(根据status判断不太稳,所有这里直接判断该设备有没有对应的模板指标)
|
||||||
private void checkDevSetData(List<CsLedgerVO> ledgerVOS) {
|
private void checkDevSetData(List<CsLedgerVO> ledgerVOS) {
|
||||||
Iterator<CsLedgerVO> iterator = ledgerVOS.iterator();
|
Iterator<CsLedgerVO> iterator = ledgerVOS.iterator();
|
||||||
@@ -328,7 +337,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
engineeringList = allList.stream().filter(item->roleengineer.contains(item.getId())).collect(Collectors.toList());
|
engineeringList = allList.stream().filter(item -> roleengineer.contains(item.getId())).collect(Collectors.toList());
|
||||||
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
||||||
|
|
||||||
Map<String, CsEquipmentDeliveryPO> poMap = allList.stream()
|
Map<String, CsEquipmentDeliveryPO> poMap = allList.stream()
|
||||||
@@ -404,16 +413,16 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
List<CsLedgerVO> ledger;
|
List<CsLedgerVO> ledger;
|
||||||
String role = RequestUtil.getUserRole();
|
String role = RequestUtil.getUserRole();
|
||||||
List<String> roles = JSONArray.parseArray(role, String.class);
|
List<String> roles = JSONArray.parseArray(role, String.class);
|
||||||
if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode())){
|
if(roles.contains(AppRoleEnum.ROOT.getCode()) || roles.contains(AppRoleEnum.OPERATION_MANAGER.getCode()) || roles.contains(AppRoleEnum.REGULAR_USER.getCode())){
|
||||||
ledger = allList.stream()
|
ledger = allList.stream()
|
||||||
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
|
.filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0"))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
} else {
|
} else {
|
||||||
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CsDeviceUserPO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId,RequestUtil.getUserIndex());
|
queryWrapper.eq(CsDeviceUserPO::getPrimaryUserId, RequestUtil.getUserIndex());
|
||||||
List<CsDeviceUserPO> list1 = csDeviceUserPOMapper.selectList(queryWrapper);
|
List<CsDeviceUserPO> list1 = csDeviceUserPOMapper.selectList(queryWrapper);
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
if (CollectionUtil.isNotEmpty(list1)){
|
if (CollectionUtil.isNotEmpty(list1)) {
|
||||||
result = list1.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
|
result = list1.stream().map(CsDeviceUserPO::getDeviceId).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
//针对未启用的装置判断
|
//针对未启用的装置判断
|
||||||
@@ -475,11 +484,11 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsLedger addLedgerTree(CsLedgerParam csLedgerParam) {
|
public CsLedger addLedgerTree(CsLedgerParam csLedgerParam) {
|
||||||
CsLedger fatherCsLedger = this.lambdaQuery().eq(CsLedger::getId,csLedgerParam.getPid()).one();
|
CsLedger fatherCsLedger = this.lambdaQuery().eq(CsLedger::getId, csLedgerParam.getPid()).one();
|
||||||
CsLedger csLedger = new CsLedger();
|
CsLedger csLedger = new CsLedger();
|
||||||
BeanUtils.copyProperties(csLedgerParam,csLedger);
|
BeanUtils.copyProperties(csLedgerParam, csLedger);
|
||||||
csLedger.setState(1);
|
csLedger.setState(1);
|
||||||
if (Objects.equals(csLedgerParam.getPid(),"9999999")){
|
if (Objects.equals(csLedgerParam.getPid(), "9999999")) {
|
||||||
csLedger.setPid("0");
|
csLedger.setPid("0");
|
||||||
csLedger.setPids("0");
|
csLedger.setPids("0");
|
||||||
} else {
|
} else {
|
||||||
@@ -491,7 +500,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteLedgerTree(String id) {
|
public void deleteLedgerTree(String id) {
|
||||||
CsLedger csLedger = this.lambdaQuery().eq(CsLedger::getId,id).one();
|
CsLedger csLedger = this.lambdaQuery().eq(CsLedger::getId, id).one();
|
||||||
csLedger.setState(0);
|
csLedger.setState(0);
|
||||||
this.updateById(csLedger);
|
this.updateById(csLedger);
|
||||||
}
|
}
|
||||||
@@ -506,8 +515,8 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
@Override
|
@Override
|
||||||
public String findDevByLineId(String lineId) {
|
public String findDevByLineId(String lineId) {
|
||||||
String deviceId = null;
|
String deviceId = null;
|
||||||
CsLedger csLedger = this.lambdaQuery().eq(CsLedger::getId,lineId).eq(CsLedger::getState,1).one();
|
CsLedger csLedger = this.lambdaQuery().eq(CsLedger::getId, lineId).eq(CsLedger::getState, 1).one();
|
||||||
if (!Objects.isNull(csLedger)){
|
if (!Objects.isNull(csLedger)) {
|
||||||
deviceId = csLedger.getPid();
|
deviceId = csLedger.getPid();
|
||||||
}
|
}
|
||||||
return deviceId;
|
return deviceId;
|
||||||
@@ -515,7 +524,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CsLedger findDataById(String id) {
|
public CsLedger findDataById(String id) {
|
||||||
return this.lambdaQuery().eq(CsLedger::getId,id).eq(CsLedger::getState,1).one();
|
return this.lambdaQuery().eq(CsLedger::getId, id).eq(CsLedger::getState, 1).one();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -523,12 +532,12 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
List<CsLedgerVO> engineeringList = new ArrayList<>();
|
List<CsLedgerVO> engineeringList = new ArrayList<>();
|
||||||
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
||||||
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
||||||
engineeringList = allList.stream().filter(item->roleengineer.contains(item.getId())).collect(Collectors.toList());
|
engineeringList = allList.stream().filter(item -> roleengineer.contains(item.getId())).collect(Collectors.toList());
|
||||||
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
||||||
QueryWrapper<AppTopologyDiagramPO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<AppTopologyDiagramPO> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("status","1");
|
queryWrapper.eq("status", "1");
|
||||||
List<AppTopologyDiagramPO> appTopologyDiagramPOS = appTopologyDiagramMapper.selectList(queryWrapper);
|
List<AppTopologyDiagramPO> appTopologyDiagramPOS = appTopologyDiagramMapper.selectList(queryWrapper);
|
||||||
projectList.forEach(temp->{
|
projectList.forEach(temp -> {
|
||||||
AppProjectPO appProjectPO = appProjectMapper.selectById(temp.getId());
|
AppProjectPO appProjectPO = appProjectMapper.selectById(temp.getId());
|
||||||
temp.setArea(appProjectPO.getArea());
|
temp.setArea(appProjectPO.getArea());
|
||||||
temp.setRemark(appProjectPO.getDescription());
|
temp.setRemark(appProjectPO.getDescription());
|
||||||
@@ -544,13 +553,13 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
temp.setChildren(collect);
|
temp.setChildren(collect);
|
||||||
});
|
});
|
||||||
engineeringList.forEach(eng -> {
|
engineeringList.forEach(eng -> {
|
||||||
CsEngineeringPO csEngineeringPO = csEngineeringMapper.selectById(eng.getId());
|
CsEngineeringPO csEngineeringPO = csEngineeringMapper.selectById(eng.getId());
|
||||||
eng.setArea(this.getAreaById(csEngineeringPO.getProvince())+this.getAreaById(csEngineeringPO.getCity()));
|
eng.setArea(this.getAreaById(csEngineeringPO.getProvince()) + this.getAreaById(csEngineeringPO.getCity()));
|
||||||
eng.setProvinceId(csEngineeringPO.getProvince());
|
eng.setProvinceId(csEngineeringPO.getProvince());
|
||||||
eng.setCityId(csEngineeringPO.getCity());
|
eng.setCityId(csEngineeringPO.getCity());
|
||||||
eng.setRemark(csEngineeringPO.getDescription());
|
eng.setRemark(csEngineeringPO.getDescription());
|
||||||
eng.setChildren(getChildren(eng, projectList));
|
eng.setChildren(getChildren(eng, projectList));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return engineeringList;
|
return engineeringList;
|
||||||
@@ -566,14 +575,14 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
DevDetailDTO device = new DevDetailDTO();
|
DevDetailDTO device = new DevDetailDTO();
|
||||||
CsLedger dev = this.findDataById(devId);
|
CsLedger dev = this.findDataById(devId);
|
||||||
//如果是便携式设备,pid为0,项目,工程都设置为/
|
//如果是便携式设备,pid为0,项目,工程都设置为/
|
||||||
if(Objects.equals(dev.getPid(),"0")){
|
if (Objects.equals(dev.getPid(), "0")) {
|
||||||
device.setEquipmentName(dev.getName());
|
device.setEquipmentName(dev.getName());
|
||||||
device.setEquipmentId(devId);
|
device.setEquipmentId(devId);
|
||||||
device.setProjectId("/");
|
device.setProjectId("/");
|
||||||
device.setProjectName("/");
|
device.setProjectName("/");
|
||||||
device.setEngineeringid("/");
|
device.setEngineeringid("/");
|
||||||
device.setEngineeringName("/");
|
device.setEngineeringName("/");
|
||||||
}else {
|
} else {
|
||||||
device.setEquipmentName(dev.getName());
|
device.setEquipmentName(dev.getName());
|
||||||
device.setEquipmentId(devId);
|
device.setEquipmentId(devId);
|
||||||
CsLedger project = this.findDataById(dev.getPid());
|
CsLedger project = this.findDataById(dev.getPid());
|
||||||
@@ -595,12 +604,12 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
/*获取用户工程,设备信息过滤*/
|
/*获取用户工程,设备信息过滤*/
|
||||||
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
List<String> roleengineer = roleEngineerDevService.getRoleengineer();
|
||||||
List<String> device = roleEngineerDevService.getDevice();
|
List<String> device = roleEngineerDevService.getDevice();
|
||||||
engineeringList = allList.stream().filter(item->roleengineer.contains(item.getId())).collect(Collectors.toList());
|
engineeringList = allList.stream().filter(item -> roleengineer.contains(item.getId())).collect(Collectors.toList());
|
||||||
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
List<CsLedgerVO> projectList = allList.stream().filter(item -> item.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())).sorted(Comparator.comparing(CsLedgerVO::getSort)).collect(Collectors.toList());
|
||||||
|
|
||||||
List<CsLedgerVO> deviceList = allList.stream().filter(item -> device.contains(item.getId()) && !Objects.equals(item.getPid(),"0")).
|
List<CsLedgerVO> deviceList = allList.stream().filter(item -> device.contains(item.getId()) && !Objects.equals(item.getPid(), "0")).
|
||||||
peek(
|
peek(
|
||||||
temp->{
|
temp -> {
|
||||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryMapper.selectById(temp.getId());
|
CsEquipmentDeliveryPO po = csEquipmentDeliveryMapper.selectById(temp.getId());
|
||||||
temp.setComFlag(po.getRunStatus());
|
temp.setComFlag(po.getRunStatus());
|
||||||
temp.setNDId(po.getNdid());
|
temp.setNDId(po.getNdid());
|
||||||
@@ -626,9 +635,9 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
project.setPid("0");
|
project.setPid("0");
|
||||||
project.setId(DataParam.WIRELESS_PROJECT_ID);
|
project.setId(DataParam.WIRELESS_PROJECT_ID);
|
||||||
|
|
||||||
List<CsLedgerVO> portables = allList.stream().filter(item->Objects.equals(item.getLevel(),2) && Objects.equals(item.getPid(),"0")).collect(Collectors.toList());
|
List<CsLedgerVO> portables = allList.stream().filter(item -> Objects.equals(item.getLevel(), 2) && Objects.equals(item.getPid(), "0")).collect(Collectors.toList());
|
||||||
checkDevSetData(portables);
|
checkDevSetData(portables);
|
||||||
for(CsLedgerVO c : portables){
|
for (CsLedgerVO c : portables) {
|
||||||
c.setPid(project.getId());
|
c.setPid(project.getId());
|
||||||
CsEquipmentDeliveryPO po = csEquipmentDeliveryMapper.selectById(c.getId());
|
CsEquipmentDeliveryPO po = csEquipmentDeliveryMapper.selectById(c.getId());
|
||||||
c.setComFlag(po.getRunStatus());
|
c.setComFlag(po.getRunStatus());
|
||||||
@@ -643,9 +652,6 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
portable.setChildren(wxProjectList);
|
portable.setChildren(wxProjectList);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CsLedgerVO government = new CsLedgerVO();
|
CsLedgerVO government = new CsLedgerVO();
|
||||||
government.setLevel(0);
|
government.setLevel(0);
|
||||||
government.setName(DataParam.GOVERNANCE_SYSTEM);
|
government.setName(DataParam.GOVERNANCE_SYSTEM);
|
||||||
@@ -659,29 +665,109 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(deviceList)) {
|
if (CollUtil.isNotEmpty(deviceList)) {
|
||||||
tree.add(government);
|
tree.add(government);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tree;
|
return tree;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<CsLedgerVO> objTree() {
|
||||||
|
List<CsLedgerVO> result = new ArrayList<>();
|
||||||
|
String userId = "fa37b93cc90d4c1784ca8f6debddee1a";
|
||||||
|
UserVO userVO = userFeignClient.getUserById(userId).getData();
|
||||||
|
List<String> devIds;
|
||||||
|
if (userVO.getType().equals(UserType.SUPER_ADMINISTRATOR) || userVO.getType().equals(UserType.ADMINISTRATOR)) {
|
||||||
|
devIds = csEquipmentDeliveryMapper.selectList(null).stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
||||||
|
} else {
|
||||||
|
LambdaQueryWrapper<CsDeviceUserPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.select(CsDeviceUserPO::getDeviceId)
|
||||||
|
.and(w -> w.eq(CsDeviceUserPO::getPrimaryUserId, userId).or().eq(CsDeviceUserPO::getSubUserId, userId))
|
||||||
|
.eq(CsDeviceUserPO::getStatus, DataStateEnum.ENABLE.getCode());
|
||||||
|
List<CsDeviceUserPO> devList = csDeviceUserPOMapper.selectList(lambdaQueryWrapper);
|
||||||
|
devIds = devList.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (CollUtil.isEmpty(devIds)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
List<CsLinePO> poList = csLinePOService.lambdaQuery().in(CsLinePO::getDeviceId, devIds)
|
||||||
|
.eq(CsLinePO::getStatus, DataStateEnum.ENABLE.getCode()).ne(CsLinePO::getMonitorUser,"").isNotNull(CsLinePO::getMonitorUser).list();
|
||||||
|
if (CollUtil.isEmpty(poList)) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
List<String> objIds = poList.stream().map(CsLinePO::getMonitorUser).distinct().collect(Collectors.toList());
|
||||||
|
List<String> lineIds = poList.stream().map(CsLinePO::getLineId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<PqSensitiveUser> pqSensitiveUserList = pqSensitiveUserFeignClient.getListByIds(objIds).getData();
|
||||||
|
Map<String,String> objMap = pqSensitiveUserList.stream().collect(Collectors.toMap(PqSensitiveUser::getId, PqSensitiveUser::getName));
|
||||||
|
|
||||||
|
List<CsLedger> csLineList = this.baseMapper.selectList(new LambdaQueryWrapper<CsLedger>().in(CsLedger::getId, lineIds));
|
||||||
|
Map<String,List<String>> lineMap = csLineList.stream().collect(Collectors.groupingBy(it->it.getPids().split(StrUtil.COMMA)[LineBaseEnum.PROJECT_LEVEL.getCode()+1],Collectors.mapping(CsLedger::getId,Collectors.toList())));
|
||||||
|
|
||||||
|
List<String> projectIds = csLineList.stream().map(it -> it.getPids().split(StrUtil.COMMA)[LineBaseEnum.PROJECT_LEVEL.getCode()+1]).distinct().collect(Collectors.toList());
|
||||||
|
List<CsLedger> projectList = this.baseMapper.selectList(new LambdaQueryWrapper<CsLedger>().in(CsLedger::getId, projectIds));
|
||||||
|
|
||||||
|
List<CsLedgerVO> realProjectList = new ArrayList<>();
|
||||||
|
projectList.forEach(pro->{
|
||||||
|
CsLedgerVO csLedgerVO = new CsLedgerVO();
|
||||||
|
csLedgerVO.setId(pro.getId());
|
||||||
|
csLedgerVO.setPid(pro.getPid());
|
||||||
|
csLedgerVO.setLevel(pro.getLevel());
|
||||||
|
csLedgerVO.setName(pro.getName());
|
||||||
|
|
||||||
|
List<CsLedgerVO> temObjList = new ArrayList<>();
|
||||||
|
if(lineMap.containsKey(pro.getId())){
|
||||||
|
List<String> ids = lineMap.get(pro.getId());
|
||||||
|
List<String> objTemIds = poList.stream().filter(it->ids.contains(it.getLineId())).map(CsLinePO::getMonitorUser).distinct().collect(Collectors.toList());
|
||||||
|
if(CollUtil.isNotEmpty(objTemIds)){
|
||||||
|
objTemIds.forEach(it->{
|
||||||
|
CsLedgerVO inner = new CsLedgerVO();
|
||||||
|
inner.setName(objMap.getOrDefault(it,"未知异常用户"));
|
||||||
|
inner.setId(it);
|
||||||
|
inner.setLevel(2);
|
||||||
|
temObjList.add(inner);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
csLedgerVO.setChildren(temObjList);
|
||||||
|
realProjectList.add(csLedgerVO);
|
||||||
|
});
|
||||||
|
|
||||||
|
List<String> gcIds = projectList.stream().map(CsLedger::getPid).collect(Collectors.toList());
|
||||||
|
List<CsLedger> gcList = this.baseMapper.selectList(new LambdaQueryWrapper<CsLedger>().in(CsLedger::getId, gcIds));
|
||||||
|
|
||||||
|
List<CsLedgerVO> realGcList = new ArrayList<>();
|
||||||
|
gcList.forEach(gc->{
|
||||||
|
CsLedgerVO csLedgerVO = new CsLedgerVO();
|
||||||
|
csLedgerVO.setId(gc.getId());
|
||||||
|
csLedgerVO.setPid(gc.getPid());
|
||||||
|
csLedgerVO.setLevel(gc.getLevel());
|
||||||
|
csLedgerVO.setName(gc.getName());
|
||||||
|
|
||||||
|
List<CsLedgerVO> proList = realProjectList.stream().filter(it->gc.getId().equals(it.getPid())).collect(Collectors.toList());
|
||||||
|
csLedgerVO.setChildren(proList);
|
||||||
|
realGcList.add(csLedgerVO);
|
||||||
|
});
|
||||||
|
return realGcList;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<CsLedgerVO> getProAndEngineer(List<String> id) {
|
public List<CsLedgerVO> getProAndEngineer(List<String> id) {
|
||||||
List<CsLedgerVO> result = new ArrayList<>();
|
List<CsLedgerVO> result = new ArrayList<>();
|
||||||
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
List<CsLedgerVO> allList = this.baseMapper.getAll();
|
||||||
Set<String> idSet = new HashSet<>(id);
|
Set<String> idSet = new HashSet<>(id);
|
||||||
if (CollectionUtil.isNotEmpty(id)) {
|
if (CollectionUtil.isNotEmpty(id)) {
|
||||||
id.forEach(item->{
|
id.forEach(item -> {
|
||||||
allList.forEach(item2->{
|
allList.forEach(item2 -> {
|
||||||
if (Objects.equals(item2.getId(),item)) {
|
if (Objects.equals(item2.getId(), item)) {
|
||||||
idSet.addAll(Arrays.asList(item2.getPids().split( ",")));
|
idSet.addAll(Arrays.asList(item2.getPids().split(",")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(idSet)) {
|
if (CollectionUtil.isNotEmpty(idSet)) {
|
||||||
idSet.forEach(item->{
|
idSet.forEach(item -> {
|
||||||
allList.forEach(item2->{
|
allList.forEach(item2 -> {
|
||||||
if (Objects.equals(item2.getId(),item)) {
|
if (Objects.equals(item2.getId(), item)) {
|
||||||
result.add(item2);
|
result.add(item2);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -718,7 +804,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
DictTreeVO vo1 = dictTreeFeignClient.queryByCode(DicDataEnum.DEV_CLD.getCode()).getData();
|
DictTreeVO vo1 = dictTreeFeignClient.queryByCode(DicDataEnum.DEV_CLD.getCode()).getData();
|
||||||
|
|
||||||
//list1是 cld设备
|
//list1是 cld设备
|
||||||
devs.forEach(item->{
|
devs.forEach(item -> {
|
||||||
if (item.getDevType().equals(vo1.getId())) {
|
if (item.getDevType().equals(vo1.getId())) {
|
||||||
list1.add(item.getId());
|
list1.add(item.getId());
|
||||||
}
|
}
|
||||||
@@ -759,19 +845,19 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
|
|
||||||
if (CollectionUtil.isNotEmpty(deviceTree)) {
|
if (CollectionUtil.isNotEmpty(deviceTree)) {
|
||||||
List<CsLedgerVO> finalLineTree = lineTree;
|
List<CsLedgerVO> finalLineTree = lineTree;
|
||||||
deviceTree.forEach(item->{
|
deviceTree.forEach(item -> {
|
||||||
item.setChildren(getChildren(item, finalLineTree));
|
item.setChildren(getChildren(item, finalLineTree));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(projectTree)) {
|
if (CollectionUtil.isNotEmpty(projectTree)) {
|
||||||
List<CsLedgerVO> finalDeviceTree = deviceTree;
|
List<CsLedgerVO> finalDeviceTree = deviceTree;
|
||||||
projectTree.forEach(item->{
|
projectTree.forEach(item -> {
|
||||||
item.setChildren(getChildren(item, finalDeviceTree));
|
item.setChildren(getChildren(item, finalDeviceTree));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (CollectionUtil.isNotEmpty(engineerTree)) {
|
if (CollectionUtil.isNotEmpty(engineerTree)) {
|
||||||
List<CsLedgerVO> finalProjectTree = projectTree;
|
List<CsLedgerVO> finalProjectTree = projectTree;
|
||||||
engineerTree.forEach(item->{
|
engineerTree.forEach(item -> {
|
||||||
item.setChildren(getChildren(item, finalProjectTree));
|
item.setChildren(getChildren(item, finalProjectTree));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -791,9 +877,9 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
List<DevDetailDTO> details = new ArrayList<>();
|
List<DevDetailDTO> details = new ArrayList<>();
|
||||||
List<CsLedger> ledgers = this.listByIds(list);
|
List<CsLedger> ledgers = this.listByIds(list);
|
||||||
Set<String> enginingeringIds = new HashSet<>();
|
Set<String> enginingeringIds = new HashSet<>();
|
||||||
ledgers.forEach(item->{
|
ledgers.forEach(item -> {
|
||||||
DevDetailDTO device = new DevDetailDTO();
|
DevDetailDTO device = new DevDetailDTO();
|
||||||
if(Objects.equals(item.getPid(),"0")){
|
if (Objects.equals(item.getPid(), "0")) {
|
||||||
device.setEquipmentName(item.getName());
|
device.setEquipmentName(item.getName());
|
||||||
device.setEquipmentId(item.getId());
|
device.setEquipmentId(item.getId());
|
||||||
device.setProjectId("/");
|
device.setProjectId("/");
|
||||||
@@ -807,7 +893,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
});
|
});
|
||||||
if (CollectionUtil.isNotEmpty(enginingeringIds)) {
|
if (CollectionUtil.isNotEmpty(enginingeringIds)) {
|
||||||
List<CsLedger> engineer = this.listByIds(enginingeringIds);
|
List<CsLedger> engineer = this.listByIds(enginingeringIds);
|
||||||
engineer.forEach(item->{
|
engineer.forEach(item -> {
|
||||||
DevDetailDTO detail = new DevDetailDTO();
|
DevDetailDTO detail = new DevDetailDTO();
|
||||||
detail.setEngineeringid(item.getId());
|
detail.setEngineeringid(item.getId());
|
||||||
detail.setEngineeringName(item.getName());
|
detail.setEngineeringName(item.getName());
|
||||||
@@ -828,7 +914,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
LambdaQueryWrapper<CsLedger> queryWrapper2 = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CsLedger> queryWrapper2 = new LambdaQueryWrapper<>();
|
||||||
queryWrapper2.in(CsLedger::getPid, projectIds);
|
queryWrapper2.in(CsLedger::getPid, projectIds);
|
||||||
List<CsLedger> dev = this.list(queryWrapper2);
|
List<CsLedger> dev = this.list(queryWrapper2);
|
||||||
dev.forEach(item->{
|
dev.forEach(item -> {
|
||||||
DevDetailDTO detail = new DevDetailDTO();
|
DevDetailDTO detail = new DevDetailDTO();
|
||||||
detail.setEquipmentName(item.getName());
|
detail.setEquipmentName(item.getName());
|
||||||
detail.setEquipmentId(item.getId());
|
detail.setEquipmentId(item.getId());
|
||||||
@@ -840,7 +926,7 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
@Override
|
@Override
|
||||||
public List<DevDetailDTO> getEngineeringHaveDevs(List<String> list) {
|
public List<DevDetailDTO> getEngineeringHaveDevs(List<String> list) {
|
||||||
List<DevDetailDTO> result = new ArrayList<>();
|
List<DevDetailDTO> result = new ArrayList<>();
|
||||||
list.forEach(item->{
|
list.forEach(item -> {
|
||||||
LambdaQueryWrapper<CsLedger> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CsLedger> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(CsLedger::getPid, item);
|
queryWrapper.eq(CsLedger::getPid, item);
|
||||||
List<CsLedger> project = this.list(queryWrapper);
|
List<CsLedger> project = this.list(queryWrapper);
|
||||||
@@ -873,12 +959,12 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
|||||||
return children;
|
return children;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAreaById(String id){
|
public String getAreaById(String id) {
|
||||||
String areaName =redisUtil.getStringByKey (id);
|
String areaName = redisUtil.getStringByKey(id);
|
||||||
areaName = Optional.ofNullable (areaName).orElseGet (() ->{
|
areaName = Optional.ofNullable(areaName).orElseGet(() -> {
|
||||||
Area data = areaFeignClient.selectIdArea (id).getData ( );
|
Area data = areaFeignClient.selectIdArea(id).getData();
|
||||||
redisUtil.saveByKey (id,data.getName ());
|
redisUtil.saveByKey(id, data.getName());
|
||||||
return data.getName ();
|
return data.getName();
|
||||||
});
|
});
|
||||||
return areaName;
|
return areaName;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,9 +14,12 @@ import com.njcn.access.api.CsLineLatestDataFeignClient;
|
|||||||
import com.njcn.access.pojo.po.CsLineLatestData;
|
import com.njcn.access.pojo.po.CsLineLatestData;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.utils.PubUtils;
|
||||||
|
import com.njcn.csdevice.enums.LineBaseEnum;
|
||||||
import com.njcn.csdevice.mapper.*;
|
import com.njcn.csdevice.mapper.*;
|
||||||
import com.njcn.csdevice.pojo.param.CsLineParam;
|
import com.njcn.csdevice.pojo.param.CsLineParam;
|
||||||
import com.njcn.csdevice.pojo.po.*;
|
import com.njcn.csdevice.pojo.po.*;
|
||||||
|
import com.njcn.csdevice.pojo.vo.LineDetailDataVO;
|
||||||
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
import com.njcn.csdevice.pojo.vo.PqSensitiveUserLineVO;
|
||||||
import com.njcn.csdevice.service.CsDevModelService;
|
import com.njcn.csdevice.service.CsDevModelService;
|
||||||
import com.njcn.csdevice.service.CsLinePOService;
|
import com.njcn.csdevice.service.CsLinePOService;
|
||||||
@@ -34,6 +37,7 @@ import com.njcn.user.pojo.vo.UserVO;
|
|||||||
import com.njcn.web.pojo.param.BaseParam;
|
import com.njcn.web.pojo.param.BaseParam;
|
||||||
import com.njcn.web.utils.RequestUtil;
|
import com.njcn.web.utils.RequestUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
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 org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -102,6 +106,10 @@ public class CsLinePOServiceImpl extends ServiceImpl<CsLinePOMapper, CsLinePO> i
|
|||||||
return this.baseMapper.findByNdid(id);
|
return this.baseMapper.findByNdid(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String,String> getCustomDetailByLineId(String lineId){
|
||||||
|
return this.baseMapper.getCustomDetailByLineId(lineId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLine(CsLineParam csLineParam) {
|
public void updateLine(CsLineParam csLineParam) {
|
||||||
LambdaUpdateWrapper<CsLinePO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
LambdaUpdateWrapper<CsLinePO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||||
@@ -386,6 +394,46 @@ public class CsLinePOServiceImpl extends ServiceImpl<CsLinePOMapper, CsLinePO> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LineDetailDataVO getLineDetailData(String id) {
|
||||||
|
if (StringUtils.isEmpty(id)) {
|
||||||
|
return new LineDetailDataVO();
|
||||||
|
} else {
|
||||||
|
CsLinePO csLinePO = this.baseMapper.selectOne(new LambdaQueryWrapper<CsLinePO>().eq(CsLinePO::getLineId,id));
|
||||||
|
|
||||||
|
CsLedger csLedger = csLedgerMapper.selectById(csLinePO.getLineId());
|
||||||
|
|
||||||
|
LineDetailDataVO lineDetailDataVO = new LineDetailDataVO();
|
||||||
|
|
||||||
|
lineDetailDataVO.setScale(csLinePO.getVolGrade()+"kV");
|
||||||
|
lineDetailDataVO.setAreaName(csLedgerMapper.selectById(csLedger.getPids().split(StrUtil.COMMA)[LineBaseEnum.ENGINEERING_LEVEL.getCode()+1]).getName());
|
||||||
|
lineDetailDataVO.setBdName(csLedgerMapper.selectById(csLedger.getPids().split(StrUtil.COMMA)[LineBaseEnum.PROJECT_LEVEL.getCode()+1]).getName());
|
||||||
|
|
||||||
|
//Device device = deviceMapper.selectById(devId);
|
||||||
|
//lineDetailDataVO.setComFlag(PubUtils.comFlag(device.getComFlag()));
|
||||||
|
//lineDetailDataVO.setRunFlag(PubUtils.lineRunFlag(lineDetail.getRunFlag()));
|
||||||
|
//lineDetailDataVO.setIp(device.getIp());
|
||||||
|
//lineDetailDataVO.setLoginTime(device.getLoginTime());
|
||||||
|
//lineDetailDataVO.setDevId(device.getId());
|
||||||
|
//lineDetailDataVO.setBusinessType(dicDataFeignClient.getDicDataById(lineDetail.getBusinessType()).getData().getName());
|
||||||
|
//lineDetailDataVO.setLoadType(dicDataFeignClient.getDicDataById(lineDetail.getLoadType()).getData().getName());
|
||||||
|
lineDetailDataVO.setObjName(csLinePO.getMonitorUser());
|
||||||
|
lineDetailDataVO.setLineId(csLinePO.getLineId());
|
||||||
|
lineDetailDataVO.setPtType(PubUtils.ptType(csLinePO.getConType()));
|
||||||
|
lineDetailDataVO.setPt(csLinePO.getPtRatio() + "/" + csLinePO.getPt2Ratio());
|
||||||
|
lineDetailDataVO.setCt(csLinePO.getCtRatio() + "/" + csLinePO.getCt2Ratio());
|
||||||
|
lineDetailDataVO.setDealCapacity(csLinePO.getProtocolCapacity().floatValue());
|
||||||
|
lineDetailDataVO.setDevCapacity(csLinePO.getDevCapacity().floatValue());
|
||||||
|
lineDetailDataVO.setShortCapacity(csLinePO.getShortCircuitCapacity().floatValue());
|
||||||
|
lineDetailDataVO.setStandardCapacity(csLinePO.getBasicCapacity().floatValue());
|
||||||
|
lineDetailDataVO.setTimeInterval(csLinePO.getLineInterval());
|
||||||
|
|
||||||
|
return lineDetailDataVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private String getRunStatusDescription(Integer runStatus) {
|
private String getRunStatusDescription(Integer runStatus) {
|
||||||
// 0:运行;1:检修;2:停运;3:调试;4:退运
|
// 0:运行;1:检修;2:停运;3:调试;4:退运
|
||||||
switch (runStatus) {
|
switch (runStatus) {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
|
|||||||
QueryWrapper<CsLedger> csLedgerQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<CsLedger> csLedgerQueryWrapper = new QueryWrapper<>();
|
||||||
|
|
||||||
List<String> collect = new ArrayList<>();
|
List<String> collect = new ArrayList<>();
|
||||||
if(Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode())){
|
if(Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER_8000.getCode())){
|
||||||
csDeviceUserPOQueryWrapper.clear();
|
csDeviceUserPOQueryWrapper.clear();
|
||||||
csEngineeringUserPOQueryWrapper.clear();
|
csEngineeringUserPOQueryWrapper.clear();
|
||||||
csLedgerQueryWrapper.clear();
|
csLedgerQueryWrapper.clear();
|
||||||
@@ -94,7 +94,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// ||Objects.equals(role,"bxs_user")
|
// ||Objects.equals(role,"bxs_user")
|
||||||
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())){
|
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode()) || Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER.getCode()) ){
|
||||||
List<CsEngineeringPO> csEngineeringPOS = csEngineeringMapper.selectList(null);
|
List<CsEngineeringPO> csEngineeringPOS = csEngineeringMapper.selectList(null);
|
||||||
collect =csEngineeringPOS.stream().filter(temp->Objects.equals(temp.getStatus(),"1")).map(CsEngineeringPO::getId).collect(Collectors.toList());
|
collect =csEngineeringPOS.stream().filter(temp->Objects.equals(temp.getStatus(),"1")).map(CsEngineeringPO::getId).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
|
|||||||
|
|
||||||
List<String> collect = new ArrayList<>();
|
List<String> collect = new ArrayList<>();
|
||||||
if(
|
if(
|
||||||
Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode())){
|
Objects.equals(role,AppRoleEnum.APP_VIP_USER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER_8000.getCode())){
|
||||||
csDeviceUserPOQueryWrapper.clear();
|
csDeviceUserPOQueryWrapper.clear();
|
||||||
csDeviceUserPOQueryWrapper.eq("status","1").and(wq -> {
|
csDeviceUserPOQueryWrapper.eq("status","1").and(wq -> {
|
||||||
wq.eq("primary_user_id", userIndex)
|
wq.eq("primary_user_id", userIndex)
|
||||||
@@ -198,7 +198,7 @@ public class RoleEngineerDevServiceImpl implements RoleEngineerDevService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// ||Objects.equals(role,"bxs_user")
|
// ||Objects.equals(role,"bxs_user")
|
||||||
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode())){
|
else if(Objects.equals(role,AppRoleEnum.ROOT.getCode())||Objects.equals(role,AppRoleEnum.OPERATION_MANAGER.getCode()) || Objects.equals(role,AppRoleEnum.REGULAR_USER.getCode())){
|
||||||
csLedgerQueryWrapper.clear();
|
csLedgerQueryWrapper.clear();
|
||||||
csLedgerQueryWrapper.eq("level",2).eq("state",1);
|
csLedgerQueryWrapper.eq("level",2).eq("state",1);
|
||||||
List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);
|
List<CsLedger> csLedgers = csLedgerMapper.selectList(csLedgerQueryWrapper);
|
||||||
|
|||||||
@@ -51,6 +51,17 @@
|
|||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-oss</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>common-poi</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ public class CsConfigurationParm {
|
|||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据范围 0 私有 1全局
|
||||||
|
*/
|
||||||
|
private int scope;
|
||||||
|
|
||||||
private List<String> projectIds;
|
private List<String> projectIds;
|
||||||
|
|
||||||
|
|
||||||
@@ -55,6 +60,10 @@ public class CsConfigurationParm {
|
|||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public static class CsConfigurationQueryParam extends BaseParam {
|
public static class CsConfigurationQueryParam extends BaseParam {
|
||||||
private String id;
|
private String id;
|
||||||
|
@ApiModelProperty(value = "当前用户ID")
|
||||||
|
private String currentUserId;
|
||||||
|
@ApiModelProperty(value = "当前用户角色")
|
||||||
|
private String roleCode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ public class SensitiveUserReportQueryParam {
|
|||||||
@ApiModelProperty(name = "tempId",value = "模板ID")
|
@ApiModelProperty(name = "tempId",value = "模板ID")
|
||||||
private String tempId;
|
private String tempId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "searchBeginTime", value = "开始时间")
|
@ApiModelProperty(name = "startTime", value = "开始时间")
|
||||||
@NotBlank(message = "起始时间不可为空")
|
@NotBlank(message = "起始时间不可为空")
|
||||||
@DateTimeStrValid(message = "起始时间格式出错")
|
@DateTimeStrValid(message = "起始时间格式出错")
|
||||||
private String searchBeginTime;
|
private String startTime;
|
||||||
|
|
||||||
@ApiModelProperty(name = "searchEndTime", value = "结束时间")
|
@ApiModelProperty(name = "endTime", value = "结束时间")
|
||||||
@NotBlank(message = "结束时间不可为空")
|
@NotBlank(message = "结束时间不可为空")
|
||||||
private String searchEndTime;
|
private String endTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2025/09/18 下午 2:00【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RealTimeDataDTO {
|
||||||
|
private Integer code;
|
||||||
|
private String message;
|
||||||
|
private Integer type =1;
|
||||||
|
// private List<RealTimeDataVo> realTimeDataVoList;
|
||||||
|
}
|
||||||
@@ -39,8 +39,11 @@ public class ZuTaiDTO {
|
|||||||
@SerializedName("lineId")
|
@SerializedName("lineId")
|
||||||
private String lineId;
|
private String lineId;
|
||||||
|
|
||||||
|
@SerializedName("UIDType")
|
||||||
|
private Boolean uIdType;
|
||||||
|
|
||||||
@SerializedName("UID")
|
@SerializedName("UID")
|
||||||
private List<String> uId;
|
private List<Object> uId;
|
||||||
|
|
||||||
@SerializedName("UIDName")
|
@SerializedName("UIDName")
|
||||||
private String target;
|
private String target;
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/6/14 20:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public class ZuTaiNewDTO {
|
||||||
|
|
||||||
|
private List<DiagramElement> json;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
public static class DiagramElement{
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String title;
|
||||||
|
private String keyId;
|
||||||
|
private String type;
|
||||||
|
private boolean resize;
|
||||||
|
private boolean rotate;
|
||||||
|
private boolean lock;
|
||||||
|
private boolean active;
|
||||||
|
private boolean hide;
|
||||||
|
private String tag;
|
||||||
|
private boolean use_proportional_scaling;
|
||||||
|
private String lineId;
|
||||||
|
private List<String> lineList;
|
||||||
|
private String lineName;
|
||||||
|
@JsonProperty("UID")
|
||||||
|
private List<Object> uid;
|
||||||
|
@JsonProperty("UIDNames")
|
||||||
|
|
||||||
|
private List<String> uidNames;
|
||||||
|
private List<String> unit;
|
||||||
|
|
||||||
|
private Boolean uidType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto.eventReport;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.influxdb.annotation.Column;
|
||||||
|
import org.influxdb.annotation.Measurement;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author denghuajun
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年04月07日 08:59
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Measurement(name = "pqs_eventdetail")
|
||||||
|
//@TableName("r_mp_event_detail")
|
||||||
|
public class EventDetail {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "eventId",value ="暂态事件id")
|
||||||
|
private String eventId;
|
||||||
|
|
||||||
|
@Column(name = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@Column(name = "time")
|
||||||
|
@ApiModelProperty(value = "开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss.SSS",timezone = "GMT+8")
|
||||||
|
private LocalDateTime startTime;
|
||||||
|
|
||||||
|
@Column(name = "event_describe")
|
||||||
|
@ApiModelProperty(value = "事件描述")
|
||||||
|
private String eventDescribe;
|
||||||
|
|
||||||
|
@Column(name = "wave_type")
|
||||||
|
@ApiModelProperty(value = "统计类型")
|
||||||
|
private String eventType;
|
||||||
|
|
||||||
|
@Column(name = "persist_time")
|
||||||
|
@ApiModelProperty(value = "持续时间,单位秒")
|
||||||
|
private Double duration;
|
||||||
|
|
||||||
|
@Column(name = "event_value")
|
||||||
|
@ApiModelProperty(value = "特征幅值")
|
||||||
|
private Double featureAmplitude;
|
||||||
|
|
||||||
|
@Column(name = "event_reason")
|
||||||
|
@ApiModelProperty(value = "暂降原因(Event_Reason)")
|
||||||
|
private String advanceReason;
|
||||||
|
|
||||||
|
@Column(name = "event_type")
|
||||||
|
@ApiModelProperty(value = "暂降类型(Event_Type)")
|
||||||
|
private String advanceType;
|
||||||
|
|
||||||
|
@Column(name = "eventass_index")
|
||||||
|
private String eventassIndex;
|
||||||
|
|
||||||
|
@Column(name = "dq_time")
|
||||||
|
private Integer dqTime;
|
||||||
|
|
||||||
|
@Column(name = "deal_time")
|
||||||
|
private String dealTime;
|
||||||
|
|
||||||
|
@Column(name = "deal_flag")
|
||||||
|
private Integer dealFlag;
|
||||||
|
|
||||||
|
@Column(name = "num")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@Column(name = "file_flag")
|
||||||
|
private Integer fileFlag;
|
||||||
|
|
||||||
|
@Column(name = "first_time")
|
||||||
|
private String firstTime;
|
||||||
|
|
||||||
|
@Column(name = "first_type")
|
||||||
|
private String firstType;
|
||||||
|
|
||||||
|
@Column(name = "first_ms")
|
||||||
|
private Integer firstMs;
|
||||||
|
|
||||||
|
@Column(name = "wave_name")
|
||||||
|
@ApiModelProperty(value = "波形路径")
|
||||||
|
private String wavePath;
|
||||||
|
|
||||||
|
@Column(name = "energy")
|
||||||
|
private Double energy;
|
||||||
|
|
||||||
|
@Column(name = "severity")
|
||||||
|
private Double severity;
|
||||||
|
|
||||||
|
@Column(name = "sagsource")
|
||||||
|
private String sagSource;
|
||||||
|
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
private BigDecimal lat;
|
||||||
|
|
||||||
|
private BigDecimal lng;
|
||||||
|
|
||||||
|
private String gdName;
|
||||||
|
|
||||||
|
private String subName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.influxdb.annotation.Column;
|
||||||
|
import org.influxdb.annotation.Measurement;
|
||||||
|
|
||||||
|
import java.time.Instant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* data_v influxDB别名映射表
|
||||||
|
*
|
||||||
|
* @author qijian
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/10/27 15:27
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Measurement(name = "data_i")
|
||||||
|
public class DataI {
|
||||||
|
|
||||||
|
@Column(name = "time")
|
||||||
|
private Instant time;
|
||||||
|
|
||||||
|
@Column(name = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@Column(name = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@Column(name = "rms")
|
||||||
|
private Double rms;
|
||||||
|
|
||||||
|
@Column(name = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@Column(name = "freq_max")
|
||||||
|
private Double frepMAX;
|
||||||
|
|
||||||
|
@Column(name = "freq_min")
|
||||||
|
private Double frepMIN;
|
||||||
|
|
||||||
|
@Column(name = "rms_max")
|
||||||
|
private Double rmsMAX;
|
||||||
|
|
||||||
|
@Column(name = "rms_min")
|
||||||
|
private Double rmsMIN;
|
||||||
|
|
||||||
|
@Column(name = "rms_lvr_max")
|
||||||
|
private Double rmsLvrMAX;
|
||||||
|
|
||||||
|
@Column(name = "rms_lvr_min")
|
||||||
|
private Double rmsLvrMIN;
|
||||||
|
|
||||||
|
@Column(name = "v_thd_max")
|
||||||
|
private Double vThdMAX;
|
||||||
|
|
||||||
|
@Column(name = "v_thd_min")
|
||||||
|
private Double vThdMIN;
|
||||||
|
|
||||||
|
@Column(name = "v_unbalance_max")
|
||||||
|
private Double vUnbalanceMAX;
|
||||||
|
|
||||||
|
@Column(name = "v_unbalance_min")
|
||||||
|
private Double vUnbalanceMIN;
|
||||||
|
|
||||||
|
@Column(name = "freq_count")
|
||||||
|
private Integer freqCount;
|
||||||
|
|
||||||
|
@Column(name = "rms_count")
|
||||||
|
private Integer rmsCount;
|
||||||
|
|
||||||
|
@Column(name = "rms_lvr_count")
|
||||||
|
private Integer rmsLvrCount;
|
||||||
|
|
||||||
|
@Column(name = "v_thd_count")
|
||||||
|
private Integer vThdCount;
|
||||||
|
|
||||||
|
@Column(name = "v_unbalance_count")
|
||||||
|
private Integer vUnbalanceCount;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto.report;
|
||||||
|
|
||||||
|
public enum EnumPass {
|
||||||
|
MAX(1, "使用最大值与国标限值比较,判断指标是否合格"),
|
||||||
|
MIN(2, "使用最小值与国标限值比较,判断指标是否合格"),
|
||||||
|
MEAN(3, "使用平均值与国标限值比较,判断指标是否合格"),
|
||||||
|
CP95(4, "使用CP95值与国标限值比较,判断指标是否合格"),
|
||||||
|
DEFAULT(5, "不作比较"),
|
||||||
|
PASS(0, "合格"),
|
||||||
|
FPYVALUE(98, "合格率限值"),
|
||||||
|
FPYV(1, "UHARM_0_OVERTIME"),
|
||||||
|
FPYI(2, "IHARM_0_OVERTIME"),
|
||||||
|
FPYVOLTAGE(3, "VOLTAGE_DEV_OVERTIME"),
|
||||||
|
FPYTHREE(4, "UBALANCE_OVERTIME"),
|
||||||
|
FPYTHDV(5, "UABERRANCE_OVERTIME"),
|
||||||
|
FPYRATE(6, "FREQ_DEV_OVERTIME"),
|
||||||
|
FPYFLICKER(7, "FLICKER_OVERTIME"),
|
||||||
|
NOPASS(-1, "不合格");
|
||||||
|
|
||||||
|
private Integer code;
|
||||||
|
private String describe;
|
||||||
|
|
||||||
|
EnumPass(Integer code, String describe) {
|
||||||
|
this.code = code;
|
||||||
|
this.describe = describe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescribe() {
|
||||||
|
return describe;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto.report;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OverLimitInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 7466469972886414616L;
|
||||||
|
private List<Overlimit> overLimitRate;
|
||||||
|
private Double count;
|
||||||
|
private Double pltCount;
|
||||||
|
private Double pstCount;
|
||||||
|
private List<String> list;
|
||||||
|
private String mode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto.report;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wr
|
||||||
|
* @description
|
||||||
|
* @date 2023/4/12 11:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class Pass {
|
||||||
|
private Float overLimit;
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
public Pass(Float overLimit) {
|
||||||
|
this.code = EnumPass.DEFAULT.getCode();
|
||||||
|
this.overLimit = overLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pass(Float overLimit, Integer code) {
|
||||||
|
this.overLimit = overLimit;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.dto.report;
|
||||||
|
|
||||||
|
import com.njcn.csharmonic.pojo.vo.report.ReportValue;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
@Data
|
||||||
|
public class ReportTarget implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -6931764660060228127L;
|
||||||
|
private List<ReportValue> list;
|
||||||
|
private Float overLimit; //指标的国标限值
|
||||||
|
private Integer pass;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.param.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月16日 19:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ExportParam implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lineId",value = "监测点ID")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "searchBeginTime",value = "开始时间")
|
||||||
|
private String searchBeginTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "searchEndTime",value = "结束时间")
|
||||||
|
private String searchEndTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lineName",value = "监测点名称")
|
||||||
|
private String lineName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "xq",value = "监测点详情",example = "true")
|
||||||
|
private boolean xq;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lb",value = "暂降事件列表",example = "true")
|
||||||
|
private boolean lb;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "mdbg",value = "暂降密度表格",example = "false")
|
||||||
|
private boolean mdbg;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "mdtx",value = "暂降密度图形",example = "false")
|
||||||
|
private boolean mdtx;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "sjdITIC",value = "暂降时间点ITIC",example = "false")
|
||||||
|
private boolean sjdITIC;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "sjdF47",value = "暂降时间点F47",example = "false")
|
||||||
|
private boolean sjdF47;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "glfbfz",value = "概率分布暂降赋值",example = "false")
|
||||||
|
private boolean glfbfz;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "glfbsj",value = "概率分布持续时间",example = "false")
|
||||||
|
private boolean glfbsj;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "tjbg",value = "月份统计表格",example = "false")
|
||||||
|
private boolean tjbg;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "tjtx",value = "月份统计图形",example = "false")
|
||||||
|
private boolean tjtx;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "yybg",value = "暂降原因表格",example = "false")
|
||||||
|
private boolean yybg;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "yytx",value = "暂降原因图形",example = "false")
|
||||||
|
private boolean yytx;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lxbg",value = "暂降类型表格",example = "false")
|
||||||
|
private boolean lxbg;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lxtx",value = "暂降类型图形",example = "false")
|
||||||
|
private boolean lxtx;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "flag",value = "标识")
|
||||||
|
private Integer flag;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "type",value = "系统区分(0:pq 1:pms)")
|
||||||
|
private Integer type;
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.param.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月01日 15:35
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StatisticsParam implements Serializable {
|
||||||
|
|
||||||
|
@NotBlank(message = "没有监测点ID")
|
||||||
|
@ApiModelProperty(name = "lineIndex",value = "监测点ID")
|
||||||
|
private String lineIndex;
|
||||||
|
|
||||||
|
@NotBlank(message = "没有开始时间")
|
||||||
|
@ApiModelProperty(name = "startTime",value = "开始时间")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@NotBlank(message = "没有结束时间")
|
||||||
|
@ApiModelProperty(name = "endTime",value = "结束时间")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "flag",value = "标识")
|
||||||
|
private Integer flag;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.param.report;
|
||||||
|
|
||||||
|
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2022/8/26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ReportQueryParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lineId",value = "监测点id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "startTime",value = "开始时间")
|
||||||
|
@NotBlank(message = "起始时间不可为空")
|
||||||
|
@DateTimeStrValid(message = "起始时间格式出错")
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "endTime",value = "结束时间")
|
||||||
|
@NotBlank(message = "结束时间不可为空")
|
||||||
|
private String endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "b",value = "判断时间是否是当天(true 当天 false不是当天)")
|
||||||
|
private Boolean b ;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "lineId",value = "95条数取值")
|
||||||
|
private double count;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,8 +17,8 @@ import lombok.NoArgsConstructor;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@TableName(value = "cs_configuration")
|
@TableName(value = "cs_configuration")
|
||||||
public class CsConfigurationPO extends BaseEntity {
|
public class CsConfigurationPO extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
@@ -31,6 +31,12 @@ public class CsConfigurationPO extends BaseEntity {
|
|||||||
@TableField(value = "`name`")
|
@TableField(value = "`name`")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据范围 0 私有 1全局
|
||||||
|
*/
|
||||||
|
@TableField(value = "scope")
|
||||||
|
private int scope;
|
||||||
|
|
||||||
@TableField(value = "image_path")
|
@TableField(value = "image_path")
|
||||||
private String imagePath;
|
private String imagePath;
|
||||||
|
|
||||||
@@ -50,7 +56,6 @@ public class CsConfigurationPO extends BaseEntity {
|
|||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static final String COL_ID = "id";
|
public static final String COL_ID = "id";
|
||||||
|
|
||||||
public static final String COL_NAME = "name";
|
public static final String COL_NAME = "name";
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CsPageUser implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组态界面ID
|
||||||
|
*/
|
||||||
|
private String pageId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.csharmonic.pojo.po;
|
package com.njcn.csharmonic.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -7,6 +8,8 @@ import lombok.Setter;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import static com.baomidou.mybatisplus.annotation.IdType.ASSIGN_ID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
*
|
*
|
||||||
@@ -25,6 +28,7 @@ public class PqSensitiveUser extends BaseEntity implements Serializable{
|
|||||||
/**
|
/**
|
||||||
* id
|
* id
|
||||||
*/
|
*/
|
||||||
|
@TableId(value = "id",type = ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/27 15:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_asses_d")
|
||||||
|
public class RStatAssesDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time_id")
|
||||||
|
private Date time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev")
|
||||||
|
private Double vuDev;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev")
|
||||||
|
private Double freqDev;
|
||||||
|
|
||||||
|
@TableField(value = "data_plt")
|
||||||
|
private Double dataPlt;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance_cp95")
|
||||||
|
private Double vUnbalanceCp95;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd_cp95")
|
||||||
|
private Double vThdCp95;
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/27 15:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_comasses_d")
|
||||||
|
public class RStatComassesDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time_id")
|
||||||
|
private Date time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev1")
|
||||||
|
private Double freqDev1;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev2")
|
||||||
|
private Double freqDev2;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev3")
|
||||||
|
private Double freqDev3;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev4")
|
||||||
|
private Double freqDev4;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev5")
|
||||||
|
private Double freqDev5;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev1")
|
||||||
|
private Double vuDev1;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev2")
|
||||||
|
private Double vuDev2;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev3")
|
||||||
|
private Double vuDev3;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev4")
|
||||||
|
private Double vuDev4;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev5")
|
||||||
|
private Double vuDev5;
|
||||||
|
|
||||||
|
@TableField(value = "data_plt1")
|
||||||
|
private Double dataPst1;
|
||||||
|
|
||||||
|
@TableField(value = "data_plt2")
|
||||||
|
private Double dataPst2;
|
||||||
|
|
||||||
|
@TableField(value = "data_plt3")
|
||||||
|
private Double dataPst3;
|
||||||
|
|
||||||
|
@TableField(value = "data_plt4")
|
||||||
|
private Double dataPst4;
|
||||||
|
|
||||||
|
@TableField(value = "data_plt5")
|
||||||
|
private Double dataPst5;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance1")
|
||||||
|
private Double vUnbalance1;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance2")
|
||||||
|
private Double vUnbalance2;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance3")
|
||||||
|
private Double vUnbalance3;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance4")
|
||||||
|
private Double vUnbalance4;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance5")
|
||||||
|
private Double vUnbalance5;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd1")
|
||||||
|
private Double vThd1;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd2")
|
||||||
|
private Double vThd2;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd3")
|
||||||
|
private Double vThd3;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd4")
|
||||||
|
private Double vThd4;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd5")
|
||||||
|
private Double vThd5;
|
||||||
|
|
||||||
|
@TableField(value = "event1")
|
||||||
|
private Double event1;
|
||||||
|
|
||||||
|
@TableField(value = "event2")
|
||||||
|
private Double event2;
|
||||||
|
|
||||||
|
@TableField(value = "event3")
|
||||||
|
private Double event3;
|
||||||
|
|
||||||
|
@TableField(value = "event4")
|
||||||
|
private Double event4;
|
||||||
|
|
||||||
|
@TableField(value = "event5")
|
||||||
|
private Double event5;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/22 19:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_flicker_d")
|
||||||
|
public class RStatDataFlickerDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "fluc")
|
||||||
|
private Double fluc;
|
||||||
|
|
||||||
|
@TableField(value = "plt")
|
||||||
|
private Double plt;
|
||||||
|
|
||||||
|
@TableField(value = "pst")
|
||||||
|
private Double pst;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 11:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_fluc_d")
|
||||||
|
public class RStatDataFlucDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "fluc")
|
||||||
|
private Double fluc;
|
||||||
|
|
||||||
|
@TableField(value = "fluccf")
|
||||||
|
private Double fluccf;
|
||||||
|
}
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 11:39
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmphasic_i_d")
|
||||||
|
public class RStatDataHarmphasicIDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "i_1")
|
||||||
|
private Double i1;
|
||||||
|
|
||||||
|
@TableField(value = "i_2")
|
||||||
|
private Double i2;
|
||||||
|
|
||||||
|
@TableField(value = "i_3")
|
||||||
|
private Double i3;
|
||||||
|
|
||||||
|
@TableField(value = "i_4")
|
||||||
|
private Double i4;
|
||||||
|
|
||||||
|
@TableField(value = "i_5")
|
||||||
|
private Double i5;
|
||||||
|
|
||||||
|
@TableField(value = "i_6")
|
||||||
|
private Double i6;
|
||||||
|
|
||||||
|
@TableField(value = "i_7")
|
||||||
|
private Double i7;
|
||||||
|
|
||||||
|
@TableField(value = "i_8")
|
||||||
|
private Double i8;
|
||||||
|
|
||||||
|
@TableField(value = "i_9")
|
||||||
|
private Double i9;
|
||||||
|
|
||||||
|
@TableField(value = "i_10")
|
||||||
|
private Double i10;
|
||||||
|
|
||||||
|
@TableField(value = "i_11")
|
||||||
|
private Double i11;
|
||||||
|
|
||||||
|
@TableField(value = "i_12")
|
||||||
|
private Double i12;
|
||||||
|
|
||||||
|
@TableField(value = "i_13")
|
||||||
|
private Double i13;
|
||||||
|
|
||||||
|
@TableField(value = "i_14")
|
||||||
|
private Double i14;
|
||||||
|
|
||||||
|
@TableField(value = "i_15")
|
||||||
|
private Double i15;
|
||||||
|
|
||||||
|
@TableField(value = "i_16")
|
||||||
|
private Double i16;
|
||||||
|
|
||||||
|
@TableField(value = "i_17")
|
||||||
|
private Double i17;
|
||||||
|
|
||||||
|
@TableField(value = "i_18")
|
||||||
|
private Double i18;
|
||||||
|
|
||||||
|
@TableField(value = "i_19")
|
||||||
|
private Double i19;
|
||||||
|
|
||||||
|
@TableField(value = "i_20")
|
||||||
|
private Double i20;
|
||||||
|
|
||||||
|
@TableField(value = "i_21")
|
||||||
|
private Double i21;
|
||||||
|
|
||||||
|
@TableField(value = "i_22")
|
||||||
|
private Double i22;
|
||||||
|
|
||||||
|
@TableField(value = "i_23")
|
||||||
|
private Double i23;
|
||||||
|
|
||||||
|
@TableField(value = "i_24")
|
||||||
|
private Double i24;
|
||||||
|
|
||||||
|
@TableField(value = "i_25")
|
||||||
|
private Double i25;
|
||||||
|
|
||||||
|
@TableField(value = "i_26")
|
||||||
|
private Double i26;
|
||||||
|
|
||||||
|
@TableField(value = "i_27")
|
||||||
|
private Double i27;
|
||||||
|
|
||||||
|
@TableField(value = "i_28")
|
||||||
|
private Double i28;
|
||||||
|
|
||||||
|
@TableField(value = "i_29")
|
||||||
|
private Double i29;
|
||||||
|
|
||||||
|
@TableField(value = "i_30")
|
||||||
|
private Double i30;
|
||||||
|
|
||||||
|
@TableField(value = "i_31")
|
||||||
|
private Double i31;
|
||||||
|
|
||||||
|
@TableField(value = "i_32")
|
||||||
|
private Double i32;
|
||||||
|
|
||||||
|
@TableField(value = "i_33")
|
||||||
|
private Double i33;
|
||||||
|
|
||||||
|
@TableField(value = "i_34")
|
||||||
|
private Double i34;
|
||||||
|
|
||||||
|
@TableField(value = "i_35")
|
||||||
|
private Double i35;
|
||||||
|
|
||||||
|
@TableField(value = "i_36")
|
||||||
|
private Double i36;
|
||||||
|
|
||||||
|
@TableField(value = "i_37")
|
||||||
|
private Double i37;
|
||||||
|
|
||||||
|
@TableField(value = "i_38")
|
||||||
|
private Double i38;
|
||||||
|
|
||||||
|
@TableField(value = "i_39")
|
||||||
|
private Double i39;
|
||||||
|
|
||||||
|
@TableField(value = "i_40")
|
||||||
|
private Double i40;
|
||||||
|
|
||||||
|
@TableField(value = "i_41")
|
||||||
|
private Double i41;
|
||||||
|
|
||||||
|
@TableField(value = "i_42")
|
||||||
|
private Double i42;
|
||||||
|
|
||||||
|
@TableField(value = "i_43")
|
||||||
|
private Double i43;
|
||||||
|
|
||||||
|
@TableField(value = "i_44")
|
||||||
|
private Double i44;
|
||||||
|
|
||||||
|
@TableField(value = "i_45")
|
||||||
|
private Double i45;
|
||||||
|
|
||||||
|
@TableField(value = "i_46")
|
||||||
|
private Double i46;
|
||||||
|
|
||||||
|
@TableField(value = "i_47")
|
||||||
|
private Double i47;
|
||||||
|
|
||||||
|
@TableField(value = "i_48")
|
||||||
|
private Double i48;
|
||||||
|
|
||||||
|
@TableField(value = "i_49")
|
||||||
|
private Double i49;
|
||||||
|
|
||||||
|
@TableField(value = "i_50")
|
||||||
|
private Double i50;
|
||||||
|
}
|
||||||
@@ -0,0 +1,190 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 11:39
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmphasic_v_d")
|
||||||
|
public class RStatDataHarmphasicVDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "v_1")
|
||||||
|
private Double v1;
|
||||||
|
|
||||||
|
@TableField(value = "v_2")
|
||||||
|
private Double v2;
|
||||||
|
|
||||||
|
@TableField(value = "v_3")
|
||||||
|
private Double v3;
|
||||||
|
|
||||||
|
@TableField(value = "v_4")
|
||||||
|
private Double v4;
|
||||||
|
|
||||||
|
@TableField(value = "v_5")
|
||||||
|
private Double v5;
|
||||||
|
|
||||||
|
@TableField(value = "v_6")
|
||||||
|
private Double v6;
|
||||||
|
|
||||||
|
@TableField(value = "v_7")
|
||||||
|
private Double v7;
|
||||||
|
|
||||||
|
@TableField(value = "v_8")
|
||||||
|
private Double v8;
|
||||||
|
|
||||||
|
@TableField(value = "v_9")
|
||||||
|
private Double v9;
|
||||||
|
|
||||||
|
@TableField(value = "v_10")
|
||||||
|
private Double v10;
|
||||||
|
|
||||||
|
@TableField(value = "v_11")
|
||||||
|
private Double v11;
|
||||||
|
|
||||||
|
@TableField(value = "v_12")
|
||||||
|
private Double v12;
|
||||||
|
|
||||||
|
@TableField(value = "v_13")
|
||||||
|
private Double v13;
|
||||||
|
|
||||||
|
@TableField(value = "v_14")
|
||||||
|
private Double v14;
|
||||||
|
|
||||||
|
@TableField(value = "v_15")
|
||||||
|
private Double v15;
|
||||||
|
|
||||||
|
@TableField(value = "v_16")
|
||||||
|
private Double v16;
|
||||||
|
|
||||||
|
@TableField(value = "v_17")
|
||||||
|
private Double v17;
|
||||||
|
|
||||||
|
@TableField(value = "v_18")
|
||||||
|
private Double v18;
|
||||||
|
|
||||||
|
@TableField(value = "v_19")
|
||||||
|
private Double v19;
|
||||||
|
|
||||||
|
@TableField(value = "v_20")
|
||||||
|
private Double v20;
|
||||||
|
|
||||||
|
@TableField(value = "v_21")
|
||||||
|
private Double v21;
|
||||||
|
|
||||||
|
@TableField(value = "v_22")
|
||||||
|
private Double v22;
|
||||||
|
|
||||||
|
@TableField(value = "v_23")
|
||||||
|
private Double v23;
|
||||||
|
|
||||||
|
@TableField(value = "v_24")
|
||||||
|
private Double v24;
|
||||||
|
|
||||||
|
@TableField(value = "v_25")
|
||||||
|
private Double v25;
|
||||||
|
|
||||||
|
@TableField(value = "v_26")
|
||||||
|
private Double v26;
|
||||||
|
|
||||||
|
@TableField(value = "v_27")
|
||||||
|
private Double v27;
|
||||||
|
|
||||||
|
@TableField(value = "v_28")
|
||||||
|
private Double v28;
|
||||||
|
|
||||||
|
@TableField(value = "v_29")
|
||||||
|
private Double v29;
|
||||||
|
|
||||||
|
@TableField(value = "v_30")
|
||||||
|
private Double v30;
|
||||||
|
|
||||||
|
@TableField(value = "v_31")
|
||||||
|
private Double v31;
|
||||||
|
|
||||||
|
@TableField(value = "v_32")
|
||||||
|
private Double v32;
|
||||||
|
|
||||||
|
@TableField(value = "v_33")
|
||||||
|
private Double v33;
|
||||||
|
|
||||||
|
@TableField(value = "v_34")
|
||||||
|
private Double v34;
|
||||||
|
|
||||||
|
@TableField(value = "v_35")
|
||||||
|
private Double v35;
|
||||||
|
|
||||||
|
@TableField(value = "v_36")
|
||||||
|
private Double v36;
|
||||||
|
|
||||||
|
@TableField(value = "v_37")
|
||||||
|
private Double v37;
|
||||||
|
|
||||||
|
@TableField(value = "v_38")
|
||||||
|
private Double v38;
|
||||||
|
|
||||||
|
@TableField(value = "v_39")
|
||||||
|
private Double v39;
|
||||||
|
|
||||||
|
@TableField(value = "v_40")
|
||||||
|
private Double v40;
|
||||||
|
|
||||||
|
@TableField(value = "v_41")
|
||||||
|
private Double v41;
|
||||||
|
|
||||||
|
@TableField(value = "v_42")
|
||||||
|
private Double v42;
|
||||||
|
|
||||||
|
@TableField(value = "v_43")
|
||||||
|
private Double v43;
|
||||||
|
|
||||||
|
@TableField(value = "v_44")
|
||||||
|
private Double v44;
|
||||||
|
|
||||||
|
@TableField(value = "v_45")
|
||||||
|
private Double v45;
|
||||||
|
|
||||||
|
@TableField(value = "v_46")
|
||||||
|
private Double v46;
|
||||||
|
|
||||||
|
@TableField(value = "v_47")
|
||||||
|
private Double v47;
|
||||||
|
|
||||||
|
@TableField(value = "v_48")
|
||||||
|
private Double v48;
|
||||||
|
|
||||||
|
@TableField(value = "v_49")
|
||||||
|
private Double v49;
|
||||||
|
|
||||||
|
@TableField(value = "v_50")
|
||||||
|
private Double v50;
|
||||||
|
}
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 13:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmpower_p_d")
|
||||||
|
public class RStatDataHarmpowerPDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "df")
|
||||||
|
private Double df;
|
||||||
|
|
||||||
|
@TableField(value = "pf")
|
||||||
|
private Double pf;
|
||||||
|
|
||||||
|
@TableField(value = "p")
|
||||||
|
private Double p;
|
||||||
|
|
||||||
|
@TableField(value = "p_1")
|
||||||
|
private Double p1;
|
||||||
|
|
||||||
|
@TableField(value = "p_2")
|
||||||
|
private Double p2;
|
||||||
|
|
||||||
|
@TableField(value = "p_3")
|
||||||
|
private Double p3;
|
||||||
|
|
||||||
|
@TableField(value = "p_4")
|
||||||
|
private Double p4;
|
||||||
|
|
||||||
|
@TableField(value = "p_5")
|
||||||
|
private Double p5;
|
||||||
|
|
||||||
|
@TableField(value = "p_6")
|
||||||
|
private Double p6;
|
||||||
|
|
||||||
|
@TableField(value = "p_7")
|
||||||
|
private Double p7;
|
||||||
|
|
||||||
|
@TableField(value = "p_8")
|
||||||
|
private Double p8;
|
||||||
|
|
||||||
|
@TableField(value = "p_9")
|
||||||
|
private Double p9;
|
||||||
|
|
||||||
|
@TableField(value = "p_10")
|
||||||
|
private Double p10;
|
||||||
|
|
||||||
|
@TableField(value = "p_11")
|
||||||
|
private Double p11;
|
||||||
|
|
||||||
|
@TableField(value = "p_12")
|
||||||
|
private Double p12;
|
||||||
|
|
||||||
|
@TableField(value = "p_13")
|
||||||
|
private Double p13;
|
||||||
|
|
||||||
|
@TableField(value = "p_14")
|
||||||
|
private Double p14;
|
||||||
|
|
||||||
|
@TableField(value = "p_15")
|
||||||
|
private Double p15;
|
||||||
|
|
||||||
|
@TableField(value = "p_16")
|
||||||
|
private Double p16;
|
||||||
|
|
||||||
|
@TableField(value = "p_17")
|
||||||
|
private Double p17;
|
||||||
|
|
||||||
|
@TableField(value = "p_18")
|
||||||
|
private Double p18;
|
||||||
|
|
||||||
|
@TableField(value = "p_19")
|
||||||
|
private Double p19;
|
||||||
|
|
||||||
|
@TableField(value = "p_20")
|
||||||
|
private Double p20;
|
||||||
|
|
||||||
|
@TableField(value = "p_21")
|
||||||
|
private Double p21;
|
||||||
|
|
||||||
|
@TableField(value = "p_22")
|
||||||
|
private Double p22;
|
||||||
|
|
||||||
|
@TableField(value = "p_23")
|
||||||
|
private Double p23;
|
||||||
|
|
||||||
|
@TableField(value = "p_24")
|
||||||
|
private Double p24;
|
||||||
|
|
||||||
|
@TableField(value = "p_25")
|
||||||
|
private Double p25;
|
||||||
|
|
||||||
|
@TableField(value = "p_26")
|
||||||
|
private Double p26;
|
||||||
|
|
||||||
|
@TableField(value = "p_27")
|
||||||
|
private Double p27;
|
||||||
|
|
||||||
|
@TableField(value = "p_28")
|
||||||
|
private Double p28;
|
||||||
|
|
||||||
|
@TableField(value = "p_29")
|
||||||
|
private Double p29;
|
||||||
|
|
||||||
|
@TableField(value = "p_30")
|
||||||
|
private Double p30;
|
||||||
|
|
||||||
|
@TableField(value = "p_31")
|
||||||
|
private Double p31;
|
||||||
|
|
||||||
|
@TableField(value = "p_32")
|
||||||
|
private Double p32;
|
||||||
|
|
||||||
|
@TableField(value = "p_33")
|
||||||
|
private Double p33;
|
||||||
|
|
||||||
|
@TableField(value = "p_34")
|
||||||
|
private Double p34;
|
||||||
|
|
||||||
|
@TableField(value = "p_35")
|
||||||
|
private Double p35;
|
||||||
|
|
||||||
|
@TableField(value = "p_36")
|
||||||
|
private Double p36;
|
||||||
|
|
||||||
|
@TableField(value = "p_37")
|
||||||
|
private Double p37;
|
||||||
|
|
||||||
|
@TableField(value = "p_38")
|
||||||
|
private Double p38;
|
||||||
|
|
||||||
|
@TableField(value = "p_39")
|
||||||
|
private Double p39;
|
||||||
|
|
||||||
|
@TableField(value = "p_40")
|
||||||
|
private Double p40;
|
||||||
|
|
||||||
|
@TableField(value = "p_41")
|
||||||
|
private Double p41;
|
||||||
|
|
||||||
|
@TableField(value = "p_42")
|
||||||
|
private Double p42;
|
||||||
|
|
||||||
|
@TableField(value = "p_43")
|
||||||
|
private Double p43;
|
||||||
|
|
||||||
|
@TableField(value = "p_44")
|
||||||
|
private Double p44;
|
||||||
|
|
||||||
|
@TableField(value = "p_45")
|
||||||
|
private Double p45;
|
||||||
|
|
||||||
|
@TableField(value = "p_46")
|
||||||
|
private Double p46;
|
||||||
|
|
||||||
|
@TableField(value = "p_47")
|
||||||
|
private Double p47;
|
||||||
|
|
||||||
|
@TableField(value = "p_48")
|
||||||
|
private Double p48;
|
||||||
|
|
||||||
|
@TableField(value = "p_49")
|
||||||
|
private Double p49;
|
||||||
|
|
||||||
|
@TableField(value = "p_50")
|
||||||
|
private Double p50;
|
||||||
|
}
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 13:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmpower_q_d")
|
||||||
|
public class RStatDataHarmpowerQDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "q")
|
||||||
|
private Double q;
|
||||||
|
|
||||||
|
@TableField(value = "q_1")
|
||||||
|
private Double q1;
|
||||||
|
|
||||||
|
@TableField(value = "q_2")
|
||||||
|
private Double q2;
|
||||||
|
|
||||||
|
@TableField(value = "q_3")
|
||||||
|
private Double q3;
|
||||||
|
|
||||||
|
@TableField(value = "q_4")
|
||||||
|
private Double q4;
|
||||||
|
|
||||||
|
@TableField(value = "q_5")
|
||||||
|
private Double q5;
|
||||||
|
|
||||||
|
@TableField(value = "q_6")
|
||||||
|
private Double q6;
|
||||||
|
|
||||||
|
@TableField(value = "q_7")
|
||||||
|
private Double q7;
|
||||||
|
|
||||||
|
@TableField(value = "q_8")
|
||||||
|
private Double q8;
|
||||||
|
|
||||||
|
@TableField(value = "q_9")
|
||||||
|
private Double q9;
|
||||||
|
|
||||||
|
@TableField(value = "q_10")
|
||||||
|
private Double q10;
|
||||||
|
|
||||||
|
@TableField(value = "q_11")
|
||||||
|
private Double q11;
|
||||||
|
|
||||||
|
@TableField(value = "q_12")
|
||||||
|
private Double q12;
|
||||||
|
|
||||||
|
@TableField(value = "q_13")
|
||||||
|
private Double q13;
|
||||||
|
|
||||||
|
@TableField(value = "q_14")
|
||||||
|
private Double q14;
|
||||||
|
|
||||||
|
@TableField(value = "q_15")
|
||||||
|
private Double q15;
|
||||||
|
|
||||||
|
@TableField(value = "q_16")
|
||||||
|
private Double q16;
|
||||||
|
|
||||||
|
@TableField(value = "q_17")
|
||||||
|
private Double q17;
|
||||||
|
|
||||||
|
@TableField(value = "q_18")
|
||||||
|
private Double q18;
|
||||||
|
|
||||||
|
@TableField(value = "q_19")
|
||||||
|
private Double q19;
|
||||||
|
|
||||||
|
@TableField(value = "q_20")
|
||||||
|
private Double q20;
|
||||||
|
|
||||||
|
@TableField(value = "q_21")
|
||||||
|
private Double q21;
|
||||||
|
|
||||||
|
@TableField(value = "q_22")
|
||||||
|
private Double q22;
|
||||||
|
|
||||||
|
@TableField(value = "q_23")
|
||||||
|
private Double q23;
|
||||||
|
|
||||||
|
@TableField(value = "q_24")
|
||||||
|
private Double q24;
|
||||||
|
|
||||||
|
@TableField(value = "q_25")
|
||||||
|
private Double q25;
|
||||||
|
|
||||||
|
@TableField(value = "q_26")
|
||||||
|
private Double q26;
|
||||||
|
|
||||||
|
@TableField(value = "q_27")
|
||||||
|
private Double q27;
|
||||||
|
|
||||||
|
@TableField(value = "q_28")
|
||||||
|
private Double q28;
|
||||||
|
|
||||||
|
@TableField(value = "q_29")
|
||||||
|
private Double q29;
|
||||||
|
|
||||||
|
@TableField(value = "q_30")
|
||||||
|
private Double q30;
|
||||||
|
|
||||||
|
@TableField(value = "q_31")
|
||||||
|
private Double q31;
|
||||||
|
|
||||||
|
@TableField(value = "q_32")
|
||||||
|
private Double q32;
|
||||||
|
|
||||||
|
@TableField(value = "q_33")
|
||||||
|
private Double q33;
|
||||||
|
|
||||||
|
@TableField(value = "q_34")
|
||||||
|
private Double q34;
|
||||||
|
|
||||||
|
@TableField(value = "q_35")
|
||||||
|
private Double q35;
|
||||||
|
|
||||||
|
@TableField(value = "q_36")
|
||||||
|
private Double q36;
|
||||||
|
|
||||||
|
@TableField(value = "q_37")
|
||||||
|
private Double q37;
|
||||||
|
|
||||||
|
@TableField(value = "q_38")
|
||||||
|
private Double q38;
|
||||||
|
|
||||||
|
@TableField(value = "q_39")
|
||||||
|
private Double q39;
|
||||||
|
|
||||||
|
@TableField(value = "q_40")
|
||||||
|
private Double q40;
|
||||||
|
|
||||||
|
@TableField(value = "q_41")
|
||||||
|
private Double q41;
|
||||||
|
|
||||||
|
@TableField(value = "q_42")
|
||||||
|
private Double q42;
|
||||||
|
|
||||||
|
@TableField(value = "q_43")
|
||||||
|
private Double q43;
|
||||||
|
|
||||||
|
@TableField(value = "q_44")
|
||||||
|
private Double q44;
|
||||||
|
|
||||||
|
@TableField(value = "q_45")
|
||||||
|
private Double q45;
|
||||||
|
|
||||||
|
@TableField(value = "q_46")
|
||||||
|
private Double q46;
|
||||||
|
|
||||||
|
@TableField(value = "q_47")
|
||||||
|
private Double q47;
|
||||||
|
|
||||||
|
@TableField(value = "q_48")
|
||||||
|
private Double q48;
|
||||||
|
|
||||||
|
@TableField(value = "q_49")
|
||||||
|
private Double q49;
|
||||||
|
|
||||||
|
@TableField(value = "q_50")
|
||||||
|
private Double q50;
|
||||||
|
}
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 13:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmpower_s_d")
|
||||||
|
public class RStatDataHarmpowerSDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "s")
|
||||||
|
private Double s;
|
||||||
|
|
||||||
|
@TableField(value = "s_1")
|
||||||
|
private Double s1;
|
||||||
|
|
||||||
|
@TableField(value = "s_2")
|
||||||
|
private Double s2;
|
||||||
|
|
||||||
|
@TableField(value = "s_3")
|
||||||
|
private Double s3;
|
||||||
|
|
||||||
|
@TableField(value = "s_4")
|
||||||
|
private Double s4;
|
||||||
|
|
||||||
|
@TableField(value = "s_5")
|
||||||
|
private Double s5;
|
||||||
|
|
||||||
|
@TableField(value = "s_6")
|
||||||
|
private Double s6;
|
||||||
|
|
||||||
|
@TableField(value = "s_7")
|
||||||
|
private Double s7;
|
||||||
|
|
||||||
|
@TableField(value = "s_8")
|
||||||
|
private Double s8;
|
||||||
|
|
||||||
|
@TableField(value = "s_9")
|
||||||
|
private Double s9;
|
||||||
|
|
||||||
|
@TableField(value = "s_10")
|
||||||
|
private Double s10;
|
||||||
|
|
||||||
|
@TableField(value = "s_11")
|
||||||
|
private Double s11;
|
||||||
|
|
||||||
|
@TableField(value = "s_12")
|
||||||
|
private Double s12;
|
||||||
|
|
||||||
|
@TableField(value = "s_13")
|
||||||
|
private Double s13;
|
||||||
|
|
||||||
|
@TableField(value = "s_14")
|
||||||
|
private Double s14;
|
||||||
|
|
||||||
|
@TableField(value = "s_15")
|
||||||
|
private Double s15;
|
||||||
|
|
||||||
|
@TableField(value = "s_16")
|
||||||
|
private Double s16;
|
||||||
|
|
||||||
|
@TableField(value = "s_17")
|
||||||
|
private Double s17;
|
||||||
|
|
||||||
|
@TableField(value = "s_18")
|
||||||
|
private Double s18;
|
||||||
|
|
||||||
|
@TableField(value = "s_19")
|
||||||
|
private Double s19;
|
||||||
|
|
||||||
|
@TableField(value = "s_20")
|
||||||
|
private Double s20;
|
||||||
|
|
||||||
|
@TableField(value = "s_21")
|
||||||
|
private Double s21;
|
||||||
|
|
||||||
|
@TableField(value = "s_22")
|
||||||
|
private Double s22;
|
||||||
|
|
||||||
|
@TableField(value = "s_23")
|
||||||
|
private Double s23;
|
||||||
|
|
||||||
|
@TableField(value = "s_24")
|
||||||
|
private Double s24;
|
||||||
|
|
||||||
|
@TableField(value = "s_25")
|
||||||
|
private Double s25;
|
||||||
|
|
||||||
|
@TableField(value = "s_26")
|
||||||
|
private Double s26;
|
||||||
|
|
||||||
|
@TableField(value = "s_27")
|
||||||
|
private Double s27;
|
||||||
|
|
||||||
|
@TableField(value = "s_28")
|
||||||
|
private Double s28;
|
||||||
|
|
||||||
|
@TableField(value = "s_29")
|
||||||
|
private Double s29;
|
||||||
|
|
||||||
|
@TableField(value = "s_30")
|
||||||
|
private Double s30;
|
||||||
|
|
||||||
|
@TableField(value = "s_31")
|
||||||
|
private Double s31;
|
||||||
|
|
||||||
|
@TableField(value = "s_32")
|
||||||
|
private Double s32;
|
||||||
|
|
||||||
|
@TableField(value = "s_33")
|
||||||
|
private Double s33;
|
||||||
|
|
||||||
|
@TableField(value = "s_34")
|
||||||
|
private Double s34;
|
||||||
|
|
||||||
|
@TableField(value = "s_35")
|
||||||
|
private Double s35;
|
||||||
|
|
||||||
|
@TableField(value = "s_36")
|
||||||
|
private Double s36;
|
||||||
|
|
||||||
|
@TableField(value = "s_37")
|
||||||
|
private Double s37;
|
||||||
|
|
||||||
|
@TableField(value = "s_38")
|
||||||
|
private Double s38;
|
||||||
|
|
||||||
|
@TableField(value = "s_39")
|
||||||
|
private Double s39;
|
||||||
|
|
||||||
|
@TableField(value = "s_40")
|
||||||
|
private Double s40;
|
||||||
|
|
||||||
|
@TableField(value = "s_41")
|
||||||
|
private Double s41;
|
||||||
|
|
||||||
|
@TableField(value = "s_42")
|
||||||
|
private Double s42;
|
||||||
|
|
||||||
|
@TableField(value = "s_43")
|
||||||
|
private Double s43;
|
||||||
|
|
||||||
|
@TableField(value = "s_44")
|
||||||
|
private Double s44;
|
||||||
|
|
||||||
|
@TableField(value = "s_45")
|
||||||
|
private Double s45;
|
||||||
|
|
||||||
|
@TableField(value = "s_46")
|
||||||
|
private Double s46;
|
||||||
|
|
||||||
|
@TableField(value = "s_47")
|
||||||
|
private Double s47;
|
||||||
|
|
||||||
|
@TableField(value = "s_48")
|
||||||
|
private Double s48;
|
||||||
|
|
||||||
|
@TableField(value = "s_49")
|
||||||
|
private Double s49;
|
||||||
|
|
||||||
|
@TableField(value = "s_50")
|
||||||
|
private Double s50;
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmrate_i_d")
|
||||||
|
public class RStatDataHarmrateIDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "i_1")
|
||||||
|
private Double i1;
|
||||||
|
|
||||||
|
@TableField(value = "i_2")
|
||||||
|
private Double i2;
|
||||||
|
|
||||||
|
@TableField(value = "i_3")
|
||||||
|
private Double i3;
|
||||||
|
|
||||||
|
@TableField(value = "i_4")
|
||||||
|
private Double i4;
|
||||||
|
|
||||||
|
@TableField(value = "i_5")
|
||||||
|
private Double i5;
|
||||||
|
|
||||||
|
@TableField(value = "i_6")
|
||||||
|
private Double i6;
|
||||||
|
|
||||||
|
@TableField(value = "i_7")
|
||||||
|
private Double i7;
|
||||||
|
|
||||||
|
@TableField(value = "i_8")
|
||||||
|
private Double i8;
|
||||||
|
|
||||||
|
@TableField(value = "i_9")
|
||||||
|
private Double i9;
|
||||||
|
|
||||||
|
@TableField(value = "i_10")
|
||||||
|
private Double i10;
|
||||||
|
|
||||||
|
@TableField(value = "i_11")
|
||||||
|
private Double i11;
|
||||||
|
|
||||||
|
@TableField(value = "i_12")
|
||||||
|
private Double i12;
|
||||||
|
|
||||||
|
@TableField(value = "i_13")
|
||||||
|
private Double i13;
|
||||||
|
|
||||||
|
@TableField(value = "i_14")
|
||||||
|
private Double i14;
|
||||||
|
|
||||||
|
@TableField(value = "i_15")
|
||||||
|
private Double i15;
|
||||||
|
|
||||||
|
@TableField(value = "i_16")
|
||||||
|
private Double i16;
|
||||||
|
|
||||||
|
@TableField(value = "i_17")
|
||||||
|
private Double i17;
|
||||||
|
|
||||||
|
@TableField(value = "i_18")
|
||||||
|
private Double i18;
|
||||||
|
|
||||||
|
@TableField(value = "i_19")
|
||||||
|
private Double i19;
|
||||||
|
|
||||||
|
@TableField(value = "i_20")
|
||||||
|
private Double i20;
|
||||||
|
|
||||||
|
@TableField(value = "i_21")
|
||||||
|
private Double i21;
|
||||||
|
|
||||||
|
@TableField(value = "i_22")
|
||||||
|
private Double i22;
|
||||||
|
|
||||||
|
@TableField(value = "i_23")
|
||||||
|
private Double i23;
|
||||||
|
|
||||||
|
@TableField(value = "i_24")
|
||||||
|
private Double i24;
|
||||||
|
|
||||||
|
@TableField(value = "i_25")
|
||||||
|
private Double i25;
|
||||||
|
|
||||||
|
@TableField(value = "i_26")
|
||||||
|
private Double i26;
|
||||||
|
|
||||||
|
@TableField(value = "i_27")
|
||||||
|
private Double i27;
|
||||||
|
|
||||||
|
@TableField(value = "i_28")
|
||||||
|
private Double i28;
|
||||||
|
|
||||||
|
@TableField(value = "i_29")
|
||||||
|
private Double i29;
|
||||||
|
|
||||||
|
@TableField(value = "i_30")
|
||||||
|
private Double i30;
|
||||||
|
|
||||||
|
@TableField(value = "i_31")
|
||||||
|
private Double i31;
|
||||||
|
|
||||||
|
@TableField(value = "i_32")
|
||||||
|
private Double i32;
|
||||||
|
|
||||||
|
@TableField(value = "i_33")
|
||||||
|
private Double i33;
|
||||||
|
|
||||||
|
@TableField(value = "i_34")
|
||||||
|
private Double i34;
|
||||||
|
|
||||||
|
@TableField(value = "i_35")
|
||||||
|
private Double i35;
|
||||||
|
|
||||||
|
@TableField(value = "i_36")
|
||||||
|
private Double i36;
|
||||||
|
|
||||||
|
@TableField(value = "i_37")
|
||||||
|
private Double i37;
|
||||||
|
|
||||||
|
@TableField(value = "i_38")
|
||||||
|
private Double i38;
|
||||||
|
|
||||||
|
@TableField(value = "i_39")
|
||||||
|
private Double i39;
|
||||||
|
|
||||||
|
@TableField(value = "i_40")
|
||||||
|
private Double i40;
|
||||||
|
|
||||||
|
@TableField(value = "i_41")
|
||||||
|
private Double i41;
|
||||||
|
|
||||||
|
@TableField(value = "i_42")
|
||||||
|
private Double i42;
|
||||||
|
|
||||||
|
@TableField(value = "i_43")
|
||||||
|
private Double i43;
|
||||||
|
|
||||||
|
@TableField(value = "i_44")
|
||||||
|
private Double i44;
|
||||||
|
|
||||||
|
@TableField(value = "i_45")
|
||||||
|
private Double i45;
|
||||||
|
|
||||||
|
@TableField(value = "i_46")
|
||||||
|
private Double i46;
|
||||||
|
|
||||||
|
@TableField(value = "i_47")
|
||||||
|
private Double i47;
|
||||||
|
|
||||||
|
@TableField(value = "i_48")
|
||||||
|
private Double i48;
|
||||||
|
|
||||||
|
@TableField(value = "i_49")
|
||||||
|
private Double i49;
|
||||||
|
|
||||||
|
@TableField(value = "i_50")
|
||||||
|
private Double i50;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_harmrate_v_d")
|
||||||
|
public class RStatDataHarmrateVDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "v_1")
|
||||||
|
private Double v1;
|
||||||
|
|
||||||
|
@TableField(value = "v_2")
|
||||||
|
private Double v2;
|
||||||
|
|
||||||
|
@TableField(value = "v_3")
|
||||||
|
private Double v3;
|
||||||
|
|
||||||
|
@TableField(value = "v_4")
|
||||||
|
private Double v4;
|
||||||
|
|
||||||
|
@TableField(value = "v_5")
|
||||||
|
private Double v5;
|
||||||
|
|
||||||
|
@TableField(value = "v_6")
|
||||||
|
private Double v6;
|
||||||
|
|
||||||
|
@TableField(value = "v_7")
|
||||||
|
private Double v7;
|
||||||
|
|
||||||
|
@TableField(value = "v_8")
|
||||||
|
private Double v8;
|
||||||
|
|
||||||
|
@TableField(value = "v_9")
|
||||||
|
private Double v9;
|
||||||
|
|
||||||
|
@TableField(value = "v_10")
|
||||||
|
private Double v10;
|
||||||
|
|
||||||
|
@TableField(value = "v_11")
|
||||||
|
private Double v11;
|
||||||
|
|
||||||
|
@TableField(value = "v_12")
|
||||||
|
private Double v12;
|
||||||
|
|
||||||
|
@TableField(value = "v_13")
|
||||||
|
private Double v13;
|
||||||
|
|
||||||
|
@TableField(value = "v_14")
|
||||||
|
private Double v14;
|
||||||
|
|
||||||
|
@TableField(value = "v_15")
|
||||||
|
private Double v15;
|
||||||
|
|
||||||
|
@TableField(value = "v_16")
|
||||||
|
private Double v16;
|
||||||
|
|
||||||
|
@TableField(value = "v_17")
|
||||||
|
private Double v17;
|
||||||
|
|
||||||
|
@TableField(value = "v_18")
|
||||||
|
private Double v18;
|
||||||
|
|
||||||
|
@TableField(value = "v_19")
|
||||||
|
private Double v19;
|
||||||
|
|
||||||
|
@TableField(value = "v_20")
|
||||||
|
private Double v20;
|
||||||
|
|
||||||
|
@TableField(value = "v_21")
|
||||||
|
private Double v21;
|
||||||
|
|
||||||
|
@TableField(value = "v_22")
|
||||||
|
private Double v22;
|
||||||
|
|
||||||
|
@TableField(value = "v_23")
|
||||||
|
private Double v23;
|
||||||
|
|
||||||
|
@TableField(value = "v_24")
|
||||||
|
private Double v24;
|
||||||
|
|
||||||
|
@TableField(value = "v_25")
|
||||||
|
private Double v25;
|
||||||
|
|
||||||
|
@TableField(value = "v_26")
|
||||||
|
private Double v26;
|
||||||
|
|
||||||
|
@TableField(value = "v_27")
|
||||||
|
private Double v27;
|
||||||
|
|
||||||
|
@TableField(value = "v_28")
|
||||||
|
private Double v28;
|
||||||
|
|
||||||
|
@TableField(value = "v_29")
|
||||||
|
private Double v29;
|
||||||
|
|
||||||
|
@TableField(value = "v_30")
|
||||||
|
private Double v30;
|
||||||
|
|
||||||
|
@TableField(value = "v_31")
|
||||||
|
private Double v31;
|
||||||
|
|
||||||
|
@TableField(value = "v_32")
|
||||||
|
private Double v32;
|
||||||
|
|
||||||
|
@TableField(value = "v_33")
|
||||||
|
private Double v33;
|
||||||
|
|
||||||
|
@TableField(value = "v_34")
|
||||||
|
private Double v34;
|
||||||
|
|
||||||
|
@TableField(value = "v_35")
|
||||||
|
private Double v35;
|
||||||
|
|
||||||
|
@TableField(value = "v_36")
|
||||||
|
private Double v36;
|
||||||
|
|
||||||
|
@TableField(value = "v_37")
|
||||||
|
private Double v37;
|
||||||
|
|
||||||
|
@TableField(value = "v_38")
|
||||||
|
private Double v38;
|
||||||
|
|
||||||
|
@TableField(value = "v_39")
|
||||||
|
private Double v39;
|
||||||
|
|
||||||
|
@TableField(value = "v_40")
|
||||||
|
private Double v40;
|
||||||
|
|
||||||
|
@TableField(value = "v_41")
|
||||||
|
private Double v41;
|
||||||
|
|
||||||
|
@TableField(value = "v_42")
|
||||||
|
private Double v42;
|
||||||
|
|
||||||
|
@TableField(value = "v_43")
|
||||||
|
private Double v43;
|
||||||
|
|
||||||
|
@TableField(value = "v_44")
|
||||||
|
private Double v44;
|
||||||
|
|
||||||
|
@TableField(value = "v_45")
|
||||||
|
private Double v45;
|
||||||
|
|
||||||
|
@TableField(value = "v_46")
|
||||||
|
private Double v46;
|
||||||
|
|
||||||
|
@TableField(value = "v_47")
|
||||||
|
private Double v47;
|
||||||
|
|
||||||
|
@TableField(value = "v_48")
|
||||||
|
private Double v48;
|
||||||
|
|
||||||
|
@TableField(value = "v_49")
|
||||||
|
private Double v49;
|
||||||
|
|
||||||
|
@TableField(value = "v_50")
|
||||||
|
private Double v50;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_i_d")
|
||||||
|
public class RStatDataIDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "i_neg")
|
||||||
|
private Double iNeg;
|
||||||
|
|
||||||
|
@TableField(value = "i_pos")
|
||||||
|
private Double iPos;
|
||||||
|
|
||||||
|
@TableField(value = "i_thd")
|
||||||
|
private Double iThd;
|
||||||
|
|
||||||
|
@TableField(value = "i_unbalance")
|
||||||
|
private Double iUnbalance;
|
||||||
|
|
||||||
|
@TableField(value = "i_zero")
|
||||||
|
private Double iZero;
|
||||||
|
|
||||||
|
@TableField(value = "rms")
|
||||||
|
private Double rms;
|
||||||
|
|
||||||
|
@TableField(value = "i_1")
|
||||||
|
private Double i1;
|
||||||
|
|
||||||
|
@TableField(value = "i_2")
|
||||||
|
private Double i2;
|
||||||
|
|
||||||
|
@TableField(value = "i_3")
|
||||||
|
private Double i3;
|
||||||
|
|
||||||
|
@TableField(value = "i_4")
|
||||||
|
private Double i4;
|
||||||
|
|
||||||
|
@TableField(value = "i_5")
|
||||||
|
private Double i5;
|
||||||
|
|
||||||
|
@TableField(value = "i_6")
|
||||||
|
private Double i6;
|
||||||
|
|
||||||
|
@TableField(value = "i_7")
|
||||||
|
private Double i7;
|
||||||
|
|
||||||
|
@TableField(value = "i_8")
|
||||||
|
private Double i8;
|
||||||
|
|
||||||
|
@TableField(value = "i_9")
|
||||||
|
private Double i9;
|
||||||
|
|
||||||
|
@TableField(value = "i_10")
|
||||||
|
private Double i10;
|
||||||
|
|
||||||
|
@TableField(value = "i_11")
|
||||||
|
private Double i11;
|
||||||
|
|
||||||
|
@TableField(value = "i_12")
|
||||||
|
private Double i12;
|
||||||
|
|
||||||
|
@TableField(value = "i_13")
|
||||||
|
private Double i13;
|
||||||
|
|
||||||
|
@TableField(value = "i_14")
|
||||||
|
private Double i14;
|
||||||
|
|
||||||
|
@TableField(value = "i_15")
|
||||||
|
private Double i15;
|
||||||
|
|
||||||
|
@TableField(value = "i_16")
|
||||||
|
private Double i16;
|
||||||
|
|
||||||
|
@TableField(value = "i_17")
|
||||||
|
private Double i17;
|
||||||
|
|
||||||
|
@TableField(value = "i_18")
|
||||||
|
private Double i18;
|
||||||
|
|
||||||
|
@TableField(value = "i_19")
|
||||||
|
private Double i19;
|
||||||
|
|
||||||
|
@TableField(value = "i_20")
|
||||||
|
private Double i20;
|
||||||
|
|
||||||
|
@TableField(value = "i_21")
|
||||||
|
private Double i21;
|
||||||
|
|
||||||
|
@TableField(value = "i_22")
|
||||||
|
private Double i22;
|
||||||
|
|
||||||
|
@TableField(value = "i_23")
|
||||||
|
private Double i23;
|
||||||
|
|
||||||
|
@TableField(value = "i_24")
|
||||||
|
private Double i24;
|
||||||
|
|
||||||
|
@TableField(value = "i_25")
|
||||||
|
private Double i25;
|
||||||
|
|
||||||
|
@TableField(value = "i_26")
|
||||||
|
private Double i26;
|
||||||
|
|
||||||
|
@TableField(value = "i_27")
|
||||||
|
private Double i27;
|
||||||
|
|
||||||
|
@TableField(value = "i_28")
|
||||||
|
private Double i28;
|
||||||
|
|
||||||
|
@TableField(value = "i_29")
|
||||||
|
private Double i29;
|
||||||
|
|
||||||
|
@TableField(value = "i_30")
|
||||||
|
private Double i30;
|
||||||
|
|
||||||
|
@TableField(value = "i_31")
|
||||||
|
private Double i31;
|
||||||
|
|
||||||
|
@TableField(value = "i_32")
|
||||||
|
private Double i32;
|
||||||
|
|
||||||
|
@TableField(value = "i_33")
|
||||||
|
private Double i33;
|
||||||
|
|
||||||
|
@TableField(value = "i_34")
|
||||||
|
private Double i34;
|
||||||
|
|
||||||
|
@TableField(value = "i_35")
|
||||||
|
private Double i35;
|
||||||
|
|
||||||
|
@TableField(value = "i_36")
|
||||||
|
private Double i36;
|
||||||
|
|
||||||
|
@TableField(value = "i_37")
|
||||||
|
private Double i37;
|
||||||
|
|
||||||
|
@TableField(value = "i_38")
|
||||||
|
private Double i38;
|
||||||
|
|
||||||
|
@TableField(value = "i_39")
|
||||||
|
private Double i39;
|
||||||
|
|
||||||
|
@TableField(value = "i_40")
|
||||||
|
private Double i40;
|
||||||
|
|
||||||
|
@TableField(value = "i_41")
|
||||||
|
private Double i41;
|
||||||
|
|
||||||
|
@TableField(value = "i_42")
|
||||||
|
private Double i42;
|
||||||
|
|
||||||
|
@TableField(value = "i_43")
|
||||||
|
private Double i43;
|
||||||
|
|
||||||
|
@TableField(value = "i_44")
|
||||||
|
private Double i44;
|
||||||
|
|
||||||
|
@TableField(value = "i_45")
|
||||||
|
private Double i45;
|
||||||
|
|
||||||
|
@TableField(value = "i_46")
|
||||||
|
private Double i46;
|
||||||
|
|
||||||
|
@TableField(value = "i_47")
|
||||||
|
private Double i47;
|
||||||
|
|
||||||
|
@TableField(value = "i_48")
|
||||||
|
private Double i48;
|
||||||
|
|
||||||
|
@TableField(value = "i_49")
|
||||||
|
private Double i49;
|
||||||
|
|
||||||
|
@TableField(value = "i_50")
|
||||||
|
private Double i50;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_inharm_i_d")
|
||||||
|
public class RStatDataInharmIDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "i_1")
|
||||||
|
private Double i1;
|
||||||
|
|
||||||
|
@TableField(value = "i_2")
|
||||||
|
private Double i2;
|
||||||
|
|
||||||
|
@TableField(value = "i_3")
|
||||||
|
private Double i3;
|
||||||
|
|
||||||
|
@TableField(value = "i_4")
|
||||||
|
private Double i4;
|
||||||
|
|
||||||
|
@TableField(value = "i_5")
|
||||||
|
private Double i5;
|
||||||
|
|
||||||
|
@TableField(value = "i_6")
|
||||||
|
private Double i6;
|
||||||
|
|
||||||
|
@TableField(value = "i_7")
|
||||||
|
private Double i7;
|
||||||
|
|
||||||
|
@TableField(value = "i_8")
|
||||||
|
private Double i8;
|
||||||
|
|
||||||
|
@TableField(value = "i_9")
|
||||||
|
private Double i9;
|
||||||
|
|
||||||
|
@TableField(value = "i_10")
|
||||||
|
private Double i10;
|
||||||
|
|
||||||
|
@TableField(value = "i_11")
|
||||||
|
private Double i11;
|
||||||
|
|
||||||
|
@TableField(value = "i_12")
|
||||||
|
private Double i12;
|
||||||
|
|
||||||
|
@TableField(value = "i_13")
|
||||||
|
private Double i13;
|
||||||
|
|
||||||
|
@TableField(value = "i_14")
|
||||||
|
private Double i14;
|
||||||
|
|
||||||
|
@TableField(value = "i_15")
|
||||||
|
private Double i15;
|
||||||
|
|
||||||
|
@TableField(value = "i_16")
|
||||||
|
private Double i16;
|
||||||
|
|
||||||
|
@TableField(value = "i_17")
|
||||||
|
private Double i17;
|
||||||
|
|
||||||
|
@TableField(value = "i_18")
|
||||||
|
private Double i18;
|
||||||
|
|
||||||
|
@TableField(value = "i_19")
|
||||||
|
private Double i19;
|
||||||
|
|
||||||
|
@TableField(value = "i_20")
|
||||||
|
private Double i20;
|
||||||
|
|
||||||
|
@TableField(value = "i_21")
|
||||||
|
private Double i21;
|
||||||
|
|
||||||
|
@TableField(value = "i_22")
|
||||||
|
private Double i22;
|
||||||
|
|
||||||
|
@TableField(value = "i_23")
|
||||||
|
private Double i23;
|
||||||
|
|
||||||
|
@TableField(value = "i_24")
|
||||||
|
private Double i24;
|
||||||
|
|
||||||
|
@TableField(value = "i_25")
|
||||||
|
private Double i25;
|
||||||
|
|
||||||
|
@TableField(value = "i_26")
|
||||||
|
private Double i26;
|
||||||
|
|
||||||
|
@TableField(value = "i_27")
|
||||||
|
private Double i27;
|
||||||
|
|
||||||
|
@TableField(value = "i_28")
|
||||||
|
private Double i28;
|
||||||
|
|
||||||
|
@TableField(value = "i_29")
|
||||||
|
private Double i29;
|
||||||
|
|
||||||
|
@TableField(value = "i_30")
|
||||||
|
private Double i30;
|
||||||
|
|
||||||
|
@TableField(value = "i_31")
|
||||||
|
private Double i31;
|
||||||
|
|
||||||
|
@TableField(value = "i_32")
|
||||||
|
private Double i32;
|
||||||
|
|
||||||
|
@TableField(value = "i_33")
|
||||||
|
private Double i33;
|
||||||
|
|
||||||
|
@TableField(value = "i_34")
|
||||||
|
private Double i34;
|
||||||
|
|
||||||
|
@TableField(value = "i_35")
|
||||||
|
private Double i35;
|
||||||
|
|
||||||
|
@TableField(value = "i_36")
|
||||||
|
private Double i36;
|
||||||
|
|
||||||
|
@TableField(value = "i_37")
|
||||||
|
private Double i37;
|
||||||
|
|
||||||
|
@TableField(value = "i_38")
|
||||||
|
private Double i38;
|
||||||
|
|
||||||
|
@TableField(value = "i_39")
|
||||||
|
private Double i39;
|
||||||
|
|
||||||
|
@TableField(value = "i_40")
|
||||||
|
private Double i40;
|
||||||
|
|
||||||
|
@TableField(value = "i_41")
|
||||||
|
private Double i41;
|
||||||
|
|
||||||
|
@TableField(value = "i_42")
|
||||||
|
private Double i42;
|
||||||
|
|
||||||
|
@TableField(value = "i_43")
|
||||||
|
private Double i43;
|
||||||
|
|
||||||
|
@TableField(value = "i_44")
|
||||||
|
private Double i44;
|
||||||
|
|
||||||
|
@TableField(value = "i_45")
|
||||||
|
private Double i45;
|
||||||
|
|
||||||
|
@TableField(value = "i_46")
|
||||||
|
private Double i46;
|
||||||
|
|
||||||
|
@TableField(value = "i_47")
|
||||||
|
private Double i47;
|
||||||
|
|
||||||
|
@TableField(value = "i_48")
|
||||||
|
private Double i48;
|
||||||
|
|
||||||
|
@TableField(value = "i_49")
|
||||||
|
private Double i49;
|
||||||
|
|
||||||
|
@TableField(value = "i_50")
|
||||||
|
private Double i50;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:36
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_inharm_v_d")
|
||||||
|
public class RStatDataInharmVDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "v_1")
|
||||||
|
private Double v1;
|
||||||
|
|
||||||
|
@TableField(value = "v_2")
|
||||||
|
private Double v2;
|
||||||
|
|
||||||
|
@TableField(value = "v_3")
|
||||||
|
private Double v3;
|
||||||
|
|
||||||
|
@TableField(value = "v_4")
|
||||||
|
private Double v4;
|
||||||
|
|
||||||
|
@TableField(value = "v_5")
|
||||||
|
private Double v5;
|
||||||
|
|
||||||
|
@TableField(value = "v_6")
|
||||||
|
private Double v6;
|
||||||
|
|
||||||
|
@TableField(value = "v_7")
|
||||||
|
private Double v7;
|
||||||
|
|
||||||
|
@TableField(value = "v_8")
|
||||||
|
private Double v8;
|
||||||
|
|
||||||
|
@TableField(value = "v_9")
|
||||||
|
private Double v9;
|
||||||
|
|
||||||
|
@TableField(value = "v_10")
|
||||||
|
private Double v10;
|
||||||
|
|
||||||
|
@TableField(value = "v_11")
|
||||||
|
private Double v11;
|
||||||
|
|
||||||
|
@TableField(value = "v_12")
|
||||||
|
private Double v12;
|
||||||
|
|
||||||
|
@TableField(value = "v_13")
|
||||||
|
private Double v13;
|
||||||
|
|
||||||
|
@TableField(value = "v_14")
|
||||||
|
private Double v14;
|
||||||
|
|
||||||
|
@TableField(value = "v_15")
|
||||||
|
private Double v15;
|
||||||
|
|
||||||
|
@TableField(value = "v_16")
|
||||||
|
private Double v16;
|
||||||
|
|
||||||
|
@TableField(value = "v_17")
|
||||||
|
private Double v17;
|
||||||
|
|
||||||
|
@TableField(value = "v_18")
|
||||||
|
private Double v18;
|
||||||
|
|
||||||
|
@TableField(value = "v_19")
|
||||||
|
private Double v19;
|
||||||
|
|
||||||
|
@TableField(value = "v_20")
|
||||||
|
private Double v20;
|
||||||
|
|
||||||
|
@TableField(value = "v_21")
|
||||||
|
private Double v21;
|
||||||
|
|
||||||
|
@TableField(value = "v_22")
|
||||||
|
private Double v22;
|
||||||
|
|
||||||
|
@TableField(value = "v_23")
|
||||||
|
private Double v23;
|
||||||
|
|
||||||
|
@TableField(value = "v_24")
|
||||||
|
private Double v24;
|
||||||
|
|
||||||
|
@TableField(value = "v_25")
|
||||||
|
private Double v25;
|
||||||
|
|
||||||
|
@TableField(value = "v_26")
|
||||||
|
private Double v26;
|
||||||
|
|
||||||
|
@TableField(value = "v_27")
|
||||||
|
private Double v27;
|
||||||
|
|
||||||
|
@TableField(value = "v_28")
|
||||||
|
private Double v28;
|
||||||
|
|
||||||
|
@TableField(value = "v_29")
|
||||||
|
private Double v29;
|
||||||
|
|
||||||
|
@TableField(value = "v_30")
|
||||||
|
private Double v30;
|
||||||
|
|
||||||
|
@TableField(value = "v_31")
|
||||||
|
private Double v31;
|
||||||
|
|
||||||
|
@TableField(value = "v_32")
|
||||||
|
private Double v32;
|
||||||
|
|
||||||
|
@TableField(value = "v_33")
|
||||||
|
private Double v33;
|
||||||
|
|
||||||
|
@TableField(value = "v_34")
|
||||||
|
private Double v34;
|
||||||
|
|
||||||
|
@TableField(value = "v_35")
|
||||||
|
private Double v35;
|
||||||
|
|
||||||
|
@TableField(value = "v_36")
|
||||||
|
private Double v36;
|
||||||
|
|
||||||
|
@TableField(value = "v_37")
|
||||||
|
private Double v37;
|
||||||
|
|
||||||
|
@TableField(value = "v_38")
|
||||||
|
private Double v38;
|
||||||
|
|
||||||
|
@TableField(value = "v_39")
|
||||||
|
private Double v39;
|
||||||
|
|
||||||
|
@TableField(value = "v_40")
|
||||||
|
private Double v40;
|
||||||
|
|
||||||
|
@TableField(value = "v_41")
|
||||||
|
private Double v41;
|
||||||
|
|
||||||
|
@TableField(value = "v_42")
|
||||||
|
private Double v42;
|
||||||
|
|
||||||
|
@TableField(value = "v_43")
|
||||||
|
private Double v43;
|
||||||
|
|
||||||
|
@TableField(value = "v_44")
|
||||||
|
private Double v44;
|
||||||
|
|
||||||
|
@TableField(value = "v_45")
|
||||||
|
private Double v45;
|
||||||
|
|
||||||
|
@TableField(value = "v_46")
|
||||||
|
private Double v46;
|
||||||
|
|
||||||
|
@TableField(value = "v_47")
|
||||||
|
private Double v47;
|
||||||
|
|
||||||
|
@TableField(value = "v_48")
|
||||||
|
private Double v48;
|
||||||
|
|
||||||
|
@TableField(value = "v_49")
|
||||||
|
private Double v49;
|
||||||
|
|
||||||
|
@TableField(value = "v_50")
|
||||||
|
private Double v50;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_plt_d")
|
||||||
|
public class RStatDataPltDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "plt")
|
||||||
|
private Double plt;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类的介绍:
|
||||||
|
*
|
||||||
|
* @author xuyang
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2023/3/24 14:29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_data_v_d")
|
||||||
|
public class RStatDataVDPO implements Serializable {
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phaseType;
|
||||||
|
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "value_type")
|
||||||
|
private String valueType;
|
||||||
|
|
||||||
|
@TableField(value = "quality_flag")
|
||||||
|
private Integer qualityFlag;
|
||||||
|
|
||||||
|
@TableField(value = "freq")
|
||||||
|
private Double freq;
|
||||||
|
|
||||||
|
@TableField(value = "freq_dev")
|
||||||
|
private Double freqDev;
|
||||||
|
|
||||||
|
@TableField(value = "rms")
|
||||||
|
private Double rms;
|
||||||
|
|
||||||
|
@TableField(value = "rms_lvr")
|
||||||
|
private Double rmsLvr;
|
||||||
|
|
||||||
|
@TableField(value = "v_neg")
|
||||||
|
private Double vNeg;
|
||||||
|
|
||||||
|
@TableField(value = "v_pos")
|
||||||
|
private Double vPos;
|
||||||
|
|
||||||
|
@TableField(value = "v_thd")
|
||||||
|
private Double vThd;
|
||||||
|
|
||||||
|
@TableField(value = "v_unbalance")
|
||||||
|
private Double vUnbalance;
|
||||||
|
|
||||||
|
@TableField(value = "v_zero")
|
||||||
|
private Double vZero;
|
||||||
|
|
||||||
|
@TableField(value = "vl_dev")
|
||||||
|
private Double vlDev;
|
||||||
|
|
||||||
|
@TableField(value = "vu_dev")
|
||||||
|
private Double vuDev;
|
||||||
|
|
||||||
|
@TableField(value = "v_1")
|
||||||
|
private Double v1;
|
||||||
|
|
||||||
|
@TableField(value = "v_2")
|
||||||
|
private Double v2;
|
||||||
|
|
||||||
|
@TableField(value = "v_3")
|
||||||
|
private Double v3;
|
||||||
|
|
||||||
|
@TableField(value = "v_4")
|
||||||
|
private Double v4;
|
||||||
|
|
||||||
|
@TableField(value = "v_5")
|
||||||
|
private Double v5;
|
||||||
|
|
||||||
|
@TableField(value = "v_6")
|
||||||
|
private Double v6;
|
||||||
|
|
||||||
|
@TableField(value = "v_7")
|
||||||
|
private Double v7;
|
||||||
|
|
||||||
|
@TableField(value = "v_8")
|
||||||
|
private Double v8;
|
||||||
|
|
||||||
|
@TableField(value = "v_9")
|
||||||
|
private Double v9;
|
||||||
|
|
||||||
|
@TableField(value = "v_10")
|
||||||
|
private Double v10;
|
||||||
|
|
||||||
|
@TableField(value = "v_11")
|
||||||
|
private Double v11;
|
||||||
|
|
||||||
|
@TableField(value = "v_12")
|
||||||
|
private Double v12;
|
||||||
|
|
||||||
|
@TableField(value = "v_13")
|
||||||
|
private Double v13;
|
||||||
|
|
||||||
|
@TableField(value = "v_14")
|
||||||
|
private Double v14;
|
||||||
|
|
||||||
|
@TableField(value = "v_15")
|
||||||
|
private Double v15;
|
||||||
|
|
||||||
|
@TableField(value = "v_16")
|
||||||
|
private Double v16;
|
||||||
|
|
||||||
|
@TableField(value = "v_17")
|
||||||
|
private Double v17;
|
||||||
|
|
||||||
|
@TableField(value = "v_18")
|
||||||
|
private Double v18;
|
||||||
|
|
||||||
|
@TableField(value = "v_19")
|
||||||
|
private Double v19;
|
||||||
|
|
||||||
|
@TableField(value = "v_20")
|
||||||
|
private Double v20;
|
||||||
|
|
||||||
|
@TableField(value = "v_21")
|
||||||
|
private Double v21;
|
||||||
|
|
||||||
|
@TableField(value = "v_22")
|
||||||
|
private Double v22;
|
||||||
|
|
||||||
|
@TableField(value = "v_23")
|
||||||
|
private Double v23;
|
||||||
|
|
||||||
|
@TableField(value = "v_24")
|
||||||
|
private Double v24;
|
||||||
|
|
||||||
|
@TableField(value = "v_25")
|
||||||
|
private Double v25;
|
||||||
|
|
||||||
|
@TableField(value = "v_26")
|
||||||
|
private Double v26;
|
||||||
|
|
||||||
|
@TableField(value = "v_27")
|
||||||
|
private Double v27;
|
||||||
|
|
||||||
|
@TableField(value = "v_28")
|
||||||
|
private Double v28;
|
||||||
|
|
||||||
|
@TableField(value = "v_29")
|
||||||
|
private Double v29;
|
||||||
|
|
||||||
|
@TableField(value = "v_30")
|
||||||
|
private Double v30;
|
||||||
|
|
||||||
|
@TableField(value = "v_31")
|
||||||
|
private Double v31;
|
||||||
|
|
||||||
|
@TableField(value = "v_32")
|
||||||
|
private Double v32;
|
||||||
|
|
||||||
|
@TableField(value = "v_33")
|
||||||
|
private Double v33;
|
||||||
|
|
||||||
|
@TableField(value = "v_34")
|
||||||
|
private Double v34;
|
||||||
|
|
||||||
|
@TableField(value = "v_35")
|
||||||
|
private Double v35;
|
||||||
|
|
||||||
|
@TableField(value = "v_36")
|
||||||
|
private Double v36;
|
||||||
|
|
||||||
|
@TableField(value = "v_37")
|
||||||
|
private Double v37;
|
||||||
|
|
||||||
|
@TableField(value = "v_38")
|
||||||
|
private Double v38;
|
||||||
|
|
||||||
|
@TableField(value = "v_39")
|
||||||
|
private Double v39;
|
||||||
|
|
||||||
|
@TableField(value = "v_40")
|
||||||
|
private Double v40;
|
||||||
|
|
||||||
|
@TableField(value = "v_41")
|
||||||
|
private Double v41;
|
||||||
|
|
||||||
|
@TableField(value = "v_42")
|
||||||
|
private Double v42;
|
||||||
|
|
||||||
|
@TableField(value = "v_43")
|
||||||
|
private Double v43;
|
||||||
|
|
||||||
|
@TableField(value = "v_44")
|
||||||
|
private Double v44;
|
||||||
|
|
||||||
|
@TableField(value = "v_45")
|
||||||
|
private Double v45;
|
||||||
|
|
||||||
|
@TableField(value = "v_46")
|
||||||
|
private Double v46;
|
||||||
|
|
||||||
|
@TableField(value = "v_47")
|
||||||
|
private Double v47;
|
||||||
|
|
||||||
|
@TableField(value = "v_48")
|
||||||
|
private Double v48;
|
||||||
|
|
||||||
|
@TableField(value = "v_49")
|
||||||
|
private Double v49;
|
||||||
|
|
||||||
|
@TableField(value = "v_50")
|
||||||
|
private Double v50;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,469 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.po.day;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@TableName(value = "r_stat_limit_target_d")
|
||||||
|
public class RStatLimitTargetDPO{
|
||||||
|
/**
|
||||||
|
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "my_index")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型,’A’表示A相,’B’表示B相,’C’表示C相,’’M’表示ABC三项总和,T’表示总
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phasicType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格率时间
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time_id")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总计算次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "all_time")
|
||||||
|
private Integer allTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变总计算次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "flicker_all_time")
|
||||||
|
private Integer flickerAllTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "flicker_overtime")
|
||||||
|
private Integer flickerOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 频率偏差越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "freq_dev_overtime")
|
||||||
|
private Integer freqDevOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "voltage_dev_overtime")
|
||||||
|
private Integer voltageDevOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压不平衡度越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "ubalance_overtime")
|
||||||
|
private Integer ubalanceOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压谐波畸变率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uaberrance_overtime")
|
||||||
|
private Integer uaberranceOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负序电流限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "i_neg_overtime")
|
||||||
|
private Integer iNegOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_2_overtime")
|
||||||
|
private Integer uharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_3_overtime")
|
||||||
|
private Integer uharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_4_overtime")
|
||||||
|
private Integer uharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_5_overtime")
|
||||||
|
private Integer uharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_6_overtime")
|
||||||
|
private Integer uharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_7_overtime")
|
||||||
|
private Integer uharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_8_overtime")
|
||||||
|
private Integer uharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_9_overtime")
|
||||||
|
private Integer uharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_10_overtime")
|
||||||
|
private Integer uharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_11_overtime")
|
||||||
|
private Integer uharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_12_overtime")
|
||||||
|
private Integer uharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_13_overtime")
|
||||||
|
private Integer uharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_14_overtime")
|
||||||
|
private Integer uharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_15_overtime")
|
||||||
|
private Integer uharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 16次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_16_overtime")
|
||||||
|
private Integer uharm16Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 17次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_17_overtime")
|
||||||
|
private Integer uharm17Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 18次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_18_overtime")
|
||||||
|
private Integer uharm18Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_19_overtime")
|
||||||
|
private Integer uharm19Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_20_overtime")
|
||||||
|
private Integer uharm20Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 21次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_21_overtime")
|
||||||
|
private Integer uharm21Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 22次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_22_overtime")
|
||||||
|
private Integer uharm22Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 23次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_23_overtime")
|
||||||
|
private Integer uharm23Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_24_overtime")
|
||||||
|
private Integer uharm24Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 25次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_25_overtime")
|
||||||
|
private Integer uharm25Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_2_overtime")
|
||||||
|
private Integer iharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_3_overtime")
|
||||||
|
private Integer iharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_4_overtime")
|
||||||
|
private Integer iharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_5_overtime")
|
||||||
|
private Integer iharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_6_overtime")
|
||||||
|
private Integer iharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_7_overtime")
|
||||||
|
private Integer iharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_8_overtime")
|
||||||
|
private Integer iharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_9_overtime")
|
||||||
|
private Integer iharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_10_overtime")
|
||||||
|
private Integer iharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_11_overtime")
|
||||||
|
private Integer iharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_12_overtime")
|
||||||
|
private Integer iharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_13_overtime")
|
||||||
|
private Integer iharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_14_overtime")
|
||||||
|
private Integer iharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_15_overtime")
|
||||||
|
private Integer iharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 16次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_16_overtime")
|
||||||
|
private Integer iharm16Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 17次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_17_overtime")
|
||||||
|
private Integer iharm17Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 18次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_18_overtime")
|
||||||
|
private Integer iharm18Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_19_overtime")
|
||||||
|
private Integer iharm19Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_20_overtime")
|
||||||
|
private Integer iharm20Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 21次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_21_overtime")
|
||||||
|
private Integer iharm21Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 22次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_22_overtime")
|
||||||
|
private Integer iharm22Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 23次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_23_overtime")
|
||||||
|
private Integer iharm23Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_24_overtime")
|
||||||
|
private Integer iharm24Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 25次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_25_overtime")
|
||||||
|
private Integer iharm25Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_1_overtime")
|
||||||
|
private Integer inuharm1Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_2_overtime")
|
||||||
|
private Integer inuharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_3_overtime")
|
||||||
|
private Integer inuharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_4_overtime")
|
||||||
|
private Integer inuharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_5_overtime")
|
||||||
|
private Integer inuharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_6_overtime")
|
||||||
|
private Integer inuharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_7_overtime")
|
||||||
|
private Integer inuharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_8_overtime")
|
||||||
|
private Integer inuharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_9_overtime")
|
||||||
|
private Integer inuharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_10_overtime")
|
||||||
|
private Integer inuharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_11_overtime")
|
||||||
|
private Integer inuharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_12_overtime")
|
||||||
|
private Integer inuharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_13_overtime")
|
||||||
|
private Integer inuharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_14_overtime")
|
||||||
|
private Integer inuharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_15_overtime")
|
||||||
|
private Integer inuharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_16_overtime")
|
||||||
|
private Integer inuharm16Overtime;
|
||||||
|
}
|
||||||
@@ -31,6 +31,8 @@ public class CsConfigurationVO extends BaseEntity {
|
|||||||
|
|
||||||
private Integer orderBy;
|
private Integer orderBy;
|
||||||
|
|
||||||
|
private Integer scope;
|
||||||
|
|
||||||
|
|
||||||
private List<String> projectIds;
|
private List<String> projectIds;
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ public class CsRtDataVO {
|
|||||||
@ApiModelProperty("指标显示名称")
|
@ApiModelProperty("指标显示名称")
|
||||||
private String statisticalName;
|
private String statisticalName;
|
||||||
|
|
||||||
|
@ApiModelProperty("指标单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
@ApiModelProperty("指标名称")
|
@ApiModelProperty("指标名称")
|
||||||
private String target;
|
private String target;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组态下事件描述实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CsWarnDescVO implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称,比如监测点名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发生时间
|
||||||
|
*/
|
||||||
|
private String timeId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事件描述eventDesc
|
||||||
|
*/
|
||||||
|
private String eventDesc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间
|
||||||
|
*/
|
||||||
|
private Double persistTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂降幅值
|
||||||
|
*/
|
||||||
|
private Double amplitude;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DISDIP表格
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月01日 15:46
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class DISDIPVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "name",value = "剩余电压/持续时间")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "twentyMs",value = "20ms")
|
||||||
|
private String twentyMs;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "oneHundredMs",value = "100ms")
|
||||||
|
private String oneHundredMs;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "fiveHundredMs",value = "500ms")
|
||||||
|
private String fiveHundredMs;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "oneS",value = "1s")
|
||||||
|
private String oneS;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "threeS",value = "3s")
|
||||||
|
private String threeS;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "twentyS",value = "20s")
|
||||||
|
private String twentyS;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "sixtyS",value = "60s")
|
||||||
|
private String sixtyS;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "oneEightyS",value = "180s")
|
||||||
|
private String oneEightyS;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月01日 16:09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class IEC28VO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "name",value = "剩余电压/持续时间")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "q",value = "0.01~0.1s")
|
||||||
|
private String q;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "w",value = "0.1~0.25s")
|
||||||
|
private String w;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "e",value = "0.25~0.5s")
|
||||||
|
private String e;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "r",value = "0.5~1s")
|
||||||
|
private String r;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "t",value = "1~3s")
|
||||||
|
private String t;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "y",value = "3~20s")
|
||||||
|
private String y;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "u",value = "20~60s")
|
||||||
|
private String u;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "i",value = "60~180s")
|
||||||
|
private String i;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IEC411
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月01日 16:00
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class IEC411VO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "name",value = "剩余电压/持续时间")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "tenTwentyMs",value = "10~20ms")
|
||||||
|
private String tenTwentyMs;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "twentyOneHundredMs",value = "20~100ms")
|
||||||
|
private String twentyOneHundredMs;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "zeroPiontOneTwoS",value = "0.1~0.2s")
|
||||||
|
private String zeroPiontOneTwoS;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "zeroPiontTwoFiveS",value = "0.2~0.5s")
|
||||||
|
private String zeroPiontTwoFiveS;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "zeroPiontFive1S",value = "0.5~1s")
|
||||||
|
private String zeroPiontFive1S;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "greater1S",value = ">1s")
|
||||||
|
private String greater1S;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月03日 15:31
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ProbabilityVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "eventvalue")
|
||||||
|
private List<String> eventvalue;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "pereventvalue")
|
||||||
|
private List<String> pereventvalue;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "persisttime")
|
||||||
|
private List<String> persisttime;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "sisttime")
|
||||||
|
private List<String> sisttime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月03日 09:03
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ReasonsVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "reason",value = "原因")
|
||||||
|
private String reason;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "times",value = "次数")
|
||||||
|
private Integer times;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "rate",value = "占比")
|
||||||
|
private String rate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import com.njcn.csharmonic.pojo.dto.eventReport.EventDetail;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月02日 16:01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class StatisticVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "cityName",value = "城市名称")
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "detail")
|
||||||
|
private List<EventDetail> detail;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "f47")
|
||||||
|
private String f47;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "itic")
|
||||||
|
private String itic;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "reason")
|
||||||
|
private List<ReasonsVO> reason;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "totalTimes")
|
||||||
|
private Integer totalTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "types")
|
||||||
|
private List<TypesVO> types;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月02日 10:45
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TimeVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "amounts")
|
||||||
|
private String amounts;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "handledTimes")
|
||||||
|
private String handledTimes;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "days",value = "天数")
|
||||||
|
private String day;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "month",value = "月份")
|
||||||
|
private String month;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "times")
|
||||||
|
private String times;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "year",value = "年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "fulltime",value = "时间全称")
|
||||||
|
private String fulltime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.eventReport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xxy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2022年08月03日 09:07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class TypesVO implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "type",value = "类型")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "times",value = "次数")
|
||||||
|
private Integer times;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.njcn.csharmonic.pojo.vo.report;
|
||||||
|
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wr
|
||||||
|
* @description
|
||||||
|
* @date 2023/4/10 15:36
|
||||||
|
*/
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ReportValue implements Serializable {
|
||||||
|
|
||||||
|
private String phaseType; //A(AB)相,B(BC)相,C(CA)相,T总功
|
||||||
|
private Float fmaxValue; //最大值
|
||||||
|
private Float minValue; //最小值
|
||||||
|
private Float meanValue; //平均值
|
||||||
|
private Float cp95Value; //CP95值
|
||||||
|
|
||||||
|
public String getPhaseType() {
|
||||||
|
return phaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Float getFmaxValue() {
|
||||||
|
return fmaxValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Float getMinValue() {
|
||||||
|
return minValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Float getMeanValue() {
|
||||||
|
return meanValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Float getCp95Value() {
|
||||||
|
return cp95Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhaseType(String phaseType) {
|
||||||
|
this.phaseType = phaseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFmaxValue(Float fmaxValue) {
|
||||||
|
this.fmaxValue = transData(fmaxValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinValue(Float minValue) {
|
||||||
|
this.minValue = transData(minValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMeanValue(Float meanValue) {
|
||||||
|
this.meanValue = transData(meanValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCp95Value(Float cp95Value) {
|
||||||
|
this.cp95Value = transData(cp95Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReportValue(String phaseType, Float maxValue, Float minValue, Float meanValue, Float cp95Value) {
|
||||||
|
this.phaseType = phaseType;
|
||||||
|
this.fmaxValue = transData(maxValue);
|
||||||
|
this.minValue = transData(minValue);
|
||||||
|
this.meanValue = transData(meanValue);
|
||||||
|
this.cp95Value = transData(cp95Value);
|
||||||
|
}
|
||||||
|
private Float transData(Float f) {
|
||||||
|
if (f == null) {
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
float f1 = (float) (Math.round(f.floatValue() * 100)) / 100;
|
||||||
|
return new Float(f1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,350 @@
|
|||||||
|
package com.njcn.csharmonic.utils.eventReport;
|
||||||
|
|
||||||
|
import org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy;
|
||||||
|
import org.apache.poi.xwpf.usermodel.*;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
|
public class WordUtils {
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args)throws Exception {
|
||||||
|
|
||||||
|
// 空白文档
|
||||||
|
XWPFDocument document= new XWPFDocument();
|
||||||
|
//把文档写进本地系统
|
||||||
|
FileOutputStream out = new FileOutputStream(new File("create_table.docx"));
|
||||||
|
//设定标题格式
|
||||||
|
setHeadingStyle(document);
|
||||||
|
//添加标题
|
||||||
|
XWPFParagraph titleParagraph = document.createParagraph();
|
||||||
|
setParagraphStyle(titleParagraph);
|
||||||
|
addLine(titleParagraph,11);
|
||||||
|
//设置段落居中
|
||||||
|
titleParagraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
XWPFRun titleParagraphRun = titleParagraph.createRun();
|
||||||
|
addParagraph(titleParagraphRun,"宋体",15,"000000","四川省供电公司",true);
|
||||||
|
|
||||||
|
addLine(titleParagraph,3);
|
||||||
|
XWPFRun titleParagraphBigRun = titleParagraph.createRun();
|
||||||
|
addParagraph(titleParagraphBigRun,"宋体",36,"000000","电压暂降事件分析报告",true);
|
||||||
|
addLine(titleParagraph,19);
|
||||||
|
|
||||||
|
XWPFRun titleParagraphDateRun = titleParagraph.createRun();
|
||||||
|
addParagraph(titleParagraphDateRun,"宋体",14,"000000","日期: 2018年1月3号",true);
|
||||||
|
titleParagraph.setPageBreak(true);
|
||||||
|
|
||||||
|
|
||||||
|
//段落
|
||||||
|
XWPFParagraph statisticsParagraph = document.createParagraph();
|
||||||
|
setParagraphStyle(statisticsParagraph);
|
||||||
|
//段前分页
|
||||||
|
statisticsParagraph.setPageBreak(true);
|
||||||
|
statisticsParagraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
XWPFRun statisticsRun = statisticsParagraph.createRun();
|
||||||
|
addParagraph(statisticsRun,"宋体",24,"000000","电压暂降事件分析报告",false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
XWPFParagraph introductionParagraph= document.createParagraph();
|
||||||
|
setParagraphStyle(introductionParagraph);
|
||||||
|
introductionParagraph.setStyle("标题 1");
|
||||||
|
introductionParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
XWPFRun introductionRun = introductionParagraph.createRun();
|
||||||
|
addParagraph(introductionRun,"宋体",15,"000000","1. 引言",true);
|
||||||
|
|
||||||
|
XWPFParagraph introductionContentParagraph = document.createParagraph();
|
||||||
|
// 首行缩进---段落
|
||||||
|
setParagraphStyle(introductionContentParagraph);
|
||||||
|
introductionContentParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
introductionContentParagraph.setIndentationFirstLine(200);
|
||||||
|
XWPFRun introductionContentRun=introductionContentParagraph.createRun();
|
||||||
|
addParagraph(introductionContentRun,"宋体",11,"000000","对所选中区间内电压暂降事件进行分析,能够直观清晰查看相应的暂降事件信息。",false);
|
||||||
|
|
||||||
|
XWPFParagraph objectParagraph=document.createParagraph();
|
||||||
|
setParagraphStyle(objectParagraph);
|
||||||
|
objectParagraph.setStyle("标题 1");
|
||||||
|
objectParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
XWPFRun objectRun= objectParagraph.createRun();
|
||||||
|
addParagraph(objectRun,"宋体",15,"000000","2. 报告分析对象:",true);
|
||||||
|
|
||||||
|
XWPFParagraph objectContentParagraph = document.createParagraph();
|
||||||
|
setParagraphStyle(objectContentParagraph);
|
||||||
|
objectContentParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
objectContentParagraph.setIndentationFirstLine(200);
|
||||||
|
XWPFRun objectContentRun = objectContentParagraph.createRun();
|
||||||
|
addParagraph(objectContentRun,"宋体",11,"000000","成都供电公司—>锦江区变电站—>锦江2号。",false);
|
||||||
|
|
||||||
|
XWPFParagraph timeParagraph = document.createParagraph();
|
||||||
|
timeParagraph.setStyle("标题 1");
|
||||||
|
timeParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
setParagraphStyle(timeParagraph);
|
||||||
|
XWPFRun timeRun = timeParagraph.createRun();
|
||||||
|
addParagraph(timeRun,"宋体",15,"000000","3. 报告分析时间:",true);
|
||||||
|
|
||||||
|
XWPFParagraph timeContentParagraph = document.createParagraph();
|
||||||
|
setParagraphStyle(timeContentParagraph);
|
||||||
|
timeContentParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
timeContentParagraph.setIndentationFirstLine(200);
|
||||||
|
XWPFRun timeContentRun = timeContentParagraph.createRun();
|
||||||
|
addParagraph(timeContentRun,"宋体",11,"000000","2017年12月21日至2017年12月30日。",false);
|
||||||
|
|
||||||
|
|
||||||
|
XWPFParagraph summaeParagraph = document.createParagraph();
|
||||||
|
setParagraphStyle(summaeParagraph);
|
||||||
|
summaeParagraph.setStyle("标题 1");
|
||||||
|
summaeParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
XWPFRun summaeRun = summaeParagraph.createRun();
|
||||||
|
addParagraph(summaeRun,"宋体",15,"000000","4. 汇总信息:",true);
|
||||||
|
|
||||||
|
|
||||||
|
XWPFParagraph summaeTableParagraph = document.createParagraph();
|
||||||
|
setParagraphStyle(summaeTableParagraph);
|
||||||
|
summaeTableParagraph.setStyle("标题 2");
|
||||||
|
summaeTableParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
summaeTableParagraph.setIndentationFirstLine(200);
|
||||||
|
XWPFRun summaeTableRun = summaeTableParagraph.createRun();
|
||||||
|
addParagraph(summaeTableRun,"宋体",11,"000000","4.1 表格",false);
|
||||||
|
|
||||||
|
|
||||||
|
//工作经历表格
|
||||||
|
XWPFTable summaTable = document.createTable();
|
||||||
|
|
||||||
|
//列宽自动分割
|
||||||
|
CTTblWidth summaTableWidth = summaTable.getCTTbl().addNewTblPr().addNewTblW();
|
||||||
|
summaTableWidth.setType(STTblWidth.DXA);
|
||||||
|
summaTableWidth.setW(BigInteger.valueOf(9072));
|
||||||
|
|
||||||
|
//表格第一行
|
||||||
|
XWPFTableRow summaTableRowOne = summaTable.getRow(0);
|
||||||
|
XWPFParagraph excelParagraph= document.createParagraph();
|
||||||
|
setParagraphStyle(excelParagraph);
|
||||||
|
excelParagraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
excelParagraph.setVerticalAlignment(TextAlignment.CENTER);
|
||||||
|
setExcelHeadContent(excelParagraph,summaTableRowOne,"序号","暂降发生时刻","暂降幅值(%)","持续时间(ms)","暂降类型","暂降原因","严重度");
|
||||||
|
|
||||||
|
//表格第二行
|
||||||
|
XWPFTableRow summaTableRowTwo = summaTable.createRow();
|
||||||
|
setExcelContent(excelParagraph,summaTableRowTwo,"1","2017-11-24 14:26:56.490","9","20","未识别","未明","0.91");
|
||||||
|
|
||||||
|
//表格第三行
|
||||||
|
XWPFTableRow summaTableRowThree = summaTable.createRow();
|
||||||
|
setExcelContent(excelParagraph,summaTableRowThree,"2","2017-11-24 14:25:46.472","15","19","未识别","未明","0.85");
|
||||||
|
|
||||||
|
XWPFParagraph summaePicParagraph = document.createParagraph();
|
||||||
|
summaePicParagraph.setStyle("标题 2");
|
||||||
|
summaePicParagraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
summaePicParagraph.setIndentationFirstLine(200);
|
||||||
|
XWPFRun summaePicRun = summaePicParagraph.createRun();
|
||||||
|
addParagraph(summaePicRun,"宋体",11,"000000","4.2 ITIC曲线",false);
|
||||||
|
|
||||||
|
|
||||||
|
CTSectPr sectPr = document.getDocument().getBody().addNewSectPr();
|
||||||
|
XWPFHeaderFooterPolicy policy = new XWPFHeaderFooterPolicy(document, sectPr);
|
||||||
|
|
||||||
|
//添加页眉
|
||||||
|
CTP ctpHeader = CTP.Factory.newInstance();
|
||||||
|
CTR ctrHeader = ctpHeader.addNewR();
|
||||||
|
CTText ctHeader = ctrHeader.addNewT();
|
||||||
|
String headerText = "Java POI create MS word file.";
|
||||||
|
ctHeader.setStringValue(headerText);
|
||||||
|
XWPFParagraph headerParagraph = new XWPFParagraph(ctpHeader, document);
|
||||||
|
//设置为右对齐
|
||||||
|
headerParagraph.setAlignment(ParagraphAlignment.RIGHT);
|
||||||
|
XWPFParagraph[] parsHeader = new XWPFParagraph[1];
|
||||||
|
parsHeader[0] = headerParagraph;
|
||||||
|
policy.createHeader(XWPFHeaderFooterPolicy.DEFAULT, parsHeader);
|
||||||
|
|
||||||
|
|
||||||
|
//添加页脚
|
||||||
|
CTP ctpFooter = CTP.Factory.newInstance();
|
||||||
|
CTR ctrFooter = ctpFooter.addNewR();
|
||||||
|
CTText ctFooter = ctrFooter.addNewT();
|
||||||
|
String footerText = "http://blog.csdn.net/zhouseawater";
|
||||||
|
ctFooter.setStringValue(footerText);
|
||||||
|
XWPFParagraph footerParagraph = new XWPFParagraph(ctpFooter, document);
|
||||||
|
headerParagraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
XWPFParagraph[] parsFooter = new XWPFParagraph[1];
|
||||||
|
parsFooter[0] = footerParagraph;
|
||||||
|
policy.createFooter(XWPFHeaderFooterPolicy.DEFAULT, parsFooter);
|
||||||
|
|
||||||
|
document.write(out);
|
||||||
|
out.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setParagraphStyle(XWPFParagraph paragraph){
|
||||||
|
paragraph.setSpacingBefore(100);
|
||||||
|
paragraph.setSpacingAfter(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回指定格式的段落 居中型
|
||||||
|
* @param document 文档对象
|
||||||
|
*/
|
||||||
|
public static XWPFParagraph getCenterParagraph(XWPFDocument document){
|
||||||
|
XWPFParagraph paragraph = document.createParagraph();
|
||||||
|
setParagraphStyle(paragraph);
|
||||||
|
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
paragraph.setVerticalAlignment(TextAlignment.CENTER);
|
||||||
|
return paragraph;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回指定格式的段落 居左型
|
||||||
|
* @param document 文档对象
|
||||||
|
*/
|
||||||
|
public static XWPFParagraph getLeftParagraph(XWPFDocument document){
|
||||||
|
XWPFParagraph paragraph = document.createParagraph();
|
||||||
|
setParagraphStyle(paragraph);
|
||||||
|
paragraph.setAlignment(ParagraphAlignment.LEFT);
|
||||||
|
return paragraph;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加换行符
|
||||||
|
* @param paragraph 指定段落
|
||||||
|
* @param amount 行数
|
||||||
|
* */
|
||||||
|
public static void addLine(XWPFParagraph paragraph,Integer amount){
|
||||||
|
XWPFRun run = paragraph.createRun();
|
||||||
|
run.setFontSize(11);
|
||||||
|
for(int i=0;i<amount;i++){
|
||||||
|
run.addCarriageReturn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加段落文本
|
||||||
|
* @param run 文本执行对象
|
||||||
|
* @param fontFamily 字体类型
|
||||||
|
* @param fontSize 字体大小
|
||||||
|
* @param backgroundColor 字体颜色
|
||||||
|
* @param bold 是否加粗
|
||||||
|
*/
|
||||||
|
public static void addParagraph(XWPFRun run,String fontFamily,Integer fontSize,String backgroundColor,String message,boolean bold){
|
||||||
|
run.setText(message);
|
||||||
|
run.setColor(backgroundColor);
|
||||||
|
run.setFontSize(fontSize);
|
||||||
|
run.setFontFamily(fontFamily);
|
||||||
|
run.setBold(bold);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加自定义标题样式。这里用的是stackoverflow的源码
|
||||||
|
*
|
||||||
|
* @param docxDocument 目标文档
|
||||||
|
* @param strStyleId 样式名称
|
||||||
|
* @param headingLevel 样式级别
|
||||||
|
*/
|
||||||
|
public static void addCustomHeadingStyle(XWPFDocument docxDocument, String strStyleId, int headingLevel) {
|
||||||
|
|
||||||
|
CTStyle ctStyle = CTStyle.Factory.newInstance();
|
||||||
|
ctStyle.setStyleId(strStyleId);
|
||||||
|
|
||||||
|
CTString styleName = CTString.Factory.newInstance();
|
||||||
|
styleName.setVal(strStyleId);
|
||||||
|
ctStyle.setName(styleName);
|
||||||
|
|
||||||
|
CTDecimalNumber indentNumber = CTDecimalNumber.Factory.newInstance();
|
||||||
|
indentNumber.setVal(BigInteger.valueOf(headingLevel));
|
||||||
|
|
||||||
|
// lower number > style is more prominent in the formats bar
|
||||||
|
ctStyle.setUiPriority(indentNumber);
|
||||||
|
|
||||||
|
CTOnOff onoffnull = CTOnOff.Factory.newInstance();
|
||||||
|
ctStyle.setUnhideWhenUsed(onoffnull);
|
||||||
|
|
||||||
|
// style shows up in the formats bar
|
||||||
|
ctStyle.setQFormat(onoffnull);
|
||||||
|
|
||||||
|
// style defines a heading of the given level
|
||||||
|
CTPPr ppr = CTPPr.Factory.newInstance();
|
||||||
|
ppr.setOutlineLvl(indentNumber);
|
||||||
|
ctStyle.setPPr(ppr);
|
||||||
|
|
||||||
|
XWPFStyle style = new XWPFStyle(ctStyle);
|
||||||
|
|
||||||
|
// is a null op if already defined
|
||||||
|
XWPFStyles styles = docxDocument.createStyles();
|
||||||
|
|
||||||
|
style.setType(STStyleType.PARAGRAPH);
|
||||||
|
styles.addStyle(style);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置文档中标题格式
|
||||||
|
* */
|
||||||
|
public static void setHeadingStyle(XWPFDocument document){
|
||||||
|
addCustomHeadingStyle(document, "标题 1", 1);
|
||||||
|
addCustomHeadingStyle(document, "标题 2", 2);
|
||||||
|
addCustomHeadingStyle(document, "标题 3", 3);
|
||||||
|
addCustomHeadingStyle(document, "标题 4", 4);
|
||||||
|
addCustomHeadingStyle(document, "标题 5", 5);
|
||||||
|
addCustomHeadingStyle(document, "标题 6", 6);
|
||||||
|
addCustomHeadingStyle(document, "标题 7", 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给表格添加一行数据
|
||||||
|
* @param paragraph 段落对象
|
||||||
|
* @param row 行对象
|
||||||
|
* @param data 不定长度的数据
|
||||||
|
*/
|
||||||
|
public static void setExcelContent(XWPFParagraph paragraph, XWPFTableRow row,String... data){
|
||||||
|
for (int i=0;i<data.length;i++){
|
||||||
|
XWPFRun run =paragraph.createRun();
|
||||||
|
run.setFontFamily("宋体");
|
||||||
|
run.setText(data[i]);
|
||||||
|
row.getCell(i).setParagraph(paragraph);
|
||||||
|
paragraph.removeRun(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加表头标题一行数据
|
||||||
|
* @param paragraph 段落对象
|
||||||
|
* @param row 行对象
|
||||||
|
* @param data 不定长度的数据
|
||||||
|
*/
|
||||||
|
public static void setExcelHeadContent(XWPFParagraph paragraph, XWPFTableRow row,String... data){
|
||||||
|
XWPFRun run= paragraph.createRun();
|
||||||
|
run.setFontFamily("宋体");
|
||||||
|
run.setBold(true);
|
||||||
|
run.setText(data[0]);
|
||||||
|
row.getCell(0).setParagraph(paragraph);
|
||||||
|
paragraph.removeRun(0);
|
||||||
|
for(int i=1;i<data.length;i++){
|
||||||
|
XWPFRun run1 =paragraph.createRun();
|
||||||
|
run1.setFontFamily("宋体");
|
||||||
|
run1.setBold(true);
|
||||||
|
run1.setText(data[i]);
|
||||||
|
row.addNewTableCell().setParagraph(paragraph);
|
||||||
|
paragraph.removeRun(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取当前的日期
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getRightNow(){
|
||||||
|
Calendar rightNow = Calendar.getInstance();
|
||||||
|
Integer year = rightNow.get(Calendar.YEAR);
|
||||||
|
Integer month = rightNow.get(Calendar.MONTH)+1;
|
||||||
|
Integer day = rightNow.get(rightNow.DAY_OF_MONTH);
|
||||||
|
return year+"年"+month+"月"+day+"日";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @date: 2020/8/20 13:36
|
||||||
|
*/
|
||||||
|
public class ClearPathUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对漏洞,新增的特殊字符替换的扫描方法
|
||||||
|
*/
|
||||||
|
public static String cleanString(String str) {
|
||||||
|
if (str == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (int i = 0; i < str.length(); ++i) {
|
||||||
|
sb.append(cleanChar(str.charAt(i)));
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static char cleanChar(char ch) {
|
||||||
|
|
||||||
|
// 0 - 9
|
||||||
|
for (int i = 48; i < 58; ++i) {
|
||||||
|
if (ch == i) {
|
||||||
|
return (char) i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 'A' - 'Z'
|
||||||
|
for (int i = 65; i < 91; ++i) {
|
||||||
|
if (ch == i) {
|
||||||
|
return (char) i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 'a' - 'z'
|
||||||
|
for (int i = 97; i < 123; ++i) {
|
||||||
|
if (ch == i) {
|
||||||
|
return (char) i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// other valid characters
|
||||||
|
switch (ch) {
|
||||||
|
case '/':
|
||||||
|
return '/';
|
||||||
|
case '.':
|
||||||
|
return '.';
|
||||||
|
case '-':
|
||||||
|
return '-';
|
||||||
|
case '_':
|
||||||
|
return '_';
|
||||||
|
case ',':
|
||||||
|
return ',';
|
||||||
|
case ' ':
|
||||||
|
return ' ';
|
||||||
|
case '!':
|
||||||
|
return '!';
|
||||||
|
case '@':
|
||||||
|
return '@';
|
||||||
|
case '#':
|
||||||
|
return '#';
|
||||||
|
case '$':
|
||||||
|
return '$';
|
||||||
|
case '%':
|
||||||
|
return '%';
|
||||||
|
case '^':
|
||||||
|
return '^';
|
||||||
|
case '&':
|
||||||
|
return '&';
|
||||||
|
case '*':
|
||||||
|
return '*';
|
||||||
|
case '(':
|
||||||
|
return '(';
|
||||||
|
case ')':
|
||||||
|
return ')';
|
||||||
|
case '+':
|
||||||
|
return '+';
|
||||||
|
case '=':
|
||||||
|
return '=';
|
||||||
|
case ':':
|
||||||
|
return ':';
|
||||||
|
case ';':
|
||||||
|
return ';';
|
||||||
|
case '?':
|
||||||
|
return '?';
|
||||||
|
case '"':
|
||||||
|
return '"';
|
||||||
|
case '<':
|
||||||
|
return '<';
|
||||||
|
case '>':
|
||||||
|
return '>';
|
||||||
|
case '`':
|
||||||
|
return '`';
|
||||||
|
case '\\':
|
||||||
|
return '/';
|
||||||
|
case 'I':
|
||||||
|
return 'I';
|
||||||
|
case 'Ⅱ':
|
||||||
|
return 'Ⅱ';
|
||||||
|
case 'Ⅲ':
|
||||||
|
return 'Ⅲ';
|
||||||
|
case 'Ⅳ':
|
||||||
|
return 'Ⅳ';
|
||||||
|
case 'Ⅴ':
|
||||||
|
return 'Ⅴ';
|
||||||
|
case 'Ⅵ':
|
||||||
|
return 'Ⅵ';
|
||||||
|
case 'Ⅶ':
|
||||||
|
return 'Ⅶ';
|
||||||
|
case 'Ⅷ':
|
||||||
|
return 'Ⅷ';
|
||||||
|
case 'Ⅸ':
|
||||||
|
return 'Ⅸ';
|
||||||
|
|
||||||
|
case 'V':
|
||||||
|
return 'V';
|
||||||
|
case 'X':
|
||||||
|
return 'X';
|
||||||
|
case 'Ⅹ':
|
||||||
|
return 'Ⅹ';
|
||||||
|
default:
|
||||||
|
if (isChineseChar(ch)) {
|
||||||
|
return ch;
|
||||||
|
}
|
||||||
|
return '%';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据Unicode编码判断中文汉字和符号
|
||||||
|
private static boolean isChineseChar(char c) {
|
||||||
|
Character.UnicodeBlock ub = Character.UnicodeBlock.of(c);
|
||||||
|
return ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS || ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS
|
||||||
|
|| ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A || ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
|
||||||
|
|| ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS
|
||||||
|
|| ub == Character.UnicodeBlock.GENERAL_PUNCTUATION;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||||
|
import org.apache.xmlbeans.XmlException;
|
||||||
|
import org.apache.xmlbeans.XmlToken;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
public class CustomXWPFDocument extends XWPFDocument {
|
||||||
|
// 日志记录
|
||||||
|
public CustomXWPFDocument(InputStream in) throws IOException {
|
||||||
|
super(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomXWPFDocument() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomXWPFDocument(OPCPackage pkg) throws IOException {
|
||||||
|
super(pkg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
* @param width
|
||||||
|
* 宽
|
||||||
|
* @param height
|
||||||
|
* 高
|
||||||
|
* @param paragraph
|
||||||
|
* 段落
|
||||||
|
*/
|
||||||
|
public void createPicture(int id, int width, int height,String blipId, XWPFParagraph paragraph) {
|
||||||
|
final int EMU = 9525;
|
||||||
|
width *= EMU;
|
||||||
|
height *= EMU;
|
||||||
|
// String blipId = getAllPictures().get(id).getPackageRelationship().getId();
|
||||||
|
CTInline inline = paragraph.createRun().getCTR().addNewDrawing().addNewInline();
|
||||||
|
String picXml = "" + "<a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">"
|
||||||
|
+ " <a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">"
|
||||||
|
+ " <pic:pic xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">"
|
||||||
|
+ " <pic:nvPicPr>" + " <pic:cNvPr id=\"" + id + "\" name=\"Generated\"/>"
|
||||||
|
+ " <pic:cNvPicPr/>" + " </pic:nvPicPr>" + " <pic:blipFill>"
|
||||||
|
+ " <a:blip r:embed=\"" + blipId
|
||||||
|
+ "\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"/>"
|
||||||
|
+ " <a:stretch>" + " <a:fillRect/>" + " </a:stretch>"
|
||||||
|
+ " </pic:blipFill>" + " <pic:spPr>" + " <a:xfrm>"
|
||||||
|
+ " <a:off x=\"0\" y=\"0\"/>" + " <a:ext cx=\"" + width + "\" cy=\""
|
||||||
|
+ height + "\"/>" + " </a:xfrm>" + " <a:prstGeom prst=\"rect\">"
|
||||||
|
+ " <a:avLst/>" + " </a:prstGeom>" + " </pic:spPr>"
|
||||||
|
+ " </pic:pic>" + " </a:graphicData>" + "</a:graphic>";
|
||||||
|
|
||||||
|
inline.addNewGraphic().addNewGraphicData();
|
||||||
|
XmlToken xmlToken = null;
|
||||||
|
try {
|
||||||
|
xmlToken = XmlToken.Factory.parse(picXml);
|
||||||
|
} catch (XmlException xe) {
|
||||||
|
log.error("生成报表发生异常,异常是"+xe.getMessage());
|
||||||
|
}
|
||||||
|
inline.set(xmlToken);
|
||||||
|
|
||||||
|
inline.setDistT(0);
|
||||||
|
inline.setDistB(0);
|
||||||
|
inline.setDistL(0);
|
||||||
|
inline.setDistR(0);
|
||||||
|
|
||||||
|
CTPositiveSize2D extent = inline.addNewExtent();
|
||||||
|
extent.setCx(width);
|
||||||
|
extent.setCy(height);
|
||||||
|
|
||||||
|
CTNonVisualDrawingProps docPr = inline.addNewDocPr();
|
||||||
|
docPr.setId(id);
|
||||||
|
docPr.setName("图片" + id);
|
||||||
|
docPr.setDescr("测试");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen(创建) -----denghuajun(移植使用)
|
||||||
|
* @Date: 2018/8/27 11:29
|
||||||
|
*/
|
||||||
|
public class FloatUtils {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保留传入进来的float的两位小数,四舍五入的方式
|
||||||
|
*
|
||||||
|
* @param data Float参数
|
||||||
|
*/
|
||||||
|
public static float get2Float(Float data) {
|
||||||
|
if (data == null || data.isNaN() || data.isInfinite()) {
|
||||||
|
return 0f;
|
||||||
|
}
|
||||||
|
int scale = 2;//设置位数
|
||||||
|
int roundingMode = 4;//表示四舍五入,可以选择其他舍值方式,例如去尾,等等.
|
||||||
|
BigDecimal bd = new BigDecimal(data);
|
||||||
|
bd = bd.setScale(scale, roundingMode);
|
||||||
|
data = bd.floatValue();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,224 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wr
|
||||||
|
* @description
|
||||||
|
* @date 2023/4/10 17:39
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class PubUtils {
|
||||||
|
public static boolean createFile(String destFileName) {
|
||||||
|
File file = new File(destFileName);
|
||||||
|
if (file.exists()) {
|
||||||
|
log.warn("创建单个文件" + destFileName + "失败,目标文件已存在!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (destFileName.endsWith(File.separator)) {
|
||||||
|
log.warn("创建单个文件" + destFileName + "失败,目标文件不能为目录!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//判断目标文件所在的目录是否存在
|
||||||
|
if (!file.getParentFile().exists()) {
|
||||||
|
//如果目标文件所在的目录不存在,则创建父目录
|
||||||
|
log.warn("目标文件所在目录不存在,准备创建它!");
|
||||||
|
if (!file.getParentFile().mkdirs()) {
|
||||||
|
log.warn("创建目标文件所在目录失败!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//创建目标文件
|
||||||
|
try {
|
||||||
|
if (file.createNewFile()) {
|
||||||
|
log.warn("创建单个文件" + destFileName + "成功!");
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
log.warn("创建单个文件" + destFileName + "失败!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.warn("创建单个文件" + destFileName + "失败!" + e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取配置文件
|
||||||
|
*
|
||||||
|
* @param cl 类名字
|
||||||
|
* @param strPropertiesName 配置文件名称
|
||||||
|
*/
|
||||||
|
public static Properties readProperties(ClassLoader cl, String strPropertiesName) {
|
||||||
|
Properties pros = new Properties();
|
||||||
|
InputStream in = null;
|
||||||
|
try {
|
||||||
|
in = cl.getResourceAsStream(strPropertiesName);
|
||||||
|
pros.load(in);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("读取配置文件失败失败:" + e.getMessage());
|
||||||
|
} finally {
|
||||||
|
if (in != null) {
|
||||||
|
PubUtils.safeClose(in, "安全关闭读取配置文件失败,异常为:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pros;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全关闭InputStream
|
||||||
|
*
|
||||||
|
* @param s
|
||||||
|
*/
|
||||||
|
public static void safeClose(InputStream s, String strError) {
|
||||||
|
if (s != null) {
|
||||||
|
try {
|
||||||
|
s.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error(strError + e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Double dataLimits(Double data) {
|
||||||
|
if (ObjectUtil.isNotNull(data)) {
|
||||||
|
return data > 100 ? 100 : data;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
|
public static List<String> getIntervalTime(String startTime, String endTime) {
|
||||||
|
List<String> times = new ArrayList<>();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
||||||
|
Date start = sdf.parse(startTime);
|
||||||
|
Date end = sdf.parse(endTime);
|
||||||
|
// 同月
|
||||||
|
if (start.getTime() == end.getTime()) {
|
||||||
|
String time = startTime.substring(0, 7);
|
||||||
|
times.add(time);
|
||||||
|
} else if (start.getYear() == end.getYear()) {
|
||||||
|
// 同年
|
||||||
|
int startM = start.getMonth() + 1;
|
||||||
|
int endM = end.getMonth() + 1;
|
||||||
|
int temp = endM - startM;
|
||||||
|
for (int i = 0; i <= temp; i++) {
|
||||||
|
String time = start.getYear() + 1900 + "";
|
||||||
|
int month = startM + i;
|
||||||
|
if (month < 10) {
|
||||||
|
time = time + "-0" + month;
|
||||||
|
} else {
|
||||||
|
time = time + "-" + month;
|
||||||
|
}
|
||||||
|
times.add(time);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 不同年!!!!这里忽略了年份之间跨年的情况
|
||||||
|
int startY = start.getYear() + 1900;
|
||||||
|
int startM = start.getMonth() + 1;
|
||||||
|
int endY = end.getYear() + 1900;
|
||||||
|
int endM = end.getMonth() + 1;
|
||||||
|
int tempS = 12 - startM;
|
||||||
|
// 连续的年份
|
||||||
|
if (endY - startY == 1) {
|
||||||
|
// 第一年的时间获取
|
||||||
|
for (int i = 0; i <= tempS; i++) {
|
||||||
|
int month = startM + i;
|
||||||
|
String time = startY + "-";
|
||||||
|
if (month < 10) {
|
||||||
|
time = time + "0" + month;
|
||||||
|
} else {
|
||||||
|
time = time + month;
|
||||||
|
}
|
||||||
|
times.add(time);
|
||||||
|
}
|
||||||
|
// 第二年的时间获取
|
||||||
|
|
||||||
|
for (int i = 1; i <= endM; i++) {
|
||||||
|
String time = endY + "-";
|
||||||
|
if (i < 10) {
|
||||||
|
time = time + "0" + i;
|
||||||
|
} else {
|
||||||
|
time = time + i;
|
||||||
|
}
|
||||||
|
times.add(time);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 不连续的年份
|
||||||
|
// 第一年的时间获取
|
||||||
|
for (int i = 0; i <= tempS; i++) {
|
||||||
|
int month = startM + i;
|
||||||
|
String time = startY + "-";
|
||||||
|
if (month < 10) {
|
||||||
|
time = time + "0" + month;
|
||||||
|
} else {
|
||||||
|
time = time + month;
|
||||||
|
}
|
||||||
|
times.add(time);
|
||||||
|
}
|
||||||
|
int tempY = endY - startY;
|
||||||
|
// 中间年份的时间
|
||||||
|
for (int i = 1; i < tempY; i++) {
|
||||||
|
for (int j = 1; j <= 12; j++) {
|
||||||
|
String time = startY + i + "-";
|
||||||
|
if (j < 10) {
|
||||||
|
time = time + "0" + j;
|
||||||
|
} else {
|
||||||
|
time = time + j;
|
||||||
|
}
|
||||||
|
times.add(time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 最后一年的时间获取
|
||||||
|
for (int i = 1; i <= endM; i++) {
|
||||||
|
String time = endY + "-";
|
||||||
|
if (i < 10) {
|
||||||
|
time = time + "0" + i;
|
||||||
|
} else {
|
||||||
|
time = time + i;
|
||||||
|
}
|
||||||
|
times.add(time);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return times;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SneakyThrows
|
||||||
|
public static List<String> getIntervalDateTime(Integer startTime, int beginDay, Integer endTime, Integer dd) {
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
|
Calendar calendar = Calendar.getInstance(Locale.CHINA);
|
||||||
|
calendar.set(startTime, endTime - 1, 1);
|
||||||
|
//年份
|
||||||
|
int year = calendar.get(Calendar.YEAR);
|
||||||
|
//月份
|
||||||
|
int month = calendar.get(Calendar.MONTH) + 1;
|
||||||
|
for (int i = beginDay; i <= dd; i++) {
|
||||||
|
String date = null;
|
||||||
|
if (month < 10 && i < 10) {
|
||||||
|
date = year + "-0" + month + "-0" + i;
|
||||||
|
}
|
||||||
|
if (month < 10 && i >= 10) {
|
||||||
|
date = year + "-0" + month + "-" + i;
|
||||||
|
}
|
||||||
|
if (month >= 10 && i < 10) {
|
||||||
|
date = year + "-" + month + "-0" + i;
|
||||||
|
}
|
||||||
|
if (month >= 10 && i >= 10) {
|
||||||
|
date = year + "-" + month + "-" + i;
|
||||||
|
}
|
||||||
|
|
||||||
|
list.add(date);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据公共工具类
|
||||||
|
*
|
||||||
|
* @author qijian
|
||||||
|
* @version 1.0.0
|
||||||
|
* @createTime 2022/10/14 - 10:07
|
||||||
|
*/
|
||||||
|
public class PublicDataUtils {
|
||||||
|
/**
|
||||||
|
* 功能:下划线命名转驼峰命名
|
||||||
|
* 将下划线替换为空格,将字符串根据空格分割成数组,再将每个单词首字母大写
|
||||||
|
* @param s
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String underCamel(String s)
|
||||||
|
{
|
||||||
|
String separator = "_";
|
||||||
|
String under="";
|
||||||
|
s = s.toLowerCase().replace(separator, " ");
|
||||||
|
String sarr[]=s.split(" ");
|
||||||
|
for(int i=0;i<sarr.length;i++)
|
||||||
|
{
|
||||||
|
String w=sarr[i].substring(0,1).toUpperCase()+sarr[i].substring(1);
|
||||||
|
under +=w;
|
||||||
|
}
|
||||||
|
return under;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.serializer.JSONSerializer;
|
||||||
|
import com.alibaba.fastjson.serializer.ObjectSerializer;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TimestampAsLongSerializer implements ObjectSerializer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(JSONSerializer serializer, Object object, Object fieldName, Type fieldType, int features) throws IOException {
|
||||||
|
if (object instanceof Timestamp) {
|
||||||
|
Timestamp timestamp = (Timestamp) object;
|
||||||
|
// 将Timestamp转换为时间戳(毫秒数)
|
||||||
|
long time = timestamp.getTime();
|
||||||
|
serializer.write(time);
|
||||||
|
} else {
|
||||||
|
serializer.write(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,427 @@
|
|||||||
|
package com.njcn.csharmonic.utils.report;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.njcn.oss.constant.OssPath;
|
||||||
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.xwpf.usermodel.*;
|
||||||
|
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
||||||
|
import org.springframework.core.io.ClassPathResource;
|
||||||
|
import org.springframework.core.io.Resource;
|
||||||
|
import org.springframework.core.io.ResourceLoader;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.FileCopyUtils;
|
||||||
|
|
||||||
|
import javax.servlet.ServletOutputStream;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class WordUtil2 {
|
||||||
|
|
||||||
|
|
||||||
|
private final ResourceLoader resourceLoader;
|
||||||
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
|
|
||||||
|
public void getWord(String path, Map<String, Object> params, String fileName,List<List<String[]>> tableList, HttpServletResponse response)
|
||||||
|
throws Exception {
|
||||||
|
byte[] docBytes = null;
|
||||||
|
|
||||||
|
path = ClearPathUtil.cleanString(path);
|
||||||
|
InputStream is = null;
|
||||||
|
CustomXWPFDocument doc = null;
|
||||||
|
//读取报告模板
|
||||||
|
try {
|
||||||
|
Resource resource = resourceLoader.getResource("classpath:" + path);
|
||||||
|
if (!resource.exists()) {
|
||||||
|
throw new FileNotFoundException("模板文件未找到: " + path);
|
||||||
|
}
|
||||||
|
is = resource.getInputStream();
|
||||||
|
doc = new CustomXWPFDocument(is);
|
||||||
|
if(CollUtil.isNotEmpty(tableList)){
|
||||||
|
this.replaceInTable(doc, params,tableList);
|
||||||
|
}else{
|
||||||
|
this.replaceInTable(doc, params);
|
||||||
|
}
|
||||||
|
// 替换表格里面的变量
|
||||||
|
this.replaceInPara(doc, params); // 替换文本里面的变量
|
||||||
|
} catch (IOException e) {
|
||||||
|
getError("获取报告模板异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (null != is) {
|
||||||
|
is.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
ServletOutputStream outputStream = response.getOutputStream();
|
||||||
|
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
|
||||||
|
response.setContentType("application/octet-stream;charset=UTF-8");
|
||||||
|
doc.write(outputStream);
|
||||||
|
outputStream.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
getError("输出稳态报告异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (doc != null) {
|
||||||
|
doc.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 辅助方法:字节数组转十六进制(便于打印排查)
|
||||||
|
private static String bytesToHex(byte[] bytes) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (byte b : bytes) {
|
||||||
|
sb.append(String.format("%02X ", b));
|
||||||
|
}
|
||||||
|
return sb.toString().trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public InputStream getReportFile(String path, Map<String, Object> params, List<List<String[]>> tableList)
|
||||||
|
throws Exception {
|
||||||
|
path = ClearPathUtil.cleanString(path);
|
||||||
|
InputStream inStream = null,in = null;
|
||||||
|
CustomXWPFDocument doc = null;
|
||||||
|
//读取报告模板
|
||||||
|
try {
|
||||||
|
inStream = new ClassPathResource(path).getInputStream();
|
||||||
|
doc = new CustomXWPFDocument(inStream);
|
||||||
|
this.replaceInTable(doc,params,tableList);
|
||||||
|
this.replaceInPara(doc, params);
|
||||||
|
} catch (IOException e) {
|
||||||
|
getError("获取报告模板异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (null != inStream) {
|
||||||
|
inStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
//临时缓冲区
|
||||||
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
doc.write(out);
|
||||||
|
byte[] docByteAry = out.toByteArray();
|
||||||
|
in = new ByteArrayInputStream(docByteAry);
|
||||||
|
out.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
getError("输出稳态报告异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (doc != null) {
|
||||||
|
doc.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getReportFileUrl(String path,String fileName,List<List<String[]>> tableList, Map<String, Object> params)
|
||||||
|
throws Exception {
|
||||||
|
path = ClearPathUtil.cleanString(path);
|
||||||
|
InputStream inStream = null,in = null;
|
||||||
|
CustomXWPFDocument doc = null;
|
||||||
|
//读取报告模板
|
||||||
|
try {
|
||||||
|
inStream = new ClassPathResource(path).getInputStream();;
|
||||||
|
doc = new CustomXWPFDocument(inStream);
|
||||||
|
if(CollUtil.isNotEmpty(tableList)){
|
||||||
|
this.replaceInTable(doc, params,tableList);
|
||||||
|
}else{
|
||||||
|
this.replaceInTable(doc, params);
|
||||||
|
}
|
||||||
|
this.replaceInPara(doc, params); // 替换文本里面的变量
|
||||||
|
//临时缓冲区
|
||||||
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
doc.write(out);
|
||||||
|
byte[] docByteAry = out.toByteArray();
|
||||||
|
in = new ByteArrayInputStream(docByteAry);
|
||||||
|
out.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
getError("获取报告模板异常,原因为:" + e);
|
||||||
|
} finally {
|
||||||
|
if (null != inStream) {
|
||||||
|
inStream.close();
|
||||||
|
}
|
||||||
|
if (doc != null) {
|
||||||
|
doc.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//上传文件服务器
|
||||||
|
return fileStorageUtil.uploadStreamSpecifyName(in, OssPath.ONLINE_REPORT, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void getError(String e) {
|
||||||
|
log.error(e);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 替换段落里面的变量
|
||||||
|
*
|
||||||
|
* @param doc 要替换的文档
|
||||||
|
* @param params 参数
|
||||||
|
*/
|
||||||
|
private void replaceInPara(CustomXWPFDocument doc, Map<String, Object> params) {
|
||||||
|
Iterator<XWPFParagraph> iterator = doc.getParagraphsIterator();
|
||||||
|
List<XWPFParagraph> paragraphList = new ArrayList<>();
|
||||||
|
XWPFParagraph para;
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
para = iterator.next();
|
||||||
|
paragraphList.add(para);
|
||||||
|
}
|
||||||
|
processParagraphs(paragraphList, params, doc);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void replaceInTable(CustomXWPFDocument doc, Map<String, Object> params) {
|
||||||
|
Iterator<XWPFTable> it = doc.getTablesIterator();
|
||||||
|
while (it.hasNext()) {
|
||||||
|
XWPFTable table = it.next();
|
||||||
|
List<XWPFTableRow> rows = table.getRows();
|
||||||
|
for (XWPFTableRow row : rows) {
|
||||||
|
List<XWPFTableCell> cells = row.getTableCells();
|
||||||
|
for (XWPFTableCell cell : cells) {
|
||||||
|
List<XWPFParagraph> paragraphListTable = cell.getParagraphs();
|
||||||
|
processParagraphs(paragraphListTable, params, doc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void processParagraphs(List<XWPFParagraph> paragraphList, Map<String, Object> param,
|
||||||
|
CustomXWPFDocument doc) {
|
||||||
|
if (paragraphList != null && paragraphList.size() > 0) {
|
||||||
|
for (XWPFParagraph paragraph : paragraphList) {
|
||||||
|
List<XWPFRun> runs = paragraph.getRuns();
|
||||||
|
if (runs.size() > 0) {
|
||||||
|
for (XWPFRun run : runs) {
|
||||||
|
String bflag = "";
|
||||||
|
String text = run.getText(0);
|
||||||
|
if (text != null) {
|
||||||
|
boolean isSetText = false;
|
||||||
|
for (Entry<String, Object> entry : param.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
if (text.indexOf(key) != -1) {
|
||||||
|
isSetText = true;
|
||||||
|
Object value = entry.getValue();
|
||||||
|
if (value instanceof String) {// 文本替换
|
||||||
|
text = text.replace(key, value.toString());
|
||||||
|
} else if (value instanceof Map) {// 图片替换
|
||||||
|
text = text.replace(key, "");
|
||||||
|
Map pic = (Map) value;
|
||||||
|
int width = Integer.parseInt(pic.get("width").toString());
|
||||||
|
int height = Integer.parseInt(pic.get("height").toString());
|
||||||
|
int picType = getPictureType(pic.get("type").toString());
|
||||||
|
byte[] byteArray = (byte[]) pic.get("content");
|
||||||
|
ByteArrayInputStream byteInputStream = new ByteArrayInputStream(byteArray);
|
||||||
|
try {
|
||||||
|
String s = doc.addPictureData(byteInputStream, picType);
|
||||||
|
|
||||||
|
doc.createPicture(doc.getAllPictures().size() - 1, width, height,
|
||||||
|
s,paragraph);
|
||||||
|
bflag = "break";
|
||||||
|
} catch (Exception e) {
|
||||||
|
getError("文本替换发生异常,异常是" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isSetText) {
|
||||||
|
run.setText(text, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (bflag == "break") {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 替换段落里面的变量
|
||||||
|
*
|
||||||
|
* @param para 要替换的段落
|
||||||
|
* @param params 参数
|
||||||
|
*/
|
||||||
|
private void replaceInPara(XWPFParagraph para, Map<String, Object> params, CustomXWPFDocument doc) {
|
||||||
|
List<XWPFRun> runs;
|
||||||
|
Matcher matcher;
|
||||||
|
// if (this.matcher(para.getParagraphText()).find()) {
|
||||||
|
runs = para.getRuns();
|
||||||
|
int start = -1;
|
||||||
|
int end = -1;
|
||||||
|
String str = "";
|
||||||
|
for (int i = 0; i < runs.size(); i++) {
|
||||||
|
XWPFRun run = runs.get(i);
|
||||||
|
String runText = run.toString();
|
||||||
|
if ('$' == runText.charAt(0) && '{' == runText.charAt(1)) {
|
||||||
|
start = i;
|
||||||
|
}
|
||||||
|
if ((start != -1)) {
|
||||||
|
str += runText;
|
||||||
|
}
|
||||||
|
if ('}' == runText.charAt(runText.length() - 1)) {
|
||||||
|
if (start != -1) {
|
||||||
|
end = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = start; i <= end; i++) {
|
||||||
|
para.removeRun(i);
|
||||||
|
i--;
|
||||||
|
end--;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Entry<String, Object> entry : params.entrySet()) {
|
||||||
|
String key = entry.getKey();
|
||||||
|
if (str.indexOf(key) != -1) {
|
||||||
|
Object value = entry.getValue();
|
||||||
|
if (value instanceof String) {
|
||||||
|
str = str.replace(key, value.toString());
|
||||||
|
para.createRun().setText(str, 0);
|
||||||
|
break;
|
||||||
|
} else if (value instanceof Map) {
|
||||||
|
str = str.replace(key, "");
|
||||||
|
Map pic = (Map) value;
|
||||||
|
int width = Integer.parseInt(pic.get("width").toString());
|
||||||
|
int height = Integer.parseInt(pic.get("height").toString());
|
||||||
|
int picType = getPictureType(pic.get("type").toString());
|
||||||
|
byte[] byteArray = (byte[]) pic.get("content");
|
||||||
|
ByteArrayInputStream byteInputStream = new ByteArrayInputStream(byteArray);
|
||||||
|
try {
|
||||||
|
// int ind = doc.addPicture(byteInputStream,picType);
|
||||||
|
// doc.createPicture(ind, width , height,para);
|
||||||
|
String s = doc.addPictureData(byteInputStream, picType);
|
||||||
|
doc.createPicture(doc.getAllPictures().size() - 1, width, height,s, para);
|
||||||
|
para.createRun().setText(str, 0);
|
||||||
|
break;
|
||||||
|
} catch (Exception e) {
|
||||||
|
getError("文件替换发生异常,异常是" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 为表格插入数据,行数不够添加新行
|
||||||
|
*
|
||||||
|
* @param table 需要插入数据的表格
|
||||||
|
* @param tableList 插入数据集合
|
||||||
|
*/
|
||||||
|
private static void insertTable(XWPFTable table, List<String[]> tableList) {
|
||||||
|
//删除占位符行数
|
||||||
|
table.removeRow(1);
|
||||||
|
if (CollUtil.isNotEmpty(tableList)) {
|
||||||
|
// 创建行,根据需要插入的数据添加新行,不处理表头
|
||||||
|
for (int i = 0; i < tableList.size(); i++) {
|
||||||
|
XWPFTableRow row = table.createRow();
|
||||||
|
List<XWPFTableCell> cells = row.getTableCells();
|
||||||
|
for (int j = 0; j < cells.size(); j++) {
|
||||||
|
String s = tableList.get(i)[j];
|
||||||
|
XWPFTableCell cell = cells.get(j);
|
||||||
|
cell.removeParagraph(0);
|
||||||
|
XWPFParagraph paragraph = cell.addParagraph();
|
||||||
|
paragraph.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
// 在段落中添加文本
|
||||||
|
XWPFRun run = paragraph.createRun();
|
||||||
|
run.setText(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 替换表格里面的变量
|
||||||
|
*
|
||||||
|
* @param doc 要替换的文档
|
||||||
|
* @param tableList 存放数据顺序要与表格一致
|
||||||
|
* @param params 参数
|
||||||
|
*/
|
||||||
|
private void replaceInTable(CustomXWPFDocument doc, Map<String, Object> params, List<List<String[]>> tableList) {
|
||||||
|
Iterator<XWPFTable> iterator = doc.getTablesIterator();
|
||||||
|
XWPFTable table;
|
||||||
|
List<XWPFTableRow> rows;
|
||||||
|
List<XWPFTableCell> cells;
|
||||||
|
List<XWPFParagraph> paras;
|
||||||
|
Integer num=0;
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
table = iterator.next();
|
||||||
|
if (table.getRows().size() > 1) {
|
||||||
|
// 判断表格是需要替换还是需要插入,判断逻辑有$为替换,表格无$为插入
|
||||||
|
if (this.matcher(table.getText()).find()||this.matcherS(table.getText()).find()) {
|
||||||
|
rows = table.getRows();
|
||||||
|
for (XWPFTableRow row : rows) {
|
||||||
|
cells = row.getTableCells();
|
||||||
|
for (XWPFTableCell cell : cells) {
|
||||||
|
List<XWPFParagraph> paragraphListTable = cell.getParagraphs();
|
||||||
|
processParagraphs(paragraphListTable, params, doc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (CollUtil.isNotEmpty(tableList.get(num))){
|
||||||
|
insertTable(table, tableList.get(num)); // 插入数据
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正则匹配字符串
|
||||||
|
*
|
||||||
|
* @param str
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Matcher matcher(String str) {
|
||||||
|
Pattern pattern = Pattern.compile("\\$\\{(.+?)\\}", Pattern.CASE_INSENSITIVE);
|
||||||
|
Matcher matcher = pattern.matcher(str);
|
||||||
|
return matcher;
|
||||||
|
}
|
||||||
|
private Matcher matcherS(String str) {
|
||||||
|
Pattern pattern = Pattern.compile("\\$(.*?)\\$");
|
||||||
|
Matcher matcher = pattern.matcher(str);
|
||||||
|
return matcher;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据图片类型,取得对应的图片类型代码
|
||||||
|
*
|
||||||
|
* @param picType
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
private static int getPictureType(String picType) {
|
||||||
|
int res = CustomXWPFDocument.PICTURE_TYPE_PICT;
|
||||||
|
if (picType != null) {
|
||||||
|
if (picType.equalsIgnoreCase("image/png")) {
|
||||||
|
res = CustomXWPFDocument.PICTURE_TYPE_PNG;
|
||||||
|
} else if (picType.equalsIgnoreCase("image/dib")) {
|
||||||
|
res = CustomXWPFDocument.PICTURE_TYPE_DIB;
|
||||||
|
} else if (picType.equalsIgnoreCase("image/emf")) {
|
||||||
|
res = CustomXWPFDocument.PICTURE_TYPE_EMF;
|
||||||
|
} else if (picType.equalsIgnoreCase("image/jpg") || picType.equalsIgnoreCase("image/jpeg")) {
|
||||||
|
res = CustomXWPFDocument.PICTURE_TYPE_JPEG;
|
||||||
|
} else if (picType.equalsIgnoreCase("image/wmf")) {
|
||||||
|
res = CustomXWPFDocument.PICTURE_TYPE_WMF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -135,11 +135,27 @@
|
|||||||
<artifactId>message-api</artifactId>
|
<artifactId>message-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>cs-system-api</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<finalName>csHarmonicBoot</finalName>
|
<finalName>csHarmonicBoot</finalName>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<nonFilteredFileExtensions>
|
||||||
|
<nonFilteredFileExtension>docx</nonFilteredFileExtension>
|
||||||
|
</nonFilteredFileExtensions>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (cs_configuration)表控制层
|
* (cs_configuration)表控制层
|
||||||
*
|
*
|
||||||
* @author xxxxx
|
* @author xxxxx
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/csconfiguration")
|
@RequestMapping("/csconfiguration")
|
||||||
@@ -38,10 +38,10 @@ public class CsConfigurationController extends BaseController {
|
|||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增组态项目")
|
@ApiOperation("新增组态项目")
|
||||||
@ApiImplicitParam(name = "csConfigurationParm", value = "新增组态项目参数", required = true)
|
@ApiImplicitParam(name = "csConfigurationParm", value = "新增组态项目参数", required = true)
|
||||||
public HttpResult<Boolean> add(@RequestBody @Validated CsConfigurationParm csConfigurationParm){
|
public HttpResult<Boolean> add(@RequestBody @Validated CsConfigurationParm csConfigurationParm) {
|
||||||
String methodDescribe = getMethodDescribe("add");
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
|
||||||
boolean save = csConfigurationService.add (csConfigurationParm);
|
boolean save = csConfigurationService.add(csConfigurationParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,23 +49,22 @@ public class CsConfigurationController extends BaseController {
|
|||||||
@PostMapping("/audit")
|
@PostMapping("/audit")
|
||||||
@ApiOperation("修改组态项目")
|
@ApiOperation("修改组态项目")
|
||||||
@ApiImplicitParam(name = "auditParm", value = "修改组态项目参数", required = true)
|
@ApiImplicitParam(name = "auditParm", value = "修改组态项目参数", required = true)
|
||||||
public HttpResult<Boolean> audit(@RequestBody @Validated CsConfigurationParm.CsConfigurationAuditParam auditParm){
|
public HttpResult<Boolean> audit(@RequestBody @Validated CsConfigurationParm.CsConfigurationAuditParam auditParm) {
|
||||||
String methodDescribe = getMethodDescribe("audit");
|
String methodDescribe = getMethodDescribe("audit");
|
||||||
|
|
||||||
boolean save = csConfigurationService.audit (auditParm);
|
boolean save = csConfigurationService.audit(auditParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryPage")
|
@PostMapping("/queryPage")
|
||||||
@ApiOperation("组态项目分页查询")
|
@ApiOperation("组态项目分页查询")
|
||||||
@ApiImplicitParam(name = "csConfigurationQueryParam", value = "组态项目查询参数", required = true)
|
@ApiImplicitParam(name = "csConfigurationQueryParam", value = "组态项目查询参数", required = true)
|
||||||
public HttpResult<IPage<CsConfigurationVO>> queryPage(@RequestBody @Validated CsConfigurationParm.CsConfigurationQueryParam csConfigurationQueryParam ){
|
public HttpResult<IPage<CsConfigurationVO>> queryPage(@RequestBody @Validated CsConfigurationParm.CsConfigurationQueryParam csConfigurationQueryParam) {
|
||||||
String methodDescribe = getMethodDescribe("queryPage");
|
String methodDescribe = getMethodDescribe("queryPage");
|
||||||
|
|
||||||
IPage<CsConfigurationVO> page = csConfigurationService.queryPage (csConfigurationQueryParam);
|
IPage<CsConfigurationVO> page = csConfigurationService.queryPage(csConfigurationQueryParam);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,10 +72,10 @@ public class CsConfigurationController extends BaseController {
|
|||||||
@PostMapping("/uploadImage")
|
@PostMapping("/uploadImage")
|
||||||
@ApiOperation("上传底图")
|
@ApiOperation("上传底图")
|
||||||
@ApiImplicitParam(name = "file", value = "底图文件", required = true)
|
@ApiImplicitParam(name = "file", value = "底图文件", required = true)
|
||||||
public HttpResult<MinIoUploadResDTO> uploadImage(@RequestParam("file") MultipartFile issuesFile){
|
public HttpResult<MinIoUploadResDTO> uploadImage(@RequestParam("file") MultipartFile issuesFile) {
|
||||||
String methodDescribe = getMethodDescribe("uploadImage");
|
String methodDescribe = getMethodDescribe("uploadImage");
|
||||||
String filePath = csConfigurationService.uploadImage(issuesFile);
|
String filePath = csConfigurationService.uploadImage(issuesFile);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,new MinIoUploadResDTO(issuesFile.getOriginalFilename(),filePath), methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, new MinIoUploadResDTO(issuesFile.getOriginalFilename(), filePath), methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ 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;
|
||||||
import com.njcn.csharmonic.param.CsPageParm;
|
import com.njcn.csharmonic.param.CsPageParm;
|
||||||
|
import com.njcn.csharmonic.pojo.po.CsPageUser;
|
||||||
import com.njcn.csharmonic.pojo.vo.CsPageVO;
|
import com.njcn.csharmonic.pojo.vo.CsPageVO;
|
||||||
import com.njcn.csharmonic.service.CsPagePOService;
|
import com.njcn.csharmonic.service.CsPagePOService;
|
||||||
|
import com.njcn.csharmonic.service.CsPageUserService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@@ -21,48 +23,68 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (cs_page)表控制层
|
* (cs_page)表控制层
|
||||||
*
|
*
|
||||||
* @author xxxxx
|
* @author xxxxx
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/cspage")
|
@RequestMapping("/cspage")
|
||||||
@Api(tags = "组态项目页面")
|
@Api(tags = "组态项目页面")
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class CsPagePOController extends BaseController {
|
public class CsPagePOController extends BaseController {
|
||||||
private final CsPagePOService csPagePOService;
|
private final CsPagePOService csPagePOService;
|
||||||
|
|
||||||
|
private final CsPageUserService csPageUserService;
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation("新增组态页面")
|
@ApiOperation("新增组态页面")
|
||||||
// @ApiImplicitParam(name = "csPageParm", value = "新增组态项目参数", required = true)
|
// @ApiImplicitParam(name = "csPageParm", value = "新增组态项目参数", required = true)
|
||||||
public HttpResult<Boolean> add( @Validated CsPageParm csPageParm){
|
public HttpResult<Boolean> add(@Validated CsPageParm csPageParm) {
|
||||||
String methodDescribe = getMethodDescribe("add");
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
|
||||||
boolean flag = csPagePOService.add (csPageParm);
|
boolean flag = csPagePOService.add(csPageParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/audit")
|
@PostMapping("/audit")
|
||||||
@ApiOperation("修改组态页面")
|
@ApiOperation("修改组态页面")
|
||||||
public HttpResult<Boolean> audit( @Validated CsPageParm.CsPageParmAuditParam auditParm){
|
public HttpResult<Boolean> audit(@Validated CsPageParm.CsPageParmAuditParam auditParm) {
|
||||||
String methodDescribe = getMethodDescribe("audit");
|
String methodDescribe = getMethodDescribe("audit");
|
||||||
|
|
||||||
boolean save = csPagePOService.audit (auditParm);
|
boolean save = csPagePOService.audit(auditParm);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, save, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@PostMapping("/queryPage")
|
@PostMapping("/queryPage")
|
||||||
@ApiOperation("组态页面分页查询")
|
@ApiOperation("组态页面分页查询")
|
||||||
@ApiImplicitParam(name = "csPageParam", value = "组态项目查询参数", required = true)
|
@ApiImplicitParam(name = "csPageParam", value = "组态项目查询参数", required = true)
|
||||||
public HttpResult<IPage<CsPageVO>> queryPage(@RequestBody @Validated CsPageParm.CsPageParmQueryParam csPageParam ){
|
public HttpResult<IPage<CsPageVO>> queryPage(@RequestBody @Validated CsPageParm.CsPageParmQueryParam csPageParam) {
|
||||||
String methodDescribe = getMethodDescribe("queryPage");
|
String methodDescribe = getMethodDescribe("queryPage");
|
||||||
|
|
||||||
IPage<CsPageVO> page = csPagePOService.queryPage (csPageParam);
|
IPage<CsPageVO> page = csPagePOService.queryPage(csPageParam);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/savePageIdWithUser")
|
||||||
|
@ApiOperation("保存组态界面与用户的关系")
|
||||||
|
public HttpResult<Boolean> savePageIdWithUser(CsPageUser csPageUser) {
|
||||||
|
String methodDescribe = getMethodDescribe("savePageIdWithUser");
|
||||||
|
boolean flag = csPageUserService.savePageIdWithUser(csPageUser);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, flag, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getByUserId")
|
||||||
|
@ApiOperation("根据用户id获取组件信息")
|
||||||
|
public HttpResult<CsPageUser> getByUserId(String userId) {
|
||||||
|
String methodDescribe = getMethodDescribe("getByUserId");
|
||||||
|
CsPageUser csPageUser = csPageUserService.getByUserId(userId);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csPageUser, methodDescribe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ public class CustomReportController extends BaseController {
|
|||||||
@GetMapping("/getTemplateByDept")
|
@GetMapping("/getTemplateByDept")
|
||||||
@ApiOperation("根据部门查询模板")
|
@ApiOperation("根据部门查询模板")
|
||||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
public HttpResult<List<ReportTemplateVO>> getTemplateByDept(@RequestParam("id") String id){
|
public HttpResult<List<ReportTemplateVO>> getTemplateByDept(@RequestParam(value = "id",required = false) String id){
|
||||||
String methodDescribe = getMethodDescribe("getTemplateList");
|
String methodDescribe = getMethodDescribe("getTemplateList");
|
||||||
List<ReportTemplateVO> list = customReportService.getTemplateByDept(id);
|
List<ReportTemplateVO> list = customReportService.getTemplateByDept(id);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.njcn.csharmonic.controller;
|
||||||
|
|
||||||
|
import cn.hutool.extra.template.TemplateException;
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.csharmonic.pojo.param.eventReport.ExportParam;
|
||||||
|
import com.njcn.csharmonic.service.event.EventMonitorReportService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
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 javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.ParseException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* govern
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2025/12/6
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "暂态报告")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/eventReport")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class EventMonitorReportController {
|
||||||
|
|
||||||
|
private final EventMonitorReportService eventMonitorReportService;
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getLineExport")
|
||||||
|
@ApiOperation("监测点报告导出")
|
||||||
|
@ApiImplicitParam(name = "exportParam", value = "监测点报告导出参数", required = true)
|
||||||
|
public void getLineExport(@RequestBody @Validated ExportParam exportParam, HttpServletResponse response) throws IOException, InvalidFormatException, TemplateException, ParseException {
|
||||||
|
eventMonitorReportService.getLineExport(exportParam, response);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.njcn.csharmonic.controller;
|
package com.njcn.csharmonic.controller;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
@@ -12,21 +12,18 @@ import com.njcn.csharmonic.pojo.vo.event.EventStatisticVO;
|
|||||||
import com.njcn.csharmonic.pojo.vo.event.F47Curve;
|
import com.njcn.csharmonic.pojo.vo.event.F47Curve;
|
||||||
import com.njcn.csharmonic.service.event.EventOverviewService;
|
import com.njcn.csharmonic.service.event.EventOverviewService;
|
||||||
import com.njcn.web.controller.BaseController;
|
import com.njcn.web.controller.BaseController;
|
||||||
import com.njcn.web.pojo.param.BaseParam;
|
|
||||||
import com.njcn.web.utils.RequestUtil;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
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.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: cdf
|
* @Author: cdf
|
||||||
@@ -90,5 +87,20 @@ public class EventOverviewController extends BaseController {
|
|||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,vo,methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,vo,methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
|
@PostMapping("/getEventDirectionData")
|
||||||
|
@ApiOperation("获取暂降方向统计数据")
|
||||||
|
public HttpResult<List<Map<String,Object>>> getEventDirectionData(@RequestBody EventStatisticParam baseParam){
|
||||||
|
String methodDescribe = getMethodDescribe("getEventDirectionData");
|
||||||
|
Map<String,Object> load = new HashMap<>();
|
||||||
|
load.put("source", "load");
|
||||||
|
load.put("times", 41);
|
||||||
|
Map<String,Object> grid = new HashMap<>();
|
||||||
|
grid.put("source", "grid");
|
||||||
|
grid.put("times", 4);
|
||||||
|
List<Map<String,Object>> list = CollUtil.newArrayList(load, grid);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,list,methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
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.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
package com.njcn.csharmonic.handler;
|
package com.njcn.csharmonic.handler;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
import com.alibaba.nacos.shaded.com.google.gson.Gson;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.github.tocrhz.mqtt.annotation.MqttSubscribe;
|
import com.github.tocrhz.mqtt.annotation.MqttSubscribe;
|
||||||
@@ -16,8 +17,11 @@ import com.njcn.csdevice.api.EquipmentFeignClient;
|
|||||||
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
import com.njcn.csdevice.pojo.vo.CsEquipmentDeliveryVO;
|
||||||
import com.njcn.csharmonic.param.CommonStatisticalQueryParam;
|
import com.njcn.csharmonic.param.CommonStatisticalQueryParam;
|
||||||
import com.njcn.csharmonic.param.FrequencyStatisticalQueryParam;
|
import com.njcn.csharmonic.param.FrequencyStatisticalQueryParam;
|
||||||
|
import com.njcn.csharmonic.pojo.dto.RealTimeDataDTO;
|
||||||
import com.njcn.csharmonic.pojo.vo.CsRtDataVO;
|
import com.njcn.csharmonic.pojo.vo.CsRtDataVO;
|
||||||
|
import com.njcn.csharmonic.pojo.vo.CsWarnDescVO;
|
||||||
import com.njcn.csharmonic.pojo.vo.ThdDataVO;
|
import com.njcn.csharmonic.pojo.vo.ThdDataVO;
|
||||||
|
import com.njcn.csharmonic.service.CsEventPOService;
|
||||||
import com.njcn.csharmonic.service.ILineTargetService;
|
import com.njcn.csharmonic.service.ILineTargetService;
|
||||||
import com.njcn.csharmonic.service.StableDataService;
|
import com.njcn.csharmonic.service.StableDataService;
|
||||||
import com.njcn.csharmonic.service.TemperatureService;
|
import com.njcn.csharmonic.service.TemperatureService;
|
||||||
@@ -34,12 +38,10 @@ import org.apache.commons.lang.StringUtils;
|
|||||||
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
import org.eclipse.paho.client.mqttv3.MqttMessage;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@@ -64,7 +66,7 @@ public class MqttMessageHandler {
|
|||||||
private final TemperatureService temperatureService;
|
private final TemperatureService temperatureService;
|
||||||
|
|
||||||
private final DevCapacityFeignClient devCapacityFeignClient;
|
private final DevCapacityFeignClient devCapacityFeignClient;
|
||||||
private final DecimalFormat df = new DecimalFormat("#0.000");
|
private final DecimalFormat df = new DecimalFormat("#0.000");
|
||||||
private final ChannelObjectUtil channelObjectUtil;
|
private final ChannelObjectUtil channelObjectUtil;
|
||||||
private final EquipmentFeignClient equipmentFeignClient;
|
private final EquipmentFeignClient equipmentFeignClient;
|
||||||
private final CsTopicFeignClient csTopicFeignClient;
|
private final CsTopicFeignClient csTopicFeignClient;
|
||||||
@@ -72,26 +74,61 @@ public class MqttMessageHandler {
|
|||||||
private static Integer mid = 1;
|
private static Integer mid = 1;
|
||||||
private final FileFeignClient fileFeignClient;
|
private final FileFeignClient fileFeignClient;
|
||||||
|
|
||||||
|
CsEventPOService csEventPOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实时数据应答
|
* 实时数据应答
|
||||||
*/
|
*/
|
||||||
@MqttSubscribe(value = "/zl/askRtData/{pageId}",qos = 1)
|
@MqttSubscribe(value = "/zl/askRtData/{pageId}", qos = 1)
|
||||||
public void responseRtData(String topic, @NamedValue("pageId") String pageId, MqttMessage message, @Payload String payload) {
|
public void responseRtData(String topic, @NamedValue("pageId") String pageId, MqttMessage message, @Payload String payload) {
|
||||||
List<CsRtDataVO> list = lineTargetService.getLineData(pageId);
|
List<CsRtDataVO> list = lineTargetService.getLineData(pageId);
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
publisher.send("/zl/rtData/"+pageId,gson.toJson(list),1,false);
|
publisher.send("/zl/rtData/" + pageId, gson.toJson(list), 1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@MqttSubscribe(value = "/zl/askTemperData/{devId}",qos = 1)
|
@MqttSubscribe(value = "/zl/askTemperData/{devId}", qos = 1)
|
||||||
public void responseTemperData(String topic, @NamedValue("devId") String devId, MqttMessage message, @Payload String payload) {
|
public void responseTemperData(String topic, @NamedValue("devId") String devId, MqttMessage message, @Payload String payload) {
|
||||||
List<StatisticalDataDTO> statisticalDataDTOS = temperatureService.queryTemperature(devId);
|
List<StatisticalDataDTO> statisticalDataDTOS = temperatureService.queryTemperature(devId);
|
||||||
statisticalDataDTOS.stream().forEach(temp->{
|
statisticalDataDTOS.stream().forEach(temp -> {
|
||||||
temp.setClDid(getCldidName(temp.getClDid()));
|
temp.setClDid(getCldidName(temp.getClDid()));
|
||||||
});
|
});
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
publisher.send("/zl/TemperData/"+devId,gson.toJson(statisticalDataDTOS),1,false);
|
publisher.send("/zl/TemperData/" + devId, gson.toJson(statisticalDataDTOS), 1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物联平台的组态实时数据调试
|
||||||
|
*/
|
||||||
|
@MqttSubscribe(value = "/zl/askCSConfigRtData/{pageId}", qos = 1)
|
||||||
|
public void responseCSConfigRtData(String topic, @NamedValue("pageId") String pageId, MqttMessage message, @Payload String payload) {
|
||||||
|
List<String> lineIdList = Arrays.stream(payload.substring(1, payload.length() - 1).split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<CsRtDataVO> lineData = lineTargetService.getLineDataNew(pageId);
|
||||||
|
List<CsRtDataVO> collect = lineData.stream().filter(temp -> (!CollectionUtils.isEmpty(lineIdList)) && lineIdList.contains(temp.getLineId())).collect(Collectors.toList());
|
||||||
|
RealTimeDataDTO recallReplyDTO = new RealTimeDataDTO();
|
||||||
|
recallReplyDTO.setCode(200);
|
||||||
|
recallReplyDTO.setMessage(JSONObject.toJSONString(collect));
|
||||||
|
Gson gson = new Gson();
|
||||||
|
publisher.send("/zl/csConfigRtData/" + pageId, gson.toJson(recallReplyDTO), 1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@MqttSubscribe(value = "/zl/askCSConfigWarnData/{pageId}", qos = 1)
|
||||||
|
public void responseCSConfigWarnData(String topic, @NamedValue("pageId") String pageId, MqttMessage message, @Payload String payload) {
|
||||||
|
List<String> lineIdList = Arrays.stream(payload.substring(1, payload.length() - 1).split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
// 目前暂且查最近的60条记录
|
||||||
|
List<CsWarnDescVO> csWarnDescVOList = csEventPOService.getEventDesc(lineIdList);
|
||||||
|
RealTimeDataDTO recallReplyDTO = new RealTimeDataDTO();
|
||||||
|
recallReplyDTO.setCode(200);
|
||||||
|
recallReplyDTO.setMessage(JSONObject.toJSONString(csWarnDescVOList));
|
||||||
|
Gson gson = new Gson();
|
||||||
|
publisher.send("/zl/TemperData/" + pageId, gson.toJson(recallReplyDTO), 1, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实时数据应答
|
* 实时数据应答
|
||||||
*/
|
*/
|
||||||
@@ -195,20 +232,21 @@ public class MqttMessageHandler {
|
|||||||
// }
|
// }
|
||||||
// publisher.send("/zl/devData/"+devId,topoDataJson,1,false);
|
// publisher.send("/zl/devData/"+devId,topoDataJson,1,false);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实时数据应答
|
* 实时数据应答
|
||||||
*/
|
*/
|
||||||
@MqttSubscribe(value = "/zl/askDevData/{devId}/{typeId}",qos = 1)
|
@MqttSubscribe(value = "/zl/askDevData/{devId}/{typeId}", qos = 1)
|
||||||
public void responseTopoDataByType(String topic, @NamedValue("devId") String devId,@NamedValue("typeId") String typeId, MqttMessage message, @Payload String payload) {
|
public void responseTopoDataByType(String topic, @NamedValue("devId") String devId, @NamedValue("typeId") String typeId, MqttMessage message, @Payload String payload) {
|
||||||
String topoDataJson =redisUtil.getStringByKey (devId+"#"+typeId);
|
String topoDataJson = redisUtil.getStringByKey(devId + "#" + typeId);
|
||||||
if(StringUtils.isEmpty(topoDataJson)){
|
if (StringUtils.isEmpty(topoDataJson)) {
|
||||||
List<ThdDataVO> result = new ArrayList<>();
|
List<ThdDataVO> result = new ArrayList<>();
|
||||||
List<ThdDataVO> tempList = new ArrayList<>();
|
List<ThdDataVO> tempList = new ArrayList<>();
|
||||||
|
|
||||||
//1.查询拓扑图配置的指标:拓扑图扑图配置:7677f94c749dedaff30f911949cbd724
|
//1.查询拓扑图配置的指标:拓扑图扑图配置:7677f94c749dedaff30f911949cbd724
|
||||||
List<EleEpdPqd> data = csStatisticalSetFeignClient.queryStatisticalSelect(typeId).getData();
|
List<EleEpdPqd> data = csStatisticalSetFeignClient.queryStatisticalSelect(typeId).getData();
|
||||||
data.forEach(temp->{
|
data.forEach(temp -> {
|
||||||
if(Objects.nonNull(temp.getHarmStart())&&Objects.nonNull(temp.getHarmEnd())){
|
if (Objects.nonNull(temp.getHarmStart()) && Objects.nonNull(temp.getHarmEnd())) {
|
||||||
FrequencyStatisticalQueryParam frequencyStatisticalQueryParam = new FrequencyStatisticalQueryParam();
|
FrequencyStatisticalQueryParam frequencyStatisticalQueryParam = new FrequencyStatisticalQueryParam();
|
||||||
frequencyStatisticalQueryParam.setDevId(devId);
|
frequencyStatisticalQueryParam.setDevId(devId);
|
||||||
frequencyStatisticalQueryParam.setStatisticalId(temp.getId());
|
frequencyStatisticalQueryParam.setStatisticalId(temp.getId());
|
||||||
@@ -218,12 +256,12 @@ public class MqttMessageHandler {
|
|||||||
List<ThdDataVO> thdDataVOList = stableDataService.QuerySqlData(frequencyStatisticalQueryParam);
|
List<ThdDataVO> thdDataVOList = stableDataService.QuerySqlData(frequencyStatisticalQueryParam);
|
||||||
tempList.addAll(thdDataVOList);
|
tempList.addAll(thdDataVOList);
|
||||||
|
|
||||||
}else {
|
} else {
|
||||||
CommonStatisticalQueryParam commonStatisticalQueryParam = new CommonStatisticalQueryParam();
|
CommonStatisticalQueryParam commonStatisticalQueryParam = new CommonStatisticalQueryParam();
|
||||||
commonStatisticalQueryParam.setDevId(devId);
|
commonStatisticalQueryParam.setDevId(devId);
|
||||||
commonStatisticalQueryParam.setStatisticalId(temp.getId());
|
commonStatisticalQueryParam.setStatisticalId(temp.getId());
|
||||||
commonStatisticalQueryParam.setValueType("avg");
|
commonStatisticalQueryParam.setValueType("avg");
|
||||||
List<ThdDataVO> listFuture= stableDataService.queryFisrtCommonStatistical(commonStatisticalQueryParam);
|
List<ThdDataVO> listFuture = stableDataService.queryFisrtCommonStatistical(commonStatisticalQueryParam);
|
||||||
tempList.addAll(listFuture);
|
tempList.addAll(listFuture);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,23 +269,23 @@ public class MqttMessageHandler {
|
|||||||
|
|
||||||
//过滤M相
|
//过滤M相
|
||||||
List<ThdDataVO> m = tempList.stream().filter(temp -> Objects.equals(temp.getPhase(), "M")).collect(Collectors.toList());
|
List<ThdDataVO> m = tempList.stream().filter(temp -> Objects.equals(temp.getPhase(), "M")).collect(Collectors.toList());
|
||||||
m.stream().forEach(temp->{
|
m.stream().forEach(temp -> {
|
||||||
Stream.of("A","B","C").forEach(phase->{
|
Stream.of("A", "B", "C").forEach(phase -> {
|
||||||
ThdDataVO thdDataVO = new ThdDataVO();
|
ThdDataVO thdDataVO = new ThdDataVO();
|
||||||
BeanUtils.copyProperties(temp,thdDataVO);
|
BeanUtils.copyProperties(temp, thdDataVO);
|
||||||
thdDataVO.setPhase(phase);
|
thdDataVO.setPhase(phase);
|
||||||
result.add(thdDataVO);
|
result.add(thdDataVO);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
//如果是基础数据则添加拓扑图的数据
|
//如果是基础数据则添加拓扑图的数据
|
||||||
if(Objects.equals("fc8c86dbc3f2d9810f5cd8f53c295415",typeId)){
|
if (Objects.equals("fc8c86dbc3f2d9810f5cd8f53c295415", typeId)) {
|
||||||
List<ThdDataVO> apfThdI = tempList.stream().filter(temp -> Objects.equals(temp.getStatisticalName(), "Apf_ThdA_Load(%)")).collect(Collectors.toList());
|
List<ThdDataVO> apfThdI = tempList.stream().filter(temp -> Objects.equals(temp.getStatisticalName(), "Apf_ThdA_Load(%)")).collect(Collectors.toList());
|
||||||
Map<String, List<ThdDataVO>> collect3 = apfThdI.stream().collect(Collectors.groupingBy(ThdDataVO::getLineId));
|
Map<String, List<ThdDataVO>> collect3 = apfThdI.stream().collect(Collectors.groupingBy(ThdDataVO::getLineId));
|
||||||
collect3.forEach((k,v)->{
|
collect3.forEach((k, v) -> {
|
||||||
if(!CollectionUtil.isEmpty(v)){
|
if (!CollectionUtil.isEmpty(v)) {
|
||||||
double asDouble = v.stream().mapToDouble(ThdDataVO::getStatisticalData).average().getAsDouble();
|
double asDouble = v.stream().mapToDouble(ThdDataVO::getStatisticalData).average().getAsDouble();
|
||||||
ThdDataVO thdDataVO = new ThdDataVO();
|
ThdDataVO thdDataVO = new ThdDataVO();
|
||||||
BeanUtils.copyProperties(v.get(0),thdDataVO);
|
BeanUtils.copyProperties(v.get(0), thdDataVO);
|
||||||
thdDataVO.setStatisticalData(Double.valueOf(df.format(asDouble)));
|
thdDataVO.setStatisticalData(Double.valueOf(df.format(asDouble)));
|
||||||
thdDataVO.setPhase("avg");
|
thdDataVO.setPhase("avg");
|
||||||
result.add(thdDataVO);
|
result.add(thdDataVO);
|
||||||
@@ -255,11 +293,11 @@ public class MqttMessageHandler {
|
|||||||
});
|
});
|
||||||
List<ThdDataVO> apfRmsI = tempList.stream().filter(temp -> Objects.equals(temp.getStatisticalName(), "Apf_RmsI_TolOut(A)")).collect(Collectors.toList());
|
List<ThdDataVO> apfRmsI = tempList.stream().filter(temp -> Objects.equals(temp.getStatisticalName(), "Apf_RmsI_TolOut(A)")).collect(Collectors.toList());
|
||||||
Map<String, List<ThdDataVO>> collect2 = apfRmsI.stream().collect(Collectors.groupingBy(ThdDataVO::getLineId));
|
Map<String, List<ThdDataVO>> collect2 = apfRmsI.stream().collect(Collectors.groupingBy(ThdDataVO::getLineId));
|
||||||
collect2.forEach((k,v)->{
|
collect2.forEach((k, v) -> {
|
||||||
if(!CollectionUtil.isEmpty(v)){
|
if (!CollectionUtil.isEmpty(v)) {
|
||||||
double asDouble = v.stream().mapToDouble(ThdDataVO::getStatisticalData).average().getAsDouble();
|
double asDouble = v.stream().mapToDouble(ThdDataVO::getStatisticalData).average().getAsDouble();
|
||||||
ThdDataVO thdDataVO = new ThdDataVO();
|
ThdDataVO thdDataVO = new ThdDataVO();
|
||||||
BeanUtils.copyProperties(v.get(0),thdDataVO);
|
BeanUtils.copyProperties(v.get(0), thdDataVO);
|
||||||
thdDataVO.setStatisticalData(Double.valueOf(df.format(asDouble)));
|
thdDataVO.setStatisticalData(Double.valueOf(df.format(asDouble)));
|
||||||
thdDataVO.setPhase("avg");
|
thdDataVO.setPhase("avg");
|
||||||
result.add(thdDataVO);
|
result.add(thdDataVO);
|
||||||
@@ -267,11 +305,11 @@ public class MqttMessageHandler {
|
|||||||
});
|
});
|
||||||
List<ThdDataVO> apfThdISys = tempList.stream().filter(temp -> Objects.equals(temp.getStatisticalName(), "Apf_ThdA_Sys(%)")).collect(Collectors.toList());
|
List<ThdDataVO> apfThdISys = tempList.stream().filter(temp -> Objects.equals(temp.getStatisticalName(), "Apf_ThdA_Sys(%)")).collect(Collectors.toList());
|
||||||
Map<String, List<ThdDataVO>> collect4 = apfThdISys.stream().collect(Collectors.groupingBy(ThdDataVO::getLineId));
|
Map<String, List<ThdDataVO>> collect4 = apfThdISys.stream().collect(Collectors.groupingBy(ThdDataVO::getLineId));
|
||||||
collect4.forEach((k,v)->{
|
collect4.forEach((k, v) -> {
|
||||||
if(!CollectionUtil.isEmpty(v)){
|
if (!CollectionUtil.isEmpty(v)) {
|
||||||
double asDouble = v.stream().mapToDouble(ThdDataVO::getStatisticalData).average().getAsDouble();
|
double asDouble = v.stream().mapToDouble(ThdDataVO::getStatisticalData).average().getAsDouble();
|
||||||
ThdDataVO thdDataVO = new ThdDataVO();
|
ThdDataVO thdDataVO = new ThdDataVO();
|
||||||
BeanUtils.copyProperties(v.get(0),thdDataVO);
|
BeanUtils.copyProperties(v.get(0), thdDataVO);
|
||||||
thdDataVO.setStatisticalData(Double.valueOf(df.format(asDouble)));
|
thdDataVO.setStatisticalData(Double.valueOf(df.format(asDouble)));
|
||||||
thdDataVO.setPhase("avg");
|
thdDataVO.setPhase("avg");
|
||||||
result.add(thdDataVO);
|
result.add(thdDataVO);
|
||||||
@@ -279,16 +317,16 @@ public class MqttMessageHandler {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
Double capacity = devCapacityFeignClient.getDevCapacity(devId).getData();
|
Double capacity = devCapacityFeignClient.getDevCapacity(devId).getData();
|
||||||
apfRmsI.forEach(temp->{
|
apfRmsI.forEach(temp -> {
|
||||||
ThdDataVO thdDataVO = new ThdDataVO();
|
ThdDataVO thdDataVO = new ThdDataVO();
|
||||||
BeanUtils.copyProperties(temp,thdDataVO);
|
BeanUtils.copyProperties(temp, thdDataVO);
|
||||||
thdDataVO.setUnit("%");
|
thdDataVO.setUnit("%");
|
||||||
thdDataVO.setStatisticalName("load_Rate");
|
thdDataVO.setStatisticalName("load_Rate");
|
||||||
thdDataVO.setAnotherName("负载率");
|
thdDataVO.setAnotherName("负载率");
|
||||||
if (capacity<=0){
|
if (capacity <= 0) {
|
||||||
thdDataVO.setStatisticalData(3.1415926);
|
thdDataVO.setStatisticalData(3.1415926);
|
||||||
}else {
|
} else {
|
||||||
double v = temp.getStatisticalData()*100 / capacity;
|
double v = temp.getStatisticalData() * 100 / capacity;
|
||||||
thdDataVO.setStatisticalData(Double.valueOf(df.format(v)));
|
thdDataVO.setStatisticalData(Double.valueOf(df.format(v)));
|
||||||
}
|
}
|
||||||
result.add(thdDataVO);
|
result.add(thdDataVO);
|
||||||
@@ -299,14 +337,13 @@ public class MqttMessageHandler {
|
|||||||
result.addAll(notM);
|
result.addAll(notM);
|
||||||
Gson gson = new Gson();
|
Gson gson = new Gson();
|
||||||
topoDataJson = gson.toJson(result);
|
topoDataJson = gson.toJson(result);
|
||||||
redisUtil.saveByKeyWithExpire(devId+"#"+typeId, (Object) topoDataJson, 30L);
|
redisUtil.saveByKeyWithExpire(devId + "#" + typeId, (Object) topoDataJson, 30L);
|
||||||
}
|
}
|
||||||
publisher.send("/zl/devData/"+devId+"/"+typeId,topoDataJson,1,false);
|
publisher.send("/zl/devData/" + devId + "/" + typeId, topoDataJson, 1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getCldidName(String cldid) {
|
||||||
public String getCldidName( String cldid) {
|
|
||||||
|
|
||||||
switch (cldid) {
|
switch (cldid) {
|
||||||
case "0":
|
case "0":
|
||||||
@@ -361,7 +398,7 @@ public class MqttMessageHandler {
|
|||||||
/**
|
/**
|
||||||
* 处理补召数据
|
* 处理补召数据
|
||||||
*/
|
*/
|
||||||
@MqttSubscribe(value = "/makeUpData/{nDid}/{lineId}",qos = 1)
|
@MqttSubscribe(value = "/makeUpData/{nDid}/{lineId}", qos = 1)
|
||||||
public void responseRtData(String topic, @NamedValue("nDid") String nDid, @NamedValue("lineId") String lineId, MqttMessage message, @Payload String payload) {
|
public void responseRtData(String topic, @NamedValue("nDid") String nDid, @NamedValue("lineId") String lineId, MqttMessage message, @Payload String payload) {
|
||||||
//下载文件
|
//下载文件
|
||||||
fileFeignClient.downloadMakeUpFile(nDid);
|
fileFeignClient.downloadMakeUpFile(nDid);
|
||||||
|
|||||||
@@ -16,5 +16,5 @@ import java.util.List;
|
|||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
public interface CsConfigurationMapper extends BaseMapper<CsConfigurationPO> {
|
public interface CsConfigurationMapper extends BaseMapper<CsConfigurationPO> {
|
||||||
Page<CsConfigurationPO> queryPage(Page<CsConfigurationPO> temppage, @Param("temp") CsConfigurationParm.CsConfigurationQueryParam csConfigurationQueryParam, @Param("list") List<String> list);
|
Page<CsConfigurationPO> queryPage(Page<CsConfigurationPO> temppage, @Param("temp") CsConfigurationParm.CsConfigurationQueryParam csConfigurationQueryParam, @Param("list") List<String> list, @Param("userId") String userId);
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,10 @@ package com.njcn.csharmonic.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.njcn.csharmonic.pojo.po.CsEventPO;
|
import com.njcn.csharmonic.pojo.po.CsEventPO;
|
||||||
|
import com.njcn.csharmonic.pojo.vo.CsWarnDescVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -12,4 +16,5 @@ import com.njcn.csharmonic.pojo.po.CsEventPO;
|
|||||||
* @version V1.0.0
|
* @version V1.0.0
|
||||||
*/
|
*/
|
||||||
public interface CsEventPOMapper extends BaseMapper<CsEventPO> {
|
public interface CsEventPOMapper extends BaseMapper<CsEventPO> {
|
||||||
|
List<CsWarnDescVO> getEventDesc(@Param("lineIdList")List<String> lineIdList, @Param("count")int count);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.njcn.csharmonic.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.csharmonic.pojo.po.CsPageUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 数据集表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
public interface CsPageUserMapper extends BaseMapper<CsPageUser> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,14 +7,15 @@
|
|||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="status" jdbcType="INTEGER" property="status" />
|
<result column="status" jdbcType="INTEGER" property="status" />
|
||||||
|
<result column="scope" jdbcType="INTEGER" property="scope" />
|
||||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, `name`, `status`, create_by, create_time, update_by, update_time
|
id, `name`, `status`, `scope`,create_by, create_time, update_by, update_time
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryPage" resultMap="BaseResultMap">
|
<select id="queryPage" resultMap="BaseResultMap">
|
||||||
@@ -24,6 +25,14 @@
|
|||||||
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
|
<choose>
|
||||||
|
<when test="userId != null and userId != ''">
|
||||||
|
AND (a.scope = 1 OR (a.scope = 0 AND a.create_by = #{userId}))
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
AND (a.scope = 1 OR a.scope = 0)
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
<if test="temp!=null and temp.searchValue != null and temp.searchValue !=''">
|
<if test="temp!=null and temp.searchValue != null and temp.searchValue !=''">
|
||||||
AND a.name like concat(concat("%",#{temp.searchValue}),"%")
|
AND a.name like concat(concat("%",#{temp.searchValue}),"%")
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -15,4 +15,26 @@
|
|||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, line_id, device_id, start_time, tag, wave_id
|
id, line_id, device_id, start_time, tag, wave_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getEventDesc" resultType="com.njcn.csharmonic.pojo.vo.CsWarnDescVO">
|
||||||
|
SELECT
|
||||||
|
t1.line_id id,
|
||||||
|
t2.NAME,
|
||||||
|
t1.start_time timeId,
|
||||||
|
t1.amplitude,
|
||||||
|
t1.persist_time
|
||||||
|
FROM
|
||||||
|
cs_event t1,
|
||||||
|
cs_line t2
|
||||||
|
WHERE
|
||||||
|
t1.line_id = t2.line_id
|
||||||
|
and t1.line_id in
|
||||||
|
<foreach collection="lineIdList" item="lineId" separator="," open="(" close=")">
|
||||||
|
#{lineId}
|
||||||
|
</foreach>
|
||||||
|
and t1.type = 0
|
||||||
|
LIMIT 60
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.csharmonic.mapper.CsPageUserMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
sys_excel_rpt_temp a
|
sys_excel_rpt_temp a
|
||||||
WHERE
|
WHERE
|
||||||
a.state = 1
|
a.state = 1
|
||||||
|
order by a.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getReportTemplateByDept" resultType="com.njcn.csharmonic.pojo.vo.ReportTemplateVO">
|
<select id="getReportTemplateByDept" resultType="com.njcn.csharmonic.pojo.vo.ReportTemplateVO">
|
||||||
|
|||||||
@@ -0,0 +1,959 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.csharmonic.mapper.report.ReportMapper">
|
||||||
|
<select id="getVirtualDataI" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_i_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
rms DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getVirtualDataV" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
@rankSum := IF( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
rms DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getTotalCP95Day" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count( rms ) total
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A' )
|
||||||
|
AND value_type = "CP95"
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="getTotalPltCP95Day" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count( plt ) total
|
||||||
|
FROM
|
||||||
|
r_stat_data_plt_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A' )
|
||||||
|
AND value_type = "CP95"
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="getTotalPstCP95Day" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count( plt ) total
|
||||||
|
FROM
|
||||||
|
r_stat_data_flicker_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A' )
|
||||||
|
AND value_type = "CP95"
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="getVVirtualData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms_lvr as rms,
|
||||||
|
@rankSum := IF( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
rms_lvr DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getPowerP" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
p as rms,
|
||||||
|
@rankSum :=
|
||||||
|
IF
|
||||||
|
( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_harmpower_p_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN
|
||||||
|
1
|
||||||
|
WHEN value_type = 'MAX' THEN
|
||||||
|
2
|
||||||
|
WHEN value_type = 'MIN' THEN
|
||||||
|
3
|
||||||
|
WHEN value_type = 'AVG' THEN
|
||||||
|
4 ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
p DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getPF" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
pf as rms,
|
||||||
|
@rankSum :=
|
||||||
|
IF
|
||||||
|
( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_harmpower_p_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN
|
||||||
|
1
|
||||||
|
WHEN value_type = 'MAX' THEN
|
||||||
|
2
|
||||||
|
WHEN value_type = 'MIN' THEN
|
||||||
|
3
|
||||||
|
WHEN value_type = 'AVG' THEN
|
||||||
|
4 ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
pf DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getPowerQ" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
q as rms,
|
||||||
|
@rankSum :=
|
||||||
|
IF
|
||||||
|
( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_harmpower_q_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN
|
||||||
|
1
|
||||||
|
WHEN value_type = 'MAX' THEN
|
||||||
|
2
|
||||||
|
WHEN value_type = 'MIN' THEN
|
||||||
|
3
|
||||||
|
WHEN value_type = 'AVG' THEN
|
||||||
|
4 ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
q DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getPowerS" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
s as rms,
|
||||||
|
@rankSum :=
|
||||||
|
IF
|
||||||
|
( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_harmpower_s_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' ,'T')
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN
|
||||||
|
1
|
||||||
|
WHEN value_type = 'MAX' THEN
|
||||||
|
2
|
||||||
|
WHEN value_type = 'MIN' THEN
|
||||||
|
3
|
||||||
|
WHEN value_type = 'AVG' THEN
|
||||||
|
4 ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
s DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getFlickerData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
plt as rms,
|
||||||
|
@rankSum :=
|
||||||
|
IF
|
||||||
|
( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_flicker_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN
|
||||||
|
1
|
||||||
|
WHEN value_type = 'MAX' THEN
|
||||||
|
2
|
||||||
|
WHEN value_type = 'MIN' THEN
|
||||||
|
3
|
||||||
|
WHEN value_type = 'AVG' THEN
|
||||||
|
4 ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
plt DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getLFlickerData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
pst as rms,
|
||||||
|
@rankSum :=
|
||||||
|
IF
|
||||||
|
( @CI = phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_flicker_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C')
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN
|
||||||
|
1
|
||||||
|
WHEN value_type = 'MAX' THEN
|
||||||
|
2
|
||||||
|
WHEN value_type = 'MIN' THEN
|
||||||
|
3
|
||||||
|
WHEN value_type = 'AVG' THEN
|
||||||
|
4 ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
pst DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type
|
||||||
|
</select>
|
||||||
|
<select id="getUVdeviationData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
vu_dev as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
vu_dev DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getLVdeviationData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
vl_dev as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
vl_dev DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getDistortionDataV" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
v_thd as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
v_thd DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getDistortionDataI" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
i_thd as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_i_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
i_thd DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getFrequencyData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
freq as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type = 'T'
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
freq DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getDEVFrequencyData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
freq_dev as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_v_d
|
||||||
|
<where>
|
||||||
|
phasic_type = 'T'
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
freq_dev DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
<select id="getINegData" resultType="com.njcn.csharmonic.pojo.vo.report.ReportValue">
|
||||||
|
SELECT
|
||||||
|
phasic_type AS phaseType,
|
||||||
|
AVG( CASE WHEN value_type = 'AVG' THEN rms END ) AS meanValue,
|
||||||
|
MIN( CASE WHEN value_type = 'MIN' THEN rms END ) AS minValue,
|
||||||
|
MAX( CASE WHEN value_type = 'MAX' THEN rms END ) AS fmaxValue,
|
||||||
|
MAX( CASE WHEN rankSum = #{param.count} THEN rms END ) AS cp95Value
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
rms,
|
||||||
|
rankSum
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
phasic_type,
|
||||||
|
value_type,
|
||||||
|
i_neg as rms,
|
||||||
|
@rankSum := IF( @CI := phasic_type, @rankSum + 1, 1 ) AS rankSum,
|
||||||
|
@CI := phasic_type
|
||||||
|
FROM
|
||||||
|
r_stat_data_i_d
|
||||||
|
<where>
|
||||||
|
phasic_type IN ( 'A', 'B', 'C' )
|
||||||
|
and quality_flag = 0
|
||||||
|
<if test="param.startTime != null and param.startTime != ''">
|
||||||
|
and time >= #{param.startTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.endTime != null and param.endTime != ''">
|
||||||
|
and time <= #{param.endTime}
|
||||||
|
</if>
|
||||||
|
<if test="param.lineId != null and param.lineId != ''">
|
||||||
|
and line_id = #{param.lineId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
ORDER BY
|
||||||
|
phasic_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN value_type = 'CP95' THEN 1
|
||||||
|
WHEN value_type = 'MAX' THEN 2
|
||||||
|
WHEN value_type = 'MIN' THEN 3
|
||||||
|
WHEN value_type = 'AVG' THEN 4
|
||||||
|
ELSE 5
|
||||||
|
END
|
||||||
|
),
|
||||||
|
rms DESC
|
||||||
|
) AS t1
|
||||||
|
) a
|
||||||
|
GROUP BY
|
||||||
|
phasic_type;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.njcn.csharmonic.mapper.report;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.csharmonic.pojo.po.day.RStatDataIDPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2023-04-17
|
||||||
|
*/
|
||||||
|
public interface RStatDataIDMapper extends BaseMapper<RStatDataIDPO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取监测点负序电流
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<RStatDataIDPO> getINeg(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波电流
|
||||||
|
*/
|
||||||
|
List<RStatDataIDPO> getI(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.csharmonic.mapper.report;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.csharmonic.pojo.po.day.RStatDataInharmVDPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2024/7/31 9:24
|
||||||
|
*/
|
||||||
|
public interface RStatDataInharmVDMapper extends BaseMapper<RStatDataInharmVDPO> {
|
||||||
|
|
||||||
|
//List<RStatDataInharmVDPO> getV(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.njcn.csharmonic.mapper.report;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.csharmonic.pojo.po.day.RStatDataVDPO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wr
|
||||||
|
* @since 2023-03-31
|
||||||
|
*/
|
||||||
|
public interface RStatDataVDPOMapper extends BaseMapper<RStatDataVDPO> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取频率偏差、三相电压不平衡度
|
||||||
|
*/
|
||||||
|
List<RStatDataVDPO> getFreqDev(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电压偏差
|
||||||
|
*/
|
||||||
|
List<RStatDataVDPO> getVuDev(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电压总谐波畸变率
|
||||||
|
*/
|
||||||
|
List<RStatDataVDPO> getVthd(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取三相电压不平衡度
|
||||||
|
*/
|
||||||
|
List<RStatDataVDPO> getUnbalance(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取谐波电压
|
||||||
|
*/
|
||||||
|
List<RStatDataVDPO> getV(@Param("list") List<String> lineList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
}
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
package com.njcn.csharmonic.mapper.report;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.csharmonic.pojo.param.report.ReportQueryParam;
|
||||||
|
import com.njcn.csharmonic.pojo.vo.report.ReportValue;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 谐波报告查询
|
||||||
|
*/
|
||||||
|
public interface ReportMapper {
|
||||||
|
/**
|
||||||
|
* 获取电流有效值
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getVirtualDataI(@Param("param") ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电压有效值
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getVirtualDataV(@Param("param") ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CP95条数
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getTotalCP95Day(@Param("param")ReportQueryParam param);
|
||||||
|
/**
|
||||||
|
* CP95条数
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getTotalPltCP95Day(@Param("param")ReportQueryParam param);
|
||||||
|
/**
|
||||||
|
* CP95条数
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer getTotalPstCP95Day(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
|
||||||
|
List<ReportValue> getVVirtualData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取有功功率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getPowerP(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无功功率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getPowerQ(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视在功率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getPowerS(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功率因数
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getPF(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短时闪变
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getFlickerData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 长时闪变
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getLFlickerData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压负偏差
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getUVdeviationData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压正偏差
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getLVdeviationData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电压畸变率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getDistortionDataV(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电流畸变率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getDistortionDataI(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*频率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getFrequencyData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*频率
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getDEVFrequencyData(@Param("param")ReportQueryParam param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负序电流
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ReportValue> getINegData(@Param("param")ReportQueryParam param);
|
||||||
|
}
|
||||||
@@ -10,6 +10,7 @@ import com.njcn.csharmonic.param.DataParam;
|
|||||||
import com.njcn.csharmonic.pojo.param.EventStatisticParam;
|
import com.njcn.csharmonic.pojo.param.EventStatisticParam;
|
||||||
import com.njcn.csharmonic.pojo.po.CsEventPO;
|
import com.njcn.csharmonic.pojo.po.CsEventPO;
|
||||||
import com.njcn.csharmonic.pojo.vo.CsEventVO;
|
import com.njcn.csharmonic.pojo.vo.CsEventVO;
|
||||||
|
import com.njcn.csharmonic.pojo.vo.CsWarnDescVO;
|
||||||
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
|
import com.njcn.csharmonic.pojo.vo.EventDetailVO;
|
||||||
import com.njcn.csharmonic.pojo.vo.EventStatisticsVo;
|
import com.njcn.csharmonic.pojo.vo.EventStatisticsVo;
|
||||||
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
import com.njcn.event.file.pojo.dto.WaveDataDTO;
|
||||||
@@ -69,4 +70,5 @@ public interface CsEventPOService extends IService<CsEventPO>{
|
|||||||
|
|
||||||
List<EventStatisticsVo> getEventStatistics(CsEventUserQueryParam param);
|
List<EventStatisticsVo> getEventStatistics(CsEventUserQueryParam param);
|
||||||
|
|
||||||
|
List<CsWarnDescVO> getEventDesc(List<String> lineIdList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.njcn.csharmonic.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.csharmonic.pojo.po.CsPageUser;
|
||||||
|
|
||||||
|
public interface CsPageUserService extends IService<CsPageUser> {
|
||||||
|
boolean savePageIdWithUser(CsPageUser csPageUser);
|
||||||
|
|
||||||
|
CsPageUser getByUserId(String userId);
|
||||||
|
}
|
||||||
@@ -23,4 +23,9 @@ public interface ILineTargetService {
|
|||||||
*/
|
*/
|
||||||
List<CsRtDataVO> getLineData(String id);
|
List<CsRtDataVO> getLineData(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取绑定指标的数据
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
List<CsRtDataVO> getLineDataNew(String id);
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user