部门接口,字典树接口调整
This commit is contained in:
@@ -31,6 +31,10 @@ public interface DictTreeFeignClient {
|
||||
@GetMapping("/queryAll")
|
||||
HttpResult<List<SysDicTreePO>> queryAll() ;
|
||||
|
||||
@GetMapping("/queryAllByType")
|
||||
HttpResult<List<SysDicTreePO>> queryAllByType(@RequestParam("type")Integer type) ;
|
||||
|
||||
|
||||
|
||||
@GetMapping("/queryTree")
|
||||
HttpResult<List<SysDicTreePO>> queryTree() ;
|
||||
|
||||
@@ -58,6 +58,11 @@ public class DictTreeFeignClientFallbackFactory implements FallbackFactory<DictT
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<SysDicTreePO>> queryAllByType(Integer type) {
|
||||
log.error("{}异常,降级处理,异常为:{}","分类获取所有字典树数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum); }
|
||||
|
||||
@Override
|
||||
public HttpResult<List<SysDicTreePO>> queryTree() {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取树形数据",cause.toString());
|
||||
|
||||
@@ -19,16 +19,26 @@ public enum DicTreeEnum {
|
||||
Wind_Farms("风电场","1401"),
|
||||
Power_Station("光伏电站","1402"),
|
||||
//其实对应其他非线性负荷
|
||||
Smelting_Load("冶炼负荷","2300"),
|
||||
Smelting_Load("其他非线性负荷","2300"),
|
||||
Imp_Users("敏感/重要/高危用户","2400"),
|
||||
|
||||
//冶炼负荷->小类
|
||||
//冶炼负荷->小类(以下5个对应主网测点中的所属场站的冶炼负荷)
|
||||
Electric_Heating_Load("电加热负荷(含电弧炉、中频炉、电热炉、单/多晶硅生产设备)","2301"),
|
||||
Rolling_Mill("轧机","2303"),
|
||||
Welding_Load("电焊负荷","2306"),
|
||||
Lifting_Load("起重负荷(含电铲、升降机、门吊等吊装设备)","2308"),
|
||||
Electrolytic_Load("电解负荷","2309"),
|
||||
|
||||
//
|
||||
|
||||
rail_traffic("轨道交通","2304"),
|
||||
electric_vehicle("电动汽车充电站","2305"),
|
||||
inverter_motor("变频调速负荷(变频电机、变频水泵等)","2312"),
|
||||
Commercial_civil_use("商业/市政/民用/电子通讯负荷(含变频空调、大型电梯、节能照明设备、UPS、开关电源、逆变电源等)","2315"),
|
||||
|
||||
|
||||
|
||||
|
||||
//冀北主要非线性设备类型
|
||||
/**
|
||||
* 类型 类别 名称 所属行业 主要关注的电能质量指标
|
||||
|
||||
@@ -1,52 +1,52 @@
|
||||
package com.njcn.system.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
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;
|
||||
|
||||
@Data
|
||||
public class DicParam {
|
||||
|
||||
@ApiModelProperty("节点")
|
||||
@NotBlank(message = ValidMessage.PID_NOT_BLANK)
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
@NotBlank(message = ValidMessage.NAME_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.DIC_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("编号")
|
||||
@NotBlank(message = ValidMessage.CODE_NOT_BLANK)
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
@NotNull(message = ValidMessage.SORT_NOT_NULL)
|
||||
@Range(min = 0, max = 999, message = ValidMessage.PARAM_FORMAT_ERROR)
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
* 需要填写的参数:id
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public static class UpdateParam extends DicParam {
|
||||
|
||||
@ApiModelProperty("Id")
|
||||
@NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
}
|
||||
}
|
||||
//package com.njcn.system.pojo.param;
|
||||
//
|
||||
//import com.njcn.common.pojo.constant.PatternRegex;
|
||||
//import com.njcn.web.constant.ValidMessage;
|
||||
//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;
|
||||
//
|
||||
//@Data
|
||||
//public class DicParam {
|
||||
//
|
||||
// @ApiModelProperty("节点")
|
||||
// @NotBlank(message = ValidMessage.PID_NOT_BLANK)
|
||||
// private String pid;
|
||||
//
|
||||
// @ApiModelProperty("名称")
|
||||
// @NotBlank(message = ValidMessage.NAME_NOT_BLANK)
|
||||
// @Pattern(regexp = PatternRegex.DIC_REGEX, message = ValidMessage.NAME_FORMAT_ERROR)
|
||||
// private String name;
|
||||
//
|
||||
// @ApiModelProperty("编号")
|
||||
// @NotBlank(message = ValidMessage.CODE_NOT_BLANK)
|
||||
// private String code;
|
||||
//
|
||||
// @ApiModelProperty("排序")
|
||||
// @NotNull(message = ValidMessage.SORT_NOT_NULL)
|
||||
// @Range(min = 0, max = 999, message = ValidMessage.PARAM_FORMAT_ERROR)
|
||||
// private Integer sort;
|
||||
//
|
||||
// @ApiModelProperty("描述")
|
||||
// private String remark;
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 更新操作实体
|
||||
// * 需要填写的参数:id
|
||||
// */
|
||||
// @Data
|
||||
// @EqualsAndHashCode(callSuper = true)
|
||||
// public static class UpdateParam extends DicParam {
|
||||
//
|
||||
// @ApiModelProperty("Id")
|
||||
// @NotBlank(message = ValidMessage.ID_NOT_BLANK)
|
||||
// @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
// private String id;
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -41,6 +41,16 @@ public class DictTreeParam {
|
||||
@NotBlank(message = ValidMessage.CODE_NOT_BLANK)
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 根据type自定义内容,type:0用于区分对象类型是101电网侧 102用户侧
|
||||
*/
|
||||
private String extend;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
package com.njcn.system.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("sys_dic_tree")
|
||||
public class Dic extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private String pid;
|
||||
|
||||
private String pids;
|
||||
|
||||
private String name;
|
||||
|
||||
private String code;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private String remark;
|
||||
|
||||
private Integer status;
|
||||
}
|
||||
//package com.njcn.system.pojo.po;
|
||||
//
|
||||
//import com.baomidou.mybatisplus.annotation.TableName;
|
||||
//import com.njcn.db.bo.BaseEntity;
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//
|
||||
//@Data
|
||||
//@EqualsAndHashCode(callSuper = true)
|
||||
//@TableName("sys_dic_tree")
|
||||
//public class Dic extends BaseEntity {
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// private String id;
|
||||
//
|
||||
// private String pid;
|
||||
//
|
||||
// private String pids;
|
||||
//
|
||||
// private String name;
|
||||
//
|
||||
// private String code;
|
||||
//
|
||||
// private Integer sort;
|
||||
//
|
||||
// private String remark;
|
||||
//
|
||||
// private Integer status;
|
||||
//}
|
||||
|
||||
@@ -51,6 +51,16 @@ public class SysDicTreePO extends BaseEntity {
|
||||
@TableField(value = "code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 根据type自定义内容,type:0用于区分对象类型是101电网侧 102用户侧
|
||||
*/
|
||||
private String extend;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
package com.njcn.system.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DicVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("Id")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("父节点")
|
||||
private String pid;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("编码")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("子级")
|
||||
List<DicVO> children;
|
||||
}
|
||||
//package com.njcn.system.pojo.vo;
|
||||
//
|
||||
//import io.swagger.annotations.ApiModelProperty;
|
||||
//import lombok.Data;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//import java.util.List;
|
||||
//
|
||||
//@Data
|
||||
//public class DicVO implements Serializable {
|
||||
//
|
||||
// @ApiModelProperty("Id")
|
||||
// private String id;
|
||||
//
|
||||
// @ApiModelProperty("父节点")
|
||||
// private String pid;
|
||||
//
|
||||
// @ApiModelProperty("名称")
|
||||
// private String name;
|
||||
//
|
||||
// @ApiModelProperty("编码")
|
||||
// private String code;
|
||||
//
|
||||
// @ApiModelProperty("排序")
|
||||
// private Integer sort;
|
||||
//
|
||||
// @ApiModelProperty("描述")
|
||||
// private String remark;
|
||||
//
|
||||
// @ApiModelProperty("状态")
|
||||
// private Integer status;
|
||||
//
|
||||
// @ApiModelProperty("子级")
|
||||
// List<DicVO> children;
|
||||
//}
|
||||
|
||||
@@ -42,6 +42,16 @@ public class DictTreeVO implements Serializable {
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 根据type自定义内容,type:0用于区分对象类型是101电网侧 102用户侧
|
||||
*/
|
||||
private String extend;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user