commit 9e8662efc0c9dab35cb9da111acba76757eedd32
Author: chendaofei <857448963@qq.com>
Date: Thu Sep 25 09:45:47 2025 +0800
Initial commit
diff --git a/cn-auth/.gitignore b/cn-auth/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/cn-auth/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/cn-auth/pom.xml b/cn-auth/pom.xml
new file mode 100644
index 0000000..3674c70
--- /dev/null
+++ b/cn-auth/pom.xml
@@ -0,0 +1,68 @@
+
+
+ 4.0.0
+
+ com.njcn.product
+ CN_Product
+ 1.0.0
+
+
+ cn-auth
+ 1.0.0
+ cn-auth
+ cn-auth
+
+
+
+ com.njcn
+ njcn-common
+ 0.0.1
+
+
+
+ com.njcn
+ mybatis-plus
+ 0.0.1
+
+
+
+ com.njcn
+ spingboot2.3.12
+ 2.3.12
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+ com.google.guava
+ guava
+ 32.1.3-jre
+
+
+
+
+ io.jsonwebtoken
+ jjwt-api
+ 0.11.5
+
+
+ io.jsonwebtoken
+ jjwt-impl
+ 0.11.5
+ runtime
+
+
+ io.jsonwebtoken
+ jjwt-jackson
+ 0.11.5
+ runtime
+
+
+
+
+
+
diff --git a/cn-auth/src/main/java/com/njcn/product/security/AuthController.java b/cn-auth/src/main/java/com/njcn/product/security/AuthController.java
new file mode 100644
index 0000000..8835467
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/AuthController.java
@@ -0,0 +1,91 @@
+package com.njcn.product.security;
+
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.response.HttpResult;
+import com.njcn.web.controller.BaseController;
+import com.njcn.web.utils.HttpResultUtil;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.constraints.NotBlank;
+
+@RestController
+@Slf4j
+@RequiredArgsConstructor
+public class AuthController extends BaseController {
+
+
+ private final AuthenticationManager authenticationManager;
+
+
+ private final JwtUtil jwtUtil;
+
+
+
+
+
+
+ @PostMapping("/cn_authenticate")
+ @ApiOperation("登录认证")
+ public HttpResult createAuthenticationToken(@RequestBody @Validated AuthRequest authRequest) {
+ String methodDescribe = getMethodDescribe("createAuthenticationToken");
+ //log.info("Authentication request - username: {}, password: {}",authRequest.getUsername(),authRequest.getPassword());
+ try {
+
+ // 执行认证,内部会调用 UserDetailsService 加载用户信息
+ Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(authRequest.getUsername(),authRequest.getPassword()));
+
+ // 将认证信息存入 SecurityContext
+ SecurityContextHolder.getContext().setAuthentication(authentication);
+
+ // 直接从 Authentication 对象中获取已加载的 UserDetails,避免重复查询
+ MyUserDetails userDetails = (MyUserDetails) authentication.getPrincipal();
+
+ // 获取用户部门(假设 CustomUserDetails 包含部门信息)
+ String department = userDetails.getDeptId();
+
+ final String jwt = jwtUtil.generateToken(userDetails);
+
+ AuthResponse authResponse = new AuthResponse();
+ authResponse.setToken(jwt);
+ authResponse.setDeptId(department);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, authResponse, methodDescribe);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.FAIL, null, methodDescribe);
+ }
+ }
+}
+
+// 认证请求类
+class AuthRequest {
+
+ @NotBlank(message = "用户名不可为空")
+ private String username;
+ private String password;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
diff --git a/cn-auth/src/main/java/com/njcn/product/security/AuthResponse.java b/cn-auth/src/main/java/com/njcn/product/security/AuthResponse.java
new file mode 100644
index 0000000..e31be96
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/AuthResponse.java
@@ -0,0 +1,20 @@
+package com.njcn.product.security;
+
+import lombok.Data;
+
+/**
+ * @Author: cdf
+ * @CreateTime: 2025-06-26
+ * @Description:
+ */
+@Data
+public class AuthResponse {
+
+ private String token;
+
+ private String deptId;
+
+ private String roleId;
+
+ private String userIndex;
+}
diff --git a/cn-auth/src/main/java/com/njcn/product/security/JwtRequestFilter.java b/cn-auth/src/main/java/com/njcn/product/security/JwtRequestFilter.java
new file mode 100644
index 0000000..c580c58
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/JwtRequestFilter.java
@@ -0,0 +1,81 @@
+package com.njcn.product.security;
+
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.json.JSONObject;
+import com.njcn.common.pojo.enums.response.CommonResponseEnum;
+import com.njcn.common.pojo.response.HttpResult;
+import io.jsonwebtoken.ExpiredJwtException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
+import org.springframework.stereotype.Component;
+import org.springframework.web.filter.OncePerRequestFilter;
+
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@Component
+@Slf4j
+public class JwtRequestFilter extends OncePerRequestFilter {
+
+ private final UserDetailsService userDetailsService;
+ private final JwtUtil jwtUtil;
+
+ public JwtRequestFilter(UserDetailsService userDetailsService, JwtUtil jwtUtil) {
+ this.userDetailsService = userDetailsService;
+ this.jwtUtil = jwtUtil;
+ }
+
+ @Override
+ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
+ throws ServletException, IOException {
+
+ final String authorizationHeader = request.getHeader("Authorization");
+ String username = null;
+ String jwt = null;
+ if (authorizationHeader != null && authorizationHeader.startsWith("Bearer ")) {
+ jwt = authorizationHeader.substring(7);
+ try {
+ username = jwtUtil.extractUsername(jwt);
+ } catch (ExpiredJwtException e) {
+ log.error(e.getMessage());
+ sendErrorResponse(response,CommonResponseEnum.TOKEN_EXPIRE_JWT);
+ return;
+ } catch (Exception e) {
+ log.error(e.getMessage());
+ sendErrorResponse(response,CommonResponseEnum.PARSE_TOKEN_ERROR);
+ return;
+ }
+ }
+
+ if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {
+ UserDetails userDetails = this.userDetailsService.loadUserByUsername(username);
+
+ if (jwtUtil.validateToken(jwt, userDetails)) {
+ UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken =
+ new UsernamePasswordAuthenticationToken(
+ userDetails, null, userDetails.getAuthorities());
+ usernamePasswordAuthenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+ SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
+ }
+ }
+ chain.doFilter(request, response);
+ }
+
+ private void sendErrorResponse(HttpServletResponse response, CommonResponseEnum error) throws IOException {
+ response.setStatus(HttpServletResponse.SC_OK);
+ response.setContentType("application/json;charset=UTF-8");
+
+ HttpResult httpResult = new HttpResult<>();
+ httpResult.setCode(error.getCode());
+ httpResult.setMessage(error.getMessage());
+
+ response.getWriter().write(new JSONObject(httpResult, false).toString());
+ }
+}
diff --git a/cn-auth/src/main/java/com/njcn/product/security/JwtUtil.java b/cn-auth/src/main/java/com/njcn/product/security/JwtUtil.java
new file mode 100644
index 0000000..f303f13
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/JwtUtil.java
@@ -0,0 +1,85 @@
+package com.njcn.product.security;
+
+
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import io.jsonwebtoken.security.Keys;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.stereotype.Component;
+
+import java.security.Key;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Function;
+
+@Component
+public class JwtUtil {
+
+ private final String userId = "userId";
+ private final String userName = "userName";
+ private final String deptId = "deptId";
+
+
+ private static final Key SECRET_KEY = Keys.secretKeyFor(SignatureAlgorithm.HS256);
+ private static final long EXPIRATION_TIME = 1000 * 60 * 60 * 1000000000L; // 100000小时
+
+ // 生成JWT令牌
+ public String generateToken(MyUserDetails userDetails) {
+ Map claims = new HashMap<>();
+ claims.put(userId,userDetails.getUserId());
+ claims.put(userName,userDetails.getUsername());
+ claims.put(deptId,userDetails.getDeptId());
+ return createToken(claims, userDetails.getUsername());
+ }
+
+ private String createToken(Map claims, String subject) {
+ return Jwts.builder()
+ .setClaims(claims)
+ .setSubject(subject)
+ .setIssuedAt(new Date(System.currentTimeMillis()))
+ .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME))
+ .signWith(SECRET_KEY, SignatureAlgorithm.HS256)
+ .compact();
+ }
+
+ // 验证令牌
+ public Boolean validateToken(String token, UserDetails userDetails) {
+ final String username = extractUsername(token);
+ return (username.equals(userDetails.getUsername()) && !isTokenExpired(token));
+ }
+
+ // 提取用户名
+ public String extractUsername(String token) {
+ return extractClaim(token, it->it.get(userName).toString());
+ }
+
+ // 提取用户ID
+ public String extractUserId(String token) {
+ return extractClaim(token,it->it.get(userId).toString());
+ }
+
+ // 提取用户部门
+ public String extractDepartment(String token) {
+ return extractClaim(token, it->it.get(deptId).toString());
+ }
+
+ // 提取过期时间
+ public Date extractExpiration(String token) {
+ return extractClaim(token, Claims::getExpiration);
+ }
+
+ private T extractClaim(String token, Function claimsResolver) {
+ final Claims claims = extractAllClaims(token);
+ return claimsResolver.apply(claims);
+ }
+
+ private Claims extractAllClaims(String token) {
+ return Jwts.parser().setSigningKey(SECRET_KEY).parseClaimsJws(token).getBody();
+ }
+
+ private Boolean isTokenExpired(String token) {
+ return extractExpiration(token).before(new Date());
+ }
+}
diff --git a/cn-auth/src/main/java/com/njcn/product/security/MyUserDetails.java b/cn-auth/src/main/java/com/njcn/product/security/MyUserDetails.java
new file mode 100644
index 0000000..8cef63c
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/MyUserDetails.java
@@ -0,0 +1,64 @@
+package com.njcn.product.security;
+
+import lombok.Data;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.userdetails.UserDetails;
+
+import java.util.Collection;
+
+/**
+ * @Author: cdf
+ * @CreateTime: 2025-06-26
+ * @Description:
+ */
+@Data
+public class MyUserDetails implements UserDetails {
+
+ private String userId; // 用户唯一标识
+ private String username; // 用户名
+ private String password; // 密码
+ private String deptId; // 部门信息
+ private Collection extends GrantedAuthority> authorities; // 权限集合
+ private boolean accountNonExpired; // 账户是否未过期
+ private boolean accountNonLocked; // 账户是否未锁定
+ private boolean credentialsNonExpired; // 凭证是否未过期
+ private boolean enabled; // 账户是否启用
+
+ public MyUserDetails(String userId,String username, String password, String deptId,Collection extends GrantedAuthority> authorities) {
+ this.userId = userId;
+ this.username = username;
+ this.password = password;
+ this.deptId = deptId;
+ this.authorities = authorities;
+ }
+
+ @Override
+ public String getPassword() {
+ return this.password;
+ }
+
+ @Override
+ public String getUsername() {
+ return this.username;
+ }
+
+ @Override
+ public boolean isAccountNonExpired() {
+ return true;
+ }
+
+ @Override
+ public boolean isAccountNonLocked() {
+ return true;
+ }
+
+ @Override
+ public boolean isCredentialsNonExpired() {
+ return true;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/cn-auth/src/main/java/com/njcn/product/security/MyUserDetailsService.java b/cn-auth/src/main/java/com/njcn/product/security/MyUserDetailsService.java
new file mode 100644
index 0000000..99edb4a
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/MyUserDetailsService.java
@@ -0,0 +1,51 @@
+package com.njcn.product.security;
+
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+
+@Service
+@RequiredArgsConstructor
+public class MyUserDetailsService implements UserDetailsService {
+
+
+
+
+ @Override
+ public MyUserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
+
+
+ if("system_event".equals(username)){
+ return new MyUserDetails("12345678910","system_event", "@#001njcnpqs","10001",
+ new ArrayList<>());
+ }
+
+
+ // 这里应该从数据库中获取用户信息
+ PasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
+ String encodedPassword = passwordEncoder.encode("@#001njcnpqs");
+/*
+ LambdaQueryWrapper userWrapper = new LambdaQueryWrapper<>();
+ userWrapper.eq(PqsUser::getLoginname,username);
+ PqsUser pqsUser = pqsUserMapper.selectOne(userWrapper);
+ if(Objects.isNull(pqsUser)){
+ throw new UsernameNotFoundException("User not found with username: " + username);
+ }
+
+ LambdaQueryWrapper userSetWrapper = new LambdaQueryWrapper<>();
+ userSetWrapper.eq(PqsUserSet::getUserIndex,pqsUser.getUserIndex());
+ PqsUserSet pqsUserSet = pqsUserSetMapper.selectOne(userSetWrapper);
+ String deptId = pqsUserSet.getDeptsIndex();*/
+
+
+ return new MyUserDetails("12345678910","cdf", encodedPassword,"beac2cdb4acc4826d4519ea4177f3bfa",
+ new ArrayList<>());
+
+
+ }
+}
diff --git a/cn-auth/src/main/java/com/njcn/product/security/SecurityConfig.java b/cn-auth/src/main/java/com/njcn/product/security/SecurityConfig.java
new file mode 100644
index 0000000..0d7e220
--- /dev/null
+++ b/cn-auth/src/main/java/com/njcn/product/security/SecurityConfig.java
@@ -0,0 +1,58 @@
+package com.njcn.product.security;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.authentication.AuthenticationManager;
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+import javax.annotation.Resource;
+
+@Configuration
+@EnableWebSecurity
+public class SecurityConfig extends WebSecurityConfigurerAdapter {
+
+ @Resource
+ private UserDetailsService userDetailsService;
+
+ @Resource
+ private JwtRequestFilter jwtRequestFilter;
+
+ @Override
+ protected void configure(AuthenticationManagerBuilder auth) throws Exception {
+ auth.userDetailsService(userDetailsService).passwordEncoder(passwordEncoder());
+ }
+
+ @Override
+ protected void configure(HttpSecurity http) throws Exception {
+ http.csrf().disable()
+ .authorizeRequests()
+ //.antMatchers("/cn_authenticate","/ws/**","/accept/testEvent","/accept/eventMsg").permitAll() // 允许访问认证接口
+ .antMatchers("/**").permitAll() // 允许访问认证接口
+ .anyRequest().authenticated()
+ .and()
+ .sessionManagement()
+ .sessionCreationPolicy(SessionCreationPolicy.STATELESS); // 使用无状态会话
+
+ http.addFilterBefore(jwtRequestFilter, UsernamePasswordAuthenticationFilter.class);
+ }
+
+ @Bean
+ @Override
+ public AuthenticationManager authenticationManagerBean() throws Exception {
+ return super.authenticationManagerBean();
+ }
+
+ @Bean
+ public PasswordEncoder passwordEncoder() {
+ return new BCryptPasswordEncoder();
+ }
+}
diff --git a/cn-system/.gitignore b/cn-system/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/cn-system/.gitignore
@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
diff --git a/cn-system/pom.xml b/cn-system/pom.xml
new file mode 100644
index 0000000..5d6c73b
--- /dev/null
+++ b/cn-system/pom.xml
@@ -0,0 +1,55 @@
+
+
+ 4.0.0
+
+ com.njcn.product
+ CN_Product
+ 1.0.0
+
+
+ cn-system
+ 1.0.0
+ cn-system
+ cn-system
+
+
+
+
+
+ com.njcn
+ njcn-common
+ 0.0.1
+
+
+
+ com.njcn
+ mybatis-plus
+ 0.0.1
+
+
+
+ com.njcn
+ spingboot2.3.12
+ 2.3.12
+
+
+
+ com.njcn
+ common-oss
+ 1.0.0
+
+
+ com.njcn
+ common-web
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/controller/DicDataController.java b/cn-system/src/main/java/com/njcn/product/system/dict/controller/DicDataController.java
new file mode 100644
index 0000000..64c7bef
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/controller/DicDataController.java
@@ -0,0 +1,64 @@
+package com.njcn.product.system.dict.controller;
+
+import com.njcn.common.pojo.annotation.OperateInfo;
+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.HttpResultUtil;
+import com.njcn.common.utils.LogUtil;
+import com.njcn.product.system.dict.pojo.po.DictData;
+import com.njcn.product.system.dict.service.IDictDataService;
+import com.njcn.product.system.elequality.pojo.param.EleEpdPqdParam;
+import com.njcn.web.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+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 springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+
+/**
+ * @Author: cdf
+ * @CreateTime: 2025-09-18
+ * @Description:
+ */
+@Slf4j
+@RestController
+@RequestMapping("/dicData")
+@RequiredArgsConstructor
+@Api(tags = "数据字典")
+public class DicDataController extends BaseController {
+
+ private final IDictDataService iDictDataService;
+
+ @OperateInfo(info = LogEnum.SYSTEM_COMMON)
+ @GetMapping("/getDicDataByCodeAndType")
+ @ApiOperation("根据字典Code和字典类型查询字典数据")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "dicDataCode", value = "查询参数", required = true),
+ @ApiImplicitParam(name = "dicTypeCode", value = "查询参数", required = true)
+ })
+ public HttpResult getDicDataByCodeAndType(@RequestParam("dicDataCode") String dicCode, @RequestParam("dicTypeCode") String typeCode) {
+ String methodDescribe = getMethodDescribe("getDicDataByCodeAndType");
+ DictData result = iDictDataService.getDicDataByCodeAndType(dicCode,typeCode);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
+ }
+
+
+ @OperateInfo(info = LogEnum.SYSTEM_COMMON)
+ @GetMapping("/getDicDataByTypeCode")
+ @ApiOperation("根据字典类型code查询字典数据")
+ @ApiImplicitParam(name = "dictTypeCode", value = "查询参数", required = true)
+ public HttpResult> getDicDataByTypeCode(@RequestParam("dictTypeCode") String dictTypeCode) {
+ String methodDescribe = getMethodDescribe("getDicDataByTypeCode");
+ List result = iDictDataService.getDicDataByTypeCode(dictTypeCode);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
+ }
+
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/mapper/DictDataMapper.java b/cn-system/src/main/java/com/njcn/product/system/dict/mapper/DictDataMapper.java
new file mode 100644
index 0000000..dbabbd0
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/mapper/DictDataMapper.java
@@ -0,0 +1,40 @@
+package com.njcn.product.system.dict.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.njcn.product.system.dict.pojo.po.DictData;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ *
+ * Mapper 接口
+ *
+ *
+ * @author hongawen
+ * @since 2021-12-13
+ */
+public interface DictDataMapper extends BaseMapper {
+
+
+ /**
+ * 根据字典类型名称&数据名称获取字典数据
+ *
+ * @param dicTypeName 字典类型名称
+ * @param dicDataName 字典数据名称
+ * @return 字典数据
+ */
+ DictData getDicDataByNameAndTypeName(@Param("dicTypeName") String dicTypeName, @Param("dicDataName") String dicDataName);
+
+ /**
+ * @param dictTypeCode 字典类型名称
+ * @return 根据字典类型名称查询字典数据
+ */
+ List getDicDataByTypeCode(@Param("dictTypeCode") String dictTypeCode);
+
+ DictData getDicDataByCodeAndType(@Param("dicCode") String dicCode, @Param("typeCode") String typeCode);
+
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/mapper/mapping/DictDataMapper.xml b/cn-system/src/main/java/com/njcn/product/system/dict/mapper/mapping/DictDataMapper.xml
new file mode 100644
index 0000000..43e8863
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/mapper/mapping/DictDataMapper.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/DicDataEnum.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/DicDataEnum.java
new file mode 100644
index 0000000..b1de575
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/DicDataEnum.java
@@ -0,0 +1,684 @@
+package com.njcn.product.system.dict.pojo.enums;
+
+import lombok.Getter;
+
+/**
+ * 类的介绍:字典数据名称
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2021/8/5 21:56
+ */
+@Getter
+public enum DicDataEnum {
+
+ /**
+ * 数据中心稳态统计指标
+ */
+ PLPC_ENUM("频率偏差", "PLPC"),
+ DYPC_ENUM("电压偏差", "DYPC"),
+ SXDYBPHD_ENUM("负序电压不平衡度", "SXDYBPHD"),
+ XBDY_ENUM("谐波电压", "XBDY"),
+ CSSB_ENUM("长时闪变", "CSSB"),
+ XBDL_ENUM("谐波电流", "XBDL"),
+ FXDL_ENUM("负序电流", "FXDL"),
+ JXBDY_ENUM("间谐波电压", "JXBDY"),
+
+
+ /**
+ * 稳态统计指标
+ */
+ VOLTAGE_DEV("电压偏差", "Voltage_Dev"),
+ FLICKER("长时闪变", "Flicker"),
+ HARMONIC_VOLTAGE("谐波电压", "Harmonic_Voltage"),
+ HARMONIC_CURRENT("谐波电流", "Harmonic_Current"),
+ INTERHARMONIC_VOLTAGE("间谐波电压", "Interharmonic_Voltage"),
+ PHASE_VOLTAGE("负序电压不平衡度", "phase_Voltage"),
+ FREQUENCY_DEV("频率偏差", "Frequency_Dev"),
+ NEG_CURRENT("负序电流", "Neg_Current"),
+ THD_V("电压总谐波畸变率", "Thd_V"),
+ phase_Voltage("三相电压不平衡度","phase_Voltage"),
+ TOTAL_INDICATOR("总稳态指标", "Total_Indicator"),
+
+ /**
+ * 污区图统计类型
+ */
+ I_ALL("谐波电流", "I_All"),
+ V_HARMONIC("谐波电压", "V_Harmonic"),
+
+
+ /**
+ * 谐波污染值
+ */
+ I_ALL_LIMIT("谐波电流", "I_All_Limit"),
+ V_HARMONIC_LIMIT("谐波电压", "V_Harmonic_Limit"),
+
+
+ /**
+ * 监测点类别
+ */
+ ONE_LINE("Ⅰ类监测点", "One_Line"),
+ TWO_LINE("Ⅱ类监测点", "Two_Line"),
+ THREE_LINE("Ⅲ类监测点", "Three_Line"),
+
+
+ /**
+ * 监测点类型
+ */
+ Power_Supply_Point("供电点","Power_Supply_Point"),
+ Pub_Connect_Point("公共连接点PCC","Pub_Connect_Point"),
+ Parallel_Point("并网点","Parallel_Point"),
+ Other("其他","Other"),
+
+
+ /**
+ * 电压互感器类型
+ */
+ Cap_V("电容式","Cap_V"),
+ Pele_V("光电式","Pele_V"),
+ Elec_V("电子式","Elec_V"),
+ Other_S("其他","Other"),
+ Ele_V("电磁式","Ele_V"),
+
+ /**
+ * 中性点接地方式
+ */
+ Ground_Res("经非线性电阻接地-消谐器","Ground_Res"),
+ Ground_Trans("经互感器接地-4PT","Ground_Trans"),
+ Ground_Dir("直接接地-3PT","Ground_Dir"),
+ A_Center("A类测试中性点接地方式","A_Center"),
+ Ground_Other("其他","Other"),
+
+
+
+
+ /**
+ * 终端类型
+ */
+ DEV_QUALITY("电能质量监测终端", "Dev_Quality"),
+ DEV_SMART("智能电表", "Dev_Smart"),
+ DEV_MIX("智能融合终端", "Dev_Mix"),
+
+
+ /**
+ * 装置类别
+ */
+ Test_Equipment("测试设备","Test_Equipment"),
+ Monitor_Terminals("监测终端","Monitor_Terminals"),
+ Detect_Equipment("检测设备","Detect_Equipment"),
+ Govern_Devices("治理设备","Govern_Devices"),
+
+ /***
+ * 告警类型
+ */
+ COMM_ERR("通讯异常", "Comm_Err"),
+
+ /**
+ * 暂态统计指标
+ */
+ TOTAL_INDICATORS("总暂态指标", "Total_Indicators"),
+ VOLTAGE_DIP("电压暂降", "Voltage_Dip"),
+ VOLTAGE_RISE("电压暂升", "Voltage_Rise"),
+ SHORT_INTERRUPTIONS("短时中断", "Short_Interruptions"),
+ DISTURBANCE("扰动", "Disturbance"),
+ OTHER("其他", "Other"),
+ RECORDING_WAVE("录波", "Recording_Wave"),
+
+ /**
+ * 数据类型
+ */
+ MAINNET_POINT("主网测点", "Mainnet_Point"),
+ DISTRIBUTION_POINT("配网测点", "Distribution_Point"),
+
+ /**
+ * 分布式光伏台区渗透率水平
+ */
+ RATE_0_25("0-25", "Rate_0_25"),
+ RATE_25_50("25-50", "Rate_25_50"),
+ RATE_50_75("50-75", "Rate_50_75"),
+ RATE_75_100("75-100", "Rate_75_100"),
+ RATE_100("100", "Rate_100"),
+
+ /**
+ * 入网报告状态
+ */
+ NEWLY("新建", "Newly"),
+ AUDIT("待审核", "Audit"),
+ FAILED("未通过", "Failed"),
+ FINISH("已生效", "Finish"),
+
+ /**
+ * 审核状态
+ */
+ INIT("新建", "Init"),
+ FAIL("未通过", "Fail"),
+ AUDITT("待审核", "Auditt"),
+ SUCCESS("已通过", "Success"),
+
+ /**
+ * 填报进度
+ */
+ NOT_REPORTED("未填报", "Not_Reported"),
+ INSIGHTS("成效分析", "Insights"),
+ PLAN_MEASURES("计划整改措施", "Plan_Measures"),
+ ACTUAL_MEASURES("实际采取措施", "Actual_Measures"),
+ CAUSE_ANALYSIS("原因分析", "Cause_Analysis"),
+ ARCHIVED("已归档", "Archived"),
+
+ /**
+ * 问题来源
+ */
+ ONLINE("在线监测告警", "Online"),
+ DEV_EXCEPTION("设备异常", "Dev_Exception"),
+ GENERAL("普测超标", "General"),
+ USER_COMPLAINTS("用户投诉", "User_Complaints"),
+
+ /**
+ * 台区电能质量事件类型
+ */
+ EVENT_TYPE_P("低功率因数0.7-0.8", "Event_Type_p"),
+ EVENT_TYPE_U("潮流倒送", "Event_Type_u"),
+ EVENT_TYPE_T("电压越上限15%以上", "Event_Type_t"),
+ EVENT_TYPE_W("电压越限", "Event_Type_w"),
+ EVENT_TYPE_O("低功率因数0.7以下", "Event_Type_o"),
+ EVENT_TYPE_E("电压越上限", "Event_Type_e"),
+ EVENT_TYPE_Y("电压越下限", "Event_Type_y"),
+ EVENT_TYPE_L("低功率因数0.8-0.9", "Event_Type_l"),
+ EVENT_TYPE_Q("电压总谐波畸变率超标", "Event_Type_q"),
+ EVENT_TYPE_R("电压越上限7%-15%", "Event_Type_r"),
+ EVENT_TYPE_I("低功率因数", "Event_Type_i"),
+ PENET_LIMIT("渗透率超上限", "Penet_Limit"),
+ EVENT_TYPE_A("潮流倒送导致设备重载", "Event_Type_a"),
+ EVENT_TYPE_S("潮流倒送导致设备过载", "Event_Type_s"),
+ EVENT_TYPE_D("电压越上限严重度", "Event_Type_d"),
+ EVENT_TYPE_F("电压越下限严重度", "Event_Type_f"),
+ EVENT_TYPE_G("渗透率", "Event_Type_g"),
+ EVENT_TYPE_Z("超标3%-10%", "Event_Type_z"),
+ EVENT_TYPE_X("超标10%以下", "Event_Type_x"),
+ EVENT_TYPE_C("重过载", "Event_Type_c"),
+ /**
+ * 监测点状态
+ */
+ RUN("运行", "Run"),
+ OVERHAUL("检修", "Overhaul"),
+ DEBUGGING("调试", "Debugging"),
+ DECOMMISSIONING("停运", "Decommissioning"),
+ RETIREMENT("退役", "Retirement"),
+
+ /**
+ * 终端状态
+ */
+ FREE_MOORY("剩余内存", "Free_Mmory"),
+ FREE_STORE("剩余存储空间", "Free_Store"),
+ NOT_OPERATION("未投运", "Not_Operation"),
+ RUNNING("在运", "Running"),
+ RETIRE("退役", "Retire"),
+ ON_SITE("现场留用", "On_Site"),
+ STOCK_STANDBY("库存备用", "Stock_Standby"),
+ TO_BE_SCRAPPED("待报废", "To_Be_Scrapped"),
+ SCRAP("报废", "Scrap"),
+
+ /**
+ * 监测点标签(废弃,统一使用监测点对象类型)
+ */
+ ONSHORE_WIND("陆上风电", "Onshore_Wind"),
+ POWER_STATION("光伏电站", "Power_Station"),
+ ELECTRIFIED_RAILWAYS("电气化铁路", "Electrified_Railways"),
+ SMELT_LOAD("冶炼负荷", "Smelt_Load"),
+ DISTRIBUTED_PHOTOVOLTAICS("分布式光伏", "Distributed_Photovoltaics"),
+ WIND_FARM("风电场", "Wind_Farm"),
+ SENSITIVE_USERS("重要敏感用户", "Sensitive_Users"),
+ IMPORTANT_USERS("重要用户", "Important_Users"),
+ //废弃字段
+ TRACTION_STATION("牵引站", "Traction_Station"),
+ LINEAR_LOADS("其他非线性负荷", "Linear_Loads"),
+
+
+ /**
+ * 电压等级
+ */
+ AC_380V("交流380V(含400V)", "AC_380V(400V)"),
+ DY_380V("交流0.38kV", "0.38kV"),
+ DY_10KV("交流10kV", "10kV"),
+ DY_35KV("交流35kV", "35kV"),
+ DY_110KV("交流110kV", "110kV"),
+ DY_220KV("交流220kV", "220kV"),
+ DY_500KV("交流500kV", "500kV"),
+ DY_DC_500kV("直流500kV", "DC_500kV"),
+
+
+ /**
+ * 电压等级
+ * 此电压用于计算,真实code请使用上面枚举
+ */
+
+ V100("100V", "0.1",0.1f),
+ V220("220V", "0.22",0.22f),
+ KV038("0.38kV", "0.38",0.38f),
+ V380("380V", "0.38",0.38f),
+ KV04("0.4kV", "0.4",0.4f),
+ KV06("0.6kV", "0.6",0.6f),
+ V400("400V", "0.4",0.4f),
+ KV1("1kV", "1",1.0f),
+ KV6("6kV", "6",6.0f),
+ KV10("10kV", "10",10.0f),
+ KV20("20kV", "20",20.0f),
+ KV30("30kV", "30",30.0f),
+ KV35("35kV", "35",35.0f),
+ KV50("50kV", "50",50.0f),
+ KV66("66kV", "66",66.0f),
+ KV72_5("72.5kV", "725",725.0f),
+ KV110("110kV", "110",110.0f),
+ KV120("120kV", "120",120.0f),
+ KV125("125kV", "125",125.0f),
+ KV200("200kV", "200",200.0f),
+ KV220("220kV", "220",220.0f),
+ KV320("320kV", "320",320.0f),
+ KV330("330kV", "330",330.0f),
+ KV400("400kV", "400",400.0f),
+ KV500("500kV", "500",500.0f),
+ KV600("600kV", "600",600.0f),
+ KV660("660kV", "660",660.0f),
+ KV750("750kV", "750",750.0f),
+ KV1000("1000kV", "1000",1000.0f),
+ KV1100("1100kV", "1100",1100.0f),
+
+ /**
+ * 计划采取实施
+ */
+ GOVERNANCE_FACTS("事实治理工程", "Governance_Facts"),
+ GRID_OPERATES("电网运行方式调整", "Grid_Operates"),
+ PARAMETER_OPT("治理装置运行参数优化", "Parameter_Opt"),
+ RECTIFY_ORDERS("提出整改工单", "Rectify_Orders"),
+
+ /**
+ * 牵引站变压器接线方式
+ */
+ SINGLE_TRANS("单相牵引变压器", "Single_Trans"),
+ THREE_TRANS("三相YN d11联结牵引变压器", "Three_Trans"),
+ THREE_PHASE_TRANS("三相YN d11 d1组成的牵引变压器", "Three_Phase_Trans"),
+ SCOTT_TRANS("SCOTT牵引变压器", "SCOTT_Trans"),
+ YN_V_TRANS("YN v联结平衡牵引变压器", "YN_V_Trans"),
+ YN_A_TRANS("YN A联结平衡牵引变压器", "YN_A_Trans"),
+ /**
+ * APP暂态事件类型
+ */
+ EVT_DIPSTR("电压暂降事件启动","Evt_DipStr"),
+ EVT_INTRSTR("电压中断事件启动","Evt_IntrStr"),
+ EVT_SWLSTR("电压暂升事件启动","Evt_SwlStr"),
+
+
+
+ /**
+ * 监测对象
+ */
+ PHOTOVOLT("光伏台区", "Photovolt"),
+ FEEDER_TENKV("10kV馈线", "Feeder_TenkV"),
+ MAIN_CHANGE("主变", "Main_Change"),
+
+ /**
+ * 工单状态
+ */
+ PEND_DISPATCH("待派单", "Pend_Dispatch"),
+ DISPATCHED("已派单", "Dispatched"),
+ CLOSED("已关闭", "Closed"),
+
+ /**
+ * 问题类型
+ */
+ VOLTAGE_LIMIT("谐波电压越限", "Voltage_Limit"),
+ CURRENT_LIMIT("谐波电流越限", "Current_Limit"),
+
+ /**
+ * 审核状态
+ */
+ REVIEW("待审核", "Review"),
+ AUDITED("已审核", "Audited"),
+ APPROVED("审核通过", "Approved"),
+ NOT_APPROVED("审核通过", "Not_Approved"),
+
+ /**
+ * 审核处理
+ */
+ GENERATE("生成工单", "Generate"),
+ NO_REQUIRED("无需处理", "No_Required"),
+
+ /**
+ * 工单流程
+ */
+ GENERATED("生成工单", "Generated"),
+ DISPATCH("派单", "Dispatch"),
+ FEEDBACK("反馈", "Feedback"),
+ AUDITING("审核", "Auditing"),
+ RECTIFICATION("整改", "Rectification"),
+ ASSESS("评估", "Assess"),
+ PIGEONHOLE("归档", "Pigeonhole"),
+
+ /**
+ * 评估结果
+ */
+ PASS("评估合格", "Pass"),
+ NOT_PASS("评估不合格", "Not_Pass"),
+
+ /**
+ * 工单类型
+ */
+ RECT_ORDER("整改单", "Rect_Order"),
+
+ /**
+ * 一级业务类型
+ */
+ TRANS_BUSINESS("运检业务", "Trans_Business"),
+
+ /**
+ * 日志字典类型
+ */
+ LINE_PARAMETER("监测点日志", "Line_Parameter"),
+ DEV_PARAMETER("设备日志", "Dev_Parameter"),
+ WEB_ADD("web新增用户", "Web_Add"),
+ DATA_PLAN("流量套餐修改", "Data_Plan"),
+ PROCESS_PARMETER("终端进程操作", "Process_Parmeter"),
+
+
+ /**
+ * 接线方式
+ */
+ STAR("星型接线", "Trans_Business"),
+ STAR_TRIANGLE("星三角", "Star_Triangle"),
+ OPEN_DELTA("开口三角", "Open_Delta"),
+
+ /**
+ * 装置类型
+ */
+ GATEWAY_DEV("网关", "Gateway"),
+ CONNECT_DEV("直连设备", "Direct_Connected_Device"),
+ DEV("装置", "Device"),
+ PORTABLE("便携式设备", "Portable"),
+
+
+ /**
+ * 数据模型
+ */
+ APF("APF","Apf"),
+ DVR("DVR","Dvr"),
+ EPD("电能数据","Epd"),
+ PQD("电能质量数据","Pqd"),
+ BMD("基础测量数据","Bmd"),
+ EVT("事件","Evt"),
+ ALM("告警","Alm"),
+ STS("状态","Sts"),
+ DI("开入","Di"),
+ DO("电能数据","Do"),
+ PARM("参数","Parm"),
+ SET("定值","Set"),
+ INSET("内部定值","InSet"),
+ CTRL("控制","Ctrl"),
+ TERMINAL_SORT("台账类型","terminal_sort"),
+ /**
+ * 暂降原因
+ */
+ SHORT_TROUBLE("短路故障", "Short_Trouble"),
+ TRANSFORMER_EXCITATION("变压器激磁", "Transformer_Excitation"),
+ RESON_REST("其他", "Reson_Rest"),
+ LARGE_INDUCTION("大型感应电动机启动", "Large_Induction"),
+ VOLTAGE_DISTURBANCE("电压扰动", "Voltage_Disturbance"),
+
+
+ /**
+ * 暂降类型
+ */
+ PHASE_A("A相接地", "Phase_A"),
+ PHASE_B("B相接地", "Phase_B"),
+ PHASE_C("C相接地", "Phase_C"),
+ INTERPHASE_AB("AB相间", "Interphase_AB"),
+ INTERPHASE_BC("BC相间", "Interphase_BC"),
+ INTERPHASE_AC("AC相间", "Interphase_AC"),
+ GROUND_AB("AB两相接地", "Ground_AB"),
+ GROUND_BC("BC两相接地", "Ground_BC"),
+ GROUND_AC("AC两相接地", "Ground_AC"),
+ GROUND_ABC("三相接地", "Ground_ABC"),
+ TYPE_REST("其他", "Type_Rest"),
+
+ /**
+ * 监测点位置
+ */
+ LOAD_SIDE("负载侧", "Load_Side"),
+ GRID_SIDE("电网侧", "Grid_Side"),
+ OUTPUT_SIDE("输出侧", "Output_Side"),
+
+ /**
+ * 警告级别
+ */
+
+ ALARM("告警", "Alarm"),
+ FAULT("故障", "Fault"),
+
+ /**
+ * 装置级别
+ */
+ MOST_IMPORMENT("极重要","Vital"),
+
+ /**
+ * 测量信号输入形式
+ */
+ NUMBER_SIGNAL("数字信号","Digital_Signal"),
+ SIMULATION_SIGNAL("模拟信号","Analog_Signal"),
+
+ /**
+ * 设备地区特征
+ */
+ DOWNTOWN("市中心区","downtown"),
+ CITY("市区","city"),
+ TOWN("城镇","town"),
+ COUNTY_SEAT("县城区","County_Seat"),
+ COUNTRYSIDE("农村","countryside"),
+ TOWNSHIP("乡镇","township"),
+ AGRO_AREA("农牧区","Agro_Area"),
+
+ /**
+ * 设备使用性质代码
+ */
+ DEDICATED("专用","dedicated"),
+ PUBLIC("公用","public"),
+
+
+ /**
+ * 监督类型
+ */
+ POWER_QUALITY("电能质量敏感用户监督","Power_Quality"),
+ UHV_Converter("特高压换流站监督","UHV_Converter"),
+ New_Energy("新能源场站监督","New_Energy"),
+ Technical_Super("供电电压质量技术监督","Technical_Super"),
+ capacitor_bank("电容器组监督","capacitor_bank"),
+ report_supervision("评估报告监督","report_supervision"),
+ /**
+ * app基础信息类型
+ */
+ DATA_BASE("资料库","Data_base"),
+ INTRODUCTION("系统介绍","introduction"),
+ USER_MANUAL("使用手册","User_Manual"),
+ USER_AGREEMENT("用户协议","User_Agreement"),
+ COMPANY_PROFILE("公司简介","Company_Profile"),
+ PERSONAL_INFOR_PROTECT("个人信息保护政策","Personal_Infor_Protect"),
+
+ /**
+ * app设备事件类型权限转移,数据恢复
+ */
+ AUTHORITY_TRANSFER("权限转移","Authority_transfer"),
+ DATA_RECOVERY("数据恢复","Data_recovery"),
+
+ /**
+ * 谐波数据报表,数据单位类别
+ */
+ EFFECTIVE("有效值","effective"),
+ POWER("功率","power"),
+ DISTORTION("畸变率","distortion"),
+ VOLTAGE("电压偏差","voltage"),
+ UNIT_FREQUENCY("频率","unitFrequency"),
+ UNBALANCE("三项不平横","unbalance"),
+ FUND("基波","fund"),
+
+
+
+
+
+ /**pms******************************start*/
+
+
+ /**
+ * 实施状态
+ */
+ Nocarried("未开展","Nocarried"),
+ Progressing("开展中","Progressing"),
+ Reviewing("待审核","Reviewing"),
+ Completed("已完成","Completed"),
+
+ /*3.45 典型源荷用户类型*/
+ TRACTIONSTATION("牵引站","01"),
+ WINDFARM_USER("风电场用户","02"),
+ PHOTOVOLTAICSIT_EUSERS("光伏场站用户","03"),
+ OTHER_INTERFERENCESOURCE_USERS("其他干扰源用户","04"),
+
+ /*3.39 监测对象类型-大类*/
+ SEMICONDUCTOR_MANUFACTURING("半导体制造","2401"),
+ PRECISION_MACHINING("精密加工","2402"),
+ PARTY_GOVERNMENT("党政机关","2403"),
+ NOSOCOMIUM("医院","2404"),
+ TRANSPORTATION_HUB("交通枢纽(公交场站、客运站、火车站等)","2405"),
+ AERODROME("机场","2406"),
+ FINANCE("金融","2407"),
+ DATA_CENTER("数据中心","2408"),
+ HAZARDOUS_CHEMICALS("危险化学品","2409"),
+ EXPLOSIVE_PRODUCTS("易燃易爆品制造","2410"),
+ LARGEVENUE("大型场馆(体育场、剧院等)","2411"),
+ WINDPOWER_STATION("风电场","1401"),
+ PHOTOVOLTAIC_POWER_STATION("光伏电站","1402"),
+ ELECTRIFIED_RAILWAY("电气化铁路","1300"),
+
+
+ /**
+ * 所属站别类型
+ */
+ Trans_Sub("变电站","Trans_Sub"),
+ Converter("换流站","Converter"),
+ Ele_Railways("电气化铁路","Ele_Railways"),
+ Wind_Farms("风电场","Wind_Farms"),
+ Power_Station("光伏电站","Power_Station"),
+ Smelting_Load("冶炼负荷","Smelting_Load"),
+ Imp_Users("重要敏感用户","Imp_Users"),
+ Station_Other("其他","Other"),
+
+ /*承载能力评估用户类型*/
+ Power_Station_Users("光伏电站用户","Power_Station_Users"),
+ Charging_Station_Users("充电站用户","Charging_Station_Users"),
+ Electric_Heating_Load_Users("电加热负荷用户","Electric_Heating_Load_Users"),
+ Electrified_Rail_Users("电气化铁路用户","Electrified_Rail_Users"),
+
+ //变压器连接方式
+ YNd11("YNd11","YNd11"),
+ YNy0("YNy0","YNy0"),
+ Yy0("Yy0","Yy0"),
+ Yyn0("Yyn0","Yyn0"),
+ Yd11("Yd11","Yd11"),
+ Y_yn("Y/yn","Y_yn"),
+ Y_d("Y/d","Y_d"),
+ D_y("D/y","D_y"),
+ YNyn("YNyn","YNyn"),
+
+ //用户模式
+ SPECIAL_USER("专变用户","special_user"),//专变用户
+ PUBLIC_USER("公变用户","public_user"),// ,公变用户
+
+ //统计类型
+ STATISTICAL_TYPE_Y("年数据","01"),
+ STATISTICAL_TYPE_M("月数据","02"),
+ STATISTICAL_TYPE_D("日数据","03"),
+
+ /**pms******************************end*/
+
+ //pq干扰源类型
+ PQ_ELE_RAILWAYS("电气化铁路","Ele_Railways"),
+ PQ_POWER_STATION("光伏电站","Power_Station"),
+ PQ_WIND_FARMS("风电场","Electrolytic_Load"),
+
+ //所属地市local_municipality
+ //张家口市、廊坊市、唐山市、承德市、秦皇岛市、风光储、超高压
+ ZHANGJIAKOU("张家口市","zhangjiakou"),
+ LANGFANG("廊坊市","langfang"),
+ TANGSHAN("唐山市","tangshan"),
+ CHENGDE("承德市","chengde"),
+ QINGHUANGDAO("秦皇岛市","qinghuangdao"),
+ FENGFENGRESERVE("风光储","fengfengreserve"),
+ EXTRA_HIGH_PRESSURE("超高压","extra_high_pressure"),
+
+ //行业类型-冀北
+ TRAFFIC("交通","Traffic"),
+ METALLURGY("冶金","Metallurgy"),
+ MACHINERY("机械","Machinery"),
+ CHEMICAL_INDUSTRY("化工","Chemical_Industry"),
+ MANUFACTURING("制造","Manufacturing"),
+ SHIPBUILDING("造船","Shipbuilding"),
+ UTILITIES("公用事业","Utilities"),
+ POWER_PLANT("电厂","Power_Plant"),
+ COMMERCE("商业","Commerce"),
+ MUNICIPAL("市政","Municipal"),
+ CIVILIAN("民用","Civilian"),
+ ELECTRONICS("电子","Electronics"),
+ COMMUNICATION("通讯","Communication"),
+ ELECTRIC_POWER("电力","Electric_Power"),
+ OTHER_INDUSTRY("其他","Other_Industry"),
+
+
+
+
+
+ //河北工单相关
+ //3.67工单状态
+ WORK_ORDER_STATUS_NO("未处理","01"),
+ WORK_ORDER_STATUS_ING("处理中","02"),
+ WORK_ORDER_STATUS_HAS("已上报","03"),
+ WORK_ORDER_STATUS_CLOSE("已闭环","04"),
+
+
+ YES("是","1"),
+ NO("否","0"),
+
+ No_Upload("未上送","0"),
+ Has_Upload("已上送","1"),
+ Reduce_Upload("取消上送","2"),
+ Return_Upload("待重新上送","3"),
+
+
+ //字典树类型
+ Obj_Type("监测对象类型","0"),
+ Custom_Report_Type("自定义报表类型","1")
+
+
+ ;
+
+ private final String name;
+ private final String code;
+ private final Float value;
+
+ DicDataEnum(String name, String code,Float value) {
+ this.name = name;
+ this.code = code;
+ this.value = value;
+ }
+
+ DicDataEnum(String name, String code) {
+ this.name = name;
+ this.code = code;
+ this.value =
+ null;
+ }
+
+ public static DicDataEnum getDicDataEnumValue(String code) {
+ for (DicDataEnum item : values()) {
+ if (item.getCode().equals(code)) {
+ return item;
+ }
+ }
+ return null;
+ }
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/DicDataTypeEnum.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/DicDataTypeEnum.java
new file mode 100644
index 0000000..1e3a8cd
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/DicDataTypeEnum.java
@@ -0,0 +1,164 @@
+package com.njcn.product.system.dict.pojo.enums;
+
+import lombok.Getter;
+
+/**
+ * 类的介绍:
+ *
+ * @author xuyang
+ * @version 1.0.0
+ * @createTime 2021/8/5 21:56
+ */
+@Getter
+public enum DicDataTypeEnum {
+ /**
+ * 字典类型名称
+ */
+ FRONT_TYPE("前置类型","Front_Type"),
+ POWER_CATEGORY("电源类别","Power_Category"),
+ POWER_STATION_TYPE("电站类型","Power_Station_Type"),
+ POWER_GENERATION("发电方式","Power_Generation"),
+ CONNECTION_MODE("能源消纳方式","Connection_Mode"),
+ ECC_STAT("用电客户状态","Ecc_Stat"),
+ DEV_TYPE("终端型号","Dev_Type"),
+ DEV_VARIETY("终端类型","Dev_Variety"),
+ DEV_FUN("终端功能","Dev_Fun"),
+ DEV_STATUS("终端状态","Dev_Status"),
+ DEV_LEVEL("终端等级","Dev_Level"),
+ DEV_CONNECT("接线方式","Dev_Connect"),
+ DEV_MANUFACTURER("制造厂商","Dev_Manufacturers"),
+ //电压等级用于pms区分交直流
+ DEV_VOLTAGE("电压等级","Dev_Voltage"),
+ //标准电压等级用于pq不区分交直流
+ DEV_VOLTAGE_STAND("标准电压等级","Dev_Voltage_Stand"),
+ PANORAMIC_VOLTAGE("全景电压等级","Panoramic_voltage"),
+ EVENT_REASON("暂降原因","Event_Reason"),
+ EVENT_TYPE("暂降类型","Event_Type"),
+ BUSINESS_TYPE("行业类型","Business_Type"),
+ INTERFERENCE_SOURCE_TYPE("干扰源类型","Interference_Source"),
+ ALARM_TYPE("告警类型","alarm_Type"),
+ DEV_OPS("运维日志","Dev_Ops"),
+ INDICATOR_TYPE("指标类型","Indicator_Type"),
+ COMMUNICATE_TYPE("通讯类型","Communicate_Type"),
+ RATE_TYPE("费率类型","Rate_Type"),
+ ELE_LOAD_TYPE("用能负荷类型","Ele_Load_Type"),
+ ELE_STATISTICAL_TYPE("用能统计类型","Ele_Statistical_Type"),
+ REPORT_TYPE("自定义报表类型","Report_Type"),
+ LINE_MARK("监测点评分等级","Line_Grade"),
+ LINE_TYPE("监测点类型","Line_Type"),
+ STEADY_STATIS("稳态统计指标","Steady_Statis"),
+ EVENT_STATIS("暂态指标","Event_Statis"),
+ MONITORING_LABELS("监测点标签","Monitoring_Labels"),
+ POLLUTION_STATIS("污区图统计类型","Pollution_Statis"),
+ POLLUTION_CALC("谐波污染值","Pollution_Calc"),
+ BENCHMARK_INDICATORS("基准水平评价指标","Benchmark_Indicator"),
+ LINE_SORT("监测点类别","Line_Sort"),
+ DATA_TYPE("数据类型","Data_Type"),
+ PERMEABILITY_TYPE("分布式光伏台区渗透率水平","Permeability_Type"),
+ ON_NETWORK_STATUS("报告状态","On-network_Status"),
+ AUDIT_STATUS("审核状态","Audit_Status"),
+ FILL_PROGRESS("填报进度","Fill_Progress"),
+ PROBLEM_SOURCES("问题来源","Problem_Sources"),
+ AREA_PQ_EVENT_TYPE("台区电能质量事件类型","area_pq_event_type"),
+ LINE_STATE("监测点状态","Line_State"),
+ DEVICE_STATUS("设备状态","Device_Status"),
+ //INTERFERENCE_SOURCE("监测对象类别","Interference_Source"),
+ PLAN_TAKE("计划采取实施","Plan_Take"),
+ MONITOR_OBJ("监测对象","Monitor_Obj"),
+ CONNET_GROUP_WAY("牵引站变压器接线方式","Connet_Group_Way"),
+ WORK_ORDER_STATUS("工单状态","Work_Order_Status"),
+ PROBLEM_TYPE("问题类型","Problem_Type"),
+ CHECK_STATUS("审核状态","Check_Status"),
+ CHECK_RESULT("审核处理","Check_Result"),
+ WORK_ORDER_PROCESS("工单流程","Work_Order_Process"),
+ ASSESS_RESULT("评估结果","Assess_Result"),
+ WORK_ORDER_TYPE("工单类型","Work_Order_Type"),
+
+ PRIMARY_TYPE("一级业务类型","Primary_Type"),
+ DEV_CLASS("终端类型(治理)","Dev_Class"),
+ CS_STATISTICAL_TYPE("治理统计类型","Cs_Statistical_Type"),
+ LINE_POSITION("监测点位置","Line_Position"),
+ ALARM_LEVEL("警告级别","Alarm_Level"),
+
+
+ CS_DATA_TYPE("数据模型类别", "Cs_Data_Type"),
+ PROBLEM_INDICATORS("问题指标","Problem_Indicators"),
+
+
+ //pms
+ DEV_CATEGORY("装置类别","Device_Category"),
+ DEV_GRADE("终端等级","Dev_Level"),
+ INPUT_SIGNAL("测量信号输入形式","Signal_form"),
+ VOLTAGE_TRANSFORMER("电压互感器类型","Voltage_Transformer"),
+ Neutral_Point("中性点接地方式","Neutral_Point"),
+ DEVICE_REGIONLYPE("设备地区特征","Device_RegionLype"),
+ DEVICE_USERNATURE("设备使用性质代码","Device_UseNature"),
+ SUPV_TYPE("监督类型","supv_type"),
+ SUPV_OBJ_TYPE("监督对象类型","supv_obj_type"),
+
+ evaluation_report("评估用户或报告分类编码","evaluation_report"),
+
+ user_class("用户分类","user_class"),
+
+ SUPV_STAGE("监督阶段","supv_stage"),
+ EFFECT_STATUS("实施状态","effect_status"),
+ MONITOR_TYPE("监督监测点类型","monitor_type"),
+ SUPV_PROBLEM_TYPE("监督问题类型","problem_type"),
+ RECTIFICATION_MEASURE("整改方案","RectificationMeasure"),
+
+ SUPV_PLAN_STATUS("监督计划状态","plan_status"),
+ BILL_TYPE("单据类型","bill_type"),
+ SPECIALITY_TYPE("所属专业","speciality_type"),
+ RECTIFICATION_STATUS_TYPE("整改情况","rectification_status_type"),
+ file_type("附件分类"," file_type"),
+ problem_level_type("问题等级"," problem_level_type"),
+
+ Station_Type("所属站别类型","Station_Type"),
+
+
+ APP_BASE_INFORMATION_TYPE("app基础信息类型","appInformationType"),
+
+ APP_DEVICE_EVENT_TYPE("app设备事件类型","appDeviceEventType"),
+
+ DEVICE_UNIT("数据单位类型","Device_Unit"),
+ //国网上送
+ pms_disturb_type("pms国网上送干扰源类型","pms_disturb_type"),
+ pms_disturb_sort("pms国网上送干扰源类别","pms_disturb_sort"),
+ type_of_station("站房类型","type_of_station"),
+ File_status("档案状态","File_status"),
+ USER_CLASS("用户分类","User_Class"),
+ IMPORTANCE_LEVEL("重要性等级","Importance_Level"),
+ ELE_CLASS("用电类别","Ele_Class"),
+ INDUSTRY_TYPE("行业分类","industry_type"),
+ PLAN_STATUS("计划状态","plan_status"),
+ APP_EVENT("APP暂态事件类型","app_event"),
+ DEVICE_TYPE("治理装置类型编码","Device_Type"),
+
+ CARRY_CAPCITY_USER_TYPE("承载能力评估用户类型","carry_capcity_user_type"),
+ CARRY_CAPCITY_CONNECTION_MODE("变压器连接方式","carry_capcity_connection_mode"),
+
+ CARRY_CAPCITYUSER_MODE("用户模式","carry_capcity_user_mode"),
+ LOCAL_MUNICIPALITY("所属地市","local_municipality"),
+ INDUSTRY_TYPE_JB("行业类型-冀北","industry_type_jb"),
+ LOAD_LEVEL("负荷级别","load_level"),
+ SUPPLY_CONDITION("供电电源情况","supply_condition"),
+
+ JIBEI_AREA("所属地市","jibei_area"),
+ Major_Nonlinear_Device("主要非线性设备类型","Major_Nonlinear_Device"),
+ EVALUATION_DEPT("主要非线性设备类型","evaluation_dept"),
+ EVALUATION_TYPE("评估类型","Evaluation_Type"),
+ ;
+
+
+
+
+
+ private final String name;
+ private final String code;
+
+ DicDataTypeEnum(String name,String code){
+ this.name=name;
+ this.code=code;
+ }
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/SystemResponseEnum.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/SystemResponseEnum.java
new file mode 100644
index 0000000..c6cf7d0
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/enums/SystemResponseEnum.java
@@ -0,0 +1,77 @@
+package com.njcn.product.system.dict.pojo.enums;
+
+import lombok.Getter;
+
+/**
+ * @author hongawen
+ * @version 1.0.0
+ * @date 2021年12月20日 09:56
+ */
+@Getter
+public enum SystemResponseEnum {
+
+ /**
+ * 系统模块异常响应码的范围:
+ * A00350 ~ A00449
+ */
+ SYSTEM_COMMON_ERROR("A00350","系统模块异常"),
+ DICT_TYPE_NAME_REPEAT("A00351", "字典类型名称重复"),
+ DICT_DATA_NAME_REPEAT("A00352", "字典数据名称重复"),
+ AREA_CODE_REPEAT("A00353","行政区域编码重复"),
+ LOAD_TYPE_EMPTY("A00354","用能负荷数据为空"),
+ LINE_MARK_EMPTY("A00355","字典监测点评分等级数据为空"),
+ VOLTAGE_EMPTY("A00356","查询字典电压等级数据为空"),
+
+ INTERFERENCE_EMPTY("A00356","查询字典干扰源类型数据为空"),
+ BUSINESS_EMPTY("A00356","查询字典行业类型数据为空"),
+ SYSTEM_TYPE_EMPTY("A00356","查询字典系统类型数据为空"),
+ DEV_TYPE_EMPTY("A00357","查询字典设备类型数据为空"),
+ MANUFACTURER("A00358","查询字典终端厂家数据为空"),
+ DEV_VARIETY("A00359","查询字典终端类型数据为空"),
+
+ /*pms*/
+ LINE_TYPE_VARIETY_EMPTY("A00360","查询字典监测点类型数据为空"),
+ LINE_STATE_EMPTY("A00361","查询字典监测点状态为空"),
+ LINE_TYPE_EMPTY("A00362","查询字典监测点类型状态为空"),
+ POTENTIAL_TYPE_EMPTY("A00363","查询字典电压互感器类型为空"),
+ Neutral_Mode_EMPTY("A00364","查询字典中性点接地方式为空"),
+ MONITOR_TAG_EMPTY("A00365","查询字典监测点标签类型为空"),
+ MONITORY_TYPE_EMPTY("A00366","查询字典监测对象类型为空"),
+ TERMINAL_WIRING_EMPTY("A00367","查询字典监测终端接线方式为空"),
+ MONITOR_TYPE_EMPTY("A00368","查询字典监测点类别为空"),
+ ACTIVATED_STATE("A00369","必须存在一个已激活的系统类型"),
+ ADVANCE_REASON("A00370","查询字典暂降原因为空"),
+ EFFECT_STATUS_EMPTY("A00370","查询字典实施状态为空"),
+
+ EVENT_REPORT_REPEAT("A00361","暂态报告模板重复"),
+ NOT_EXISTED("A00361", "您查询的该条记录不存在"),
+ TIMER_NO_CLASS("A00361", "请检查定时任务是否添加"),
+
+ /**
+ * 定时任务执行类不存在
+ */
+ TIMER_NOT_EXISTED("A00361", "定时任务执行类不存在"),
+ EXE_EMPTY_PARAM("A00361", "请检查定时器的id,定时器cron表达式,定时任务是否为空!"),
+
+ /**
+ * 审计日志模块异常响应
+ */
+ NOT_FIND_FILE("A0300", "文件未备份或者备份文件为空,请先备份文件"),
+ LOG_EXCEPTION("A0301", "导入旧日志文件异常"),
+ LOG_EXCEPTION_TIME("A0302", "导入旧日志文件异常:缺少时间范围"),
+ DELETE_DATA("A0303", "导入旧日志文件异常:删除数据失败"),
+ MULTIPLE_CLICKS_LOG_FILE_WRITER("A0304", "当前文件备份数据未结束,请勿多次点击"),
+ MULTIPLE_CLICKS_RECOVER_LOG_FILE("A0303", "当前文件恢复数据未结束,请勿多次点击"),
+
+ PAGE_SAME_NAME("A00357","页面名称重复"),
+ ;
+
+ private final String code;
+
+ private final String message;
+
+ SystemResponseEnum(String code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/param/DictDataParam.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/param/DictDataParam.java
new file mode 100644
index 0000000..3cb27e1
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/param/DictDataParam.java
@@ -0,0 +1,87 @@
+package com.njcn.product.system.dict.pojo.param;
+
+import com.njcn.common.pojo.constant.PatternRegex;
+import com.njcn.web.pojo.param.BaseParam;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.*;
+
+/**
+ * @author hongawen
+ * @version 1.0.0
+ * @date 2021年12月17日 15:49
+ */
+@Data
+public class DictDataParam {
+
+
+ @ApiModelProperty("字典类型id")
+
+ private String typeId;
+
+
+ @ApiModelProperty("名称")
+
+ private String name;
+
+
+ @ApiModelProperty("编码")
+
+ private String code;
+
+
+ @ApiModelProperty("排序")
+
+ private Integer sort;
+
+
+ @ApiModelProperty("事件等级:0-普通;1-中等;2-严重(默认为0)")
+ private Integer level;
+
+ @ApiModelProperty("与高级算法内部Id描述对应")
+ private Integer algoDescribe;
+
+
+ @ApiModelProperty("字典值,用于记录字典的计算值如10kV记录为 10")
+ private String value;
+
+
+ /**
+ * 更新操作实体
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class DictDataUpdateParam extends DictDataParam {
+
+ /**
+ * 表Id
+ */
+ @ApiModelProperty("id")
+ private String id;
+ }
+
+ /**
+ * 分页查询实体
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class DictDataQueryParam extends BaseParam {
+
+
+
+ }
+
+ /**
+ * 根据字典类型id分页查询字典数据
+ */
+ @Data
+ @EqualsAndHashCode(callSuper = true)
+ public static class DicTypeIdQueryParam extends BaseParam {
+ @ApiModelProperty("字典类型id")
+ private String typeId;
+
+ }
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/po/DictData.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/po/DictData.java
new file mode 100644
index 0000000..afc56be
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/po/DictData.java
@@ -0,0 +1,65 @@
+package com.njcn.product.system.dict.pojo.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.njcn.db.mybatisplus.bo.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * @author hongawen
+ * @since 2021-12-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_dict_data")
+public class DictData extends BaseEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 字典数据表Id
+ */
+ private String id;
+
+ /**
+ * 字典类型表Id
+ */
+ private String typeId;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 编码
+ */
+ private String code;
+
+ /**
+ * 排序
+ */
+ private Integer sort;
+
+ /**
+ * 事件等级:0-普通;1-中等;2-严重(默认为0)
+ */
+ private Integer level;
+
+ /**
+ * 与高级算法内部Id描述对应;
+ */
+ private Integer algoDescribe;
+
+ /**
+ * 目前只用于表示电压等级数值
+ */
+ private String value;
+
+ /**
+ * 状态:0-删除 1-正常
+ */
+ private Integer state;
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/po/DictType.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/po/DictType.java
new file mode 100644
index 0000000..b30102a
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/po/DictType.java
@@ -0,0 +1,62 @@
+package com.njcn.product.system.dict.pojo.po;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.njcn.db.mybatisplus.bo.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ *
+ * @author hongawen
+ * @since 2021-12-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("sys_dict_type")
+public class DictType extends BaseEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 字典类型表Id
+ */
+ private String id;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 编码
+ */
+ private String code;
+
+ /**
+ * 排序
+ */
+ private Integer sort;
+
+ /**
+ * 开启等级:0-不开启;1-开启,默认不开启
+ */
+ private Integer openLevel;
+
+
+ /**
+ * 开启描述:0-不开启;1-开启,默认不开启
+ */
+ private Integer openDescribe;
+
+
+ /**
+ * 描述
+ */
+ private String remark;
+
+ /**
+ * 状态:0-删除 1-正常
+ */
+ private Integer state;
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/pojo/vo/DictDataVO.java b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/vo/DictDataVO.java
new file mode 100644
index 0000000..628bf95
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/pojo/vo/DictDataVO.java
@@ -0,0 +1,63 @@
+package com.njcn.product.system.dict.pojo.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @author hongawen
+ * @version 1.0.0
+ * @date 2021年12月20日 15:52
+ */
+@Data
+public class DictDataVO implements Serializable {
+
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 字典数据表Id
+ */
+ private String id;
+
+ /**
+ * 字典类型表名称
+ */
+ private String typeName;
+
+ /**
+ * 名称
+ */
+ private String name;
+
+ /**
+ * 编码
+ */
+ private String code;
+
+ /**
+ * 排序
+ */
+ private Integer sort;
+
+ /**
+ * 事件等级:0-普通;1-中等;2-严重(默认为0)
+ */
+ private Integer level;
+
+ /**
+ * 与高级算法内部Id描述对应;
+ */
+ private Integer algoDescribe;
+
+ /**
+ * 字典值
+ */
+ private String value;
+
+ /**
+ * 状态:0-删除 1-正常
+ */
+ private Integer state;
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/service/IDictDataService.java b/cn-system/src/main/java/com/njcn/product/system/dict/service/IDictDataService.java
new file mode 100644
index 0000000..f2c351d
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/service/IDictDataService.java
@@ -0,0 +1,57 @@
+package com.njcn.product.system.dict.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.njcn.product.system.dict.pojo.param.DictDataParam;
+import com.njcn.product.system.dict.pojo.po.DictData;
+import com.njcn.product.system.dict.pojo.vo.DictDataVO;
+import org.apache.ibatis.annotations.Param;
+
+
+import java.util.List;
+
+/**
+ *
+ * 服务类
+ *
+ *
+ * @author hongawen
+ * @since 2021-12-13
+ */
+public interface IDictDataService extends IService {
+
+
+
+ /**
+ *
+ * @param dicIndex 字典id
+ * @return 根据字典id查询字典数据
+ */
+ DictData getDicDataById(String dicIndex);
+
+ /**
+ * 根据字典类型名称&数据名称获取字典数据
+ *
+ * @param dicTypeName 字典类型名称
+ * @param dicDataName 字典数据名称
+ * @return 字典数据
+ */
+ DictData getDicDataByNameAndTypeName(@Param("dicTypeName") String dicTypeName, @Param("dicDataName") String dicDataName);
+
+
+ /**
+ *
+ * @param dicCode 字典Code,类型名称
+ * @return 根据字典Code查询字典数据
+ */
+ DictData getDicDataByCodeAndType(String dicCode,String typeCode);
+
+ /**
+ *
+ * @param dictTypeCode 字典类型code
+ * @return 根据字典类型名称查询字典数据
+ */
+ List getDicDataByTypeCode(String dictTypeCode);
+
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/dict/service/impl/DictDataServiceImpl.java b/cn-system/src/main/java/com/njcn/product/system/dict/service/impl/DictDataServiceImpl.java
new file mode 100644
index 0000000..a495236
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/dict/service/impl/DictDataServiceImpl.java
@@ -0,0 +1,69 @@
+package com.njcn.product.system.dict.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.njcn.common.pojo.enums.common.DataStateEnum;
+import com.njcn.common.pojo.exception.BusinessException;
+
+import com.njcn.db.mybatisplus.constant.DbConstant;
+import com.njcn.product.system.dict.mapper.DictDataMapper;
+import com.njcn.product.system.dict.pojo.enums.DicDataEnum;
+import com.njcn.product.system.dict.pojo.enums.DicDataTypeEnum;
+import com.njcn.product.system.dict.pojo.enums.SystemResponseEnum;
+import com.njcn.product.system.dict.pojo.param.DictDataParam;
+import com.njcn.product.system.dict.pojo.po.DictData;
+import com.njcn.product.system.dict.pojo.po.DictType;
+import com.njcn.product.system.dict.pojo.vo.DictDataVO;
+import com.njcn.product.system.dict.service.IDictDataService;
+import com.njcn.web.factory.PageFactory;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+ * @author hongawen
+ * @since 2021-12-13
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class DictDataServiceImpl extends ServiceImpl implements IDictDataService {
+
+
+
+ @Override
+ public DictData getDicDataById(String dicIndex) {
+
+ return this.baseMapper.selectById(dicIndex);
+ }
+
+ @Override
+ public DictData getDicDataByNameAndTypeName(String dicTypeName, String dicDataName) {
+ return this.baseMapper.getDicDataByNameAndTypeName(dicTypeName, dicDataName);
+ }
+
+
+ @Override
+ public DictData getDicDataByCodeAndType(String dicCode, String typeCode) {
+ return this.baseMapper.getDicDataByCodeAndType(dicCode, typeCode);
+ }
+
+
+ @Override
+ public List getDicDataByTypeCode(String dictTypeCode) {
+ return this.baseMapper.getDicDataByTypeCode(dictTypeCode);
+ }
+
+
+}
diff --git a/cn-system/src/main/java/com/njcn/product/system/elequality/controller/EleEpdPqdController.java b/cn-system/src/main/java/com/njcn/product/system/elequality/controller/EleEpdPqdController.java
new file mode 100644
index 0000000..e812de4
--- /dev/null
+++ b/cn-system/src/main/java/com/njcn/product/system/elequality/controller/EleEpdPqdController.java
@@ -0,0 +1,255 @@
+package com.njcn.product.system.elequality.controller;
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.njcn.common.pojo.annotation.OperateInfo;
+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.HttpResultUtil;
+import com.njcn.common.utils.LogUtil;
+
+import com.njcn.product.system.elequality.pojo.dto.EpdDTO;
+import com.njcn.product.system.elequality.pojo.param.EleEpdPqdParam;
+import com.njcn.product.system.elequality.pojo.po.EleEpdPqd;
+import com.njcn.product.system.elequality.pojo.vo.EleEpdPqdListVO;
+import com.njcn.product.system.elequality.pojo.vo.EleEpdPqdVO;
+import com.njcn.product.system.elequality.pojo.vo.EleEpdTreeVO;
+import com.njcn.product.system.elequality.service.IEleEpdPqdService;
+import com.njcn.web.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.bouncycastle.asn1.x509.Targets;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * 前端控制器
+ *
+ *
+ * @author xuyang
+ * @since 2023-05-24
+ */
+@Slf4j
+@RestController
+@RequestMapping("/csDictData")
+@RequiredArgsConstructor
+@Api(tags = "指标数据字典")
+@Validated
+public class EleEpdPqdController extends BaseController {
+
+ private final IEleEpdPqdService eleEpdPqdService;
+
+ @PostMapping("/addByModel")
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @ApiOperation("根据模板录入字典数据")
+ @ApiImplicitParam(name = "eleEpdPqdParam", value = "模板的字典数据", required = true)
+ @ApiIgnore
+ public HttpResult addByModel(@RequestBody @Validated List eleEpdPqdParam){
+ log.info("根据模板录入字典数据");
+ String methodDescribe = getMethodDescribe("addByModel");
+ LogUtil.njcnDebug(log, "{},模板当前解析字典数据为:", methodDescribe);
+ eleEpdPqdService.saveData(eleEpdPqdParam);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
+ }
+
+ @PostMapping("/add")
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @ApiOperation("新增字典数据")
+ @ApiImplicitParam(name = "eleEpdPqdParam", value = "字典数据", required = true)
+ public HttpResult add(@RequestBody @Validated EleEpdPqdParam eleEpdPqdParam){
+ log.info("录入字典数据");
+ String methodDescribe = getMethodDescribe("add");
+ LogUtil.njcnDebug(log, "{},模板当前解析字典数据为:", methodDescribe);
+ EleEpdPqd eleEpdPqd = eleEpdPqdService.add(eleEpdPqdParam);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eleEpdPqd, methodDescribe);
+ }
+
+ @PostMapping("/delete")
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @ApiOperation("删除字典数据")
+ @ApiImplicitParam(name = "id", value = "字典数据id", required = true)
+ public HttpResult delete(@RequestParam String id){
+ log.info("删除字典数据");
+ String methodDescribe = getMethodDescribe("delete");
+ LogUtil.njcnDebug(log, "{},字典id为:", methodDescribe);
+ eleEpdPqdService.delete(id);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
+ }
+
+ @PostMapping("/update")
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @ApiOperation("更新字典数据")
+ @ApiImplicitParam(name = "updateParam", value = "字典数据", required = true)
+ public HttpResult update(@RequestBody @Validated EleEpdPqdParam.EleEpdPqdUpdateParam updateParam){
+ log.info("更新字典数据");
+ String methodDescribe = getMethodDescribe("update");
+ LogUtil.njcnDebug(log, "{},字典数据为:", updateParam);
+ eleEpdPqdService.update(updateParam);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
+ }
+
+ @OperateInfo(info = LogEnum.SYSTEM_COMMON)
+ @PostMapping("/list")
+ @ApiOperation("查询模板列表分页")
+ @ApiImplicitParam(name = "queryParam", value = "查询参数", required = true)
+ public HttpResult> getList(@RequestBody @Validated EleEpdPqdParam.EleEpdPqdQueryParam queryParam) {
+ String methodDescribe = getMethodDescribe("getList");
+ LogUtil.njcnDebug(log, "{},查询数据为:{}", methodDescribe, queryParam);
+ Page list = eleEpdPqdService.eleEpdPqdList(queryParam);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
+ }
+
+ @OperateInfo(info = LogEnum.SYSTEM_COMMON)
+ @PostMapping("/dictMarkByDataType")
+ @ApiOperation("字典数据组装唯一标识")
+ @ApiImplicitParam(name = "dataType", value = "数据模型", required = true)
+ @ApiIgnore
+ public HttpResult> dictMarkByDataType(@RequestParam("dataType") @Validated String dataType) {
+ String methodDescribe = getMethodDescribe("dictMarkByDataType");
+ List list = eleEpdPqdService.dictMarkByDataType(dataType);
+ return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
+ }
+
+ @PostMapping("/addEvt")
+ @OperateInfo(info = LogEnum.BUSINESS_COMMON)
+ @ApiOperation("事件录入字典数据")
+ @ApiImplicitParam(name = "eleEpdPqdParam", value = "模板的字典数据", required = true)
+ @ApiIgnore
+ public HttpResult