包名调整
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.njcn.cssystem.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @date 2023年04月17日 10:50
|
||||
*/
|
||||
@Getter
|
||||
public enum CsSystemResponseEnum {
|
||||
|
||||
/**
|
||||
* A0301 ~ A0399 用于治理系统模块的枚举
|
||||
* <p>
|
||||
*/
|
||||
DICT_REPEAT("A0301","字典数据重复!"),
|
||||
|
||||
CS_SYSTEM_COMMON_ERROR("A00302","治理系统模块异常"),
|
||||
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
private final String message;
|
||||
|
||||
CsSystemResponseEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.njcn.cssystem.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 11:39【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class CsFeedbackAddParm {
|
||||
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
@NotBlank(message="标题不能为空!")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@NotBlank(message="用户id不能为空!")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 问题类型(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
@NotBlank(message="问题类型不能为空!")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "拓扑图文件")
|
||||
private MultipartFile[] files;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.cssystem.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 15:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsFeedbackChatAddParm {
|
||||
@ApiModelProperty(value = "反馈id")
|
||||
@NotNull(message="反馈id不能为空!")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@NotNull(message="用户id不能为空!")
|
||||
private String userId;
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@ApiModelProperty(value = "消息内容")
|
||||
@NotNull(message="消息内容不能为空!")
|
||||
private String chatContent;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.njcn.cssystem.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 15:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsFeedbackChatCheckParm {
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "反馈")
|
||||
@NotNull(message="反馈不能为空!")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@NotNull(message="用户id不能为空!")
|
||||
private String userId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.cssystem.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 11:39【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class CsFeedbackQueryParm {
|
||||
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@NotNull(message="用户id不能为空!")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 问题类型(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 问题状态(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题状态")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.njcn.cssystem.pojo.param;
|
||||
|
||||
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.NotNull;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/5/24 14:37
|
||||
*/
|
||||
@Data
|
||||
public class EleEpdPqdParam {
|
||||
|
||||
@ApiModelProperty(value = "数据名称")
|
||||
@NotBlank(message="数据名称不能为空!")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "别名")
|
||||
private String otherName;
|
||||
|
||||
@ApiModelProperty(value = "展示名称")
|
||||
private String showName;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@NotNull(message="序号不能为空!")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "基础数据类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "相别")
|
||||
@NotBlank(message="相别不能为空!")
|
||||
private String phase;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "数据开始谐波次数")
|
||||
private Integer harmStart;
|
||||
|
||||
@ApiModelProperty(value = "数据结束谐波次数")
|
||||
private Integer harmEnd;
|
||||
|
||||
@ApiModelProperty(value = "数据分类")
|
||||
@NotBlank(message="数据分类不能为空!")
|
||||
private String classId;
|
||||
|
||||
@ApiModelProperty(value = "数据统计方法")
|
||||
private String statMethod;
|
||||
|
||||
@ApiModelProperty(value = "系统类别")
|
||||
private String systemType;
|
||||
|
||||
@ApiModelProperty(value = "数据模型")
|
||||
@NotBlank(message="数据模型不能为空!")
|
||||
private String dataType;
|
||||
|
||||
@ApiModelProperty(value = "数据是否上送")
|
||||
private Integer tranFlag;
|
||||
|
||||
@ApiModelProperty(value = "上送规则")
|
||||
private String tranRule;
|
||||
|
||||
@ApiModelProperty(value = "事件类别||参数类别||定值数据类型")
|
||||
private String eventType;
|
||||
|
||||
@ApiModelProperty(value = "是否存储||是否加密")
|
||||
private Integer storeFlag;
|
||||
|
||||
@ApiModelProperty(value = "是否需遥控校验")
|
||||
private Integer curSts;
|
||||
|
||||
@ApiModelProperty(value = "是否可远程控制||是否可修改||是否支持自动控制")
|
||||
private Integer ctlSts;
|
||||
|
||||
@ApiModelProperty(value = "设置最大值")
|
||||
private Integer maxNum;
|
||||
|
||||
@ApiModelProperty(value = "设置最小值")
|
||||
private Integer minNum;
|
||||
|
||||
@ApiModelProperty(value = "参数为enum可设置的所有值序列")
|
||||
private String setValue;
|
||||
|
||||
@ApiModelProperty(value = "参数string可设置字符串的长度上限")
|
||||
private Integer strlen;
|
||||
|
||||
@ApiModelProperty(value = "参数缺省值")
|
||||
private String defaultValue;
|
||||
|
||||
@ApiModelProperty(value = "报表数据来源(mysql表名)")
|
||||
private String resourcesId;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class EleEpdPqdUpdateParam extends EleEpdPqdParam {
|
||||
@ApiModelProperty("Id")
|
||||
@NotBlank(message = "id不为空")
|
||||
private String id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询实体
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class EleEpdPqdQueryParam extends BaseParam {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.cssystem.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 15:28【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_feedback_chat")
|
||||
public class CsFeedbackChatPO extends BaseEntity {
|
||||
@TableId(value = "id", type = IdType.INPUT)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@TableField(value = "chat_content")
|
||||
private String chatContent;
|
||||
/**
|
||||
* 消息状态消息状态(0-未读,1-已读)
|
||||
*/
|
||||
@TableField(value = "chat_status")
|
||||
private String chatStatus;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.cssystem.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 11:39【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 信息反馈表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_feedback")
|
||||
public class CsFeedbackPO extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@TableField(value = "title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 问题类型(字典数据)
|
||||
*/
|
||||
@TableField(value = "type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 问题状态(字典数据)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.cssystem.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 11:40【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
/**
|
||||
* 文件路径表
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_file_path")
|
||||
public class CsFilePathPO {
|
||||
/**
|
||||
* 关联数据id
|
||||
*/
|
||||
@TableField(value = "id")
|
||||
private String id;
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
@TableField(value = "file_name")
|
||||
private String fileName;
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
@TableField(value = "file_path")
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@TableField(value = "status")
|
||||
private String status;
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package com.njcn.cssystem.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xuyang
|
||||
* @since 2023-05-24
|
||||
*/
|
||||
@Data
|
||||
@TableName("ele_epd_pqd")
|
||||
public class EleEpdPqd {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 数据名称
|
||||
*/
|
||||
@MppMultiId(value = "name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 别名
|
||||
*/
|
||||
private String otherName;
|
||||
|
||||
/**
|
||||
* 展示
|
||||
*/
|
||||
private String showName;
|
||||
|
||||
/**
|
||||
* 数据编号
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 相别
|
||||
*/
|
||||
@MppMultiId(value = "phase")
|
||||
private String phase;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 数据开始谐波次数
|
||||
*/
|
||||
private Integer harmStart;
|
||||
|
||||
/**
|
||||
* 数据结束谐波次数
|
||||
*/
|
||||
private Integer harmEnd;
|
||||
|
||||
/**
|
||||
* 数据分类,唯一类别
|
||||
*/
|
||||
private String classId;
|
||||
|
||||
/**
|
||||
* 数据统计方法,“max”“min”“avg”“cp95”
|
||||
*/
|
||||
private String statMethod;
|
||||
|
||||
/**
|
||||
* 系统类别(区分用能/电能)
|
||||
*/
|
||||
private String systemType;
|
||||
|
||||
/**
|
||||
* 数据类型(epd、pqd...)
|
||||
*/
|
||||
@MppMultiId(value = "data_type")
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 数据是否上送 0:不上送 1:上送
|
||||
*/
|
||||
private Integer tranFlag;
|
||||
|
||||
/**
|
||||
* 上送规则 变化:“change”周期:“period”
|
||||
*/
|
||||
private String tranRule;
|
||||
|
||||
/**
|
||||
* evt的事件类别 "1"、"2"; parm的参数类别 系统参数:“sys”,运行参数:“run”,功能参数:“fun”; set的定值数据类型 “hex”“number”
|
||||
*/
|
||||
private String eventType;
|
||||
|
||||
/**
|
||||
* sts、di的是否存储 1:存储 0:不存储; ctrl的是否加密 1:加密 0:不加密
|
||||
*/
|
||||
private Integer storeFlag;
|
||||
|
||||
/**
|
||||
* sts、do的当前值; ctrl的是否需遥控校验 1:需要 0:不需要
|
||||
*/
|
||||
private Integer curSts;
|
||||
|
||||
/**
|
||||
* do的是否可远程控制 1:是 0:否; parm的是否可修改 1:是 0:否; ctrl的是否支持自动控制 1:是 0:否
|
||||
*/
|
||||
private Integer ctlSts;
|
||||
|
||||
/**
|
||||
* 设置最大值
|
||||
*/
|
||||
private Integer maxNum;
|
||||
|
||||
/**
|
||||
* 设置最小值
|
||||
*/
|
||||
private Integer minNum;
|
||||
|
||||
/**
|
||||
* 参数为enum可设置的所有值序列
|
||||
*/
|
||||
private String setValue;
|
||||
|
||||
/**
|
||||
* 参数string可设置字符串的长度上限
|
||||
*/
|
||||
private Integer strlen;
|
||||
|
||||
/**
|
||||
* 参数缺省值
|
||||
*/
|
||||
private String defaultValue;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.njcn.cssystem.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.njcn.cssystem.pojo.po.CsFeedbackChatPO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 11:39【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class CsFeedbackDetailVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 问题类型(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 问题状态(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题状态")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private List<String> imageUrls;
|
||||
|
||||
private List<CsFeedbackChatPO> csFeedbackChatPOList;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.njcn.cssystem.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/4/6 11:39【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
public class CsFeedbackVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 问题类型(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 问题状态(字典数据)
|
||||
*/
|
||||
@ApiModelProperty(value = "问题状态")
|
||||
private String status;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "未读消息条数")
|
||||
private int chatCount;
|
||||
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.njcn.cssystem.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/5/24 15:30
|
||||
*/
|
||||
@Data
|
||||
public class EleEpdPqdVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "数据名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "别名")
|
||||
private String otherName;
|
||||
|
||||
@ApiModelProperty(value = "展示名称")
|
||||
private String showName;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "基础数据类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "相别")
|
||||
private String phase;
|
||||
|
||||
@ApiModelProperty(value = "单位")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "数据开始谐波次数")
|
||||
private Integer harmStart;
|
||||
|
||||
@ApiModelProperty(value = "数据结束谐波次数")
|
||||
private Integer harmEnd;
|
||||
|
||||
@ApiModelProperty(value = "数据分类(influxDB表名)")
|
||||
private String classId;
|
||||
|
||||
@ApiModelProperty(value = "数据模型")
|
||||
private String dataType;
|
||||
|
||||
@ApiModelProperty(value = "报表数据来源(mysql表名)")
|
||||
private String resourcesId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.cssystem.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
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.utils.EnumUtils;
|
||||
import com.njcn.cssystem.enums.CsSystemResponseEnum;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月20日 10:03
|
||||
*/
|
||||
public class CsSystemEnumUtil {
|
||||
|
||||
public static CsSystemResponseEnum getDeviceEnumResponseEnumByMessage(@NotNull Object value) {
|
||||
CsSystemResponseEnum deviceResponseEnum;
|
||||
try {
|
||||
String message = value.toString();
|
||||
if(message.indexOf(StrUtil.C_COMMA)>0){
|
||||
value = message.substring(message.indexOf(StrUtil.C_COMMA)+1);
|
||||
}
|
||||
deviceResponseEnum = EnumUtils.valueOf(CsSystemResponseEnum.class, value, CsSystemResponseEnum.class.getMethod(BusinessException.GET_MESSAGE_METHOD));
|
||||
return Objects.isNull(deviceResponseEnum) ? CsSystemResponseEnum.CS_SYSTEM_COMMON_ERROR : deviceResponseEnum;
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new BusinessException(CommonResponseEnum.INTERNAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
public static Enum<?> getExceptionEnum(HttpResult<Object> result){
|
||||
//如果返回错误,且为内部错误,则直接抛出异常
|
||||
CommonResponseEnum commonResponseEnum = EnumUtils.getCommonResponseEnumByCode(result.getCode());
|
||||
if (commonResponseEnum == CommonResponseEnum.SYSTEM_RESPONSE_ENUM) {
|
||||
return getDeviceEnumResponseEnumByMessage(result.getMessage());
|
||||
}
|
||||
return commonResponseEnum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user