补充新更新

This commit is contained in:
2022-06-22 09:14:52 +08:00
parent 59da3376c1
commit 6870c2ccc3
323 changed files with 18518 additions and 441 deletions

View File

@@ -22,5 +22,6 @@ public interface ServerInfo {
String JOB_ADMIN = "job-admin"; String JOB_ADMIN = "job-admin";
String USER = "user-boot"; String USER = "user-boot";
String JOB = "job-admin"; String JOB = "job-admin";
String QUALITY = "quality-boot";
} }

View File

@@ -23,6 +23,8 @@ public enum ServerEnum {
SUPERVISE("pqs-supervise", "技术监督管理服务模块"), SUPERVISE("pqs-supervise", "技术监督管理服务模块"),
SYSTEM("system-boot", "系统配置服务模块"), SYSTEM("system-boot", "系统配置服务模块"),
USER("user-boot", "用户服务模块"), USER("user-boot", "用户服务模块"),
ENERGY("energy-boot", "用能服务模块"),
QUALITY("quality-boot", "电能质量服务模块"),
COMMON("pqs-common", "通用服务模块"); COMMON("pqs-common", "通用服务模块");
private final String name; private final String name;

View File

@@ -1109,7 +1109,7 @@ public class AnalyWave {
********************************************************/ ********************************************************/
AnalyWave analyWave = new AnalyWave(); AnalyWave analyWave = new AnalyWave();
// 获取瞬时波形 // 获取瞬时波形
WaveDataDTO waveDataDTO = analyWave.getComtrade("E:\\Comtrade\\PQMonitor_PQM1_106_20220301_101522_338.CFG", 1);//获取原始波形值 WaveDataDTO waveDataDTO = analyWave.getComtrade("C:\\Users\\陈超\\Desktop\\Comtrade\\192.168.0.58\\222.CFG", 1);//获取原始波形值
// 获取RMS波形 // 获取RMS波形
WaveDataDTO waveDataDTO1 = analyWave.getValidData(waveDataDTO); WaveDataDTO waveDataDTO1 = analyWave.getValidData(waveDataDTO);
// 获取特征值 // 获取特征值

View File

@@ -41,6 +41,10 @@
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -1,7 +1,6 @@
package com.njcn.influxdb.utils; package com.njcn.influxdb.utils;
import cn.hutool.core.util.StrUtil;
import lombok.Data; import lombok.Data;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.influxdb.InfluxDB; import org.influxdb.InfluxDB;
@@ -170,7 +169,6 @@ public class InfluxDbUtils {
builder.tag(tags); builder.tag(tags);
builder.fields(fields); builder.fields(fields);
if (0 != time) { if (0 != time) {
time = time + 28800000;
builder.time(time, timeUnit); builder.time(time, timeUnit);
} }
influxDB.write(dbName, retentionPolicy, builder.build()); influxDB.write(dbName, retentionPolicy, builder.build());

View File

@@ -1,8 +1,11 @@
import cn.hutool.core.date.DateUtil;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.influxdb.utils.InfluxDbUtils; import com.njcn.influxdb.utils.InfluxDbUtils;
import org.influxdb.InfluxDB.ConsistencyLevel; import org.influxdb.InfluxDB.ConsistencyLevel;
import org.influxdb.dto.BatchPoints; import org.influxdb.dto.BatchPoints;
import org.influxdb.dto.Point; import org.influxdb.dto.Point;
import org.influxdb.dto.QueryResult; import org.influxdb.dto.QueryResult;
import org.influxdb.impl.InfluxDBResultMapper;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@@ -21,9 +24,17 @@ public class test {
//查询 //查询
public static QueryResult select(InfluxDbUtils influxDBUtil) { public static QueryResult select(InfluxDbUtils influxDBUtil) {
long startTime = System.currentTimeMillis(); long startTime = System.currentTimeMillis();
QueryResult result = influxDBUtil.query("select * from data_V where phasic_type='A'"); //组装sql语句
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse("2022-05-06"))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse("2022-05-06"))).append("' and (");
//sql语句
stringBuilder.append("line_id ='").append("1e3b8531483b2a8cbee6747f1f641cf9").append("')");
//获取暂降事件
QueryResult result = influxDBUtil.query("select * from pqs_eventdetail where " + stringBuilder.toString());
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
List<EventDetail> eventDetailList = influxDBResultMapper.toPOJO(result, EventDetail.class);
long endTime = System.currentTimeMillis(); long endTime = System.currentTimeMillis();
System.out.println(endTime - startTime); System.out.println(eventDetailList);
return result; return result;
} }
@@ -50,98 +61,149 @@ public class test {
public static void main(String[] args) { public static void main(String[] args) {
InfluxDbUtils influxDBUtil = new InfluxDbUtils("root", "123456789", "http://192.168.1.16:8086", "pqsbase", ""); InfluxDbUtils influxDBUtil = new InfluxDbUtils("root", "123456789", "http://192.168.1.16:8086", "pqsbase", "");
insert(influxDBUtil); insert(influxDBUtil);
//select(influxDBUtil);
}
public static void deleteDB(InfluxDbUtils influxDBUtil) {
influxDBUtil.deleteDB("LIMIT_RATE");
} }
//单条数据插入 //单条数据插入
public static void insert(InfluxDbUtils influxDBUtil) { public static void insert(InfluxDbUtils influxDBUtil) {
// long time = Long.parseLong("1655135328135");
// Map<String, String> tags = new HashMap<>();
// // tags.put("line_id", "127fad1dcb0077ac2979141b8473a5e4");
// tags.put("line_id", "1883a1fe6d9c3c5a03a4371bda024452");
// Map<String, Object> fields = new HashMap<>();
// fields.put("create_time", "2022-06-13 23:57:31");
// fields.put("update_time", "");
// fields.put("push_failed",0);
// fields.put("result",1);
// influxDBUtil.insert("pqs_event_push_logs", tags, fields, time, TimeUnit.MILLISECONDS);
long time = Long.parseLong("1646180719000");
Map<String, String> tags = new HashMap<>(); Map<String, String> tags = new HashMap<>();
tags.put("lineid", "1e3b8531483b2a8cbee6747f1f641cf9"); <<<<<<< .mine tags.put("LineID", "fd4ffb0dd33eafaaf403b07a3fc1afe5");
Map<String, Object> fields = new HashMap<>(); ======= tags.put("line_id", "89604adcaf7df6284fdaa352ccaba56b");
fields.put("phasic_type","T"); >>>>>>> .theirs Map<String, Object> fields = new HashMap<>();
fields.put("value_type","MAX"); fields.put("VU_Dev1",5.706);
fields.put("Freq_Dev", 48.6 ); fields.put("VU_Dev2",5.706);
fields.put("Voltage_Dev", 8.3 ); fields.put("VU_Dev3",5.706);
fields.put("UBalance", 7.6 ); fields.put("VU_Dev4",5.706);
fields.put("Flicker", 4.6 ); fields.put("VU_Dev5",5.706);
fields.put("UAberrance", 6.5 ); fields.put("Freq_Dev1",0.534);
fields.put("I_Neg", 5.6 ); fields.put("Freq_Dev2",0.534);
fields.put("UHarm_2", 6.8 ); fields.put("Freq_Dev3",2.534);
fields.put("UHarm_3", 5.5 ); fields.put("Freq_Dev4",0.534);
fields.put("UHarm_4", 5.4 ); fields.put("Freq_Dev5",0.534);
fields.put("UHarm_5", 7.8 ); fields.put("Data_PST1",0.604);
fields.put("UHarm_6", 6.2 ); fields.put("Data_PST2",0.0);
fields.put("UHarm_7", 2.5 ); fields.put("Data_PST3",0.691);
fields.put("UHarm_8", 8.3 ); fields.put("Data_PST4",0.910);
fields.put("UHarm_9", 6.2 ); fields.put("Data_PST5",0.691);
fields.put("UHarm_10", 12.8 ); fields.put("V_Unbalance1",2.713);
fields.put("UHarm_11", 2.8 ); fields.put("V_Unbalance2",2.713);
fields.put("UHarm_12", 8.4 ); fields.put("V_Unbalance3",2.713);
fields.put("UHarm_13", 5.6 ); fields.put("V_Unbalance4",2.713);
fields.put("UHarm_14", 5.2 ); fields.put("V_Unbalance5",2.713);
fields.put("UHarm_15", 9.5 ); fields.put("V_THD1",20.001);
fields.put("UHarm_16", 8.3 ); fields.put("V_THD2",20.003);
fields.put("UHarm_17", 7.8 ); fields.put("V_THD3",20.00);
fields.put("UHarm_18", 6.2 ); fields.put("V_THD4",20.008);
fields.put("UHarm_19", 2.5); fields.put("V_THD5",20.00);
fields.put("UHarm_20", 4.5 ); fields.put("Event1",1.619);
fields.put("UHarm_21", 4.5 ); fields.put("Event2",1.619);
fields.put("UHarm_22", 6.5 ); fields.put("Event3",1.619);
fields.put("UHarm_23", 5.9 ); fields.put("Event4",1.619);
fields.put("UHarm_24", 9.2 ); fields.put("Event5",1.619);
fields.put("UHarm_25", 5.8 ); influxDBUtil.insert("PQS_COMASSES", tags, fields, time, TimeUnit.MILLISECONDS);
fields.put("IHarm_2", 12.8 ); // long time = Long.parseLong("1647473742000");
fields.put("IHarm_3", 5.4 ); // tags.put("MYINDEX", "df1ff413949f6d1fc07ffdb5440b4907");
fields.put("IHarm_4", 6.2 ); // Map<String, Object> fields = new HashMap<>();
fields.put("IHarm_5", 3.2 ); // fields.put("Phasic_Type","T");
fields.put("IHarm_6", 5.2 ); // fields.put("AllTime",1155);
fields.put("IHarm_7", 5.2 ); // fields.put("Flicker_AllTime",550);
fields.put("IHarm_8", 5.5 ); // fields.put("Flicker_OverTime",0);
fields.put("IHarm_9", 4.8 ); // fields.put("Freq_Dev_OverTime",0);
fields.put("IHarm_10", 8.2 ); // fields.put("Voltage_Dev_OverTime",0);
fields.put("IHarm_11", 2.5 ); // fields.put("UBalance_OverTime",0);
fields.put("IHarm_12", 8.6 ); // fields.put("UAberrance_OverTime",0);
fields.put("IHarm_13", 5.8 ); // fields.put("I_Neg_OverTime",0);
fields.put("IHarm_14", 3.5 ); // fields.put("UHarm_2_OverTime",0);
fields.put("IHarm_15", 2.4 ); // fields.put("UHarm_3_OverTime",0);
fields.put("IHarm_16", 5.2 ); // fields.put("UHarm_4_OverTime",0);
fields.put("IHarm_17", 2.5 ); // fields.put("UHarm_5_OverTime",0);
fields.put("IHarm_18", 9.2 ); // fields.put("UHarm_6_OverTime",0);
fields.put("IHarm_19", 8.5); // fields.put("UHarm_7_OverTime",0);
fields.put("IHarm_20", 8.5 ); // fields.put("UHarm_8_OverTime",0);
fields.put("IHarm_21", 6.2 ); // fields.put("UHarm_9_OverTime",0);
fields.put("IHarm_22", 5.2 ); // fields.put("UHarm_10_OverTime",0);
fields.put("IHarm_23", 8.5 ); // fields.put("UHarm_11_OverTime",0);
fields.put("IHarm_24", 5.2 ); // fields.put("UHarm_12_OverTime",0);
fields.put("IHarm_25", 8.4 ); // fields.put("UHarm_13_OverTime",0);
fields.put("InUHARM_1", 8.2 ); // fields.put("UHarm_14_OverTime",0);
fields.put("InUHARM_2", 5.2 ); // fields.put("UHarm_15_OverTime",0);
fields.put("InUHARM_3", 6.2 ); // fields.put("UHarm_16_OverTime",0);
fields.put("InUHARM_4", 4.2 ); // fields.put("UHarm_17_OverTime",0);
fields.put("InUHARM_5", 2.3 ); // fields.put("UHarm_18_OverTime",0);
fields.put("InUHARM_6", 6.2 ); // fields.put("UHarm_19_OverTime",0);
fields.put("InUHARM_7", 5.2 ); // fields.put("UHarm_20_OverTime",0);
fields.put("InUHARM_8", 10.2 ); // fields.put("UHarm_21_OverTime",0);
fields.put("InUHARM_9", 2.3 ); // fields.put("UHarm_22_OverTime",0);
fields.put("InUHARM_10", 4.2 ); // fields.put("UHarm_23_OverTime",0);
fields.put("InUHARM_11", 3.5 ); // fields.put("UHarm_24_OverTime",0);
fields.put("InUHARM_12", 3.6 ); // fields.put("UHarm_25_OverTime",0);
fields.put("InUHARM_13", 2.3 ); // fields.put("IHarm_2_OverTime",0);
fields.put("InUHARM_14", 7.2 ); // fields.put("IHarm_3_OverTime",0);
fields.put("InUHARM_15", 5.6 ); // fields.put("IHarm_4_OverTime",0);
fields.put("InUHARM_16", 5.6 ); // fields.put("IHarm_5_OverTime",0);
influxDBUtil.insert("PQS_AbnormalData", tags, fields, System.currentTimeMillis(), TimeUnit.MILLISECONDS); // fields.put("IHarm_6_OverTime",0);
// fields.put("IHarm_7_OverTime",0);
// fields.put("IHarm_8_OverTime",0);
// fields.put("IHarm_9_OverTime",0);
// fields.put("IHarm_10_OverTime",0);
// fields.put("IHarm_11_OverTime",0);
// fields.put("IHarm_12_OverTime",0);
// fields.put("IHarm_13_OverTime",0);
// fields.put("IHarm_14_OverTime",0);
// fields.put("IHarm_15_OverTime",0);
// fields.put("IHarm_16_OverTime",0);
// fields.put("IHarm_17_OverTime",0);
// fields.put("IHarm_18_OverTime",0);
// fields.put("IHarm_19_OverTime",0);
// fields.put("IHarm_20_OverTime",0);
// fields.put("IHarm_21_OverTime",0);
// fields.put("IHarm_22_OverTime",0);
// fields.put("IHarm_23_OverTime",0);
// fields.put("IHarm_24_OverTime",0);
// fields.put("IHarm_25_OverTime",0);
// fields.put("InUHARM_1_OverTime",0);
// fields.put("InUHARM_2_OverTime",0);
// fields.put("InUHARM_3_OverTime",0);
// fields.put("InUHARM_4_OverTime",0);
// fields.put("InUHARM_5_OverTime",0);
// fields.put("InUHARM_6_OverTime",0);
// fields.put("InUHARM_7_OverTime",0);
// fields.put("InUHARM_8_OverTime",0);
// fields.put("InUHARM_9_OverTime",0);
// fields.put("InUHARM_10_OverTime",0);
// fields.put("InUHARM_11_OverTime",0);
// fields.put("InUHARM_12_OverTime",0);
// fields.put("InUHARM_13_OverTime",0);
// fields.put("InUHARM_14_OverTime",0);
// fields.put("InUHARM_15_OverTime",0);
// fields.put("InUHARM_16_OverTime",0);
// influxDBUtil.insert("LIMIT_RATE", tags, fields, time, TimeUnit.MILLISECONDS);
} }
//循环写入数据库 //循环写入数据库
public static void batchInsertOne(InfluxDbUtils influxDBUtil) { public static void batchInsertOne(InfluxDbUtils influxDBUtil) {
Map<String, String> tags1 = new HashMap<>(); Map<String, String> tags1 = new HashMap<>();
tags1.put("LineID", "8"); tags1.put("line_id", "127fad1dcb0077ac2979141b8473a5e4");
tags1.put("Phasic_Type", "A");
Map<String, Object> fields1 = new HashMap<>(); Map<String, Object> fields1 = new HashMap<>();
fields1.put("RMS", 2); fields1.put("describe", "暂降事件1");
fields1.put("RMS_AB", 2); fields1.put("wave_type", 1);
fields1.put("RMS_BC", 2); fields1.put("persist_time", 1620);
fields1.put("RMS_CA", 2); fields1.put("event_value", 0.956);
Map<String, String> tags2 = new HashMap<>(); Map<String, String> tags2 = new HashMap<>();
tags2.put("LineID", "9"); tags2.put("LineID", "9");
tags2.put("Phasic_Type", "A"); tags2.put("Phasic_Type", "A");

View File

@@ -31,6 +31,10 @@
<groupId>cn.afterturn</groupId> <groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId> <artifactId>easypoi-spring-boot-starter</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@@ -58,7 +58,8 @@ public class Knife4jSwaggerConfig {
"com.njcn.system.controller", "com.njcn.system.controller",
"com.njcn.harmonic.controller", "com.njcn.harmonic.controller",
"com.njcn.event.controller", "com.njcn.event.controller",
"com.njcn.energy.controller") "com.njcn.energy.controller",
"com.njcn.quality.controller")
.collect(Collectors.toList()); .collect(Collectors.toList());
List<GrantType> grantTypes = new ArrayList<>(); List<GrantType> grantTypes = new ArrayList<>();
String passwordTokenUrl = "http://" + gatewayUrl + "/pqs-auth/oauth/token"; String passwordTokenUrl = "http://" + gatewayUrl + "/pqs-auth/oauth/token";

View File

@@ -40,7 +40,6 @@ public class RequestUtil {
/** /**
* 获取登录认证的客户端ID
* 兼容两种方式获取OAuth2客户端信息client_id、client_secret * 兼容两种方式获取OAuth2客户端信息client_id、client_secret
* 放在请求头Request Headers中的Authorization字段且经过加密例如 Basic Y2xpZW50OnNlY3JldA== 明文等于 client:secret * 放在请求头Request Headers中的Authorization字段且经过加密例如 Basic Y2xpZW50OnNlY3JldA== 明文等于 client:secret
*/ */
@@ -49,7 +48,7 @@ public class RequestUtil {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
// 从请求路径中获取 // 从请求路径中获取
String clientId = ""; String clientId = "";
// 从请求头获取 // 从请求头获取 * 获取登录认证的客户端ID
String basic = request.getHeader(SecurityConstants.AUTHORIZATION_KEY); String basic = request.getHeader(SecurityConstants.AUTHORIZATION_KEY);
if (StrUtil.isNotBlank(basic) && basic.startsWith(SecurityConstants.BASIC_PREFIX)) { if (StrUtil.isNotBlank(basic) && basic.startsWith(SecurityConstants.BASIC_PREFIX)) {
basic = basic.replace(SecurityConstants.BASIC_PREFIX, Strings.EMPTY); basic = basic.replace(SecurityConstants.BASIC_PREFIX, Strings.EMPTY);

View File

@@ -20,7 +20,6 @@
<module>common-web</module> <module>common-web</module>
<module>common-autocode</module> <module>common-autocode</module>
<module>common-influxdb</module> <module>common-influxdb</module>
<module>common-poi</module>
<!-- <module>common-echarts</module>--> <!-- <module>common-echarts</module>-->
</modules> </modules>

View File

@@ -0,0 +1,33 @@
package com.njcn.device.pojo.param;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* pqs
*
* @author cdf
* @date 2022/6/14
*/
@Data
@ApiModel
@Valid
public class TerminalParam {
@ApiModelProperty(name = "ids",value = "id集合",required = true)
@NotEmpty(message = "索引集合不可为空")
private List<String> ids;
@ApiModelProperty(name = "runFlag",value = "终端运行状态")
private Integer runFlag;
@ApiModelProperty(name = "baseMealId",value = "基础套餐")
private String baseMealId;
@ApiModelProperty(name = "extendMealId",value = "扩展套餐")
private String extendMealId;
@ApiModelProperty(name = "flowStrategyId",value = "流量策略")
private String flowStrategyId;
}

View File

@@ -13,8 +13,17 @@ import java.io.Serializable;
@Data @Data
public class LineDistributionVO implements Serializable { public class LineDistributionVO implements Serializable {
@ApiModelProperty("区域名称") @ApiModelProperty("区域名称")
private String areaName; private String name;
@ApiModelProperty("监测点个数") @ApiModelProperty("监测点个数")
private Integer lineNum; private Integer value;
public LineDistributionVO(String areaName, Integer lineNum) {
this.areaName = areaName;
this.lineNum = lineNum;
}
public LineDistributionVO() {
}
} }

View File

@@ -43,6 +43,8 @@ public class TerminalMaintainVO {
private Float statisValue; private Float statisValue;
@ApiModelProperty(name = "流量策略") @ApiModelProperty(name = "流量策略")
private String flowStrategy; private String flowStrategy;
@ApiModelProperty(name = "策略类型")
private Integer strategyFlag;
@ApiModelProperty(name = "子级") @ApiModelProperty(name = "子级")
List<TerminalMaintainVO> children; List<TerminalMaintainVO> children;
} }

View File

@@ -7,10 +7,12 @@ 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.common.utils.HttpResultUtil; import com.njcn.common.utils.HttpResultUtil;
import com.njcn.device.pojo.vo.ShowVersionVO;
import com.njcn.device.pojo.vo.VersionVO; import com.njcn.device.pojo.vo.VersionVO;
import com.njcn.device.service.ProgramVersionService; import com.njcn.device.service.ProgramVersionService;
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.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@@ -66,6 +68,15 @@ public class ProgramVersionController extends BaseController {
} }
} }
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getProgramVersionById")
@ApiOperation("修改版本回显")
@ApiImplicitParam(name = "id", value = "终端版本id", required = true)
public HttpResult<ShowVersionVO> getProgramVersionById(@RequestParam("id") String id) {
String methodDescribe = getMethodDescribe("getProgramVersionById");
ShowVersionVO result = programService.getProgramVersionById(id);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
}
@OperateInfo(info = LogEnum.BUSINESS_COMMON) @OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/updateProgramVersion") @PostMapping("/updateProgramVersion")

View File

@@ -1,16 +1,21 @@
package com.njcn.device.controller; package com.njcn.device.controller;
import cn.hutool.core.util.StrUtil;
import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.constant.OperateType; import com.njcn.common.pojo.constant.OperateType;
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;
import com.njcn.common.pojo.exception.BusinessException;
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.device.enums.DeviceResponseEnum;
import com.njcn.device.pojo.param.TerminalMainQueryParam; import com.njcn.device.pojo.param.TerminalMainQueryParam;
import com.njcn.device.pojo.param.TerminalParam;
import com.njcn.device.pojo.vo.TerminalMaintainVO; import com.njcn.device.pojo.vo.TerminalMaintainVO;
import com.njcn.device.service.TerminalMaintainService; import com.njcn.device.service.TerminalMaintainService;
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.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -21,6 +26,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
import java.util.Objects;
/** /**
* pqs * pqs
@@ -109,13 +115,17 @@ public class TerminalMaintainController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
@PostMapping("/updateRunFlagManage") @PostMapping("/updateRunFlagManage")
@ApiOperation("批量修改终端状态") @ApiOperation("批量修改终端状态")
public HttpResult<List<TerminalMaintainVO>> updateRunFlagManage(@NotEmpty(message = "id不可为空") @RequestBody List<String> ids, @NotNull(message = "指标id不可为空") @RequestParam("runFlag") Integer runFlag) { @ApiImplicitParam(name = "terminalParam", value = "实体", required = true)
public HttpResult<List<TerminalMaintainVO>> updateRunFlagManage(@RequestBody TerminalParam terminalParam) {
String methodDescribe = getMethodDescribe("updateRunFlagManage"); String methodDescribe = getMethodDescribe("updateRunFlagManage");
boolean res = terminalMaintainService.updateRunFlagManage(ids, runFlag); if(Objects.isNull(terminalParam.getRunFlag())){
throw new BusinessException(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION);
}
boolean res = terminalMaintainService.updateRunFlagManage(terminalParam);
if (res) { if (res) {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
} else { } else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
} }
} }
@@ -129,13 +139,17 @@ public class TerminalMaintainController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
@PostMapping("/updateDevFlowMeal") @PostMapping("/updateDevFlowMeal")
@ApiOperation("批量修改终端流量套餐") @ApiOperation("批量修改终端流量套餐")
public HttpResult<Object> updateDevFlowMeal(@NotEmpty(message = "id不可为空") @RequestBody List<String> ids, @NotBlank(message = "基础流量id不可为空") @RequestParam("baseId") String baseId, @RequestParam(value = "reamId", required = false) String reamId) { @ApiImplicitParam(name = "terminalParam", value = "实体", required = true)
public HttpResult<Object> updateDevFlowMeal(@RequestBody TerminalParam terminalParam) {
String methodDescribe = getMethodDescribe("updateDevFlowMeal"); String methodDescribe = getMethodDescribe("updateDevFlowMeal");
boolean res = terminalMaintainService.updateFlowMeal(ids, baseId, reamId); if(StrUtil.isBlank(terminalParam.getBaseMealId()) && StrUtil.isBlank(terminalParam.getExtendMealId())){
throw new BusinessException(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION);
}
boolean res = terminalMaintainService.updateFlowMeal(terminalParam);
if (res) { if (res) {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
} else { } else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
} }
} }
@@ -149,13 +163,17 @@ public class TerminalMaintainController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE) @OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPDATE)
@PostMapping("/updateDevFlowStrategy") @PostMapping("/updateDevFlowStrategy")
@ApiOperation("批量修改终端流量策略") @ApiOperation("批量修改终端流量策略")
public HttpResult<Object> updateDevFlowStrategy(@NotEmpty(message = "id不可为空") @RequestBody List<String> ids, @NotBlank(message = "指标id不可为空") @RequestParam("typeId") String typeId) { @ApiImplicitParam(name = "terminalParam", value = "实体", required = true)
public HttpResult<Object> updateDevFlowStrategy(@RequestBody TerminalParam terminalParam) {
String methodDescribe = getMethodDescribe("updateDevFlowStrategy"); String methodDescribe = getMethodDescribe("updateDevFlowStrategy");
boolean res = terminalMaintainService.updateFlowStrategy(ids, typeId); if(StrUtil.isBlank(terminalParam.getFlowStrategyId())){
throw new BusinessException(CommonResponseEnum.ILLEGAL_ARGUMENT_EXCEPTION);
}
boolean res = terminalMaintainService.updateFlowStrategy(terminalParam);
if (res) { if (res) {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
} else { } else {
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
} }
} }

View File

@@ -15,6 +15,10 @@ public interface ProgramVersionMapper {
* 获取终端版本信息,根据装置型号查询 * 获取终端版本信息,根据装置型号查询
*/ */
List<VersionVO> getVersion(String devType); List<VersionVO> getVersion(String devType);
// /**
// * 修改版本回显
// */
// ShowVersionVO getProgramVersionById(String id);
/** /**
* 修改程序版本状态 * 修改程序版本状态
*/ */
@@ -23,4 +27,5 @@ public interface ProgramVersionMapper {
* 修改程序版本状态 * 修改程序版本状态
*/ */
void updateVersionState(String id); void updateVersionState(String id);
} }

View File

@@ -27,6 +27,12 @@
</if> </if>
</select> </select>
<!-- <select id="getProgramVersionById" resultType="ShowVersionVO">-->
<!-- SELECT-->
<!-- FROM-->
<!-- WHERE-->
<!-- </select>-->
<update id="updateVersionFlag"> <update id="updateVersionFlag">
UPDATE UPDATE
cld_version cld_version
@@ -43,5 +49,4 @@
WHERE Id = #{id} WHERE Id = #{id}
</update> </update>
</mapper> </mapper>

View File

@@ -6,11 +6,12 @@
SELECT SELECT
a.id, a.id,
a.pid, a.pid,
a.NAME devName, a.NAME,
a.level, a.level,
b.run_flag, b.run_flag,
b.com_flag, b.com_flag,
e.NAME devType, e.NAME devType,
ifnull(g.name,'/') version,
ifnull(d.flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal, ifnull(d.flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal,
ifnull(d1.flow,0) reamFlowMeal, ifnull(d1.flow,0) reamFlowMeal,
FORMAT(ifnull(mo.statis_value,0)/1024/1024,2) as statisValue FORMAT(ifnull(mo.statis_value,0)/1024/1024,2) as statisValue
@@ -21,6 +22,8 @@ FROM
LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id LEFT JOIN cld_flow_meal d ON c.Base_Meal_Id = d.id
LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id LEFT JOIN cld_flow_meal d1 ON c.Ream_Meal_Id = d1.id
LEFT JOIN sys_dict_data e ON b.dev_type = e.id LEFT JOIN sys_dict_data e ON b.dev_type = e.id
LEFT JOIN cld_dev_version f on a.id = f.line_id and f.flag = 1 and f.state = 1
LEFT JOIN cld_version g on f.version_id = g.id
LEFT JOIN LEFT JOIN
(select * from cld_month_flow where date_format(time_id,'%Y-%m' ) = date_format(CURRENT_TIME(),'%Y-%m')) mo on a.id = mo.line_id (select * from cld_month_flow where date_format(time_id,'%Y-%m' ) = date_format(CURRENT_TIME(),'%Y-%m')) mo on a.id = mo.line_id
where b.dev_model = 1 where b.dev_model = 1
@@ -83,10 +86,12 @@ FROM
a.pid, a.pid,
a.name, a.name,
a.level, a.level,
h.ip,
ifnull(f.Flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal, ifnull(f.Flow,(select flow from cld_flow_meal where type = 0 and flag = 1)) baseFlowMeal,
g.Flag reamFlowMeal g.Flag reamFlowMeal
FROM FROM
pq_line a pq_line a
inner join pq_device h on a.id = h.id
Left join cld_dev_meal e on a.id = e.Line_Id Left join cld_dev_meal e on a.id = e.Line_Id
left join cld_flow_meal f on e.Base_Meal_Id = f.Id left join cld_flow_meal f on e.Base_Meal_Id = f.Id
left join cld_flow_meal g on e.Ream_Meal_Id = g.Id left join cld_flow_meal g on e.Ream_Meal_Id = g.Id
@@ -103,7 +108,8 @@ FROM
a.pid, a.pid,
a.name, a.name,
a.level, a.level,
ifnull(f.name,(select name from cld_flow_strategy where flag = 1 and state = 1)) flowStrategy ifnull(f.name,(select name from cld_flow_strategy where flag = 1 and state = 1)) flowStrategy,
ifnull(f.flag,1) as strategyFlag
FROM FROM
pq_line a pq_line a
Left join cld_dev_strategy e on a.id = e.Line_Id Left join cld_dev_strategy e on a.id = e.Line_Id

View File

@@ -1,6 +1,7 @@
package com.njcn.device.service; package com.njcn.device.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pojo.vo.ShowVersionVO;
import com.njcn.device.pojo.vo.VersionVO; import com.njcn.device.pojo.vo.VersionVO;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@@ -23,6 +24,11 @@ public interface ProgramVersionService {
* @return * @return
*/ */
boolean addProgramVersion(String name, String protocol, LocalDate date, String devType, String remark, String versionType, MultipartFile file); boolean addProgramVersion(String name, String protocol, LocalDate date, String devType, String remark, String versionType, MultipartFile file);
/**
* 修改版本回显
* @return
*/
ShowVersionVO getProgramVersionById(String id);
/** /**
* 修改程序版本管理信息 * 修改程序版本管理信息
* @return * @return

View File

@@ -1,6 +1,7 @@
package com.njcn.device.service; package com.njcn.device.service;
import com.njcn.device.pojo.param.TerminalMainQueryParam; import com.njcn.device.pojo.param.TerminalMainQueryParam;
import com.njcn.device.pojo.param.TerminalParam;
import com.njcn.device.pojo.vo.TerminalMaintainVO; import com.njcn.device.pojo.vo.TerminalMaintainVO;
import java.util.List; import java.util.List;
@@ -32,27 +33,22 @@ public interface TerminalMaintainService {
* 修改终端参数 * 修改终端参数
* @author cdf * @author cdf
* @date 2022/5/12 * @date 2022/5/12
* @param ids 装置ids;
* @param runFlag 运行状态
*/ */
boolean updateRunFlagManage(List<String> ids, Integer runFlag); boolean updateRunFlagManage(TerminalParam terminalParam);
/** /**
* 修改终端流量 * 修改终端流量
* @author cdf * @author cdf
* @date 2022/5/12 * @date 2022/5/12
* @param typeId 基础流量id
* @param type2Id 扩展流量id
*/ */
boolean updateFlowMeal(List<String> ids,String typeId,String type2Id); boolean updateFlowMeal(TerminalParam terminalParam);
/** /**
* 修改终端流量策略 * 修改终端流量策略
* @author cdf * @author cdf
* @date 2022/5/12 * @date 2022/5/12
* @param typeId 基础流量id
*/ */
boolean updateFlowStrategy(List<String> ids,String typeId); boolean updateFlowStrategy(TerminalParam terminalParam);
} }

View File

@@ -24,6 +24,7 @@ import com.njcn.device.service.LineService;
import com.njcn.influxdb.utils.InfluxDbUtils; import com.njcn.influxdb.utils.InfluxDbUtils;
import com.njcn.system.api.AreaFeignClient; import com.njcn.system.api.AreaFeignClient;
import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.pojo.po.Area;
import com.njcn.web.pojo.vo.LineDataVO; import com.njcn.web.pojo.vo.LineDataVO;
import com.njcn.web.utils.GeneralUtil; import com.njcn.web.utils.GeneralUtil;
import com.njcn.web.utils.RequestUtil; import com.njcn.web.utils.RequestUtil;
@@ -254,12 +255,27 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
//获取所有监测点 //获取所有监测点
List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList())); List<GeneralDeviceDTO> generalDeviceDTOList = generalDeviceService.getDeviceInfo(deviceInfoParam, Stream.of(0).collect(Collectors.toList()), Stream.of(1).collect(Collectors.toList()));
for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) { for (GeneralDeviceDTO generalDeviceDTO : generalDeviceDTOList) {
//根据部门id去获取省份信息
Area area = areaFeignClient.areaDeptPro(generalDeviceDTO.getIndex()).getData();
LineDistributionVO lineDistributionVO = new LineDistributionVO(); LineDistributionVO lineDistributionVO = new LineDistributionVO();
lineDistributionVO.setAreaName(generalDeviceDTO.getName()); lineDistributionVO.setName(generalDeviceDTO.getName());
lineDistributionVO.setLineNum(generalDeviceDTO.getLineIndexes().size()); lineDistributionVO.setValue(generalDeviceDTO.getLineIndexes().size());
lineDistributionVOList.add(lineDistributionVO); lineDistributionVOList.add(lineDistributionVO);
} }
return lineDistributionVOList;
List<LineDistributionVO> result =new ArrayList<LineDistributionVO>();
Map<String, Integer> map = new HashMap<String, Integer>();
for(LineDistributionVO lineDistributionVO:lineDistributionVOList){
if (map.containsKey(lineDistributionVO.getName())) {
map.put(lineDistributionVO.getName(), map.get(lineDistributionVO.getName())+lineDistributionVO.getValue());
} else {
map.put(lineDistributionVO.getName(), lineDistributionVO.getValue());
}
}
for (Map.Entry<String, Integer> entry : map.entrySet()) {
result.add(new LineDistributionVO(entry.getKey(),entry.getValue()));
}
return result;
} }
@Override @Override
@@ -395,7 +411,8 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
for (LineFlowMealDetailVO lineFlowMealDetailVO : monitorList) { for (LineFlowMealDetailVO lineFlowMealDetailVO : monitorList) {
for (LineInfluxDbInegrityVO lineInfluxDbInegrity : lineInfluxDbInegrityVO) { for (LineInfluxDbInegrityVO lineInfluxDbInegrity : lineInfluxDbInegrityVO) {
if (lineFlowMealDetailVO.getId().equals(lineInfluxDbInegrity.getLineId())) { if (lineFlowMealDetailVO.getId().equals(lineInfluxDbInegrity.getLineId())) {
lineFlowMealDetailVO.setIntegrity(lineInfluxDbInegrity.getIntegrity().floatValue()); BigDecimal flow =new BigDecimal(lineInfluxDbInegrity.getIntegrity().floatValue());
lineFlowMealDetailVO.setIntegrity(flow.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue());
} }
} }
} }
@@ -415,7 +432,8 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
for (LineInfluxDbOnlineVO lineInfluxDbOnline : lineInfluxDbOnlineVO) { for (LineInfluxDbOnlineVO lineInfluxDbOnline : lineInfluxDbOnlineVO) {
if (lineFlowMealDetailVO.getId().equals(lineInfluxDbOnline.getDevIndex())) { if (lineFlowMealDetailVO.getId().equals(lineInfluxDbOnline.getDevIndex())) {
lineFlowMealDetailVO.setOnlineRate(lineInfluxDbOnline.getOnlineRate().floatValue()); BigDecimal flowValue =new BigDecimal(lineInfluxDbOnline.getOnlineRate().floatValue());
lineFlowMealDetailVO.setOnlineRate(flowValue.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue());
} }
} }
} }

View File

@@ -10,6 +10,7 @@ import com.njcn.device.enums.DeviceResponseEnum;
import com.njcn.device.mapper.ProgramVersionMapper; import com.njcn.device.mapper.ProgramVersionMapper;
import com.njcn.device.mapper.VersionMapper; import com.njcn.device.mapper.VersionMapper;
import com.njcn.device.pojo.po.Version; import com.njcn.device.pojo.po.Version;
import com.njcn.device.pojo.vo.ShowVersionVO;
import com.njcn.device.pojo.vo.VersionVO; import com.njcn.device.pojo.vo.VersionVO;
import com.njcn.device.service.ProgramVersionService; import com.njcn.device.service.ProgramVersionService;
import com.njcn.web.utils.RequestUtil; import com.njcn.web.utils.RequestUtil;
@@ -97,6 +98,14 @@ public class ProgramVersionServiceImpl extends ServiceImpl<VersionMapper, Versio
return true; return true;
} }
@Override
public ShowVersionVO getProgramVersionById(String id) {
// ShowVersionVO showVersionVO = programVersionMapper.getProgramVersionById(id);
return null;
}
@Override @Override
public boolean updateProgramVersion(String id, String name, String protocol, LocalDate date, String devType, String remark, String versionType, MultipartFile file) { public boolean updateProgramVersion(String id, String name, String protocol, LocalDate date, String devType, String remark, String versionType, MultipartFile file) {

View File

@@ -135,16 +135,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
if (Objects.nonNull(addTerminalParam.getProjectParam())) { if (Objects.nonNull(addTerminalParam.getProjectParam())) {
if (StrUtil.isBlank(projectIndex)) { if (StrUtil.isBlank(projectIndex)) {
checkName(addTerminalParam, LineBaseEnum.PROJECT_LEVEL.getCode(), null); checkName(addTerminalParam, LineBaseEnum.PROJECT_LEVEL.getCode(), null);
/*Line line = new Line();
line.setPid("0");
line.setPids("0");
line.setLevel(LineBaseEnum.PROJECT_LEVEL.getCode());
line.setSort(addTerminalParam.getProjectParam().getSort());
line.setState(DataStateEnum.ENABLE.getCode());
line.setName(addTerminalParam.getProjectParam().getName());
line.setCreateTime(LocalDateTime.now());
this.save(line);*/
Line line = assembleLine(addTerminalParam.getProjectParam().getName(),LineBaseEnum.PROJECT_LEVEL.getCode(),"0","0",addTerminalParam.getProjectParam().getSort()); Line line = assembleLine(addTerminalParam.getProjectParam().getName(),LineBaseEnum.PROJECT_LEVEL.getCode(),"0","0",addTerminalParam.getProjectParam().getSort());
this.baseMapper.insert(line);
projectIndex = line.getId(); projectIndex = line.getId();
} else { } else {
//throw new BusinessException(DeviceResponseEnum.REQUEST_DATA_ERROR); //throw new BusinessException(DeviceResponseEnum.REQUEST_DATA_ERROR);
@@ -160,15 +152,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
} }
LogUtil.njcnDebug(log, "获取区域信息:{}", result.toString()); LogUtil.njcnDebug(log, "获取区域信息:{}", result.toString());
checkName(addTerminalParam, LineBaseEnum.PROVINCE_LEVEL.getCode(), projectIndex); checkName(addTerminalParam, LineBaseEnum.PROVINCE_LEVEL.getCode(), projectIndex);
/*Line province = new Line();
province.setPid(projectIndex);
province.setPids(projectIndex);
province.setName(result.getId());
province.setLevel(LineBaseEnum.PROVINCE_LEVEL.getCode());
province.setSort(addTerminalParam.getProvinceParam().getSort());
province.setState(DataStateEnum.ENABLE.getCode());
province.setCreateTime(LocalDateTime.now());*/
Line province = assembleLine(result.getId(),LineBaseEnum.PROVINCE_LEVEL.getCode(),projectIndex,projectIndex,addTerminalParam.getProvinceParam().getSort()); Line province = assembleLine(result.getId(),LineBaseEnum.PROVINCE_LEVEL.getCode(),projectIndex,projectIndex,addTerminalParam.getProvinceParam().getSort());
this.baseMapper.insert(province);
provinceIndex = province.getId(); provinceIndex = province.getId();
} else { } else {
//throw new BusinessException(DeviceResponseEnum.REQUEST_DATA_ERROR); //throw new BusinessException(DeviceResponseEnum.REQUEST_DATA_ERROR);
@@ -178,18 +163,9 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
//供电公司 //供电公司
if (Objects.nonNull(addTerminalParam.getGdInformationParam())) { if (Objects.nonNull(addTerminalParam.getGdInformationParam())) {
if (StrUtil.isBlank(gdIndex) && StrUtil.isNotBlank(provinceIndex)) { if (StrUtil.isBlank(gdIndex) && StrUtil.isNotBlank(provinceIndex)) {
checkName(addTerminalParam, LineBaseEnum.GD_LEVEL.getCode(), provinceIndex); checkName(addTerminalParam, LineBaseEnum.GD_LEVEL.getCode(), provinceIndex);
/*Line gdInformation = new Line();
gdInformation.setName(addTerminalParam.getGdInformationParam().getName());
gdInformation.setPid(provinceIndex);
gdInformation.setPids(projectIndex + "," + provinceIndex);
gdInformation.setLevel(LineBaseEnum.GD_LEVEL.getCode());
gdInformation.setState(DataStateEnum.ENABLE.getCode());
gdInformation.setSort(addTerminalParam.getGdInformationParam().getSort());
gdInformation.setCreateTime(LocalDateTime.now());
this.save(gdInformation);*/
Line gdInformation = assembleLine(addTerminalParam.getGdInformationParam().getName(),LineBaseEnum.GD_LEVEL.getCode(),provinceIndex,projectIndex + StrUtil.COMMA + provinceIndex,addTerminalParam.getGdInformationParam().getSort()); Line gdInformation = assembleLine(addTerminalParam.getGdInformationParam().getName(),LineBaseEnum.GD_LEVEL.getCode(),provinceIndex,projectIndex + StrUtil.COMMA + provinceIndex,addTerminalParam.getGdInformationParam().getSort());
this.baseMapper.insert(gdInformation);
gdIndex = gdInformation.getId(); gdIndex = gdInformation.getId();
} }
} }
@@ -198,16 +174,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
if (Objects.nonNull(addTerminalParam.getSubStationParam())) { if (Objects.nonNull(addTerminalParam.getSubStationParam())) {
if (StrUtil.isBlank(subIndex) && StrUtil.isNotBlank(gdIndex)) { if (StrUtil.isBlank(subIndex) && StrUtil.isNotBlank(gdIndex)) {
checkName(addTerminalParam, LineBaseEnum.SUB_LEVEL.getCode(), gdIndex); checkName(addTerminalParam, LineBaseEnum.SUB_LEVEL.getCode(), gdIndex);
/*Line subStation = new Line();
subStation.setPid(gdIndex);
subStation.setPids(projectIndex + "," + provinceIndex + "," + gdIndex);
subStation.setName(addTerminalParam.getSubStationParam().getName());
subStation.setLevel(LineBaseEnum.SUB_LEVEL.getCode());
subStation.setState(DataStateEnum.ENABLE.getCode());
subStation.setSort(addTerminalParam.getSubStationParam().getSort());
subStation.setCreateTime(LocalDateTime.now());
this.save(subStation);*/
Line subStation = assembleLine(addTerminalParam.getSubStationParam().getName(),LineBaseEnum.SUB_LEVEL.getCode(),gdIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex,addTerminalParam.getSubStationParam().getSort()); Line subStation = assembleLine(addTerminalParam.getSubStationParam().getName(),LineBaseEnum.SUB_LEVEL.getCode(),gdIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex,addTerminalParam.getSubStationParam().getSort());
this.baseMapper.insert(subStation);
subIndex = subStation.getId(); subIndex = subStation.getId();
//变电站下的经纬度入库 //变电站下的经纬度入库
@@ -270,16 +238,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
if (StrUtil.isBlank(deviceParam.getDevIndex())) { if (StrUtil.isBlank(deviceParam.getDevIndex())) {
/* Line device = new Line();
device.setName(deviceParam.getName());
device.setPid(subIndex);
device.setPids(projectIndex + "," + provinceIndex + "," + gdIndex + "," + subIndex);
device.setLevel(LineBaseEnum.DEVICE_LEVEL.getCode());
device.setState(DataStateEnum.ENABLE.getCode());
device.setSort(deviceParam.getSort());
device.setCreateTime(LocalDateTime.now());
this.save(device);*/
Line device = assembleLine(deviceParam.getName(),LineBaseEnum.DEVICE_LEVEL.getCode(),subIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex,deviceParam.getSort()); Line device = assembleLine(deviceParam.getName(),LineBaseEnum.DEVICE_LEVEL.getCode(),subIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex,deviceParam.getSort());
this.baseMapper.insert(device);
devIdIndex = device.getId(); devIdIndex = device.getId();
//装置详情 //装置详情
@@ -361,16 +321,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
if (Objects.isNull(scaleRes.getData())) { if (Objects.isNull(scaleRes.getData())) {
throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY); throw new BusinessException(DeviceResponseEnum.DIC_GET_EMPTY);
} }
/*Line subVoltage = new Line();
subVoltage.setName(subVoltageParam.getName());
subVoltage.setPid(devIdIndex);
subVoltage.setPids(projectIndex + "," + provinceIndex + "," + gdIndex + "," + subIndex + "," + devIdIndex);
subVoltage.setLevel(LineBaseEnum.SUB_V_LEVEL.getCode());
subVoltage.setSort(subVoltageParam.getSort());
subVoltage.setState(DataStateEnum.ENABLE.getCode());
subVoltage.setCreateTime(LocalDateTime.now());
this.save(subVoltage);*/
Line subVoltage = assembleLine(subVoltageParam.getName(),LineBaseEnum.SUB_V_LEVEL.getCode(),devIdIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex,subVoltageParam.getSort()); Line subVoltage = assembleLine(subVoltageParam.getName(),LineBaseEnum.SUB_V_LEVEL.getCode(),devIdIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex,subVoltageParam.getSort());
this.baseMapper.insert(subVoltage);
subvIndex = subVoltage.getId(); subvIndex = subVoltage.getId();
Voltage voltage = new Voltage(); Voltage voltage = new Voltage();
voltage.setId(subVoltage.getId()); voltage.setId(subVoltage.getId());
@@ -412,17 +364,8 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
listId.removeIf(lineNo -> lineNo.equals(lineParam.getNum())); listId.removeIf(lineNo -> lineNo.equals(lineParam.getNum()));
HttpResult<DictData> httpScale = dicDataFeignClient.getDicDataById(subVoltageParam.getScale()); HttpResult<DictData> httpScale = dicDataFeignClient.getDicDataById(subVoltageParam.getScale());
Float jcap = DeviceUtil.getJCAPByScale(httpScale.getData().getName()); Float jcap = DeviceUtil.getJCAPByScale(httpScale.getData().getName());
/* Line line = new Line();
line.setName(lineParam.getName());
line.setPid(subvIndex);
line.setPids(projectIndex + "," + provinceIndex + "," + gdIndex + "," + subIndex + "," + devIdIndex + "," + subvIndex);
line.setLevel(LineBaseEnum.LINE_LEVEL.getCode());
line.setState(DataStateEnum.ENABLE.getCode());
line.setSort(lineParam.getSort());
line.setCreateTime(LocalDateTime.now());
this.save(line);*/
Line line = assembleLine(lineParam.getName(),LineBaseEnum.LINE_LEVEL.getCode(),subvIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex+ StrUtil.COMMA + subvIndex,lineParam.getSort()); Line line = assembleLine(lineParam.getName(),LineBaseEnum.LINE_LEVEL.getCode(),subvIndex,projectIndex + StrUtil.COMMA + provinceIndex + StrUtil.COMMA + gdIndex + StrUtil.COMMA + subIndex + StrUtil.COMMA + devIdIndex+ StrUtil.COMMA + subvIndex,lineParam.getSort());
this.baseMapper.insert(line);
LineDetail lineDetail = new LineDetail(); LineDetail lineDetail = new LineDetail();
BeanUtils.copyProperties(lineParam, lineDetail); BeanUtils.copyProperties(lineParam, lineDetail);
lineDetail.setId(line.getId()); lineDetail.setId(line.getId());
@@ -714,77 +657,31 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
TerminalVO terminalVO = new TerminalVO(); TerminalVO terminalVO = new TerminalVO();
if (obj.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())) { if (obj.getLevel().equals(LineBaseEnum.PROJECT_LEVEL.getCode())) {
//点击项目节点 //点击项目节点
ProjectVO projectVO = new ProjectVO(); assProject(obj,terminalVO);
projectVO.setProjectIndex(obj.getId());
projectVO.setName(obj.getName());
projectVO.setSort(obj.getSort());
terminalVO.setProjectVO(projectVO);
} else if (obj.getLevel().equals(LineBaseEnum.PROVINCE_LEVEL.getCode())) { } else if (obj.getLevel().equals(LineBaseEnum.PROVINCE_LEVEL.getCode())) {
//点击省份节点 //点击省份节点
Line project = this.getById(obj.getPid()); Line project = this.getById(obj.getPid());
ProjectVO projectVO = new ProjectVO(); assProject(project,terminalVO);
projectVO.setProjectIndex(project.getId()); assProvince(obj,terminalVO);
projectVO.setName(project.getName());
projectVO.setSort(project.getSort());
terminalVO.setProjectVO(projectVO);
ProvinceVO provinceVO = new ProvinceVO();
provinceVO.setProvinceIndex(obj.getId());
provinceVO.setName(obj.getName());
provinceVO.setSort(obj.getSort());
terminalVO.setProvinceVO(provinceVO);
} else if (obj.getLevel().equals(LineBaseEnum.GD_LEVEL.getCode())) { } else if (obj.getLevel().equals(LineBaseEnum.GD_LEVEL.getCode())) {
//点击供电公司节点 //点击供电公司节点
GdInformationVO gdInformationVO = new GdInformationVO(); assGd(obj,terminalVO);
gdInformationVO.setGdIndex(obj.getId());
gdInformationVO.setName(obj.getName());
gdInformationVO.setSort(obj.getSort());
terminalVO.setGdInformationVO(gdInformationVO);
Line province = this.getById(obj.getPid()); Line province = this.getById(obj.getPid());
ProvinceVO provinceVO = new ProvinceVO(); assProvince(province,terminalVO);
provinceVO.setProvinceIndex(province.getId());
provinceVO.setName(province.getName());
provinceVO.setSort(province.getSort());
terminalVO.setProvinceVO(provinceVO);
Line project = this.getById(province.getPid()); Line project = this.getById(province.getPid());
ProjectVO projectVO = new ProjectVO(); assProject(project,terminalVO);
projectVO.setProjectIndex(project.getId());
projectVO.setName(project.getName());
projectVO.setSort(project.getSort());
terminalVO.setProjectVO(projectVO);
} else if (obj.getLevel().equals(LineBaseEnum.SUB_LEVEL.getCode())) { } else if (obj.getLevel().equals(LineBaseEnum.SUB_LEVEL.getCode())) {
//变电站 //变电站
assSub(obj,terminalVO);
Substation substation = substationMapper.selectById(obj.getId());
SubStationVO subStationVO = new SubStationVO();
subStationVO.setSubIndex(obj.getId());
subStationVO.setName(obj.getName());
subStationVO.setSort(obj.getSort());
BeanUtils.copyProperties(substation, subStationVO);
terminalVO.setSubStationVO(subStationVO);
Line gdInformation = this.getById(obj.getPid()); Line gdInformation = this.getById(obj.getPid());
GdInformationVO gdInformationVO = new GdInformationVO(); assGd(gdInformation,terminalVO);
gdInformationVO.setGdIndex(gdInformation.getId());
gdInformationVO.setName(gdInformation.getName());
gdInformationVO.setSort(gdInformation.getSort());
terminalVO.setGdInformationVO(gdInformationVO);
Line province = this.getById(gdInformation.getPid()); Line province = this.getById(gdInformation.getPid());
ProvinceVO provinceVO = new ProvinceVO(); assProvince(province,terminalVO);
provinceVO.setProvinceIndex(province.getId());
provinceVO.setName(province.getName());
provinceVO.setSort(province.getSort());
terminalVO.setProvinceVO(provinceVO);
Line project = this.getById(province.getPid()); Line project = this.getById(province.getPid());
ProjectVO projectVO = new ProjectVO(); assProject(project,terminalVO);
projectVO.setProjectIndex(project.getId());
projectVO.setName(project.getName());
projectVO.setSort(project.getSort());
terminalVO.setProjectVO(projectVO);
//展示所有下级装置母线监测点 //展示所有下级装置母线监测点
lineLambdaQueryWrapper.clear(); lineLambdaQueryWrapper.clear();
@@ -2173,7 +2070,7 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
/** /**
* 根据传入的id获取 * 组装台账信息
* *
* @author cdf * @author cdf
* @date 2022/2/14 * @date 2022/2/14
@@ -2186,34 +2083,16 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
Line subStation = this.getById(subId); Line subStation = this.getById(subId);
if (Objects.nonNull(subStation)) { if (Objects.nonNull(subStation)) {
Substation substation = substationMapper.selectById(subStation.getId()); assSub(subStation,terminalVO);
SubStationVO subStationVO = new SubStationVO();
subStationVO.setSubIndex(subStation.getId());
subStationVO.setName(subStation.getName());
subStationVO.setSort(subStation.getSort());
BeanUtils.copyProperties(substation, subStationVO);
terminalVO.setSubStationVO(subStationVO);
Line gdInformation = this.getById(subStation.getPid()); Line gdInformation = this.getById(subStation.getPid());
GdInformationVO gdInformationVO = new GdInformationVO(); assGd(gdInformation,terminalVO);
gdInformationVO.setGdIndex(gdInformation.getId());
gdInformationVO.setName(gdInformation.getName());
gdInformationVO.setSort(gdInformation.getSort());
terminalVO.setGdInformationVO(gdInformationVO);
Line province = this.getById(gdInformation.getPid()); Line province = this.getById(gdInformation.getPid());
ProvinceVO provinceVO = new ProvinceVO(); assProvince(province,terminalVO);
provinceVO.setProvinceIndex(province.getId());
provinceVO.setName(province.getName());
provinceVO.setSort(province.getSort());
terminalVO.setProvinceVO(provinceVO);
Line project = this.getById(province.getPid()); Line project = this.getById(province.getPid());
ProjectVO projectVO = new ProjectVO(); assProject(project,terminalVO);
projectVO.setProjectIndex(project.getId());
projectVO.setName(project.getName());
projectVO.setSort(project.getSort());
terminalVO.setProjectVO(projectVO);
return terminalVO; return terminalVO;
} else { } else {
@@ -2221,4 +2100,51 @@ public class TerminalBaseServiceImpl extends ServiceImpl<LineMapper, Line> imple
} }
} }
/**
* 组装项目
*/
private void assProject(Line project,TerminalVO terminalVO){
ProjectVO projectVO = new ProjectVO();
projectVO.setProjectIndex(project.getId());
projectVO.setName(project.getName());
projectVO.setSort(project.getSort());
terminalVO.setProjectVO(projectVO);
}
/**
* 组装省份
*/
private void assProvince(Line province,TerminalVO terminalVO){
ProvinceVO provinceVO = new ProvinceVO();
provinceVO.setProvinceIndex(province.getId());
provinceVO.setName(province.getName());
provinceVO.setSort(province.getSort());
terminalVO.setProvinceVO(provinceVO);
}
/**
* 组装供电公司
*/
private void assGd(Line gdInformation,TerminalVO terminalVO){
GdInformationVO gdInformationVO = new GdInformationVO();
gdInformationVO.setGdIndex(gdInformation.getId());
gdInformationVO.setName(gdInformation.getName());
gdInformationVO.setSort(gdInformation.getSort());
terminalVO.setGdInformationVO(gdInformationVO);
}
/**
* 组装变电站
*/
private void assSub(Line subStation,TerminalVO terminalVO){
Substation substation = substationMapper.selectById(subStation.getId());
SubStationVO subStationVO = new SubStationVO();
subStationVO.setSubIndex(subStation.getId());
subStationVO.setName(subStation.getName());
subStationVO.setSort(subStation.getSort());
BeanUtils.copyProperties(substation, subStationVO);
terminalVO.setSubStationVO(subStationVO);
}
} }

View File

@@ -7,10 +7,12 @@ import com.njcn.device.enums.DeviceResponseEnum;
import com.njcn.device.enums.LineBaseEnum; import com.njcn.device.enums.LineBaseEnum;
import com.njcn.device.mapper.TerminalMaintainMapper; import com.njcn.device.mapper.TerminalMaintainMapper;
import com.njcn.device.pojo.param.TerminalMainQueryParam; import com.njcn.device.pojo.param.TerminalMainQueryParam;
import com.njcn.device.pojo.param.TerminalParam;
import com.njcn.device.pojo.po.DevMeal; import com.njcn.device.pojo.po.DevMeal;
import com.njcn.device.pojo.po.DevStrategy; import com.njcn.device.pojo.po.DevStrategy;
import com.njcn.device.pojo.po.Device; import com.njcn.device.pojo.po.Device;
import com.njcn.device.pojo.vo.TerminalMaintainVO; import com.njcn.device.pojo.vo.TerminalMaintainVO;
import com.njcn.device.pojo.vo.TerminalVersionVO;
import com.njcn.device.service.IDevMealService; import com.njcn.device.service.IDevMealService;
import com.njcn.device.service.IDevStrategyService; import com.njcn.device.service.IDevStrategyService;
import com.njcn.device.service.IDeviceService; import com.njcn.device.service.IDeviceService;
@@ -47,23 +49,26 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
@Override @Override
public List<TerminalMaintainVO> getTerminalMainList(TerminalMainQueryParam terminalMainQueryParam) { public List<TerminalMaintainVO> getTerminalMainList(TerminalMainQueryParam terminalMainQueryParam) {
List<TerminalMaintainVO> proList = terminalMaintainMapper.getProvList();
if(CollectionUtil.isEmpty(proList)){
throw new BusinessException(DeviceResponseEnum.PROVINCE_EMPTY);
}
List<TerminalMaintainVO> gdList = terminalMaintainMapper.getGdAndSubList(LineBaseEnum.GD_LEVEL.getCode());
if(CollectionUtil.isEmpty(gdList)){
throw new BusinessException(DeviceResponseEnum.GD_NO);
}
List<TerminalMaintainVO> subList = terminalMaintainMapper.getGdAndSubList(LineBaseEnum.SUB_LEVEL.getCode());
if(CollectionUtil.isEmpty(subList)){
throw new BusinessException(DeviceResponseEnum.SUB_NO);
}
List<TerminalMaintainVO> devList = terminalMaintainMapper.getTerminalDevInfo(); List<TerminalMaintainVO> devList = terminalMaintainMapper.getTerminalDevInfo();
if(CollectionUtil.isEmpty(devList)){ if(CollectionUtil.isEmpty(devList)){
throw new BusinessException(DeviceResponseEnum.DEVICE_EMPTY); throw new BusinessException(DeviceResponseEnum.DEVICE_EMPTY);
} }
List<String> subIndexes = devList.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
List<TerminalMaintainVO> subList = terminalMaintainMapper.getPqLineGdAndSubList(subIndexes);
if(CollectionUtil.isEmpty(subList)){
throw new BusinessException(DeviceResponseEnum.SUB_NO);
}
List<String> gdIds = subList.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
List<TerminalMaintainVO> gdList = terminalMaintainMapper.getPqLineGdAndSubList(gdIds);
if(CollectionUtil.isEmpty(gdList)){
throw new BusinessException(DeviceResponseEnum.GD_NO);
}
List<String> proIds = gdList.stream().map(TerminalMaintainVO::getPid).collect(Collectors.toList());
List<TerminalMaintainVO> proList = terminalMaintainMapper.getPqLineProvList(proIds);
if(CollectionUtil.isEmpty(proList)){
throw new BusinessException(DeviceResponseEnum.PROVINCE_EMPTY);
}
List<TerminalMaintainVO> subListTem = subList.stream().peek(item->item.setChildren(getChildren(item.getId(),devList))).collect(Collectors.toList()); List<TerminalMaintainVO> subListTem = subList.stream().peek(item->item.setChildren(getChildren(item.getId(),devList))).collect(Collectors.toList());
List<TerminalMaintainVO> gdListTem = gdList.stream().peek(item->item.setChildren(getChildren(item.getId(),subListTem))).collect(Collectors.toList()); List<TerminalMaintainVO> gdListTem = gdList.stream().peek(item->item.setChildren(getChildren(item.getId(),subListTem))).collect(Collectors.toList());
return proList.stream().peek(item->item.setChildren(getChildren(item.getId(),gdListTem))).collect(Collectors.toList()); return proList.stream().peek(item->item.setChildren(getChildren(item.getId(),gdListTem))).collect(Collectors.toList());
@@ -88,40 +93,40 @@ public class TerminalMaintainServiceImpl implements TerminalMaintainService {
} }
@Override @Override
public boolean updateRunFlagManage(List<String> ids, Integer runFlag){ public boolean updateRunFlagManage(TerminalParam terminalParam){
//终端状态管理 //终端状态管理
List<Device> tem = new ArrayList<>(); List<Device> tem = new ArrayList<>();
ids.forEach(item-> { terminalParam.getIds().forEach(item-> {
Device device = new Device(); Device device = new Device();
device.setId(item); device.setId(item);
device.setRunFlag(runFlag); device.setRunFlag(terminalParam.getRunFlag());
tem.add(device); tem.add(device);
}); });
return iDeviceService.updateBatchById(tem); return iDeviceService.updateBatchById(tem);
} }
@Override @Override
public boolean updateFlowMeal(List<String> ids, String typeId, String type2Id) { public boolean updateFlowMeal(TerminalParam terminalParam) {
List<DevMeal> tem = new ArrayList<>(); List<DevMeal> tem = new ArrayList<>();
iDevMealService.removeByIds(ids); iDevMealService.removeByIds(terminalParam.getIds());
ids.forEach(item-> { terminalParam.getIds().forEach(item-> {
DevMeal devMeal = new DevMeal(); DevMeal devMeal = new DevMeal();
devMeal.setLineId(item); devMeal.setLineId(item);
devMeal.setBaseMealId(typeId); devMeal.setBaseMealId(terminalParam.getBaseMealId());
devMeal.setReamMealId(type2Id); devMeal.setReamMealId(terminalParam.getExtendMealId());
tem.add(devMeal); tem.add(devMeal);
}); });
return iDevMealService.saveBatch(tem); return iDevMealService.saveBatch(tem);
} }
@Override @Override
public boolean updateFlowStrategy(List<String> ids, String typeId) { public boolean updateFlowStrategy(TerminalParam terminalParam) {
List<DevStrategy> tem = new ArrayList<>(); List<DevStrategy> tem = new ArrayList<>();
iDevStrategyService.removeByIds(ids); iDevStrategyService.removeByIds(terminalParam.getIds());
ids.forEach(item-> { terminalParam.getIds().forEach(item-> {
DevStrategy devStrategy = new DevStrategy(); DevStrategy devStrategy = new DevStrategy();
devStrategy.setLineId(item); devStrategy.setLineId(item);
devStrategy.setStrategyId(typeId); devStrategy.setStrategyId(terminalParam.getFlowStrategyId());
tem.add(devStrategy); tem.add(devStrategy);
}); });
return iDevStrategyService.saveBatch(tem); return iDevStrategyService.saveBatch(tem);

View File

@@ -337,6 +337,7 @@ public class HighAnalyticServiceImpl implements HighAnalyticService {
if (CollectionUtil.isNotEmpty(dictDataList)) { if (CollectionUtil.isNotEmpty(dictDataList)) {
//获取负荷指标详情 //获取负荷指标详情
dictDataList = dictDataList.stream().filter(item ->item.getAlgoDescribe().equals(1)).collect(Collectors.toList());
EleMd eleMd = eleMdMapper.selectById(loadType); EleMd eleMd = eleMdMapper.selectById(loadType);
if (Objects.isNull(eleMd)) { if (Objects.isNull(eleMd)) {
@@ -382,13 +383,15 @@ public class HighAnalyticServiceImpl implements HighAnalyticService {
} }
List<LoadTendencyVO> jin = list.stream().filter(item -> item.getLoadName().equals("高压进线")).collect(Collectors.toList()); float allTem = 0f;
Float all = Float.parseFloat(jin.get(0).getValue().get(0).get(1)); for (LoadTendencyVO loadTendencyVO : list) {
List<LoadTendencyVO> other = list.stream().filter(item -> !item.getLoadName().equals("高压进线")).collect(Collectors.toList()); allTem+= Float.parseFloat(loadTendencyVO.getValue().get(0).get(1));
for (LoadTendencyVO loadTendencyVO : other) { }
for (LoadTendencyVO loadTendencyVO : list) {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("name", loadTendencyVO.getLoadName()); map.put("name", loadTendencyVO.getLoadName());
Float a = Float.parseFloat(loadTendencyVO.getValue().get(0).get(1)) / all; Float a = Float.parseFloat(loadTendencyVO.getValue().get(0).get(1)) / allTem;
map.put("value", a.toString()); map.put("value", a.toString());
res.add(map); res.add(map);
} }

View File

@@ -94,6 +94,13 @@ spring:
filters: filters:
- SwaggerHeaderFilter - SwaggerHeaderFilter
- StripPrefix=1 - StripPrefix=1
- id: quality-boot
uri: lb://quality-boot
predicates:
- Path=/quality-boot/**
filters:
- SwaggerHeaderFilter
- StripPrefix=1
#项目日志的配置 #项目日志的配置
logging: logging:
@@ -122,6 +129,7 @@ whitelist:
- /harmonic-boot/** - /harmonic-boot/**
- /energy-boot/** - /energy-boot/**
- /event-boot/** - /event-boot/**
- /quality-boot/**

View File

@@ -217,11 +217,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 10: case 10:
//相电压有效值 //相电压有效值
sql = "SELECT time as time, rms as aValue FROM data_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, rms as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc";
"SELECT time as time, rms as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, rms as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -231,11 +227,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 11: case 11:
//线电压有效值 //线电压有效值
sql = "SELECT time as time, rms_lvr as aValue FROM data_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, rms_lvr as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, rms_lvr as bValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, rms_lvr as cValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("AB相"); phasicType.add("AB相");
phasicType.add("BC相"); phasicType.add("BC相");
phasicType.add("CA相"); phasicType.add("CA相");
@@ -245,11 +237,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 12: case 12:
//电压偏差 //电压偏差
sql = "SELECT time as time, vu_dev as aValue FROM data_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, vu_dev as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, vu_dev as bValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, vu_dev as cValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = overlimit.getVoltageDev(); topLimit = overlimit.getVoltageDev();
lowerLimit = overlimit.getUvoltageDev(); lowerLimit = overlimit.getUvoltageDev();
if (ptType == 0) { if (ptType == 0) {
@@ -276,11 +264,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 14: case 14:
//电压不平衡 //电压不平衡
sql = "SELECT time as time, v_zero as aValue FROM data_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_zero as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_pos as bValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_neg as cValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("零序电压"); phasicType.add("零序电压");
phasicType.add("正序电压"); phasicType.add("正序电压");
phasicType.add("负序电压"); phasicType.add("负序电压");
@@ -292,11 +276,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 15: case 15:
//电压总谐波畸变率 //电压总谐波畸变率
sql = "SELECT time as time, v_thd as aValue FROM data_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_thd as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_thd as bValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_thd as cValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = overlimit.getUaberrance(); topLimit = overlimit.getUaberrance();
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
@@ -313,12 +293,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 20: case 20:
//电流有效值 //电流有效值
sql = "SELECT time as time, rms as aValue FROM data_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, rms as aValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, rms as bValue FROM data_i" +
" WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, rms as cValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -328,11 +303,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 21: case 21:
//电流总畸变率 //电流总畸变率
sql = "SELECT time as time, i_thd as aValue FROM data_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_thd as aValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_thd as bValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_thd as cValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -342,11 +313,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 22: case 22:
//负序电流 //负序电流
sql = "SELECT time as time, i_neg as aValue FROM data_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_neg as aValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_neg as bValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_neg as cValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = overlimit.getINeg(); topLimit = overlimit.getINeg();
phasicType.add("负序电流"); phasicType.add("负序电流");
unit.add("A"); unit.add("A");
@@ -365,11 +332,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 40: case 40:
//谐波电压含有率 //谐波电压含有率
sql = "SELECT time as time, v_" + number + " as aValue FROM data_harmrate_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_" + number + " as aValue FROM data_harmrate_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_" + number + " as bValue FROM data_harmrate_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_" + number + " as cValue FROM data_harmrate_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = PubUtils.getValueByMethod(overlimit, "getUharm", number); topLimit = PubUtils.getValueByMethod(overlimit, "getUharm", number);
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
@@ -386,11 +349,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 41: case 41:
//谐波电流含有率 //谐波电流含有率
sql = "SELECT time as time, i_" + number + " as aValue FROM data_harmrate_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_" + number + " as aValue FROM data_harmrate_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_" + number + " as bValue FROM data_harmrate_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_" + number + " as cValue FROM data_harmrate_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -400,11 +359,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 42: case 42:
//谐波电压幅值 //谐波电压幅值
sql = "SELECT time as time, v_" + number + " as aValue FROM data_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_" + number + " as aValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_" + number + " as bValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_" + number + " as cValue FROM data_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
@@ -424,11 +379,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 43: case 43:
//谐波电流幅值 //谐波电流幅值
sql = "SELECT time as time, i_" + number + " as aValue FROM data_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_" + number + " as aValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_" + number + " as bValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_" + number + " as cValue FROM data_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = PubUtils.getValueByMethod(overlimit, "getIharm", number); topLimit = PubUtils.getValueByMethod(overlimit, "getIharm", number);
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
@@ -439,11 +390,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 44: case 44:
//谐波电压相角 //谐波电压相角
sql = "SELECT time as time, v_" + number + " as aValue FROM data_harmphasic_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_" + number + " as aValue FROM data_harmphasic_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_" + number + " as bValue FROM data_harmphasic_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_" + number + " as cValue FROM data_harmphasic_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
@@ -459,11 +406,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 45: case 45:
//谐波电流相角 //谐波电流相角
sql = "SELECT time as time, i_" + number + " as aValue FROM data_harmphasic_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_" + number + " as aValue FROM data_harmphasic_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_" + number + " as bValue FROM data_harmphasic_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_" + number + " as cValue FROM data_harmphasic_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -473,11 +416,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 46: case 46:
//间谐波电压含有率 //间谐波电压含有率
sql = "SELECT time as time, v_" + number + " as aValue FROM data_inharmrate_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_" + number + " as aValue FROM data_inharmrate_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_" + number + " as bValue FROM data_inharmrate_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_" + number + " as cValue FROM data_inharmrate_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = PubUtils.getValueByMethod(overlimit, "getInuharm", number); topLimit = PubUtils.getValueByMethod(overlimit, "getInuharm", number);
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
@@ -494,11 +433,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 47: case 47:
//间谐波电流含有率 //间谐波电流含有率
sql = "SELECT time as time, i_" + number + " as aValue FROM data_inharmrate_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_" + number + " as aValue FROM data_inharmrate_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_" + number + " as bValue FROM data_inharmrate_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_" + number + " as cValue FROM data_inharmrate_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -508,11 +443,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 48: case 48:
//间谐波电压幅值 //间谐波电压幅值
sql = "SELECT time as time, v_" + number + " as aValue FROM data_inharm_v WHERE " + stringBuilder.toString() + sql = "SELECT time as time, v_" + number + " as aValue FROM data_inharm_v WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, v_" + number + " as bValue FROM data_inharm_v WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, v_" + number + " as cValue FROM data_inharm_v WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
targetName = "间谐波电压幅值"; targetName = "间谐波电压幅值";
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
@@ -528,11 +459,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 49: case 49:
//间谐波电流幅值 //间谐波电流幅值
sql = "SELECT time as time, i_" + number + " as aValue FROM data_inharm_i WHERE " + stringBuilder.toString() + sql = "SELECT time as time, i_" + number + " as aValue FROM data_inharm_i WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, i_" + number + " as bValue FROM data_inharm_i WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, i_" + number + " as cValue FROM data_inharm_i WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -542,11 +469,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 50: case 50:
//谐波有功功率 //谐波有功功率
sql = "SELECT time as time, p_" + number + " as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() + sql = "SELECT time as time, p_" + number + " as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, p_" + number + " as bValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, p_" + number + " as cValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -560,11 +483,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 51: case 51:
//谐波无功功率 //谐波无功功率
sql = "SELECT time as time, q_" + number + " as aValue FROM data_harmpower_q WHERE " + stringBuilder.toString() + sql = "SELECT time as time, q_" + number + " as aValue FROM data_harmpower_q WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, q_" + number + " as bValue FROM data_harmpower_q WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, q_" + number + " as cValue FROM data_harmpower_q WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -578,11 +497,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 52: case 52:
//谐波视在功率 //谐波视在功率
sql = "SELECT time as time, s_" + number + " as aValue FROM data_harmpower_s WHERE " + stringBuilder.toString() + sql = "SELECT time as time, s_" + number + " as aValue FROM data_harmpower_s WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, s_" + number + " as bValue FROM data_harmpower_s WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, s_" + number + " as cValue FROM data_harmpower_s WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -596,11 +511,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 53: case 53:
//三相有功功率 //三相有功功率
sql = "SELECT time as time, p as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() + sql = "SELECT time as time, p as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, p as bValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, p as cValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -610,11 +521,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 54: case 54:
//三相无功功率 //三相无功功率
sql = "SELECT time as time, q as aValue FROM data_harmpower_q WHERE " + stringBuilder.toString() + sql = "SELECT time as time, q as aValue FROM data_harmpower_q WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, q as bValue FROM data_harmpower_q WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, q as cValue FROM data_harmpower_q WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -624,11 +531,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 55: case 55:
//三相视在功率 //三相视在功率
sql = "SELECT time as time, s as aValue FROM data_harmpower_s WHERE " + stringBuilder.toString() + sql = "SELECT time as time, s as aValue FROM data_harmpower_s WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, s as bValue FROM data_harmpower_s WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, s as cValue FROM data_harmpower_s WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -662,11 +565,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 59: case 59:
//视在功率因数 //视在功率因数
sql = "SELECT time as time, pf as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() + sql = "SELECT time as time, pf as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, pf as bValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, pf as cValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -675,11 +574,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 591: case 591:
//位移功率因数 //位移功率因数
sql = "SELECT time as time, df as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() + sql = "SELECT time as time, df as aValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, df as bValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, df as cValue FROM data_harmpower_p WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
phasicType.add("C相"); phasicType.add("C相");
@@ -702,11 +597,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 61: case 61:
//长时闪变 //长时闪变
sql = "SELECT time as time, plt as aValue FROM data_plt WHERE " + stringBuilder.toString() + sql = "SELECT time as time, plt as aValue FROM data_plt WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, plt as bValue FROM data_plt WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, plt as cValue FROM data_plt WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");
@@ -722,11 +613,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 60: case 60:
//短时闪变 //短时闪变
sql = "SELECT time as time, pst as aValue FROM data_flicker WHERE " + stringBuilder.toString() + sql = "SELECT time as time, pst as aValue FROM data_flicker WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, pst as bValue FROM data_flicker WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, pst as cValue FROM data_flicker WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
topLimit = overlimit.getFlicker(); topLimit = overlimit.getFlicker();
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
@@ -742,11 +629,7 @@ public class HistoryResultServiceImpl implements HistoryResultService {
case 62: case 62:
//电压波动 //电压波动
sql = "SELECT time as time, fluc as aValue FROM data_fluc WHERE " + stringBuilder.toString() + sql = "SELECT time as time, fluc as aValue FROM data_fluc WHERE " + stringBuilder.toString() +
" and phasic_type ='A' order by time asc;" + " and (phasic_type ='A' or phasic_type ='B' or phasic_type ='C') group by phasic_type order by time asc;";
"SELECT time as time, fluc as bValue FROM data_fluc WHERE " + stringBuilder.toString() +
" and phasic_type ='B' order by time asc;" +
"SELECT time as time, fluc as cValue FROM data_fluc WHERE " + stringBuilder.toString() +
" and phasic_type ='C' order by time asc;";
if (ptType == 0) { if (ptType == 0) {
phasicType.add("A相"); phasicType.add("A相");
phasicType.add("B相"); phasicType.add("B相");

26
pqs-quality/pom.xml Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pqs</artifactId>
<groupId>com.njcn</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>pqs-quality</artifactId>
<packaging>pom</packaging>
<name>电能质量模块</name>
<modules>
<module>quality-api</module>
<module>quality-boot</module>
</modules>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
</project>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>pqs-quality</artifactId>
<groupId>com.njcn</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>quality-api</artifactId>
<name>电能质量模块对外接口</name>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-db</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-microservice</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.njcn</groupId>
<artifactId>common-poi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,27 @@
package com.njcn.quality.api;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.quality.api.fallback.EleOnlineRateFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
* pqs
*
* @author cdf
* @date 2022/4/22
*/
@FeignClient(value = ServerInfo.ENERGY,path = "/air",fallbackFactory = EleOnlineRateFallbackFactory.class)
public interface EleAirStrategyFeignClient {
/**
* 获取策略下的监测点
* @author cdf
* @date 2022/4/22
*/
@GetMapping("dealAirStrategyId")
HttpResult<Boolean> dealAirStrategyId(@RequestParam("id") String id,@RequestParam("operation") String operation);
}

View File

@@ -0,0 +1,27 @@
package com.njcn.quality.api;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.quality.api.fallback.EleIntegrityFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/20 15:08
*/
@FeignClient(value = ServerInfo.ENERGY,path = "/integrity",fallbackFactory = EleIntegrityFallbackFactory.class)
public interface EleIntegrityFeignClient {
@PostMapping("/getPowerLineId")
HttpResult<List<String>> getPowerLineId();
@PostMapping("/getAirLineId")
HttpResult<List<String>> getAirLineId();
}

View File

@@ -0,0 +1,26 @@
package com.njcn.quality.api;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.quality.api.fallback.EleOnlineRateFallbackFactory;
import com.njcn.quality.pojo.dto.OnlineRateDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/20 15:08
*/
@FeignClient(value = ServerInfo.ENERGY,path = "/onlineRate",fallbackFactory = EleOnlineRateFallbackFactory.class)
public interface EleOnlineRateFeignClient {
@PostMapping("/getDeviceTime")
HttpResult<List<OnlineRateDTO>> getDeviceTime(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime);
}

View File

@@ -0,0 +1,41 @@
package com.njcn.quality.api.fallback;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.quality.api.EleAirStrategyFeignClient;
import com.njcn.quality.utils.EnergyEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/20 15:09
*/
@Slf4j
@Component
public class EleAirStrategyFallbackFactory implements FallbackFactory<EleAirStrategyFeignClient> {
@Override
public EleAirStrategyFeignClient create(Throwable cause) {
//判断抛出异常是否为解码器抛出的业务异常
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
if(cause.getCause() instanceof BusinessException){
BusinessException businessException = (BusinessException) cause.getCause();
exceptionEnum = EnergyEnumUtil.getExceptionEnum(businessException.getResult());
}
Enum<?> finalExceptionEnum = exceptionEnum;
return new EleAirStrategyFeignClient() {
@Override
public HttpResult<Boolean> dealAirStrategyId(String id,String operation) {
log.error("{}异常,降级处理,异常为:{}","空调控制策略数据",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -0,0 +1,48 @@
package com.njcn.quality.api.fallback;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.quality.api.EleIntegrityFeignClient;
import com.njcn.quality.utils.EnergyEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/20 15:09
*/
@Slf4j
@Component
public class EleIntegrityFallbackFactory implements FallbackFactory<EleIntegrityFeignClient> {
@Override
public EleIntegrityFeignClient create(Throwable cause) {
//判断抛出异常是否为解码器抛出的业务异常
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
if(cause.getCause() instanceof BusinessException){
BusinessException businessException = (BusinessException) cause.getCause();
exceptionEnum = EnergyEnumUtil.getExceptionEnum(businessException.getResult());
}
Enum<?> finalExceptionEnum = exceptionEnum;
return new EleIntegrityFeignClient() {
@Override
public HttpResult<List<String>> getPowerLineId() {
log.error("{}异常,降级处理,异常为:{}","获取在线用采监测点",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<String>> getAirLineId() {
log.error("{}异常,降级处理,异常为:{}","获取在线空调监测点",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -0,0 +1,44 @@
package com.njcn.quality.api.fallback;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.quality.api.EleOnlineRateFeignClient;
import com.njcn.quality.pojo.dto.OnlineRateDTO;
import com.njcn.quality.utils.EnergyEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/20 15:09
*/
@Slf4j
@Component
public class EleOnlineRateFallbackFactory implements FallbackFactory<EleOnlineRateFeignClient> {
@Override
public EleOnlineRateFeignClient create(Throwable cause) {
//判断抛出异常是否为解码器抛出的业务异常
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
if(cause.getCause() instanceof BusinessException){
BusinessException businessException = (BusinessException) cause.getCause();
exceptionEnum = EnergyEnumUtil.getExceptionEnum(businessException.getResult());
}
Enum<?> finalExceptionEnum = exceptionEnum;
return new EleOnlineRateFeignClient() {
@Override
public HttpResult<List<OnlineRateDTO>> getDeviceTime(String startTime, String endTime) {
log.error("{}异常,降级处理,异常为:{}","装置在线率数据",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -0,0 +1,26 @@
package com.njcn.quality.enums;
import lombok.Getter;
/**
* 用能费率配置
* @author denghuajun
* @version 1.0.0
* @date 2022年04月14日 15:04
*/
@Getter
public enum EleStatisticalSetEnum {
/**
* 枚举配置
*/
LOAD_STATISTICS("负荷统计"),
ELETRIC_DEGREE("电度统计");
private final String name;
EleStatisticalSetEnum(String name) {
this.name = name;
}
}

View File

@@ -0,0 +1,79 @@
package com.njcn.quality.enums;
import lombok.Getter;
/**
* @author cdf
* @version 1.0.0
* @date 2022年02月23日 09:56
*/
@Getter
public enum EnergyResponseEnum {
/**
* 用能模块异常响应码的范围:
* A00450 ~ A00549
*/
ENERGY_COMMON_ERROR("A00450","用能模块异常"),
NET_DEV_NAME_REPEAT("A00451", "网关设备名称重复"),
DEV_VERSION_REPEAT("A00451", "设备版本信息重复"),
/**
* 用能模板交互应答code
*/
SUCCESS("200","success"),
PROCESSING("202","请求处理中"),
AUTO_OFFLINE("300","设备有异常,主动下线"),
FAIL("400","请求失败"),
PARAM_FAIL_TIMESTAMP("400","请求失败,时间戳不能为空,请检查timestamp字段"),
PARAM_ERROR_TIMESTAMP("400","请求失败,时间戳格式错误,请检查timestamp字段"),
PARAM_FAIL_TYPE("400","请求失败,消息类型不能为空,请检查type字段"),
TYPE_ERROR("400","请求失败,接口名称不匹配,请检查type字段"),
REGISTER_ERROR("400","注册失败,注册的联网设备不存在,请先平台录入"),
REPEAT_ERROR("400","注册失败,有重复装置注册"),
EXIST_ERROR("400","注册失败,存在已注册的装置"),
CANCEL_ERROR("400","取消注册失败,存在未注册或者接入的装置,无法取消注册"),
NO_MODEL_FIND("402","接入失败,模板未找到"),
MISSING_MODEL("402","接入失败,模板数据缺失"),
MISSING_TOPIC("402","接入失败,缺少网关主题相关信息"),
NO_DID_FIND("400","接入失败,需要接入的装置未找到"),
MODULE_MATCH_ERROR("400","接入失败,接入的装置和模板数量不匹配"),
SAME_DEV_ERROR("400","模板数据错误,存在重复的装置信息"),
MODEL_ERROR("400","模板数据错误,模板未找到"),
NET_DEV_MODEL_ERROR("400","网关模板解析错误,平台未找到此网关"),
LINE_REPEAT_ERROR("400","网关模板解析错误库中存在相同的监测点id"),
CERTIFICATION_ERROR("401","请求未认证/认证错误"),
REQUEST_REFUSE("403","请求被拒绝"),
FUNCTION_MISSING("404","请求的资源不存在"),
OVER_WAITING_TIME("408","请求超时"),
OTHER_ERROR("500","其他错误"),
NO_DICT("501","字典表无此数据"),
NO_TABLE("501","字典表无influxDB表名数据"),
DEV_LINE_EMPTY("501","设备监测点不可为空"),
DIC_NAME_REPEAT("502","字典名称不可重复"),
CHILDREN_EXIT("503","存在子节点,不可删除"),
CAI_BIND("504","用能负荷未绑定监测点"),
LOAD_VAL_CONFLICT("505","负荷类型与值类型冲突"),
ENERGY_EMPTY("506","用能查询数据为空"),
TASK_CREATE_ERROR("507","定时任务创建失败"),
TASK_HAS_START("508","任务已经执行完毕"),
TASK_DEL_ERROR("509","定时任务删除失败,请联系管理员"),
TASK_RUNING("510","任务正在执行无法操作,请先停止任务")
;
private final String code;
private final String message;
EnergyResponseEnum(String code, String message) {
this.code = code;
this.message = message;
}
}

View File

@@ -0,0 +1,33 @@
package com.njcn.quality.enums;
import lombok.Getter;
/**
* pqs
*
* @author cdf
* @date 2022/4/18
*/
@Getter
public enum LoadEnum {
AIR_LOAD("空调负荷"),
WORK_LOAD("办公负荷"),
EAT_LOAD("厨房负荷"),
SLEEP_LOAD("宿舍负荷"),
SUN_LOAD("光伏发电"),
HIGH_LINE("高压进线")
;
private final String name;
LoadEnum(String name){
this.name=name;
}
}

View File

@@ -0,0 +1,90 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.List;
/**
* pqs
* 空调策略
* @author cdf
* @date 2022/4/21
*/
@Data
@ApiModel
public class AirStrategyParam{
@ApiModelProperty(name = "策略名称",required = true)
@NotBlank(message = "名称不可为空")
private String name;
@ApiModelProperty(name = "开始时间",required = true)
@NotBlank(message = "开始时间不可为空")
@DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "开始时间格式有误")
private String startTime;
@ApiModelProperty(name = "开始时间",required = true)
@NotBlank(message = "开始时间不可为空")
@DateTimeStrValid(format = "yyyy-MM-dd HH:mm:ss",message = "结束时间格式有误")
private String endTime;
@ApiModelProperty(name = "空调模式",required = true)
@NotBlank(message = "模式不可为空")
private String mode;
@ApiModelProperty(name = "空调温度",required = true)
@NotNull(message = "空调温度不可为空")
private Integer temperature;
@ApiModelProperty(name = "空调风速",required = true)
@NotBlank(message = "空调风速不可为空")
private String wind;
@ApiModelProperty(name = "排序",required = true)
@NotNull(message = "排序不可为空")
private Integer sort;
@ApiModelProperty(name = "监测点集",required = true)
@NotEmpty(message = "监测点集不可为空")
private List<String> lineIds;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class AirUpdateParam extends AirStrategyParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class AirStrategyQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,57 @@
package com.njcn.quality.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* 类的介绍:详细数据
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/9 13:36
*/
@Data
public class DataArrayParam {
@ApiModelProperty(value = "数据集表Id")
@NotEmpty(message = "数据集表Id不可为空")
private String pid;
@ApiModelProperty(value = "数据类型表id")
@NotEmpty(message = "数据类型表id不可为空")
private String dataId;
@ApiModelProperty(value = "数据分类")
private String className;
@ApiModelProperty(value = "排序")
private Integer sort;
@ApiModelProperty(value = "数据名称")
@NotEmpty(message = "数据名称不可为空")
private String name;
@ApiModelProperty(value = "数据名称别名")
@NotEmpty(message = "数据名称别名不可为空")
private String anotherName;
@ApiModelProperty(value = "数据编号")
@NotNull(message = "数据编号不可为空")
private Integer idx;
@ApiModelProperty(value = "数据类型")
private String type;
@ApiModelProperty(value = "相别")
private String phase;
@ApiModelProperty(value = "统计类型")
private String statMethod;
@ApiModelProperty(value = "influxDB表名")
private String classId;
}

View File

@@ -0,0 +1,28 @@
package com.njcn.quality.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/16 9:14
*/
@Data
public class DataGroupParam {
@ApiModelProperty(value = "数据集表Id")
@NotEmpty(message = "数据集表Id不可为空")
private String pid;
@ApiModelProperty(value = "分组名称")
private String name;
@ApiModelProperty(value = "排序")
private Integer sort;
}

View File

@@ -0,0 +1,33 @@
package com.njcn.quality.param;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* pqs
* 通过字段表名获取统计趋势和历史趋势实体
* @author cdf
* @date 2022/3/28
*/
@Data
@ApiModel
public class DataHisParam {
@ApiModelProperty(name = "监测点id",required = true)
private String lineId;
@ApiModelProperty(name = "指标id集",required = true)
private List<String> arrName;
private String classId;
@ApiModelProperty(name = "起始时间",required = true)
private String startTime;
@ApiModelProperty(name = "结束时间",required = true)
private String endTime;
}

View File

@@ -0,0 +1,71 @@
package com.njcn.quality.param;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/8 20:19
*/
@Data
public class DataModelParam {
@ApiModelProperty(value = "数据模板名称")
@NotEmpty(message = "数据模板名称不可为空")
private String name;
@ApiModelProperty(value = "设备模板编号")
@NotNull(message = "设备模板编号不可为空")
private Integer idx;
@ApiModelProperty(value = "版本号")
private String version;
/**
* 创建或最后修改时间
*/
@ApiModelProperty(value = "创建或最后修改时间",required = true)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime time;
@ApiModelProperty(value = "创建时间",required = true)
private LocalDateTime createTime;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DataModelUpdateParam extends DataModelParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DataModelQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,72 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/9 10:08
*/
@Data
public class DataSetParam {
@ApiModelProperty(value = "数据模板表Id")
@NotEmpty(message = "数据模板表Id不可为空")
private String pid;
@ApiModelProperty(value = "数据集名称")
@NotEmpty(message = "数据集名称不可为空")
private String name;
@ApiModelProperty(value = "数据集序号")
@NotNull(message = "数据集序号不可为空")
private Integer idx;
@ApiModelProperty(value = "数据集别名")
private String anotherName;
/**
* 0 不存储
* 1 存储
*/
@ApiModelProperty(value = "是否存储")
@NotNull(message = "数据集序号不可为空")
private Integer storeFlag;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DataSetUpdateParam extends DataSetParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DataSetQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,117 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/8 13:30
*/
@Data
public class DevCfgParam {
@ApiModelProperty(value = "联网设备表Id")
@NotEmpty(message = "联网设备表Id不可为空")
private String pid;
@ApiModelProperty(value = "设备Id")
@NotEmpty(message = "设备Id不可为空")
private String did;
@ApiModelProperty(value = "版本信息表Id")
private String versionId;
@ApiModelProperty(value = "设备数据模板Id")
private String idx;
@ApiModelProperty(value = "设备名称")
private String name;
@ApiModelProperty(value = "设备型号")
private String type;
@ApiModelProperty(value = "设备类别")
private String devApp;
@ApiModelProperty(value = "设备和联网装置通讯协议")
private String protocol;
/**
* 设备和联网装置通讯接口 Lora、RS485、Eth、Bus内部总线方式
*/
@ApiModelProperty(value = "设备和联网装置通讯接口")
private String ci;
/**
* 内部时钟源 Rtc、None
*/
@ApiModelProperty(value = "内部时钟源")
private String iclk;
/**
* 外部时钟源 BCode、Sntp、MasterStation
*/
@ApiModelProperty(value = "内部时钟源")
private String eclk;
/**
* 数据上送周期(单位秒)
*/
@ApiModelProperty(value = "数据上送周期")
private Integer period;
@ApiModelProperty(value = "安装区域省")
private String province;
@ApiModelProperty(value = "安装区域市")
private String city;
@ApiModelProperty(value = "安装区域县或区")
private String county;
@ApiModelProperty(value = "安装地址(厂区或变电站)")
private String address;
@ApiModelProperty(value = "安装位置")
private String position;
@ApiModelProperty(value = "设备总线路")
private Integer allNum;
@ApiModelProperty(value = "监测点数目")
private Integer lineNum;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DevCfgUpdateParam extends DevCfgParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DevCfgQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,33 @@
package com.njcn.quality.param;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotBlank;
/**
* pqs
*
* @author cdf
* @date 2022/3/14
*/
@Data
@Validated
public class DevLineQueryParam {
@NotBlank(message = "id不可为空")
@ApiModelProperty("id")
private String id;
@DateTimeStrValid
private String beginTime;
@DateTimeStrValid
private String endTime;
@ApiModelProperty("页码")
private Integer page;
@ApiModelProperty("页面尺寸")
private Integer pageSize;
}

View File

@@ -0,0 +1,87 @@
package com.njcn.quality.param;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/7 19:02
*/
@Data
public class DevVersionParam{
/**
* 网关id
*/
@ApiModelProperty(value = "网关id",required = true)
@NotBlank(message = "网关id不可为空")
private String ndid;
/**
* 设备类型0联网设备1逻辑设备
*/
@ApiModelProperty(value = "设备类型",required = true)
@NotEmpty(message = "设备类型不可为空")
private Integer type;
/**
* 版本号
*/
@ApiModelProperty(value = "版本号",required = true)
@NotBlank(message = "版本号不可为空")
private String version;
/**
* 创建或最后修改时间
*/
@ApiModelProperty(value = "创建或最后修改时间",required = true)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime time;
/**
* 创建或最后修改时间
*/
@ApiModelProperty(value = "创建时间",required = true)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DevVersionUpdateParam extends DevVersionParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DevVersionQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,67 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/**
* pqs
*
* @author cdf
* @date 2022/3/22
*/
@Data
public class DictParam {
/**
* 父级id
*/
@ApiModelProperty(value = "父级id")
private String pid;
/**
* 字典表字段名
*/
@ApiModelProperty(value = "字典表字段名")
private String name;
/**
* 字典表别名
*/
@ApiModelProperty(value = "字典表别名")
private String anotherName;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DictUpdateParam extends DictParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class DictQueryParam extends BaseParam {
@ApiModelProperty("pid")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String pid;
}
}

View File

@@ -0,0 +1,18 @@
package com.njcn.quality.param;
import com.njcn.quality.pojo.po.EleBind;
import lombok.Data;
import java.util.List;
/**
* pqs
*
* @author cdf
* @date 2022/3/30
*/
@Data
public class ElDataBindParam {
private List<EleBind> list;
}

View File

@@ -0,0 +1,25 @@
package com.njcn.quality.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* @author denghuajun
* @version 1.0.0
* @date 2022年04月15日 13:38
*/
@Data
public class EleParam {
@ApiModelProperty("统计类型配置id")
@NotBlank(message = "id不可为空")
private String id;
@ApiModelProperty("指标类型集合ids")
@NotEmpty(message = "id数组")
private List<String> ids;
}

View File

@@ -0,0 +1,58 @@
package com.njcn.quality.param;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* pqs
*
* @author cdf
* @date 2022/4/18
*/
@Data
@ApiModel
public class ElectComparaParam {
@ApiModelProperty(value = "统计指标")
@NotBlank(message = "统计指标不可为空")
private String tagType;
@ApiModelProperty(value = "负荷类型")
@NotEmpty(message = "负荷类型不可为空")
private List<String> loadType;
@ApiModelProperty(value = "值类型")
private String valType;
@ApiModelProperty(value = "开始时间")
@NotBlank(message = "开始时间不可为空")
@DateTimeStrValid
private String startTime;
@ApiModelProperty(value = "结束时间")
@NotBlank(message = "结束时间不可为空")
@DateTimeStrValid
private String endTime;
@ApiModelProperty(value = "同比环比起始时间")
@NotBlank(message = "同比环比起始时间不可为空")
private String startTimeBi;
@ApiModelProperty(value = "同比环比结束时间")
@NotBlank(message = "同比环比结束时间不可为空")
@DateTimeStrValid
private String endTimeBi;
@ApiModelProperty(value = "统计类型")
@NotNull(message = "0.电度 1.电费")
private Integer statisticType;
}

View File

@@ -0,0 +1,45 @@
package com.njcn.quality.param;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* pqs
*
* @author cdf
* @date 2022/4/1
*/
@Data
public class EnergyBaseParam implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
private String id;
@ApiModelProperty("lineId")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
private String lineId;
@ApiModelProperty("pageNum")
private Integer pageNum;
@ApiModelProperty("pageSize")
private Integer pageSize;
@ApiModelProperty("startTime")
@DateTimeStrValid
private String startTime;
@ApiModelProperty("endTime")
@DateTimeStrValid
private String endTime;
}

View File

@@ -0,0 +1,36 @@
package com.njcn.quality.param;
import com.njcn.web.constant.ValidMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* pqs
* 重新分组
*
* @author cdf
* @date 2022/3/16
*/
@Data
public class GroupArrParam {
@ApiModelProperty("setId")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
private String setId;
@ApiModelProperty("data")
@NotEmpty(message = "数据不能为空")
private List<ArrItem> data;
@Data
public static class ArrItem {
private String id;
private String name;
private List<String> children;
}
}

View File

@@ -0,0 +1,107 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
* @author 徐扬
*/
@Data
public class HardwareParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
@ApiModelProperty(value = "设备类型区分")
@NotNull()
@Range(min = 0, max = 1)
private Integer type;
@ApiModelProperty(value = "设备类型")
private String devType;
@ApiModelProperty(value = "设备名称")
private String devName;
@ApiModelProperty(value = "设备厂商信息")
private String msgInfo;
@ApiModelProperty(value = "设备状态")
private String devStatus;
@ApiModelProperty(value = "设备硬件版本号")
private String hardVer;
@ApiModelProperty(value = "CPU核心数")
private Integer cpuCore;
@ApiModelProperty(value = "CPU主频单位GHz")
private Float cpuFreq;
@ApiModelProperty(value = "CPU架构")
private String arch;
@ApiModelProperty(value = "CPU监控阈值单位%")
private Float cpuLmt;
@ApiModelProperty(value = "物理内存单位MB")
private Float memPhy;
@ApiModelProperty(value = "虚拟内存单位MB")
private Float memVirt;
@ApiModelProperty(value = "内存监控阈值(单位%")
private Float memLmt;
@ApiModelProperty(value = "磁盘空间单位MB")
private Float diskPhy;
@ApiModelProperty(value = "存储监控阈值(单位%")
private Float diskLmt;
@ApiModelProperty(value = "已使用磁盘空间单位MB")
private Float diskUsePhy;
@ApiModelProperty(value = "操作系统名称裸机系统填None")
private String osName;
@ApiModelProperty(value = "操作系统版本裸机系统填None")
private String osVersion;
@ApiModelProperty(value = "应用程序版本号")
private String appVersion;
@ApiModelProperty(value = "应用程序发布日期")
private String appDate;
@ApiModelProperty(value = "应用程序校验码")
private String appCheck;
@ApiModelProperty(value = "是否支持远程升级程序")
private String softUpdate;
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class HardwareQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,21 @@
package com.njcn.quality.param;
import lombok.Data;
import java.io.Serializable;
/**
* @author hongawen
* @version 1.0.0
* @date 2022年04月18日 15:37
*/
@Data
public class JobInfoParam implements Serializable {
private String strategyId;
private String startTime;
private String endTime;
}

View File

@@ -0,0 +1,87 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/8 13:52
*/
@Data
public class LineParam {
@ApiModelProperty(value = "监测点id")
@NotEmpty(message = "监测点id不可为空")
private String lineId;
@ApiModelProperty(value = "逻辑设备表Id")
@NotEmpty(message = "逻辑设备表Id不可为空")
private String pid;
@ApiModelProperty(value = "监测点名称")
@NotEmpty(message = "监测点名称不可为空")
private String name;
@ApiModelProperty(value = "监测点编号")
@NotNull(message = "监测点编号不可为空")
private Integer idx;
@ApiModelProperty(value = "安装区域省")
private String province;
@ApiModelProperty(value = "安装区域市")
private String city;
@ApiModelProperty(value = "安装区域县或区")
private String county;
@ApiModelProperty(value = "安装地址(厂区或变电站)")
private String address;
@ApiModelProperty(value = "安装位置")
private String position;
@ApiModelProperty(value = "电压等级")
private String volGrade;
@ApiModelProperty(value = "PT变比")
private String ptRatio;
@ApiModelProperty(value = "CT变比")
private String ctRatio;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class LineUpdateParam extends LineParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class LineQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,54 @@
package com.njcn.quality.param;
import com.njcn.web.pojo.annotation.DateTimeStrValid;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* pqs
*
* @author cdf
* @date 2022/4/18
*/
@Data
@ApiModel
public class LoadStatisticParam {
@ApiModelProperty(value = "统计指标",required = true)
@NotBlank(message = "统计指标不可为空")
private String tagType;
@ApiModelProperty(value = "负荷类型",required = true)
@NotEmpty(message = "负荷类型不可为空")
private List<String> loadType;
@ApiModelProperty(value = "值类型 0.最大值 1.最小值",required = true)
@NotEmpty(message = "值类型不可为空")
private List<Integer> valType;
@ApiModelProperty(value = "开始时间",required = true)
@NotBlank(message = "开始时间不可为空")
@DateTimeStrValid
private String startTime;
@ApiModelProperty(value = "结束时间",required = true)
@NotBlank(message = "结束时间不可为空")
@DateTimeStrValid
private String endTime;
@ApiModelProperty(value = "同比环比开始时间",required = true)
@NotBlank(message = "同比环比开始时间不可为空")
private String startTimeBi;
@ApiModelProperty(value = "同比环比结束时间",required = true)
@NotBlank(message = "同比环比结束时间不可为空")
@DateTimeStrValid
private String endTimeBi;
}

View File

@@ -0,0 +1,108 @@
package com.njcn.quality.param;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import com.njcn.web.pojo.param.BaseParam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
/**
* <p>
*
* </p>
*
* @author cdf
* @since 2022-02-22
*/
@Data
public class NetDevParam {
/**
* 联网设备名称
*/
@ApiModelProperty(value = "名称",required = true)
@NotBlank(message = "网关设备名称不可为空")
private String name;
/**
* 联网设备ID
*/
@ApiModelProperty(value = "联网设备ID",required = true)
@NotBlank(message = "网关设备ID不可为空")
private String ndid;
/**
* 关联版本信息表Id
*/
private String versionId;
/**
* 联网设备型号(字典表)
*/
private String type;
/**
* 联网设备接入网络方式 “4G” “WIFI” (字典表)
*/
private String netType;
/**
* 用户ID
*/
private String uid;
/**
* 子用户信息
*/
private String cUid;
/**
* 硬件信息表Id
*/
private String info;
/**
* 状态
*/
private Integer state;
/**
* 排序字段
* @author cdf
* @date 2022/4/20
*/
@ApiModelProperty(value = "排序字段",required = true)
@NotBlank(message = "排序字段不可为空")
private Integer sort;
/**
* 更新操作实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class NetDevUpdateParam extends NetDevParam {
@ApiModelProperty("id")
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
private String id;
}
/**
* 分页查询实体
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class NetDevQueryParam extends BaseParam {
}
}

View File

@@ -0,0 +1,59 @@
package com.njcn.quality.pojo.constant;
/**
* @author 徐扬
*/
public interface ApiParam {
/**
* 设备接入网络设备注册申请
*/
String CMD_DEV_REGISTER = "CMD_DEV_REGISTER";
/**
* 平台对接入网络设备注册应答
*/
String REP_DEV_REGISTER = "REP_DEV_REGISTER";
/**
* 设备接入请求
*/
String CMD_LINKUP = "CMD_LINKUP";
/**
* 设备接入应答
*/
String REP_LINKUP = "REP_LINKUP";
/**
* 设备主动断开上报
*/
String ACT_LINK_DOWN = "ACT_LINK_DOWN";
/**
* 设备心跳请求
*/
String CMD_HEARTBEAT = "CMD_HEARTBEAT";
/**
* 设备心跳应答
*/
String REP_HEARTBEAT = "REP_HEARTBEAT";
/**
* 联网装置主题信息上送
*/
String ACT_DEV_TOPIC = "ACT_DEV_TOPIC";
/**
* 设备数据询问
*/
String CMD_DEV_DATA = "CMD_DEV_DATA";
/**
* 联网装置主题信息上送
*/
String REP_DEV_DATA = "REP_DEV_DATA";
}

View File

@@ -0,0 +1,68 @@
package com.njcn.quality.pojo.constant;
/**
* @author 徐扬
*/
public interface DataType {
/**
* 电度数据
*/
String EPD = "EPD";
/**
* 电能质量数据
*/
String PQD = "PQD";
/**
* 事件
*/
String EVT = "EVT";
/**
* 告警
*/
String ALM = "ALM";
/**
* 通用测量
*/
String MD = "MD";
/**
* 通用测量
*/
String STS = "STS";
/**
* 开入信号量
*/
String DI = "DI";
/**
* 开入信号量
*/
String DO = "DO";
/**
* 参数
*/
String PARM = "PARM";
/**
* 控制
*/
String CTRL = "CTRL";
/**
* 自动控制
*/
String ACTRL = "ACTRL";
/**
* 模板
*/
String TEMPLATE = "TEMPLATE";
}

View File

@@ -0,0 +1,58 @@
package com.njcn.quality.pojo.constant;
/**
* @author 徐扬
*/
public interface ModelState {
/**
* 注册成功状态
*/
Integer SUCCESS = 1;
Integer FAIL = 0;
/**
* DID操作
*/
Integer REGISTER = 1;
Integer UNREGISTER = 0;
Integer ACCESS = 2;
/**
* 报文处理优先级
*/
Integer PRIORITY_FIRST = 1;
Integer PRIORITY_SECOND = 2;
Integer PRIORITY_THIRD = 3;
Integer PRIORITY_FORTH = 4;
Integer PRIORITY_FIFTH = 5;
/**
* 报文过期的相对时间 -1表示永不过期
*/
Integer EXPIRE = -1;
/**
* 设备类型0联网设备1逻辑设备
*/
Integer NET_DEV = 0;
Integer LOGIC_DEV = 1;
/**
* 操作类型
*/
String WRITE = "write";
String READ = "read";
Integer online = 1;
Integer offline = 0;
}

View File

@@ -0,0 +1,21 @@
package com.njcn.quality.pojo.constant;
/**
* pqs
*
* @author cdf
* @date 2022/3/25
*/
public interface TableName {
String eleEpdPqd = "ele_epd_pqd";
String eleMd = "ele_md";
String eleCtrl = "ele_ctrl";
String eleSts = "ele_sts";
String powerData = "power_data";
String powerDataReal = "power_data_Real";
String powerQuality = "power_quality_data";
String powerQualityReal = "power_quality_data_Real";
}

View File

@@ -0,0 +1,42 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 15:10
*/
@Data
public class ACtrlDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Enable")
private Integer enable;
@SerializedName("Number")
private Integer number;
@SerializedName("StartTime")
private String startTime;
@SerializedName("EndTime")
private String endTime;
@SerializedName("Condition")
private List<String> condition;
@SerializedName("OutRes")
private List<String> outRes;
}

View File

@@ -0,0 +1,53 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/12 17:04
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class AccessDTO extends PublicParamDTO implements Serializable {
/**
* 请求参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class AccessRequest extends AccessDTO implements Serializable{
@SerializedName("expire")
private Integer expire;
@SerializedName("param")
private AccessParamDTO param;
}
/**
* 应答参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class AccessResponse extends AccessDTO implements Serializable{
@SerializedName("code")
private Integer code;
@SerializedName("msg")
private String msg;
@SerializedName("param")
private AccessParamDTO param;
}
}

View File

@@ -0,0 +1,25 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/12 17:08
*/
@Data
public class AccessParamDTO implements Serializable {
@SerializedName("DID")
List<String> did;
@SerializedName("TpList")
List<TpListDTO> tpList;
}

View File

@@ -0,0 +1,29 @@
package com.njcn.quality.pojo.dto;
import lombok.Data;
/**
* pqs
*
* @author cdf
* @date 2022/4/22
*/
@Data
public class AirStrategyDTO {
private Integer mid;
private String deviceId;
private Long timestamp;
private Integer expire;
private String type;
private Param param;
@Data
public static class Param{
private String lineId;
private String action;
private String parm;
}
}

View File

@@ -0,0 +1,28 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:45
*/
@Data
public class AlmDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Type")
private String type;
}

View File

@@ -0,0 +1,47 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/12 21:28
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class AskDataDTO extends PublicParamDTO implements Serializable {
/**
* 请求参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class AskDataRequest extends AskDataDTO implements Serializable{
@SerializedName("param")
private AskDataParamDTO param;
}
/**
* 响应参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class AskDataResponse extends AskDataDTO implements Serializable{
@SerializedName("code")
private Integer code;
@SerializedName("msg")
private String msg;
@SerializedName("param")
private TemplateDataArrayDTO param;
}
}

View File

@@ -0,0 +1,25 @@
package com.njcn.quality.pojo.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/12 21:30
*/
@Data
public class AskDataParamDTO implements Serializable {
private String dataType;
private String operate;
private String startTime;
private String endTime;
}

View File

@@ -0,0 +1,29 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 12:09
*/
@Data
public class CpuInfoDTO implements Serializable {
@SerializedName("CpuCore")
private Integer cpuCore;
@SerializedName("CpuFreq")
private Float cpuFreq;
@SerializedName("Arch")
private String arch;
@SerializedName("CpuLmt")
private Float cpuLmt;
}

View File

@@ -0,0 +1,48 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 15:06
*/
@Data
public class CtrlDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Type")
private String type;
@SerializedName("Check")
private Integer remoteCheck;
@SerializedName("Auto")
private Integer auto;
@SerializedName("MaxNum")
private Integer maxNum;
@SerializedName("MinNum")
private Integer minNum;
@SerializedName("Ctlvalue")
private List<String> ctlValue;
@SerializedName("Strlen")
private Integer strLen;
@SerializedName("Encode")
private Integer encode;
}

View File

@@ -0,0 +1,25 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/6/20 13:53
*/
@Data
public class CuDevDTO implements Serializable {
@SerializedName("IDX")
private String idx;
@SerializedName("DevIDList")
private List<String> devIdList;
}

View File

@@ -0,0 +1,27 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/6/20 13:56
*/
@Data
public class CuIdDTO implements Serializable {
@SerializedName("ID")
private String id;
@SerializedName("IDX")
private String idx;
@SerializedName("Permissions")
private List<String> permissions;
}

View File

@@ -0,0 +1,24 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 15:18
*/
@Data
public class DataArrayDTO implements Serializable {
@SerializedName("Type")
private String type;
@SerializedName("IDX")
private Integer idx;
}

View File

@@ -0,0 +1,21 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/21 18:57
*/
@Data
public class DataArrayListDTO {
@SerializedName("TEMPLATE")
private TemplateDTO template;
}

View File

@@ -0,0 +1,40 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:21
*/
@Data
public class DataSetDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("DataType")
private String dataType;
@SerializedName("StartTime")
private String startTime;
@SerializedName("Period")
private Integer period;
@SerializedName("StoreFlag")
private Integer storeFlag;
@SerializedName("DataArray")
private List<DataArrayDTO> dataArray;
}

View File

@@ -0,0 +1,27 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 13:03
*/
@Data
public class DevCfgDTO implements Serializable {
@SerializedName("Version")
private String version;
@SerializedName("Time")
private String time;
@SerializedName("Cfg")
private List<DeviceDTO> cfg;
}

View File

@@ -0,0 +1,79 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 13:04
*/
@Data
public class DevDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("Version")
private String version;
@SerializedName("Time")
private String time;
@SerializedName("IDX")
private Integer idx;
@SerializedName("DevType")
private String devType;
@SerializedName("DataList")
private List<String> dataList;
@SerializedName("DataSet")
private List<DataSetDTO> dataSet;
@SerializedName("IClk")
private String iclk;
@SerializedName("EClk")
private String eclk;
@SerializedName("LineNum")
private Integer lineNum;
@SerializedName("EPD")
private List<EpdPqdDTO> epd;
@SerializedName("PQD")
private List<EpdPqdDTO> pqd;
@SerializedName("EVT")
private List<EvtDTO> evt;
@SerializedName("ALM")
private List<AlmDTO> alm;
@SerializedName("MD")
private List<MdDTO> md;
@SerializedName("STS")
private List<StsDTO> sts;
@SerializedName("DI")
private List<DiDTO> di;
@SerializedName("DO")
private List<DoDTO> doDTO;
@SerializedName("Param")
private List<ParamDTO> param;
@SerializedName("CTRL")
private List<CtrlDTO> ctrl;
}

View File

@@ -0,0 +1,32 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 12:08
*/
@Data
public class DevInfoDTO implements Serializable {
@SerializedName("DevType")
private String devType;
@SerializedName("DevName")
private String devName;
@SerializedName("MsgInfo")
private String msgInfo;
@SerializedName("DevStatus")
private String devStatus;
@SerializedName("HardVer")
private String hardVer;
}

View File

@@ -0,0 +1,67 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 13:38
*/
@Data
public class DeviceDTO implements Serializable {
@SerializedName("DevModName")
private String name;
@SerializedName("DevModVersion")
private String version;
@SerializedName("DevModTime")
private String time;
@SerializedName("ID")
private String id;
@SerializedName("DevType")
private String type;
@SerializedName("DevApp")
private String devApp;
@SerializedName("DevInfo")
private DevInfoDTO devInfo;
@SerializedName("Province")
private String province;
@SerializedName("City")
private String city;
@SerializedName("County")
private String county;
@SerializedName("Address")
private String address;
@SerializedName("Position")
private String position;
@SerializedName("LineNum")
private Integer lineNum;
@SerializedName("LineInfo")
private List<LineDTO> lineInfo;
@SerializedName("FileFrameLength")
private Integer fileFrameLength;
@SerializedName("FileFrameTimeout")
private Integer fileFrameTimeout;
}

View File

@@ -0,0 +1,28 @@
package com.njcn.quality.pojo.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/24 18:40
*/
@Data
public class DeviceOperateDTO implements Serializable {
private String ndid;
private List<String> did;
private String type;
private String message;
private String time;
}

View File

@@ -0,0 +1,21 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:57
*/
@Data
public class DiDTO extends StsDTO implements Serializable {
@SerializedName("TranFlag")
private Integer tranFlag;
}

View File

@@ -0,0 +1,27 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 12:09
*/
@Data
public class DiskInfoDTO implements Serializable {
@SerializedName("DiskPhy")
private Float diskPhy;
@SerializedName("DiskUsePhy")
private Float diskUsePhy;
@SerializedName("DiskLmt")
private Float diskLmt;
}

View File

@@ -0,0 +1,29 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:59
*/
@Data
public class DoDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("CurSts")
private Integer curSts;
@SerializedName("CtlSts")
private Integer ctlSts;
}

View File

@@ -0,0 +1,20 @@
package com.njcn.quality.pojo.dto;
import lombok.Data;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/15 8:58
*/
@Data
public class ElePublicDTO {
private String lineId;
private Double data;
}

View File

@@ -0,0 +1,46 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:27
*/
@Data
public class EpdPqdDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Type")
private String type;
@SerializedName("Phase")
private String phase;
@SerializedName("Unit")
private String unit;
@SerializedName("HarmStart")
private String harmStart;
@SerializedName("HarmEnd")
private String harmEnd;
@SerializedName("ClassID")
private String classId;
@SerializedName("StatMethod")
private List<String> statMethod;
}

View File

@@ -0,0 +1,30 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:40
*/
@Data
public class EvtDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Type")
private String type;
@SerializedName("Parm")
private List<EvtParam> param;
}

View File

@@ -0,0 +1,31 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:41
*/
@Data
public class EvtParam implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("Type")
private String type;
@SerializedName("Unit")
private String unit;
@SerializedName("Data")
private String data;
}

View File

@@ -0,0 +1,50 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 13:38
*/
@Data
public class LineDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("lineId")
private String lineId;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Province")
private String province;
@SerializedName("City")
private String city;
@SerializedName("County")
private String county;
@SerializedName("Address")
private String address;
@SerializedName("Position")
private String position;
@SerializedName("VolGrade")
private String volGrade;
@SerializedName("PtRatio")
private String ptRatio;
@SerializedName("CtRatio")
private String ctRatio;
}

View File

@@ -0,0 +1,43 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:48
*/
@Data
public class MdDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Type")
private String type;
@SerializedName("Unit")
private String unit;
@SerializedName("Phase")
private String phase;
@SerializedName("ClassID")
private String classId;
@SerializedName("StatMethod")
private List<String> statMethod;
@SerializedName("TranRule")
private String tranRule;
}

View File

@@ -0,0 +1,26 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 12:09
*/
@Data
public class MemInfoDTO implements Serializable {
@SerializedName("MemPhy")
private Float memPhy;
@SerializedName("MemVirt")
private Float memVirt;
@SerializedName("MemLmt")
private Float memLmt;
}

View File

@@ -0,0 +1,18 @@
package com.njcn.quality.pojo.dto;
import lombok.Data;
/**
* pqs
*
* @author cdf
* @date 2022/4/22
*/
@Data
public class NetAndDevByLineDTO {
private String ndid;
private String devId;
private String lineId;
private String lineName;
}

View File

@@ -0,0 +1,60 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 12:03
*/
@Data
public class NetDevDTO implements Serializable {
@SerializedName("Version")
private String version;
@SerializedName("Time")
private String time;
@SerializedName("DevName")
private String devName;
@SerializedName("DevType")
private String devType;
@SerializedName("NetType")
private String netType;
@SerializedName("NDID")
private String nDid;
@SerializedName("DevTopicVer")
private String devTopicVer;
@SerializedName("Uid")
private String uid;
@SerializedName("CUid")
private List<String> cUid;
@SerializedName("DevInfo")
private DevInfoDTO devInfoDTO;
@SerializedName("CpuInfo")
private CpuInfoDTO cpuInfoDTO;
@SerializedName("MemInfo")
private MemInfoDTO memInfoDTO;
@SerializedName("DiskInfo")
private DiskInfoDTO diskInfoDTO;
@SerializedName("SoftInfo")
private SoftInfoDTO softInfoDTO;
}

View File

@@ -0,0 +1,27 @@
package com.njcn.quality.pojo.dto;
import lombok.Data;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/4/18 20:36
*/
@Data
public class OnlineRateDTO {
private Long time;
private String deviceId;
private Double onlineRate;
private Integer onlineTime;
private Integer offlineTime;
}

View File

@@ -0,0 +1,49 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 15:02
*/
@Data
public class ParamDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("Type")
private String type;
@SerializedName("DataType")
private String dataType;
@SerializedName("ModifyFlag")
private Integer modifyFlag;
@SerializedName("MaxNum")
private Integer maxNum;
@SerializedName("MinNum")
private Integer minNum;
@SerializedName("SetValue")
private List<String> setValue;
@SerializedName("Strlen")
private Integer strLen;
@SerializedName("DefaultValue")
private String defaultValue;
}

View File

@@ -0,0 +1,42 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/12 19:18
*/
@Data
public class PublicParamDTO implements Serializable {
/**
* 在请求报文中该值为请求 ID在设备主动上报数据的报文中该字段可不填写
*/
@SerializedName("mid")
private Integer mid;
@SerializedName("userId")
private String userId;
@SerializedName("deviceId")
private String deviceId;
@SerializedName("timestamp")
private String timestamp;
/**
* 报文处理的优先级
*/
@SerializedName("level")
private Integer level;
@SerializedName("type")
private String type;
}

View File

@@ -0,0 +1,51 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/11 14:36
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RegisterDTO extends PublicParamDTO implements Serializable {
/**
* 请求参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class RegisterRequest extends RegisterDTO implements Serializable{
@SerializedName("expire")
private Integer expire;
@SerializedName("param")
private RegisterParamDTO.RegisterParamRequest param;
}
/**
* 应答参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class RegisterResponse extends RegisterDTO implements Serializable{
@SerializedName("code")
private Integer code;
@SerializedName("msg")
private String msg;
@SerializedName("param")
private RegisterParamDTO.RegisterParamResponse param;
}
}

View File

@@ -0,0 +1,50 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/11 14:58
*/
@Data
public class RegisterParamDTO implements Serializable {
@SerializedName("NDID")
private String nDid;
@SerializedName("DID")
private List<String> did;
/**
* 请求参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class RegisterParamRequest extends RegisterParamDTO implements Serializable{
@SerializedName("type")
private Integer type;
}
/**
* 应答参数
*/
@Data
@EqualsAndHashCode(callSuper = true)
public static class RegisterParamResponse extends RegisterParamDTO implements Serializable{
@SerializedName("res")
private Integer res;
@SerializedName("type")
private Integer resType;
}
}

View File

@@ -0,0 +1,36 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 12:09
*/
@Data
public class SoftInfoDTO implements Serializable {
@SerializedName("OsName")
private String osName;
@SerializedName("OsVersion")
private String osVersion;
@SerializedName("AppVersion")
private String appVersion;
@SerializedName("AppDate")
private String appDate;
@SerializedName("AppCheck")
private String appCheck;
@SerializedName("Softupdate")
private String softUpdate;
}

View File

@@ -0,0 +1,36 @@
package com.njcn.quality.pojo.dto;
import com.alibaba.nacos.shaded.com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* 类的介绍:
*
* @author xuyang
* @version 1.0.0
* @createTime 2022/3/13 14:52
*/
@Data
public class StsDTO implements Serializable {
@SerializedName("Name")
private String name;
@SerializedName("IDX")
private Integer idx;
@SerializedName("StoreFlag")
private Integer storeFlag;
@SerializedName("CurSts")
private Integer curSts;
@SerializedName("ClassID")
private String classId;
@SerializedName("TranRule")
private String tranRule;
}

Some files were not shown because too many files have changed in this diff Show More