树形字典
This commit is contained in:
@@ -51,7 +51,7 @@ public class DictDataController extends BaseController {
|
|||||||
public HttpResult<Page<DictData>> listByTypeId(@RequestBody @Validated DictDataParam.DicTypeIdQueryParam queryParam) {
|
public HttpResult<Page<DictData>> listByTypeId(@RequestBody @Validated DictDataParam.DicTypeIdQueryParam queryParam) {
|
||||||
String methodDescribe = getMethodDescribe("listByTypeId");
|
String methodDescribe = getMethodDescribe("listByTypeId");
|
||||||
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam);
|
LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam);
|
||||||
Page<DictData> result = dictDataService.getTypeIdData(queryParam);
|
Page<DictData> result = dictDataService.getDictDataByTypeId(queryParam);
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,183 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
|
||||||
|
import com.njcn.common.utils.LogUtil;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.param.DictTreeParam;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.vo.DictTreeVO;
|
||||||
|
import com.njcn.gather.system.dictionary.service.IDictTreeService;
|
||||||
|
import com.njcn.web.utils.HttpResultUtil;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author hongawen
|
||||||
|
* @since 2021-12-13
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "字典树操作")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dictTree")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class DictTreeController extends BaseController {
|
||||||
|
|
||||||
|
private final IDictTreeService dictTreeService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ApiOperation("新增字典树数据")
|
||||||
|
@ApiImplicitParam(name = "dictTreeParam", value = "字典数据", required = true)
|
||||||
|
public HttpResult<Object> add(@RequestBody @Validated DictTreeParam dictTreeParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("add");
|
||||||
|
LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, dictTreeParam);
|
||||||
|
boolean result = dictTreeService.addDictTree(dictTreeParam);
|
||||||
|
if (result) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
* @param dicParam 修改参数
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.UPDATE)
|
||||||
|
@PutMapping("/update")
|
||||||
|
@ApiOperation("修改")
|
||||||
|
@ApiImplicitParam(name = "dicParam", value = "数据", required = true)
|
||||||
|
public HttpResult<Boolean> update(@RequestBody @Validated DictTreeParam.DictTreeUpdateParam dicParam) {
|
||||||
|
String methodDescribe = getMethodDescribe("update");
|
||||||
|
LogUtil.njcnDebug(log, "{},更新的信息为:{}", methodDescribe,dicParam);
|
||||||
|
boolean result = dictTreeService.updateDictTree(dicParam);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
* @param id id
|
||||||
|
*/
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.DELETE)
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||||
|
public HttpResult<Boolean> delete(@RequestParam @Validated String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("delete");
|
||||||
|
LogUtil.njcnDebug(log, "{},删除的id为:{}", methodDescribe,id);
|
||||||
|
boolean result = dictTreeService.deleteDictTree(id);
|
||||||
|
if (result){
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
||||||
|
} else {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, false, methodDescribe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/query")
|
||||||
|
@ApiOperation("根据pid查询字典树")
|
||||||
|
public HttpResult<List<DictTreeVO>> query(@RequestParam("pid") String pid) {
|
||||||
|
String methodDescribe = getMethodDescribe("query");
|
||||||
|
LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, pid);
|
||||||
|
List<DictTreeVO> result = dictTreeService.queryByPid(pid);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/queryByCodeList")
|
||||||
|
@ApiOperation("根据Code查询字典树")
|
||||||
|
public HttpResult<List<DictTree>> queryByCodeList(@RequestParam("code") String code) {
|
||||||
|
String methodDescribe = getMethodDescribe("queryByCodeList");
|
||||||
|
List<DictTree> result = dictTreeService.queryByCodeList(code);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/queryByCode")
|
||||||
|
@ApiOperation("根据Code查询字典树")
|
||||||
|
public HttpResult<DictTreeVO> queryByCode(@RequestParam("code") String code) {
|
||||||
|
String methodDescribe = getMethodDescribe("queryByCode");
|
||||||
|
LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, code);
|
||||||
|
DictTreeVO result = dictTreeService.queryByCode(code);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/queryByid")
|
||||||
|
@ApiOperation("根据id查询字典树最底层")
|
||||||
|
public HttpResult<List<DictTreeVO>> queryLastLevelById(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("queryLastLevelById");
|
||||||
|
LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, id);
|
||||||
|
List<DictTreeVO> result = dictTreeService.queryLastLevelById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@PostMapping("/queryById")
|
||||||
|
@ApiOperation("根据id查询数据")
|
||||||
|
public HttpResult<DictTree> queryById(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("queryById");
|
||||||
|
LogUtil.njcnDebug(log, "{},字典数据为:{}", methodDescribe, id);
|
||||||
|
DictTree result = dictTreeService.queryById(id);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@GetMapping("/queryAll")
|
||||||
|
@ApiOperation("查询所有树形字典")
|
||||||
|
public HttpResult<List<DictTree>> queryAll() {
|
||||||
|
String methodDescribe = getMethodDescribe("queryAll");
|
||||||
|
List<DictTree> result = dictTreeService.queryAll();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@GetMapping("/queryAllByType")
|
||||||
|
@ApiOperation("分类查询所有树形字典")
|
||||||
|
public HttpResult<List<DictTree>> queryAllByType(@RequestParam("type")Integer type) {
|
||||||
|
String methodDescribe = getMethodDescribe("queryAll");
|
||||||
|
List<DictTree> result = dictTreeService.queryAllByType(type);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||||
|
@GetMapping("/queryTree")
|
||||||
|
@ApiOperation("树形字典树结构展示")
|
||||||
|
public HttpResult<List<DictTree>> queryTree() {
|
||||||
|
String methodDescribe = getMethodDescribe("queryTree");
|
||||||
|
List<DictTree> result = dictTreeService.queryTree();
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.vo.DictTreeVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
public interface DictTreeMapper extends BaseMapper<DictTree> {
|
||||||
|
List<DictTreeVO> queryLastLevelById(@Param("id") String id);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.njcn.gather.system.dictionary.mapper.DictTreeMapper">
|
||||||
|
<select id="queryLastLevelById" resultType="com.njcn.gather.system.dictionary.pojo.vo.DictTreeVO">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
sys_dict_tree a
|
||||||
|
WHERE
|
||||||
|
a.pids LIKE concat('%',#{id},'%')
|
||||||
|
AND NOT EXISTS (
|
||||||
|
SELECT
|
||||||
|
1
|
||||||
|
FROM
|
||||||
|
sys_dict_tree b
|
||||||
|
WHERE
|
||||||
|
b.pids LIKE concat('%',#{id},'%') and a.id = b.pid)
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.pojo.param;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.njcn.common.pojo.constant.PatternRegex;
|
||||||
|
import com.njcn.gather.system.pojo.constant.SystemValidMessage;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DictTreeParam {
|
||||||
|
/**
|
||||||
|
* 父id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "父id")
|
||||||
|
private String pid;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
@NotBlank(message = SystemValidMessage.NAME_NOT_BLANK)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@TableField(value = "编码")
|
||||||
|
@NotBlank(message = SystemValidMessage.CODE_NOT_BLANK)
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据type自定义内容,type:0用于区分对象类型是101电网侧 102用户侧
|
||||||
|
*/
|
||||||
|
private String extend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新操作实体
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public static class DictTreeUpdateParam extends DictTreeParam {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("id")
|
||||||
|
@NotBlank(message = SystemValidMessage.ID_NOT_BLANK)
|
||||||
|
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = SystemValidMessage.ID_FORMAT_ERROR)
|
||||||
|
private String id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.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.mybatisplus.bo.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName(value = "sys_dict_tree")
|
||||||
|
public class DictTree extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父id
|
||||||
|
*/
|
||||||
|
@TableField(value = "pid")
|
||||||
|
private String pid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父ids
|
||||||
|
*/
|
||||||
|
@TableField(value = "pids")
|
||||||
|
private String pids;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@TableField(value = "name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@TableField(value = "code")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据type自定义内容,type:0用于区分对象类型是101电网侧 102用户侧
|
||||||
|
*/
|
||||||
|
private String extend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@TableField(value = "sort")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@TableField(value = "remark")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(字典 0正常 1停用 2删除)
|
||||||
|
*/
|
||||||
|
@TableField(value = "state")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子类
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<DictTree> children;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer level;
|
||||||
|
}
|
||||||
@@ -47,7 +47,7 @@ public class DictDataExcel implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 事件等级:0-普通;1-中等;2-严重(默认为0)
|
* 事件等级:0-普通;1-中等;2-严重(默认为0)
|
||||||
*/
|
*/
|
||||||
@Excel(name = "事件等级", width = 15)
|
@Excel(name = "事件等级", width = 15, replace = {"0", "普通", "1", "中等", "2", "严重"})
|
||||||
private Integer level;
|
private Integer level;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -61,34 +61,4 @@ public class DictDataExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "数值", width = 15)
|
@Excel(name = "数值", width = 15)
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态:0-删除 1-正常
|
|
||||||
*/
|
|
||||||
// @Excel(name = "状态", width = 15)
|
|
||||||
// private Integer state;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建人
|
|
||||||
*/
|
|
||||||
@Excel(name = "创建人", width = 40)
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss", width = 25)
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新人
|
|
||||||
*/
|
|
||||||
@Excel(name = "更新人", width = 40)
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
@Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss", width = 25)
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.pojo.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DictTreeVO implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父id
|
||||||
|
*/
|
||||||
|
private String pid;
|
||||||
|
/**
|
||||||
|
* 父类名称
|
||||||
|
*/
|
||||||
|
private String pname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用于区分多种类型的字典树 0.台账对象类型 1.自定义报表指标类型
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据type自定义内容,type:0用于区分对象类型是101电网侧 102用户侧
|
||||||
|
*/
|
||||||
|
private String extend;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(字典 0正常 1停用 2删除)
|
||||||
|
*/
|
||||||
|
private String state;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -42,13 +42,13 @@ public class DictTypeExcel implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 开启等级:0-不开启;1-开启,默认不开启
|
* 开启等级:0-不开启;1-开启,默认不开启
|
||||||
*/
|
*/
|
||||||
@Excel(name = "开启等级", width = 15)
|
@Excel(name = "开启等级", width = 15, replace = {"0", "不开启", "1", "开启"})
|
||||||
private Integer openLevel;
|
private Integer openLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启描述:0-不开启;1-开启,默认不开启
|
* 开启描述:0-不开启;1-开启,默认不开启
|
||||||
*/
|
*/
|
||||||
@Excel(name = "开启描述", width = 15)
|
@Excel(name = "开启描述", width = 15, replace = {"0", "不开启", "1", "开启"})
|
||||||
private Integer openDescribe;
|
private Integer openDescribe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -56,34 +56,4 @@ public class DictTypeExcel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@Excel(name = "描述", width = 50)
|
@Excel(name = "描述", width = 50)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/**
|
|
||||||
* 状态:0-删除 1-正常
|
|
||||||
*/
|
|
||||||
// @Excel(name = "状态", width = 15)
|
|
||||||
// private Integer state;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建人
|
|
||||||
*/
|
|
||||||
@Excel(name = "创建人", width = 40)
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@Excel(name = "创建时间", format = "yyyy-MM-dd HH:mm:ss", width = 25)
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新人
|
|
||||||
*/
|
|
||||||
@Excel(name = "更新人", width = 40)
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
@Excel(name = "更新时间", format = "yyyy-MM-dd HH:mm:ss", width = 25)
|
|
||||||
private LocalDateTime updateTime;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public interface IDictDataService extends IService<DictData> {
|
|||||||
* @param queryParam 查询参数
|
* @param queryParam 查询参数
|
||||||
* @return 操作结果
|
* @return 操作结果
|
||||||
*/
|
*/
|
||||||
Page<DictData> getTypeIdData(DictDataParam.DicTypeIdQueryParam queryParam);
|
Page<DictData> getDictDataByTypeId(DictDataParam.DicTypeIdQueryParam queryParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据字典
|
* 新增数据字典
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.service;
|
||||||
|
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.param.DictTreeParam;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.vo.DictTreeVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
public interface IDictTreeService extends IService<DictTree> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化缓存设备树
|
||||||
|
*/
|
||||||
|
//void refreshDictTreeCache();
|
||||||
|
|
||||||
|
boolean addDictTree(DictTreeParam dictTreeParam);
|
||||||
|
|
||||||
|
boolean updateDictTree(DictTreeParam dictTreeParam);
|
||||||
|
|
||||||
|
boolean deleteDictTree(String id);
|
||||||
|
|
||||||
|
List<DictTreeVO> queryByPid(String pid);
|
||||||
|
|
||||||
|
DictTreeVO queryByCode(String code);
|
||||||
|
|
||||||
|
List<DictTreeVO> queryLastLevelById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询字典数据
|
||||||
|
*
|
||||||
|
* @param id id
|
||||||
|
*/
|
||||||
|
DictTree queryById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有树形字典
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/12/18
|
||||||
|
*/
|
||||||
|
List<DictTree> queryAll();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类查询所有树形字典
|
||||||
|
*
|
||||||
|
* @author cdf
|
||||||
|
* @date 2023/12/18
|
||||||
|
*/
|
||||||
|
List<DictTree> queryAllByType(Integer type);
|
||||||
|
|
||||||
|
List<DictTree> queryTree();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code查询自动树
|
||||||
|
*
|
||||||
|
* @param code code
|
||||||
|
*/
|
||||||
|
List<DictTree> queryByCodeList(String code);
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ import java.util.stream.Collectors;
|
|||||||
public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> implements IDictDataService {
|
public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> implements IDictDataService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<DictData> getTypeIdData(DictDataParam.DicTypeIdQueryParam queryParam) {
|
public Page<DictData> getDictDataByTypeId(DictDataParam.DicTypeIdQueryParam queryParam) {
|
||||||
QueryWrapper<DictData> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<DictData> queryWrapper = new QueryWrapper<>();
|
||||||
if (ObjectUtil.isNotNull(queryParam)) {
|
if (ObjectUtil.isNotNull(queryParam)) {
|
||||||
queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_data.name", queryParam.getName())
|
queryWrapper.like(StrUtil.isNotBlank(queryParam.getName()), "sys_dict_data.name", queryParam.getName())
|
||||||
@@ -52,7 +52,7 @@ public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> i
|
|||||||
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
||||||
} else {
|
} else {
|
||||||
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
||||||
queryWrapper.orderBy(true, true, "sys_dict_data.sort");
|
queryWrapper.orderBy(true, true, "sys_dict_data.sort").orderByDesc("sys_dict_data.update_time");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryWrapper.ne("sys_dict_data.state", DataStateEnum.DELETED.getCode())
|
queryWrapper.ne("sys_dict_data.state", DataStateEnum.DELETED.getCode())
|
||||||
@@ -148,7 +148,7 @@ public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> i
|
|||||||
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
||||||
} else {
|
} else {
|
||||||
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
||||||
queryWrapper.orderBy(true, true, "sys_dict_data.sort");
|
queryWrapper.orderBy(true, true, "sys_dict_data.sort").orderByDesc("sys_dict_data.update_time");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryWrapper.ne("sys_dict_data.state", DataStateEnum.DELETED.getCode())
|
queryWrapper.ne("sys_dict_data.state", DataStateEnum.DELETED.getCode())
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class DictPqServiceImpl extends ServiceImpl<DictPqMapper, DictPq> impleme
|
|||||||
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
||||||
} else {
|
} else {
|
||||||
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
||||||
queryWrapper.orderBy(true, true, "sys_dict_pq.sort");
|
queryWrapper.orderBy(true, true, "sys_dict_pq.sort").orderByDesc("sys_dict_pq.update_time");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryWrapper.ne("sys_dict_pq.state", DataStateEnum.DELETED.getCode());
|
queryWrapper.ne("sys_dict_pq.state", DataStateEnum.DELETED.getCode());
|
||||||
|
|||||||
@@ -0,0 +1,176 @@
|
|||||||
|
package com.njcn.gather.system.dictionary.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.text.StrPool;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njcn.gather.system.dictionary.mapper.DictTreeMapper;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.param.DictTreeParam;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||||
|
import com.njcn.gather.system.dictionary.pojo.vo.DictTreeVO;
|
||||||
|
import com.njcn.gather.system.dictionary.service.IDictTreeService;
|
||||||
|
import com.njcn.gather.system.pojo.constant.DictState;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class DictTreeServiceImpl extends ServiceImpl<DictTreeMapper, DictTree> implements IDictTreeService {
|
||||||
|
|
||||||
|
//private final RedisUtil redisUtil;
|
||||||
|
|
||||||
|
// @Override
|
||||||
|
// public void refreshDictTreeCache () {
|
||||||
|
// LambdaQueryWrapper<DictTree> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
// queryWrapper.eq(DictTree::getState, DictState.ENABLE);
|
||||||
|
// List<DictTree> list = this.list(queryWrapper);
|
||||||
|
// redisUtil.saveByKey(AppRedisKey.DICT_TREE, list);
|
||||||
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = {Exception.class})
|
||||||
|
public boolean addDictTree(DictTreeParam dictTreeParam) {
|
||||||
|
boolean result;
|
||||||
|
DictTree dictTree = new DictTree();
|
||||||
|
BeanUtils.copyProperties(dictTreeParam, dictTree);
|
||||||
|
if (!Objects.equals(dictTree.getPid(), DictState.PARENT_ID)) {
|
||||||
|
QueryWrapper<DictTree> queryWrapper = new QueryWrapper<>();
|
||||||
|
|
||||||
|
queryWrapper.eq("id", dictTree.getPid());
|
||||||
|
DictTree instance = this.baseMapper.selectOne(queryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
dictTree.setPids(instance.getPids() + StrPool.COMMA + instance.getId());
|
||||||
|
|
||||||
|
} else {
|
||||||
|
dictTree.setPids(DictState.PARENT_ID);
|
||||||
|
}
|
||||||
|
dictTree.setState(DictState.ENABLE);
|
||||||
|
result = this.save(dictTree);
|
||||||
|
// if (result) {
|
||||||
|
// refreshDictTreeCache();
|
||||||
|
// }
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateDictTree(DictTreeParam dictTreeParam) {
|
||||||
|
boolean result;
|
||||||
|
DictTree dictTree = new DictTree();
|
||||||
|
BeanUtils.copyProperties(dictTreeParam, dictTree);
|
||||||
|
result = this.updateById(dictTree);
|
||||||
|
// if (result) {
|
||||||
|
// refreshDictTreeCache();
|
||||||
|
// }
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteDictTree(String id) {
|
||||||
|
boolean result = this.lambdaUpdate().set(DictTree::getState, DictState.DELETE).in(DictTree::getId, id).update();
|
||||||
|
// if (result) {
|
||||||
|
// refreshDictTreeCache();
|
||||||
|
// }
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DictTreeVO> queryByPid(String pid) {
|
||||||
|
List<DictTreeVO> collect = new ArrayList<>();
|
||||||
|
LambdaQueryWrapper<DictTree> query = new LambdaQueryWrapper<>();
|
||||||
|
query.eq(DictTree::getPid, pid).eq(DictTree::getState, DictState.ENABLE).orderByDesc(DictTree::getSort);
|
||||||
|
List<DictTree> resultList = this.list(query);
|
||||||
|
|
||||||
|
DictTree byId = this.getById(pid);
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(resultList)) {
|
||||||
|
collect = resultList.stream().map(temp -> {
|
||||||
|
DictTreeVO resultVO = new DictTreeVO();
|
||||||
|
BeanUtils.copyProperties(temp, resultVO);
|
||||||
|
resultVO.setPname(Objects.nonNull(byId) ? byId.getName() : "最高级");
|
||||||
|
return resultVO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return collect;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DictTreeVO queryByCode(String code) {
|
||||||
|
LambdaQueryWrapper<DictTree> query = new LambdaQueryWrapper<>();
|
||||||
|
query.clear();
|
||||||
|
query.eq(DictTree::getCode, code).eq(DictTree::getState, DictState.ENABLE);
|
||||||
|
DictTree result = this.getOne(query);
|
||||||
|
|
||||||
|
if (result != null) {
|
||||||
|
DictTreeVO resultVO = new DictTreeVO();
|
||||||
|
BeanUtils.copyProperties(result, resultVO);
|
||||||
|
return resultVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DictTreeVO> queryLastLevelById(String id) {
|
||||||
|
return this.baseMapper.queryLastLevelById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DictTree queryById(String id) {
|
||||||
|
return this.lambdaQuery().eq(DictTree::getId, id).eq(DictTree::getState, DictState.ENABLE).one();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DictTree> queryAll() {
|
||||||
|
LambdaQueryWrapper<DictTree> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(DictTree::getState, DictState.ENABLE);
|
||||||
|
return this.list(lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DictTree> queryAllByType(Integer type) {
|
||||||
|
LambdaQueryWrapper<DictTree> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(DictTree::getState, DictState.ENABLE).eq(DictTree::getType, type);
|
||||||
|
return this.list(lambdaQueryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DictTree> queryTree() {
|
||||||
|
LambdaQueryWrapper<DictTree> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(DictTree::getState, DictState.ENABLE);
|
||||||
|
List<DictTree> dictTreeList = this.list(lambdaQueryWrapper);
|
||||||
|
return dictTreeList.stream().filter(item -> DictState.PARENT_ID.equals(item.getPid())).peek(item -> {
|
||||||
|
item.setLevel(0);
|
||||||
|
item.setChildren(getChildren(item, dictTreeList));
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DictTree> queryByCodeList(String code) {
|
||||||
|
List<DictTree> sysDicTreePOList = this.list(new LambdaQueryWrapper<DictTree>().eq(DictTree::getState, 0));
|
||||||
|
return sysDicTreePOList.stream().filter(item -> item.getCode().equals(code)).peek(item -> {
|
||||||
|
item.setLevel(0);
|
||||||
|
item.setChildren(getChildren(item, sysDicTreePOList));
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<DictTree> getChildren(DictTree dictTree, List<DictTree> all) {
|
||||||
|
return all.stream().filter(item -> item.getPid().equals(dictTree.getId())).peek(item -> {
|
||||||
|
item.setLevel(dictTree.getLevel() + 1);
|
||||||
|
item.setChildren(getChildren(item, all));
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -42,7 +42,7 @@ public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> i
|
|||||||
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
||||||
} else {
|
} else {
|
||||||
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
||||||
queryWrapper.orderBy(true, true, "sys_dict_type.sort");
|
queryWrapper.orderBy(true, true, "sys_dict_type.sort").orderByDesc("sys_dict_type.update_time");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryWrapper.ne("sys_dict_type.state", DataStateEnum.DELETED.getCode());
|
queryWrapper.ne("sys_dict_type.state", DataStateEnum.DELETED.getCode());
|
||||||
@@ -86,7 +86,7 @@ public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> i
|
|||||||
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
queryWrapper.orderBy(true, queryParam.getOrderBy().equals(DbConstant.ASC), StrUtil.toUnderlineCase(queryParam.getSortBy()));
|
||||||
} else {
|
} else {
|
||||||
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
//没有排序参数,默认根据sort字段排序,没有排序字段的,根据updateTime更新时间排序
|
||||||
queryWrapper.orderBy(true, true, "sys_dict_type.sort");
|
queryWrapper.orderBy(true, true, "sys_dict_type.sort").orderByDesc("sys_dict_type.update_time");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
queryWrapper.ne("sys_dict_type.state", DataStateEnum.DELETED.getCode());
|
queryWrapper.ne("sys_dict_type.state", DataStateEnum.DELETED.getCode());
|
||||||
|
|||||||
@@ -59,10 +59,11 @@ public class MenuController {
|
|||||||
MenuVO menuVO3 = getMenuVORedirect("/system","system","/system/base","Tools","系统配置");
|
MenuVO menuVO3 = getMenuVORedirect("/system","system","/system/base","Tools","系统配置");
|
||||||
MenuVO menuVO31 = getMenuVO("/system/base","base","/system/base/index","UserFilled","通用配置");
|
MenuVO menuVO31 = getMenuVO("/system/base","base","/system/base/index","UserFilled","通用配置");
|
||||||
MenuVO menuVO32 = getMenuVO("/system/dict","dict","/system/dictionary/dictType/index","DataAnalysis","数据字典");
|
MenuVO menuVO32 = getMenuVO("/system/dict","dict","/system/dictionary/dictType/index","DataAnalysis","数据字典");
|
||||||
MenuVO menuVO33 = getMenuVO("/system/template","template","/system/template/index","Memo","报告模板");
|
MenuVO menuVO33 = getMenuVO("/system/dictTree","dictTree","/system/dictionary/dictTree/index","DataAnalysis","树形字典");
|
||||||
MenuVO menuVO34 = getMenuVO("/system/versionRegister","versionRegister","/system/versionRegister/index","SetUp","版本注册");
|
MenuVO menuVO34 = getMenuVO("/system/dictPq","dictPq","/system/dictionary/dictPq/index","DataAnalysis","电能质量字典");
|
||||||
MenuVO menuVO35 = getMenuVO("/system/dictPq","dictPq","/system/dictionary/dictPq/index","DataAnalysis","电能质量字典");
|
MenuVO menuVO35 = getMenuVO("/system/template","template","/system/template/index","Memo","报告模板");
|
||||||
menuVO3.setChildren(CollectionUtil.toList(menuVO31,menuVO32,menuVO33,menuVO34,menuVO35));
|
MenuVO menuVO36 = getMenuVO("/system/versionRegister","versionRegister","/system/versionRegister/index","SetUp","版本注册");
|
||||||
|
menuVO3.setChildren(CollectionUtil.toList(menuVO31,menuVO32,menuVO33,menuVO34,menuVO35,menuVO36));
|
||||||
menuVOList.add(menuVO3);
|
menuVOList.add(menuVO3);
|
||||||
|
|
||||||
MenuVO menuVO4 = getMenuVO("/log","log","/log/index","TrendCharts","日志管理");
|
MenuVO menuVO4 = getMenuVO("/log","log","/log/index","TrendCharts","日志管理");
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.njcn.gather.system.pojo.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @data 2024/11/8
|
||||||
|
*/
|
||||||
|
public interface DictState {
|
||||||
|
/**
|
||||||
|
* 状态 0-正常;1-停用;2-删除 默认正常
|
||||||
|
*/
|
||||||
|
int ENABLE = 0;
|
||||||
|
|
||||||
|
int PAUSE = 1;
|
||||||
|
|
||||||
|
int DELETE = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶层父类的pid
|
||||||
|
*/
|
||||||
|
String PARENT_ID = "0";
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@ public interface SystemValidMessage {
|
|||||||
String INDUSTRY_FORMAT_ERROR = "行业格式错误,请检查industry参数";
|
String INDUSTRY_FORMAT_ERROR = "行业格式错误,请检查industry参数";
|
||||||
String ADDR_NOT_BLANK = "所属区域不能为空,请检查addr参数";
|
String ADDR_NOT_BLANK = "所属区域不能为空,请检查addr参数";
|
||||||
|
|
||||||
String CODE_NOT_BLANK = "编号不能为空,请检查code参数";
|
String CODE_NOT_BLANK = "编码不能为空,请检查code参数";
|
||||||
|
|
||||||
String CODE_FORMAT_ERROR = "编号格式错误,请检查code参数";
|
String CODE_FORMAT_ERROR = "编号格式错误,请检查code参数";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.njcn.gather;
|
|
||||||
|
|
||||||
public class Main {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println("Hello world!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.njcn.gather.user.user.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.gather.user.user.pojo.po.SysUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author caozehui
|
||||||
|
* @since 2024-11-08
|
||||||
|
*/
|
||||||
|
public interface ISysUserService extends IService<SysUser> {
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user