Merge branch 'main' of http://121.37.111.42:3000/zhengsl/WholeProcessPlatform into main_hzz
This commit is contained in:
commit
b535529f9d
@ -56,6 +56,13 @@
|
|||||||
<artifactId>mybatis-spring</artifactId>
|
<artifactId>mybatis-spring</artifactId>
|
||||||
<version>3.0.3</version>
|
<version>3.0.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 强制统一 error_prone_annotations 版本 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.errorprone</groupId>
|
||||||
|
<artifactId>error_prone_annotations</artifactId>
|
||||||
|
<version>2.43.0</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -95,6 +102,12 @@
|
|||||||
<artifactId>spring-boot-starter-cache</artifactId>
|
<artifactId>spring-boot-starter-cache</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 缓存库 Caffeine -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.ben-manes.caffeine</groupId>
|
||||||
|
<artifactId>caffeine</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 测试 -->
|
<!-- 测试 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@ -109,8 +122,6 @@
|
|||||||
<version>${guava.version}</version>
|
<version>${guava.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 对于 jar 包,spring-boot-starter-web 已包含嵌入式 Tomcat,无需显式 provided -->
|
|
||||||
|
|
||||||
<!-- spring-quartz任务-->
|
<!-- spring-quartz任务-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.yfd.platform.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface DynamicDictEvict {
|
||||||
|
String tableName(); // 表名
|
||||||
|
String codeColumn() default "id";
|
||||||
|
String nameColumn() default "name";
|
||||||
|
String filter() default "";
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.yfd.platform.aspect;
|
||||||
|
|
||||||
|
import com.yfd.platform.annotation.DynamicDictEvict;
|
||||||
|
import com.yfd.platform.utils.DictCacheHelper;
|
||||||
|
import org.aspectj.lang.JoinPoint;
|
||||||
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Aspect
|
||||||
|
@Component
|
||||||
|
public class DictCacheEvictAspect {
|
||||||
|
@Autowired
|
||||||
|
private DictCacheHelper dictCacheHelper; // 复用上面的Helper
|
||||||
|
|
||||||
|
@AfterReturning("@annotation(dictEvict)")
|
||||||
|
public void evictCache(JoinPoint jp, DynamicDictEvict dictEvict) {
|
||||||
|
// 获取注解上的参数,触发清理
|
||||||
|
dictCacheHelper.evictDynamic(
|
||||||
|
dictEvict.tableName(),
|
||||||
|
dictEvict.codeColumn(),
|
||||||
|
dictEvict.nameColumn(),
|
||||||
|
dictEvict.filter()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,161 @@
|
|||||||
|
package com.yfd.platform.config;
|
||||||
|
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.FilterChain;
|
||||||
|
import jakarta.servlet.ServletException;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||||
|
import org.springframework.security.core.authority.AuthorityUtils;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.AntPathMatcher;
|
||||||
|
import org.springframework.web.filter.OncePerRequestFilter;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用 Bearer Token 鉴权过滤器
|
||||||
|
*
|
||||||
|
* 通过 application.yml 配置需要保护的接口路径,支持 Ant 风格匹配。
|
||||||
|
*
|
||||||
|
* <p>配置示例:
|
||||||
|
* <pre>
|
||||||
|
* bearer-token:
|
||||||
|
* paths:
|
||||||
|
* - /fb/fishhatchrecr/**
|
||||||
|
* - /fprd/wva/**
|
||||||
|
* - /some/api/**
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <p>外部系统调用流程:
|
||||||
|
* <ol>
|
||||||
|
* <li>先调用 OAuth2 token 端点获取 access_token</li>
|
||||||
|
* <li>在业务请求中携带 Authorization: Bearer <access_token></li>
|
||||||
|
* </ol>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BearerTokenFilter extends OncePerRequestFilter {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(BearerTokenFilter.class);
|
||||||
|
|
||||||
|
private final AntPathMatcher pathMatcher = new AntPathMatcher();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需要 Bearer Token 鉴权保护的路径模式列表
|
||||||
|
* 支持 Ant 风格:/api/**, /fb/* /GetKendoListCust
|
||||||
|
*/
|
||||||
|
private final List<String> protectedPathPatterns = new ArrayList<>();
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BearerTokenService bearerTokenService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BearerTokenProperties bearerTokenProperties;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doFilterInternal(HttpServletRequest request,
|
||||||
|
HttpServletResponse response,
|
||||||
|
FilterChain filterChain) throws ServletException, IOException {
|
||||||
|
String requestPath = resolveRequestPath(request);
|
||||||
|
|
||||||
|
// 检查当前请求路径是否需要 Bearer Token 鉴权
|
||||||
|
if (!isProtectedPath(requestPath)) {
|
||||||
|
filterChain.doFilter(request, response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("请求路径 {} 需要 Bearer Token 鉴权", requestPath);
|
||||||
|
|
||||||
|
// 解析 Authorization: Bearer <token>
|
||||||
|
String token = bearerTokenService.resolveToken(request);
|
||||||
|
if (token == null) {
|
||||||
|
log.warn("缺少 Bearer Token, path={}", requestPath);
|
||||||
|
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "缺少 Authorization: Bearer <token> 请求头");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证 token
|
||||||
|
if (!bearerTokenService.validateToken(token, request)) {
|
||||||
|
log.warn("Bearer Token 无效或已过期, path={}", requestPath);
|
||||||
|
response.sendError(HttpServletResponse.SC_FORBIDDEN, "Bearer Token 无效或已过期");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// token 有效,可选:刷新 token 有效期
|
||||||
|
// bearerTokenService.refreshToken(token);
|
||||||
|
|
||||||
|
// 设置 Spring Security 认证上下文,放行后续过滤器
|
||||||
|
UsernamePasswordAuthenticationToken authenticationToken =
|
||||||
|
new UsernamePasswordAuthenticationToken(
|
||||||
|
"bearer-access",
|
||||||
|
null,
|
||||||
|
AuthorityUtils.NO_AUTHORITIES
|
||||||
|
);
|
||||||
|
SecurityContextHolder.getContext().setAuthentication(authenticationToken);
|
||||||
|
|
||||||
|
log.debug("Bearer Token 鉴权通过, path={}", requestPath);
|
||||||
|
filterChain.doFilter(request, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断路径是否需要 Bearer Token 鉴权保护
|
||||||
|
*/
|
||||||
|
private boolean isProtectedPath(String uri) {
|
||||||
|
if (uri == null) return false;
|
||||||
|
|
||||||
|
List<String> patterns = getProtectedPaths();
|
||||||
|
if (patterns.isEmpty()) return false;
|
||||||
|
|
||||||
|
for (String pattern : patterns) {
|
||||||
|
if (pathMatcher.match(pattern, uri)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取受保护的路径模式列表
|
||||||
|
* 优先从 BearerTokenProperties 获取,也可以通过子类覆盖或动态添加
|
||||||
|
*/
|
||||||
|
protected List<String> getProtectedPaths() {
|
||||||
|
List<String> paths = new ArrayList<>();
|
||||||
|
// 从配置文件加载
|
||||||
|
if (bearerTokenProperties != null && bearerTokenProperties.getPaths() != null) {
|
||||||
|
paths.addAll(bearerTokenProperties.getPaths());
|
||||||
|
}
|
||||||
|
// 合并代码中动态添加的路径
|
||||||
|
paths.addAll(protectedPathPatterns);
|
||||||
|
return paths;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 程序化添加受保护路径(Ant 风格匹配)
|
||||||
|
*
|
||||||
|
* @param pattern Ant 路径模式,如 /fb/fishhatchrecr/**
|
||||||
|
*/
|
||||||
|
public void addProtectedPath(String pattern) {
|
||||||
|
if (pattern != null && !protectedPathPatterns.contains(pattern)) {
|
||||||
|
protectedPathPatterns.add(pattern);
|
||||||
|
log.info("已添加 Bearer Token 保护路径: {}", pattern);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String resolveRequestPath(HttpServletRequest request) {
|
||||||
|
String servletPath = request.getServletPath();
|
||||||
|
if (servletPath != null && !servletPath.isEmpty()) {
|
||||||
|
return servletPath;
|
||||||
|
}
|
||||||
|
String uri = request.getRequestURI();
|
||||||
|
String contextPath = request.getContextPath();
|
||||||
|
if (contextPath != null && !contextPath.isEmpty() && uri.startsWith(contextPath)) {
|
||||||
|
return uri.substring(contextPath.length());
|
||||||
|
}
|
||||||
|
return uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.yfd.platform.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bearer Token 鉴权配置属性
|
||||||
|
*
|
||||||
|
* 在 application.yml 中配置需要保护的接口路径:
|
||||||
|
* <pre>
|
||||||
|
* bearer-token:
|
||||||
|
* paths:
|
||||||
|
* - /fb/fishhatchrecr/**
|
||||||
|
* - /some/other/api/**
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "bearer-token")
|
||||||
|
public class BearerTokenProperties {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需要使用 Bearer Token 鉴权的接口路径列表
|
||||||
|
* 支持 Ant 风格路径匹配,如 /api/**, /fb/**
|
||||||
|
*/
|
||||||
|
private List<String> paths = new ArrayList<>(List.of("/base/fpssrlR/ai/report"));
|
||||||
|
}
|
||||||
@ -0,0 +1,189 @@
|
|||||||
|
package com.yfd.platform.config;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bearer Token 鉴权服务
|
||||||
|
*
|
||||||
|
* 负责 Bearer Token 的生成、缓存和验证。
|
||||||
|
* Token 通过 OAuth2 client_credentials 模式下发后,由本服务统一验证。
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class BearerTokenService {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(BearerTokenService.class);
|
||||||
|
|
||||||
|
/** 默认 token 有效期:2 小时 */
|
||||||
|
public static final long DEFAULT_EXPIRE_MILLIS = 2 * 60 * 60 * 1000L;
|
||||||
|
|
||||||
|
private static final String CACHE_PREFIX = "bearer:token:";
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private WebConfig webConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成 Bearer Token 并存入缓存
|
||||||
|
* 由 OAuth2 token 端点调用
|
||||||
|
*
|
||||||
|
* @param request 当前请求
|
||||||
|
* @param clientId 客户端标识
|
||||||
|
* @return token 信息(accessToken, expiresIn 等)
|
||||||
|
*/
|
||||||
|
public BearerTokenResult createToken(HttpServletRequest request, String clientId) {
|
||||||
|
String token = UUID.randomUUID().toString();
|
||||||
|
long expireAt = System.currentTimeMillis() + DEFAULT_EXPIRE_MILLIS;
|
||||||
|
|
||||||
|
JSONObject payload = new JSONObject();
|
||||||
|
payload.put("clientId", clientId);
|
||||||
|
payload.put("ip", getClientIp(request));
|
||||||
|
payload.put("expireAt", expireAt);
|
||||||
|
payload.put("createTime", System.currentTimeMillis());
|
||||||
|
|
||||||
|
webConfig.loginuserCache().put(CACHE_PREFIX + token, payload.toJSONString(), DEFAULT_EXPIRE_MILLIS);
|
||||||
|
|
||||||
|
log.info("Bearer Token 已创建, clientId={}, expireAt={}", clientId, expireAt);
|
||||||
|
|
||||||
|
BearerTokenResult result = new BearerTokenResult();
|
||||||
|
result.setAccessToken(token);
|
||||||
|
result.setTokenType("bearer");
|
||||||
|
result.setExpiresIn(DEFAULT_EXPIRE_MILLIS / 1000);
|
||||||
|
result.setExpireAt(expireAt);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证 Bearer Token 是否有效
|
||||||
|
*
|
||||||
|
* @param token Bearer Token
|
||||||
|
* @param request 当前请求
|
||||||
|
* @return true 有效,false 无效或过期
|
||||||
|
*/
|
||||||
|
public boolean validateToken(String token, HttpServletRequest request) {
|
||||||
|
if (StrUtil.isBlank(token)) {
|
||||||
|
log.debug("Bearer Token 验证失败: token 为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
String cacheValue = webConfig.loginuserCache().get(CACHE_PREFIX + token);
|
||||||
|
if (StrUtil.isBlank(cacheValue)) {
|
||||||
|
log.debug("Bearer Token 验证失败: token 不存在或已过期, token={}", maskToken(token));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject payload;
|
||||||
|
try {
|
||||||
|
payload = JSON.parseObject(cacheValue);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("Bearer Token 解析失败: {}", e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查过期时间
|
||||||
|
Long expireAt = payload.getLong("expireAt");
|
||||||
|
if (expireAt == null || expireAt < System.currentTimeMillis()) {
|
||||||
|
log.debug("Bearer Token 已过期, token={}", maskToken(token));
|
||||||
|
webConfig.loginuserCache().remove(CACHE_PREFIX + token);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 可选:校验 IP 一致性(可在子类中覆盖)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从请求中解析 Bearer Token
|
||||||
|
* 从 Authorization: Bearer <token> 头中提取
|
||||||
|
*
|
||||||
|
* @param request HTTP 请求
|
||||||
|
* @return token 字符串,解析失败返回 null
|
||||||
|
*/
|
||||||
|
public String resolveToken(HttpServletRequest request) {
|
||||||
|
String authHeader = request.getHeader("Authorization");
|
||||||
|
if (StrUtil.isBlank(authHeader)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 支持 "Bearer xxx" 和 "bearer xxx" 格式
|
||||||
|
String trimmed = authHeader.trim();
|
||||||
|
if (trimmed.length() > 7
|
||||||
|
&& "bearer".equalsIgnoreCase(trimmed.substring(0, 6))
|
||||||
|
&& trimmed.charAt(6) == ' ') {
|
||||||
|
return trimmed.substring(7).trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新 token 有效期(延长使用时间)
|
||||||
|
*
|
||||||
|
* @param token Bearer Token
|
||||||
|
*/
|
||||||
|
public void refreshToken(String token) {
|
||||||
|
if (StrUtil.isBlank(token)) return;
|
||||||
|
String cacheValue = webConfig.loginuserCache().get(CACHE_PREFIX + token);
|
||||||
|
if (StrUtil.isBlank(cacheValue)) return;
|
||||||
|
|
||||||
|
JSONObject payload = JSON.parseObject(cacheValue);
|
||||||
|
long newExpireAt = System.currentTimeMillis() + DEFAULT_EXPIRE_MILLIS;
|
||||||
|
payload.put("expireAt", newExpireAt);
|
||||||
|
webConfig.loginuserCache().put(CACHE_PREFIX + token, payload.toJSONString(), DEFAULT_EXPIRE_MILLIS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 撤销 token
|
||||||
|
*
|
||||||
|
* @param token Bearer Token
|
||||||
|
*/
|
||||||
|
public void revokeToken(String token) {
|
||||||
|
if (StrUtil.isNotBlank(token)) {
|
||||||
|
webConfig.loginuserCache().remove(CACHE_PREFIX + token);
|
||||||
|
log.info("Bearer Token 已撤销");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getClientIp(HttpServletRequest request) {
|
||||||
|
String ip = request.getHeader("X-Forwarded-For");
|
||||||
|
if (StrUtil.isNotBlank(ip)) {
|
||||||
|
return ip.split(",")[0].trim();
|
||||||
|
}
|
||||||
|
return request.getRemoteAddr();
|
||||||
|
}
|
||||||
|
|
||||||
|
private String maskToken(String token) {
|
||||||
|
if (token == null || token.length() <= 8) return "***";
|
||||||
|
return token.substring(0, 4) + "***" + token.substring(token.length() - 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bearer Token 创建结果
|
||||||
|
*/
|
||||||
|
public static class BearerTokenResult {
|
||||||
|
/** 访问令牌 */
|
||||||
|
private String accessToken;
|
||||||
|
/** 令牌类型 */
|
||||||
|
private String tokenType;
|
||||||
|
/** 有效期(秒) */
|
||||||
|
private long expiresIn;
|
||||||
|
/** 过期时间戳 */
|
||||||
|
private long expireAt;
|
||||||
|
|
||||||
|
public String getAccessToken() { return accessToken; }
|
||||||
|
public void setAccessToken(String accessToken) { this.accessToken = accessToken; }
|
||||||
|
public String getTokenType() { return tokenType; }
|
||||||
|
public void setTokenType(String tokenType) { this.tokenType = tokenType; }
|
||||||
|
public long getExpiresIn() { return expiresIn; }
|
||||||
|
public void setExpiresIn(long expiresIn) { this.expiresIn = expiresIn; }
|
||||||
|
public long getExpireAt() { return expireAt; }
|
||||||
|
public void setExpireAt(long expireAt) { this.expireAt = expireAt; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
package com.yfd.platform.config;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.yfd.platform.config.BearerTokenService.BearerTokenResult;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.Base64;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OAuth2 Token 端点
|
||||||
|
*
|
||||||
|
* <p>供外部系统通过 client_credentials 模式获取 Bearer Token。
|
||||||
|
*
|
||||||
|
* <p>请求格式(参考 鉴权与文件上传接口说明.md 3.2 节):
|
||||||
|
* <pre>
|
||||||
|
* POST /oauth2/token
|
||||||
|
* Content-Type: application/x-www-form-urlencoded
|
||||||
|
* Authorization: Basic <base64(clientId:clientSecret)>
|
||||||
|
*
|
||||||
|
* grant_type=client_credentials
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* <p>返回格式:
|
||||||
|
* <pre>
|
||||||
|
* {
|
||||||
|
* "success": true,
|
||||||
|
* "errorCode": 0,
|
||||||
|
* "message": "获取token成功",
|
||||||
|
* "data": {
|
||||||
|
* "access_token": "xxx",
|
||||||
|
* "token_type": "bearer",
|
||||||
|
* "expires_in": 7200
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/oauth2")
|
||||||
|
public class OAuth2TokenController {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(OAuth2TokenController.class);
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private BearerTokenService bearerTokenService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取 Access Token(client_credentials 模式)
|
||||||
|
*/
|
||||||
|
@PostMapping("/oauth/token")
|
||||||
|
public Map<String, Object> getToken(HttpServletRequest request) {
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
|
||||||
|
// 解析 Authorization: Basic <base64>
|
||||||
|
String authHeader = request.getHeader("Authorization");
|
||||||
|
if (StrUtil.isBlank(authHeader) || !authHeader.trim().toLowerCase().startsWith("basic ")) {
|
||||||
|
log.warn("获取 Token 失败: 缺少有效的 Basic Authorization 头");
|
||||||
|
result.put("success", false);
|
||||||
|
result.put("errorCode", -1);
|
||||||
|
result.put("message", "缺少有效的 Authorization: Basic 认证信息");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
String clientId = resolveClientId(authHeader);
|
||||||
|
if (StrUtil.isBlank(clientId)|| !"client:secret".equals(clientId)) {
|
||||||
|
log.warn("获取 Token 失败: 无法解析 client");
|
||||||
|
result.put("success", false);
|
||||||
|
result.put("errorCode", -1);
|
||||||
|
result.put("message", "无法解析客户端标识");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证 grant_type
|
||||||
|
String grantType = request.getParameter("grant_type");
|
||||||
|
if (StrUtil.isBlank(grantType) || !"client_credentials".equals(grantType)) {
|
||||||
|
log.warn("获取 Token 失败: 不支持的 grant_type={}", grantType);
|
||||||
|
result.put("success", false);
|
||||||
|
result.put("errorCode", -1);
|
||||||
|
// 仅支持 client_credentials 授权模式
|
||||||
|
result.put("message", "授权模式错误");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
BearerTokenResult tokenResult = bearerTokenService.createToken(request, clientId);
|
||||||
|
|
||||||
|
Map<String, Object> data = new HashMap<>();
|
||||||
|
data.put("access_token", tokenResult.getAccessToken());
|
||||||
|
data.put("token_type", tokenResult.getTokenType());
|
||||||
|
data.put("expires_in", tokenResult.getExpiresIn());
|
||||||
|
|
||||||
|
result.put("success", true);
|
||||||
|
result.put("errorCode", 0);
|
||||||
|
result.put("message", "获取token成功");
|
||||||
|
result.put("data", data);
|
||||||
|
|
||||||
|
log.info("OAuth2 Token 签发成功, clientId={}", clientId);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从 Authorization: Basic <base64> 头中解析 client
|
||||||
|
*/
|
||||||
|
private String resolveClientId(String authHeader) {
|
||||||
|
try {
|
||||||
|
String base64 = authHeader.substring(6).trim();
|
||||||
|
byte[] decoded = Base64.getDecoder().decode(base64);
|
||||||
|
// // 格式: client:secret
|
||||||
|
// int colonIdx = credentials.indexOf(':');
|
||||||
|
// if (colonIdx > 0) {
|
||||||
|
// return credentials.substring(0, colonIdx);
|
||||||
|
// }
|
||||||
|
return new String(decoded, StandardCharsets.UTF_8);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("解析 Basic 认证信息失败: {}", e.getMessage());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -42,6 +42,9 @@ public class SecurityConfig {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RegisterAccessTokenFilter registerAccessTokenFilter;
|
private RegisterAccessTokenFilter registerAccessTokenFilter;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BearerTokenFilter bearerTokenFilter;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AuthenticationException authenticationException;
|
private AuthenticationException authenticationException;
|
||||||
|
|
||||||
@ -60,7 +63,8 @@ public class SecurityConfig {
|
|||||||
.requestMatchers("/data/fishDraft/previewFile").permitAll()
|
.requestMatchers("/data/fishDraft/previewFile").permitAll()
|
||||||
.requestMatchers("/tempFile/**").permitAll()
|
.requestMatchers("/tempFile/**").permitAll()
|
||||||
.requestMatchers("/system/user/auditUser").permitAll()
|
.requestMatchers("/system/user/auditUser").permitAll()
|
||||||
.requestMatchers("/register/accessToken").permitAll()
|
.requestMatchers("/api/oauth2/oauth/token").permitAll()
|
||||||
|
.requestMatchers("/dict/cache/**").permitAll()
|
||||||
.requestMatchers("/sys/psbmodulelbb/**").permitAll()
|
.requestMatchers("/sys/psbmodulelbb/**").permitAll()
|
||||||
.requestMatchers("/base/operationLog/**").permitAll()
|
.requestMatchers("/base/operationLog/**").permitAll()
|
||||||
// .requestMatchers("/eng/**").permitAll()
|
// .requestMatchers("/eng/**").permitAll()
|
||||||
@ -87,6 +91,7 @@ public class SecurityConfig {
|
|||||||
// .requestMatchers("/base/msalongb/**").permitAll()
|
// .requestMatchers("/base/msalongb/**").permitAll()
|
||||||
// .requestMatchers("/base/msalongdetb/**").permitAll()
|
// .requestMatchers("/base/msalongdetb/**").permitAll()
|
||||||
// .requestMatchers("/smartImage/**").permitAll()
|
// .requestMatchers("/smartImage/**").permitAll()
|
||||||
|
// .requestMatchers("/base/fpssrlR/**").permitAll()
|
||||||
.requestMatchers("/sms/**").permitAll()
|
.requestMatchers("/sms/**").permitAll()
|
||||||
.requestMatchers(HttpMethod.GET, "/").permitAll()
|
.requestMatchers(HttpMethod.GET, "/").permitAll()
|
||||||
.requestMatchers(HttpMethod.GET,
|
.requestMatchers(HttpMethod.GET,
|
||||||
@ -114,6 +119,7 @@ public class SecurityConfig {
|
|||||||
.cors(cors -> {});
|
.cors(cors -> {});
|
||||||
|
|
||||||
http.addFilterBefore(registerAccessTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
http.addFilterBefore(registerAccessTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
||||||
|
http.addFilterBefore(bearerTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
||||||
http.addFilterBefore(jwtAuthenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
http.addFilterBefore(jwtAuthenticationTokenFilter, UsernamePasswordAuthenticationFilter.class);
|
||||||
|
|
||||||
http.exceptionHandling(ex -> ex
|
http.exceptionHandling(ex -> ex
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.yfd.platform.qgc_base.controller;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.yfd.platform.annotation.DynamicDictEvict;
|
||||||
import com.yfd.platform.annotation.Log;
|
import com.yfd.platform.annotation.Log;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
@ -104,6 +105,7 @@ public class SdEngInfoBHController {
|
|||||||
@Log(module = "电站管理", value = "新增电站")
|
@Log(module = "电站管理", value = "新增电站")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@Operation(summary = "新增电站")
|
@Operation(summary = "新增电站")
|
||||||
|
@DynamicDictEvict(tableName = "SD_ENGINFO_B_H", codeColumn = "STCD", nameColumn = "ENNM")
|
||||||
public ResponseResult add(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult add(@RequestBody SdEngInfoBHOperateRequest request) {
|
||||||
SdEngInfoBH engInfo = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdEngInfoBH.class);
|
SdEngInfoBH engInfo = request == null || request.getEngInfo() == null ? null : objectMapper.convertValue(request.getEngInfo(), SdEngInfoBH.class);
|
||||||
boolean result = engInfoBHService.addEngInfo(engInfo, request.getSource());
|
boolean result = engInfoBHService.addEngInfo(engInfo, request.getSource());
|
||||||
@ -113,6 +115,7 @@ public class SdEngInfoBHController {
|
|||||||
@Log(module = "电站管理", value = "修改电站")
|
@Log(module = "电站管理", value = "修改电站")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Operation(summary = "修改电站")
|
@Operation(summary = "修改电站")
|
||||||
|
@DynamicDictEvict(tableName = "SD_ENGINFO_B_H", codeColumn = "STCD", nameColumn = "ENNM")
|
||||||
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
public ResponseResult update(@RequestBody SdEngInfoBHOperateRequest request) throws Exception {
|
||||||
boolean result = engInfoBHService.updateEngInfo(request.getEngInfo(), request.getSource());
|
boolean result = engInfoBHService.updateEngInfo(request.getEngInfo(), request.getSource());
|
||||||
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
return result ? ResponseResult.success("修改成功") : ResponseResult.error("修改失败");
|
||||||
@ -121,6 +124,7 @@ public class SdEngInfoBHController {
|
|||||||
@Log(module = "电站管理", value = "删除电站")
|
@Log(module = "电站管理", value = "删除电站")
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
@Operation(summary = "删除电站")
|
@Operation(summary = "删除电站")
|
||||||
|
@DynamicDictEvict(tableName = "SD_ENGINFO_B_H", codeColumn = "STCD", nameColumn = "ENNM")
|
||||||
public ResponseResult delete(@RequestBody SdEngInfoBHOperateRequest request) {
|
public ResponseResult delete(@RequestBody SdEngInfoBHOperateRequest request) {
|
||||||
boolean result = engInfoBHService.deleteEngInfo(request == null ? null : request.getIds(),
|
boolean result = engInfoBHService.deleteEngInfo(request == null ? null : request.getIds(),
|
||||||
request == null ? null : request.getSource());
|
request == null ? null : request.getSource());
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
package com.yfd.platform.qgc_base.controller;
|
package com.yfd.platform.qgc_base.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.yfd.platform.annotation.Log;
|
import com.yfd.platform.annotation.Log;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
import com.yfd.platform.qgc_base.domain.SdEngInfoBHOperateRequest;
|
import com.yfd.platform.qgc_base.domain.*;
|
||||||
import com.yfd.platform.qgc_base.domain.SdFpssrlR;
|
import com.yfd.platform.qgc_base.service.ISdFishDictoryBService;
|
||||||
import com.yfd.platform.qgc_base.domain.SdFpssrlRAiRequest;
|
|
||||||
import com.yfd.platform.qgc_base.service.ISdFpssrlRService;
|
import com.yfd.platform.qgc_base.service.ISdFpssrlRService;
|
||||||
import com.yfd.platform.qgc_data.service.AttachmentUploadService;
|
import com.yfd.platform.qgc_data.service.AttachmentUploadService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
@ -19,6 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,6 +43,9 @@ public class SdFpssrlRController {
|
|||||||
@Resource
|
@Resource
|
||||||
private AttachmentUploadService attachmentUploadService;
|
private AttachmentUploadService attachmentUploadService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISdFishDictoryBService sdFishDictoryBService;
|
||||||
|
|
||||||
// ==================== CRUD 方法 ====================
|
// ==================== CRUD 方法 ====================
|
||||||
|
|
||||||
@PostMapping("/queryPageList")
|
@PostMapping("/queryPageList")
|
||||||
@ -131,7 +136,14 @@ public class SdFpssrlRController {
|
|||||||
if (requests == null || requests.isEmpty()) {
|
if (requests == null || requests.isEmpty()) {
|
||||||
return ResponseResult.error("请求数据不能为空");
|
return ResponseResult.error("请求数据不能为空");
|
||||||
}
|
}
|
||||||
|
List<SdFishDictoryB> list = sdFishDictoryBService.list(new LambdaQueryWrapper<SdFishDictoryB>().eq(SdFishDictoryB::getIsDeleted, "0").select(SdFishDictoryB::getId, SdFishDictoryB::getName));
|
||||||
|
Map<String, String> idNameMap = list.stream()
|
||||||
|
.filter(item -> item.getId() != null && item.getName() != null)
|
||||||
|
.collect(Collectors.toMap(
|
||||||
|
SdFishDictoryB::getName,
|
||||||
|
SdFishDictoryB::getId,
|
||||||
|
(oldValue, newValue) -> oldValue // 如果有重复 key 保留旧值(实际不会重复)
|
||||||
|
));
|
||||||
// 逐条校验
|
// 逐条校验
|
||||||
for (int i = 0; i < requests.size(); i++) {
|
for (int i = 0; i < requests.size(); i++) {
|
||||||
SdFpssrlRAiRequest req = requests.get(i);
|
SdFpssrlRAiRequest req = requests.get(i);
|
||||||
@ -141,16 +153,22 @@ public class SdFpssrlRController {
|
|||||||
if (req.getStcd() == null || req.getStcd().isEmpty()) {
|
if (req.getStcd() == null || req.getStcd().isEmpty()) {
|
||||||
return ResponseResult.error("第" + (i + 1) + "条过鱼设施编码(stcd)不能为空");
|
return ResponseResult.error("第" + (i + 1) + "条过鱼设施编码(stcd)不能为空");
|
||||||
}
|
}
|
||||||
|
if (req.getFwdx() == null || req.getFwdx().isEmpty()) {
|
||||||
|
return ResponseResult.error("第" + (i + 1) + "条服务对象(fwdx)不能为空");
|
||||||
|
}
|
||||||
if (req.getTm() == null) {
|
if (req.getTm() == null) {
|
||||||
return ResponseResult.error("第" + (i + 1) + "条识别时间(tm)不能为空");
|
return ResponseResult.error("第" + (i + 1) + "条识别时间(tm)不能为空");
|
||||||
}
|
}
|
||||||
if (req.getFtp() == null || req.getFtp().isEmpty()) {
|
if (req.getFtp() == null || req.getFtp().isEmpty()) {
|
||||||
return ResponseResult.error("第" + (i + 1) + "条鱼种类(ftp)不能为空");
|
return ResponseResult.error("第" + (i + 1) + "条鱼种类(ftp)不能为空");
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isNotBlank(req.getFtp())) {
|
||||||
|
req.setFtp(idNameMap.getOrDefault(req.getFtp(), req.getFtp()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
List<SdFpssrlR> result = sdFpssrlRService.processAiReportBatch(requests);
|
List<SdFpssrlAiR> result = sdFpssrlRService.processAiReportBatch(requests);
|
||||||
// List<String> ids = result.stream().map(SdFpssrlR::getId).collect(Collectors.toList());
|
// List<String> ids = result.stream().map(SdFpssrlR::getId).collect(Collectors.toList());
|
||||||
log.info("AI批量上报成功,共{}条", result.size());
|
log.info("AI批量上报成功,共{}条", result.size());
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
|
|||||||
@ -104,6 +104,9 @@ public class SdAiboxBH implements Serializable {
|
|||||||
@FieldChinese("是否启用")
|
@FieldChinese("是否启用")
|
||||||
private Integer usfl;
|
private Integer usfl;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String usflName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据是否接入
|
* 数据是否接入
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -60,6 +60,10 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("是否启用")
|
@FieldChinese("是否启用")
|
||||||
private Integer usfl;
|
private Integer usfl;
|
||||||
|
|
||||||
|
/** 是否启用名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String usflName;
|
||||||
|
|
||||||
/** 水能利用数据是否接入 */
|
/** 水能利用数据是否接入 */
|
||||||
@FieldChinese("水能利用数据是否接入")
|
@FieldChinese("水能利用数据是否接入")
|
||||||
private Integer dtin;
|
private Integer dtin;
|
||||||
@ -219,15 +223,31 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("建设状态")
|
@FieldChinese("建设状态")
|
||||||
private String bldstt;
|
private String bldstt;
|
||||||
|
|
||||||
|
/** 站类 */
|
||||||
|
@FieldChinese("站类")
|
||||||
|
private String sttp;
|
||||||
|
|
||||||
|
/** 站类名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String sttpName;
|
||||||
|
|
||||||
/** 建设状态分类 */
|
/** 建设状态分类 */
|
||||||
@TableField("BLDSTT_CODE")
|
@TableField("BLDSTT_CODE")
|
||||||
@FieldChinese("建设状态分类")
|
@FieldChinese("建设状态分类")
|
||||||
private Integer bldsttCode;
|
private Integer bldsttCode;
|
||||||
|
|
||||||
|
/** 建设状态分类名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String bldsttCodeName;
|
||||||
|
|
||||||
/** 工程类别 */
|
/** 工程类别 */
|
||||||
@FieldChinese("工程类别")
|
@FieldChinese("工程类别")
|
||||||
private Integer engtp;
|
private Integer engtp;
|
||||||
|
|
||||||
|
/** 工程类别名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String engtpName;
|
||||||
|
|
||||||
/** 工程规模 */
|
/** 工程规模 */
|
||||||
@FieldChinese("工程规模")
|
@FieldChinese("工程规模")
|
||||||
private Integer prsc;
|
private Integer prsc;
|
||||||
@ -236,14 +256,26 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("工程规模(水库库容)")
|
@FieldChinese("工程规模(水库库容)")
|
||||||
private Integer scrsc;
|
private Integer scrsc;
|
||||||
|
|
||||||
|
/** 工程规模(水库库容)名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String scrscName;
|
||||||
|
|
||||||
/** 工程等别 */
|
/** 工程等别 */
|
||||||
@FieldChinese("工程等别")
|
@FieldChinese("工程等别")
|
||||||
private String prgr;
|
private String prgr;
|
||||||
|
|
||||||
|
/** 工程等别名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String prgrName;
|
||||||
|
|
||||||
/** 电站-主要功能 */
|
/** 电站-主要功能 */
|
||||||
@FieldChinese("电站-主要功能")
|
@FieldChinese("电站-主要功能")
|
||||||
private String fn;
|
private String fn;
|
||||||
|
|
||||||
|
/** 电站-主要功能名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String fnName;
|
||||||
|
|
||||||
/** 地震基本烈度 */
|
/** 地震基本烈度 */
|
||||||
@FieldChinese("地震基本烈度")
|
@FieldChinese("地震基本烈度")
|
||||||
private String bsssin;
|
private String bsssin;
|
||||||
@ -256,31 +288,58 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("是否调节水库")
|
@FieldChinese("是否调节水库")
|
||||||
private Integer adjustEng;
|
private Integer adjustEng;
|
||||||
|
|
||||||
|
/** 是否调节水库名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String adjustEngName;
|
||||||
|
|
||||||
/** 有无拦河坝 */
|
/** 有无拦河坝 */
|
||||||
@TableField("ISHVBRRG")
|
@TableField("ISHVBRRG")
|
||||||
@FieldChinese("有无拦河坝")
|
@FieldChinese("有无拦河坝")
|
||||||
private String ishvrgrg;
|
private String ishvrgrg;
|
||||||
|
|
||||||
|
/** 有无拦河坝名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String ishvrgrgName;
|
||||||
|
|
||||||
/** 水库调节性能 */
|
/** 水库调节性能 */
|
||||||
@FieldChinese("水库调节性能")
|
@FieldChinese("水库调节性能")
|
||||||
private String rgcp;
|
private String rgcp;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String rgcpName;
|
||||||
|
|
||||||
/** 坝体材质 */
|
/** 坝体材质 */
|
||||||
@FieldChinese("坝体材质")
|
@FieldChinese("坝体材质")
|
||||||
private Integer dmat;
|
private Integer dmat;
|
||||||
|
|
||||||
|
/** 坝体材质名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dmatName;
|
||||||
|
|
||||||
/** 坝体类型 */
|
/** 坝体类型 */
|
||||||
@FieldChinese("坝体类型")
|
@FieldChinese("坝体类型")
|
||||||
private String dmtp;
|
private String dmtp;
|
||||||
|
|
||||||
|
/** 坝体类型名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dmtpName;
|
||||||
|
|
||||||
/** 开发方式 */
|
/** 开发方式 */
|
||||||
@FieldChinese("开发方式")
|
@FieldChinese("开发方式")
|
||||||
private String dvtp;
|
private String dvtp;
|
||||||
|
|
||||||
|
/** 开发方式名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dvtpName;
|
||||||
|
|
||||||
/** 建设类型 */
|
/** 建设类型 */
|
||||||
@FieldChinese("建设类型")
|
@FieldChinese("建设类型")
|
||||||
private String cntp;
|
private String cntp;
|
||||||
|
|
||||||
|
/** 建设类型名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cntpName;
|
||||||
|
|
||||||
/** 管理单位 */
|
/** 管理单位 */
|
||||||
@FieldChinese("管理单位")
|
@FieldChinese("管理单位")
|
||||||
private String mnun;
|
private String mnun;
|
||||||
@ -293,6 +352,10 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("归属部门")
|
@FieldChinese("归属部门")
|
||||||
private String blsys;
|
private String blsys;
|
||||||
|
|
||||||
|
/** 归属部门名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String blsysName;
|
||||||
|
|
||||||
/** 绕经度方向旋转矩阵值 */
|
/** 绕经度方向旋转矩阵值 */
|
||||||
@FieldChinese("绕经度方向旋转矩阵值")
|
@FieldChinese("绕经度方向旋转矩阵值")
|
||||||
private Double roll;
|
private Double roll;
|
||||||
@ -313,6 +376,10 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("是否受下游顶托")
|
@FieldChinese("是否受下游顶托")
|
||||||
private String impdstrz;
|
private String impdstrz;
|
||||||
|
|
||||||
|
/** 是否受下游顶托名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String impdstrzName;
|
||||||
|
|
||||||
/** 工程概况 */
|
/** 工程概况 */
|
||||||
@FieldChinese("工程概况")
|
@FieldChinese("工程概况")
|
||||||
private String prov;
|
private String prov;
|
||||||
@ -831,6 +898,10 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("航道级别")
|
@FieldChinese("航道级别")
|
||||||
private String chngrd;
|
private String chngrd;
|
||||||
|
|
||||||
|
/** 渠道级别名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String chngrdName;
|
||||||
|
|
||||||
/** 渠化航道里程 */
|
/** 渠化航道里程 */
|
||||||
@FieldChinese("渠化航道里程")
|
@FieldChinese("渠化航道里程")
|
||||||
private Double chnlnth;
|
private Double chnlnth;
|
||||||
@ -968,6 +1039,10 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("是否主要流域电站")
|
@FieldChinese("是否主要流域电站")
|
||||||
private Integer chiefbasineng;
|
private Integer chiefbasineng;
|
||||||
|
|
||||||
|
/** 是否主要流域电站名称 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String chiefbasinengName;
|
||||||
|
|
||||||
/** 蓄水开始时间 */
|
/** 蓄水开始时间 */
|
||||||
@FieldChinese("蓄水开始时间")
|
@FieldChinese("蓄水开始时间")
|
||||||
private String swsdt;
|
private String swsdt;
|
||||||
@ -1037,18 +1112,34 @@ public class SdEngInfoBH implements Serializable {
|
|||||||
@FieldChinese("环境监测数据接入情况")
|
@FieldChinese("环境监测数据接入情况")
|
||||||
private Integer dtinEnv;
|
private Integer dtinEnv;
|
||||||
|
|
||||||
|
/** 环境监测数据接入情况描述 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String dtinEnvName;
|
||||||
|
|
||||||
/** 最新运行状态:1=运行中 2=未运行 */
|
/** 最新运行状态:1=运行中 2=未运行 */
|
||||||
@FieldChinese("最新运行状态")
|
@FieldChinese("最新运行状态")
|
||||||
private Integer runState;
|
private Integer runState;
|
||||||
|
|
||||||
|
/** 最新运行状态描述 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String runStateName;
|
||||||
|
|
||||||
/** 告警状态 */
|
/** 告警状态 */
|
||||||
@FieldChinese("告警状态")
|
@FieldChinese("告警状态")
|
||||||
private String warnState;
|
private String warnState;
|
||||||
|
|
||||||
|
/** 告警状态描述 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String warnStateName;
|
||||||
|
|
||||||
/** 开展环保自动检测工作状态:0=暂无数据 1=正常 */
|
/** 开展环保自动检测工作状态:0=暂无数据 1=正常 */
|
||||||
@FieldChinese("开展环保自动检测工作状态")
|
@FieldChinese("开展环保自动检测工作状态")
|
||||||
private Integer coenvwState;
|
private Integer coenvwState;
|
||||||
|
|
||||||
|
/** 开展环保自动检测工作状态描述 */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String coenvwStateName;
|
||||||
|
|
||||||
/** 在线地址 */
|
/** 在线地址 */
|
||||||
@FieldChinese("在线地址")
|
@FieldChinese("在线地址")
|
||||||
private String url;
|
private String url;
|
||||||
|
|||||||
@ -0,0 +1,121 @@
|
|||||||
|
package com.yfd.platform.qgc_base.domain;
|
||||||
|
|
||||||
|
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 lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 过鱼设施AI盒子自动数据表
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("SD_FPSSRL_AI_R")
|
||||||
|
public class SdFpssrlAiR implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 过鱼设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 时间 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 过鱼数量 */
|
||||||
|
private Integer fcnt;
|
||||||
|
|
||||||
|
/** 鱼尺寸:大/中/小 */
|
||||||
|
private String fsz;
|
||||||
|
|
||||||
|
/** 鱼长度 */
|
||||||
|
private BigDecimal length;
|
||||||
|
|
||||||
|
/** 鱼宽度 */
|
||||||
|
private BigDecimal width;
|
||||||
|
|
||||||
|
/** 鱼速度 */
|
||||||
|
private String fishspeed;
|
||||||
|
|
||||||
|
/** 游向:0=上行 1=下行 */
|
||||||
|
private Integer direction;
|
||||||
|
|
||||||
|
/** 鱼位置 */
|
||||||
|
private Long fishposition;
|
||||||
|
|
||||||
|
/** 鱼截图主图片url */
|
||||||
|
private String firstImgUrl;
|
||||||
|
|
||||||
|
/** 鱼截图副图片url */
|
||||||
|
private String secondImgUrl;
|
||||||
|
|
||||||
|
/** 视频url */
|
||||||
|
private String videoUrl;
|
||||||
|
|
||||||
|
/** 水温:单位:℃ */
|
||||||
|
private BigDecimal temperature;
|
||||||
|
|
||||||
|
/** 水位:单位:m */
|
||||||
|
private BigDecimal waterlevel;
|
||||||
|
|
||||||
|
/** 流速:单位:m/s */
|
||||||
|
private BigDecimal speed;
|
||||||
|
|
||||||
|
/** 流量:单位:m3/s */
|
||||||
|
private BigDecimal q;
|
||||||
|
|
||||||
|
/** 溶氧:单位:mg/L */
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
/** 浊度:单位:NTU */
|
||||||
|
private Integer tu;
|
||||||
|
|
||||||
|
/** 过鱼通道 */
|
||||||
|
private String channelno;
|
||||||
|
|
||||||
|
/** AI盒子编码 */
|
||||||
|
private String aiBoxCode;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除:0=未删除 1=已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 过鱼设施名称(非表字段,用于列表展示) */
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String stnm;
|
||||||
|
}
|
||||||
@ -38,6 +38,11 @@ public class SdFpssrlRAiRequest {
|
|||||||
*/
|
*/
|
||||||
private String fsz;
|
private String fsz;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
private String fwdx;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 鱼长度,单位:cm
|
* 鱼长度,单位:cm
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -245,7 +245,8 @@ public class SdVdinfoB implements Serializable {
|
|||||||
|
|
||||||
/** 视频站设备机位变更日期 */
|
/** 视频站设备机位变更日期 */
|
||||||
@FieldChinese("视频站设备机位变更日期")
|
@FieldChinese("视频站设备机位变更日期")
|
||||||
private Integer jwupdate;
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date jwupdate;
|
||||||
|
|
||||||
/** 视频站AI识别是否启用 */
|
/** 视频站AI识别是否启用 */
|
||||||
@FieldChinese("视频站AI识别是否启用")
|
@FieldChinese("视频站AI识别是否启用")
|
||||||
|
|||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.yfd.platform.qgc_base.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.yfd.platform.qgc_base.domain.SdFpssrlAiR;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 过鱼设施AI盒子自动数据表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface SdFpssrlAiRMapper extends BaseMapper<SdFpssrlAiR> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量合并过鱼AI自动数据(基于 STCD + TM + FTP 唯一)
|
||||||
|
* 存在则更新,不存在则新增
|
||||||
|
*/
|
||||||
|
int mergeFishRecords(List<SdFpssrlAiR> list);
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ package com.yfd.platform.qgc_base.service;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
|
import com.yfd.platform.qgc_base.domain.SdFpssrlAiR;
|
||||||
import com.yfd.platform.qgc_base.domain.SdFpssrlR;
|
import com.yfd.platform.qgc_base.domain.SdFpssrlR;
|
||||||
import com.yfd.platform.qgc_base.domain.SdFpssrlRAiRequest;
|
import com.yfd.platform.qgc_base.domain.SdFpssrlRAiRequest;
|
||||||
|
|
||||||
@ -48,5 +49,5 @@ public interface ISdFpssrlRService extends IService<SdFpssrlR> {
|
|||||||
/**
|
/**
|
||||||
* 批量处理AI设备上报的识别数据
|
* 批量处理AI设备上报的识别数据
|
||||||
*/
|
*/
|
||||||
List<SdFpssrlR> processAiReportBatch(List<SdFpssrlRAiRequest> requests);
|
List<SdFpssrlAiR> processAiReportBatch(List<SdFpssrlRAiRequest> requests);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,10 +52,12 @@ public class SdAiboxBHServiceImpl extends ServiceImpl<SdAiboxBHMapper, SdAiboxBH
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,9 @@ public class SdAimonitorBHServiceImpl extends ServiceImpl<SdAimonitorBHMapper, S
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,9 +45,9 @@ public class SdArtsgBHServiceImpl extends ServiceImpl<SdArtsgBHMapper, SdArtsgBH
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -51,9 +51,9 @@ public class SdDwBHServiceImpl extends ServiceImpl<SdDwBHMapper, SdDwBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
|||||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.yfd.platform.annotation.FieldChinese;
|
||||||
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
import com.yfd.platform.common.DataSourceLoadOptionsBase;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
@ -45,9 +46,7 @@ import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
|||||||
import com.yfd.platform.qgc_base.service.ISdEngInfoBHService;
|
import com.yfd.platform.qgc_base.service.ISdEngInfoBHService;
|
||||||
import com.yfd.platform.qgc_eng.eq.entity.vo.LastTmEngEqDataVo;
|
import com.yfd.platform.qgc_eng.eq.entity.vo.LastTmEngEqDataVo;
|
||||||
import com.yfd.platform.system.service.IAdminAuthService;
|
import com.yfd.platform.system.service.IAdminAuthService;
|
||||||
import com.yfd.platform.utils.QgcQueryWrapperUtil;
|
import com.yfd.platform.utils.*;
|
||||||
import com.yfd.platform.utils.RedisCacheUtil;
|
|
||||||
import com.yfd.platform.utils.SecurityUtils;
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
@ -66,13 +65,61 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEngInfoBH> implements ISdEngInfoBHService {
|
public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEngInfoBH> implements ISdEngInfoBHService {
|
||||||
|
private static final String TABLE_NAME = "SD_FISHDICTORY_B";
|
||||||
private static final Map<String, String> ENG_CODE_NAME_FIELD_MAP = new LinkedHashMap<>();
|
private static final Map<String, String> ENG_CODE_NAME_FIELD_MAP = new LinkedHashMap<>();
|
||||||
@Resource
|
@Resource
|
||||||
private RedisCacheUtil redisCacheUtil;
|
private RedisCacheUtil redisCacheUtil;
|
||||||
@Resource
|
@Resource
|
||||||
private IDataScopeFilterService dataScopeFilterService;
|
private IDataScopeFilterService dataScopeFilterService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 代码转名称元数据配置列表(静态初始化)
|
||||||
|
* <p>
|
||||||
|
* 每个模块的 ServiceImpl 中可按需定义自己的 codeToNameMetadataBoList,
|
||||||
|
* 在查询方法返回前调用 dictCodeToNameConverter.convertCodeToName(voList, codeToNameMetadataBoList)
|
||||||
|
* 即可自动将 code 字段转为对应的 name 字段。
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* 使用示例:
|
||||||
|
* // 在查询方法末尾调用:
|
||||||
|
* dictCodeToNameConverter.convertCodeToName(voList, CODE_TO_NAME_META_LIST);
|
||||||
|
* </pre>
|
||||||
|
*/
|
||||||
|
private static final List<CodeToNameMetadataBo> CODE_TO_NAME_META_LIST = new ArrayList<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinEnv").modifyProperty("dtinEnvName").dictType("STATIC").dictSource("DTIN_ENV").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("runState").modifyProperty("runStateName").dictType("STATIC").dictSource("RUN_STATE").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("warnState").modifyProperty("warnStateName").dictType("STATIC").dictSource("WARN_STATE").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("coenvwState").modifyProperty("coenvwStateName").dictType("STATIC").dictSource("COENVW_STATE").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("scrsc").modifyProperty("scrscStateName").dictType("STATIC").dictSource("SCRSC").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("adjustEng").modifyProperty("adjustEngName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("chiefbasineng").modifyProperty("chiefbasinengName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("impdstrz").modifyProperty("impdstrzName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("ishvbrrg").modifyProperty("ishvbrrgName").dictType("STATIC").dictSource("YW_TY").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dvtp").modifyProperty("dvtpName").dictType("STATIC").dictSource("DVTP").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("blsys").modifyProperty("blsysName").dictType("STATIC").dictSource("BLSYS").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("chngrd").modifyProperty("chngrdName").dictType("STATIC").dictSource("CHNGRD").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("cntp").modifyProperty("cntpName").dictType("STATIC").dictSource("CNTP").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dmat").modifyProperty("dmatName").dictType("STATIC").dictSource("DMAT").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dmtp").modifyProperty("dmtpName").dictType("STATIC").dictSource("DMTP").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("engtp").modifyProperty("engtpName").dictType("STATIC").dictSource("ENGTP").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("fn").modifyProperty("fnName").dictType("STATIC").dictSource("ENG_FN").build());
|
||||||
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("prgr").modifyProperty("prgrName").dictType("STATIC").dictSource("PRGR").build());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
ENG_CODE_NAME_FIELD_MAP.put("baseId", "baseName");
|
ENG_CODE_NAME_FIELD_MAP.put("baseId", "baseName");
|
||||||
ENG_CODE_NAME_FIELD_MAP.put("hbrvcd", "hbrvcdName");
|
ENG_CODE_NAME_FIELD_MAP.put("hbrvcd", "hbrvcdName");
|
||||||
@ -252,10 +299,11 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
@CacheEvict(cacheNames = "engInfoCache", allEntries = true)
|
@CacheEvict(cacheNames = "engInfoCache", allEntries = true)
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public boolean addEngInfo(SdEngInfoBH engInfo, String source) {
|
public boolean addEngInfo(SdEngInfoBH engInfo, String source) {
|
||||||
fillRelatedNameFields(engInfo);
|
// fillRelatedNameFields(engInfo);
|
||||||
boolean result = this.save(engInfo);
|
boolean result = this.save(engInfo);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordEngAddLog(engInfo, source);
|
dictCodeToNameConverter.convertCodeToName(engInfo, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordAddDetailLog(engInfo.getStcd(),TABLE_NAME, engInfo, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -273,11 +321,13 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
SdEngInfoBH after = before == null ? engInfo : BeanUtil.copyProperties(before, SdEngInfoBH.class);
|
SdEngInfoBH after = before == null ? engInfo : BeanUtil.copyProperties(before, SdEngInfoBH.class);
|
||||||
if (after != null) {
|
if (after != null) {
|
||||||
BeanUtil.copyProperties(engInfo, after, CopyOptions.create().ignoreNullValue());
|
BeanUtil.copyProperties(engInfo, after, CopyOptions.create().ignoreNullValue());
|
||||||
fillRelatedNameFields(after);
|
// fillRelatedNameFields(after);
|
||||||
}
|
}
|
||||||
boolean result = this.updateById(after);
|
boolean result = this.updateById(after);
|
||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
msOperationLogService.recordEngUpdateLog(before, after, source);
|
dictCodeToNameConverter.convertCodeToName(engInfo, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(engInfo.getStcd(),TABLE_NAME, before, after, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -302,7 +352,9 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
fillRelatedNameFields(after);
|
fillRelatedNameFields(after);
|
||||||
boolean result = updateEngInfoByPatch(stcd, after, filteredPatch);
|
boolean result = updateEngInfoByPatch(stcd, after, filteredPatch);
|
||||||
if (result) {
|
if (result) {
|
||||||
msOperationLogService.recordEngUpdateLog(before, after, source);
|
dictCodeToNameConverter.convertCodeToName(after, CODE_TO_NAME_META_LIST);
|
||||||
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordModifyDetailLog(before.getStcd(),TABLE_NAME,before, after, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -562,7 +614,9 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
.set(SdEngInfoBH::getDeleteTime, new Date()));
|
.set(SdEngInfoBH::getDeleteTime, new Date()));
|
||||||
if (result) {
|
if (result) {
|
||||||
for (SdEngInfoBH before : beforeList) {
|
for (SdEngInfoBH before : beforeList) {
|
||||||
msOperationLogService.recordEngDeleteLog(before, source);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
|
msOperationLogService.recordDeleteDetailLog(before.getStcd(),TABLE_NAME, before, source,CODE_TO_NAME_META_LIST);
|
||||||
|
// msOperationLogService.recordEngDeleteLog(before, source);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -51,9 +51,9 @@ public class SdEqBHServiceImpl extends ServiceImpl<SdEqBHMapper, SdEqBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -48,9 +48,9 @@ public class SdFbrdBHServiceImpl extends ServiceImpl<SdFbrdBHMapper, SdFbrdBH> i
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -51,9 +51,9 @@ public class SdFhbtBHServiceImpl extends ServiceImpl<SdFhbtBHMapper, SdFhbtBH> i
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -63,9 +63,9 @@ public class SdFpssBHServiceImpl extends ServiceImpl<SdFpssBHMapper, SdFpssBH> i
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("isUp").modifyProperty("isUpName").dictType("STATIC").dictSource("TY_SF").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("isUp").modifyProperty("isUpName").dictType("STATIC").dictSource("TY_SF").build());
|
||||||
|
|||||||
@ -6,8 +6,10 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
|
import com.yfd.platform.qgc_base.domain.SdFpssrlAiR;
|
||||||
import com.yfd.platform.qgc_base.domain.SdFpssrlR;
|
import com.yfd.platform.qgc_base.domain.SdFpssrlR;
|
||||||
import com.yfd.platform.qgc_base.domain.SdFpssrlRAiRequest;
|
import com.yfd.platform.qgc_base.domain.SdFpssrlRAiRequest;
|
||||||
|
import com.yfd.platform.qgc_base.mapper.SdFpssrlAiRMapper;
|
||||||
import com.yfd.platform.qgc_base.mapper.SdFpssrlRMapper;
|
import com.yfd.platform.qgc_base.mapper.SdFpssrlRMapper;
|
||||||
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
import com.yfd.platform.qgc_base.service.IMsOperationLogService;
|
||||||
import com.yfd.platform.qgc_base.service.ISdFpssrlRService;
|
import com.yfd.platform.qgc_base.service.ISdFpssrlRService;
|
||||||
@ -35,6 +37,8 @@ public class SdFpssrlRServiceImpl extends ServiceImpl<SdFpssrlRMapper, SdFpssrlR
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IMsOperationLogService msOperationLogService;
|
private IMsOperationLogService msOperationLogService;
|
||||||
|
@Resource
|
||||||
|
private SdFpssrlAiRMapper fpssrlAiRMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<SdFpssrlR> queryPageList(DataSourceRequest request) {
|
public Page<SdFpssrlR> queryPageList(DataSourceRequest request) {
|
||||||
@ -130,12 +134,13 @@ public class SdFpssrlRServiceImpl extends ServiceImpl<SdFpssrlRMapper, SdFpssrlR
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public List<SdFpssrlR> processAiReportBatch(List<SdFpssrlRAiRequest> requests) {
|
public List<SdFpssrlAiR> processAiReportBatch(List<SdFpssrlRAiRequest> requests) {
|
||||||
List<SdFpssrlR> entities = new ArrayList<>();
|
List<SdFpssrlAiR> entities = new ArrayList<>();
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
for (SdFpssrlRAiRequest req : requests) {
|
for (SdFpssrlRAiRequest req : requests) {
|
||||||
SdFpssrlR entity = new SdFpssrlR();
|
SdFpssrlAiR entity = new SdFpssrlAiR();
|
||||||
entity.setStcd(req.getStcd());
|
entity.setStcd(req.getFwdx());
|
||||||
|
entity.setAiBoxCode(req.getStcd());
|
||||||
entity.setTm(req.getTm());
|
entity.setTm(req.getTm());
|
||||||
entity.setFtp(req.getFtp());
|
entity.setFtp(req.getFtp());
|
||||||
entity.setFcnt(req.getFcnt() != null ? req.getFcnt() : 1);
|
entity.setFcnt(req.getFcnt() != null ? req.getFcnt() : 1);
|
||||||
@ -164,7 +169,7 @@ public class SdFpssrlRServiceImpl extends ServiceImpl<SdFpssrlRMapper, SdFpssrlR
|
|||||||
entity.setIsDeleted(0);
|
entity.setIsDeleted(0);
|
||||||
entities.add(entity);
|
entities.add(entity);
|
||||||
}
|
}
|
||||||
baseMapper.mergeFishRecords(entities);
|
fpssrlAiRMapper.mergeFishRecords(entities);
|
||||||
return entities;
|
return entities;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public class SdHbrvDicServiceImpl extends ServiceImpl<SdHbrvDicMapper, SdHbrvDic
|
|||||||
// static {
|
// static {
|
||||||
//
|
//
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("grd").modifyProperty("grdName").dictType("STATIC").dictSource("TEST").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("grd").modifyProperty("grdName").dictType("STATIC").dictSource("TEST").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseid").modifyProperty("basename").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseid").modifyProperty("basename").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,9 +51,9 @@ public class SdOpinfoBHServiceImpl extends ServiceImpl<SdOpinfoBHMapper, SdOpinf
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,9 +48,9 @@ public class SdOtteBHServiceImpl extends ServiceImpl<SdOtteBHMapper, SdOtteBH> i
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
||||||
|
|
||||||
|
|||||||
@ -47,9 +47,9 @@ public class SdOtweBHServiceImpl extends ServiceImpl<SdOtweBHMapper, SdOtweBH> i
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,9 +51,9 @@ public class SdSonarBHServiceImpl extends ServiceImpl<SdSonarBHMapper, SdSonarBH
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
||||||
|
|
||||||
|
|||||||
@ -47,9 +47,9 @@ public class SdTeBHServiceImpl extends ServiceImpl<SdTeBHMapper, SdTeBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,9 +50,9 @@ public class SdVaBHServiceImpl extends ServiceImpl<SdVaBHMapper, SdVaBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("usfl").modifyProperty("usflName").dictType("STATIC").dictSource("USFL").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -49,9 +49,9 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("addvcd").modifyProperty("addvcdName").dictType("DYNAMIC").dictSource("SD_ADDVCD_DIC").codeColumn("ADDVCD").nameColumn("ADDVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("addvcd").modifyProperty("addvcdName").dictType("DYNAMIC").dictSource("SD_ADDVCD_DIC").codeColumn("ADDVCD").nameColumn("ADDVNM").build());
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ public class SdVdinfoBServiceImpl extends ServiceImpl<SdVdinfoBMapper, SdVdinfoB
|
|||||||
if (result && before != null) {
|
if (result && before != null) {
|
||||||
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(before, CODE_TO_NAME_META_LIST);
|
||||||
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
dictCodeToNameConverter.convertCodeToName(entity, CODE_TO_NAME_META_LIST);
|
||||||
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, entity.getStcd(), "修改", source, CODE_TO_NAME_META_LIST);
|
msOperationLogService.recordModifyDetailLog(entity.getStcd(),TABLE_NAME, before,entity, source, CODE_TO_NAME_META_LIST);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,9 +50,9 @@ public class SdVpBHServiceImpl extends ServiceImpl<SdVpBHMapper, SdVpBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtin").modifyProperty("dtinName").dictType("STATIC").dictSource("DTIN").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -49,9 +49,9 @@ public class SdWeBHServiceImpl extends ServiceImpl<SdWeBHMapper, SdWeBH> impleme
|
|||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
// CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rvcd").modifyProperty("rvnm").dictType("DYNAMIC").dictSource("V_SD_RVCD_DIC_TREE").codeColumn("RVCD").nameColumn("RVNM").build());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,9 +53,9 @@ public class SdWqBHServiceImpl extends ServiceImpl<SdWqBHMapper, SdWqBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("wwqtg").modifyProperty("wwqtgName").dictType("STATIC").dictSource("WWQTG").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("wwqtg").modifyProperty("wwqtgName").dictType("STATIC").dictSource("WWQTG").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -54,9 +54,9 @@ public class SdWtBHServiceImpl extends ServiceImpl<SdWtBHMapper, SdWtBH> impleme
|
|||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("mway").modifyProperty("mwayName").dictType("STATIC").dictSource("MWAY").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("bldsttCode").modifyProperty("bldsttCodeName").dictType("STATIC").dictSource("BLDSTT_CODE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("dtinType").modifyProperty("dtinTypeName").dictType("STATIC").dictSource("DTIN_TYPE").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("sttp").modifyProperty("sttpName").dictType("DYNAMIC").dictSource("SD_STTP_B").codeColumn("STTP_CODE").nameColumn("STTP_NAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("baseId").modifyProperty("baseName").dictType("DYNAMIC").dictSource("SD_HYDROBASE").codeColumn("BASEID").nameColumn("BASENAME").filter("IS_DELETED = 0 ").build());
|
||||||
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("NVL(IS_DELETED, 0) = 0 ").build());
|
CODE_TO_NAME_META_LIST.add(CodeToNameMetadataBo.builder().codeProperty("rstcd").modifyProperty("ennm").dictType("DYNAMIC").dictSource("SD_ENGINFO_B_H").codeColumn("STCD").nameColumn("ENNM").filter("IS_DELETED = 0 ").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
package com.yfd.platform.qgc_env.fb.controller;
|
package com.yfd.platform.qgc_env.fb.controller;
|
||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
|
import com.yfd.platform.qgc_env.fb.entity.vo.BreedStageVO;
|
||||||
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
import com.yfd.platform.qgc_env.fb.service.FbStationService;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@ -15,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/fb")
|
@RequestMapping("/fb")
|
||||||
@Tag(name = "鱼类增殖站模块")
|
@Tag(name = "鱼类增殖站模块")
|
||||||
@ -60,6 +65,84 @@ public class FbStationController {
|
|||||||
return ResponseResult.successData(fbStationService.getYearRpStatistics(year));
|
return ResponseResult.successData(fbStationService.getYearRpStatistics(year));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/bsmfr/GetKendoListCust")
|
||||||
|
@Operation(summary = "亲鱼档案管理记录列表")
|
||||||
|
public ResponseResult getBsmfRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getBsmfRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/bsdeathr/GetKendoListCust")
|
||||||
|
@Operation(summary = "亲鱼死亡记录列表")
|
||||||
|
public ResponseResult getBsdeathRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getBsdeathRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/bsctmob/GetKendoListCust")
|
||||||
|
@Operation(summary = "亲鱼培育方式列表")
|
||||||
|
public ResponseResult getBsctmoBKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getBsctmoBList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fbbwtr/GetKendoListCust")
|
||||||
|
@Operation(summary = "亲鱼培育水温观测记录列表")
|
||||||
|
public ResponseResult getFbbwtRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFbbwtRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fbcwqr/GetKendoListCust")
|
||||||
|
@Operation(summary = "亲鱼培育水质监测记录列表")
|
||||||
|
public ResponseResult getFbcwqRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFbcwqRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/bsrfir/GetKendoListCust")
|
||||||
|
@Operation(summary = "亲鱼培育投喂记录列表")
|
||||||
|
public ResponseResult getBsrfiRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getBsrfiRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/outfishr/GetKendoListCust")
|
||||||
|
@Operation(summary = "淘汰亲鱼基本信息记录列表")
|
||||||
|
public ResponseResult getOutfishRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getOutfishRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fishartinlr/GetKendoListCust")
|
||||||
|
@Operation(summary = "鱼类人工催产记录列表")
|
||||||
|
public ResponseResult getFishartinlRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFishartinlRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fishhatchrecr/GetKendoListCust")
|
||||||
|
@Operation(summary = "鱼类受精卵孵化过程记录列表")
|
||||||
|
public ResponseResult getFishhatchrecRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFishhatchrecRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fishhatchpror/GetKendoListCust")
|
||||||
|
@Operation(summary = "鱼类孵化过程巡查记录列表")
|
||||||
|
public ResponseResult getFishhatchproRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFishhatchproRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/scwemr/GetKendoListCust")
|
||||||
|
@Operation(summary = "苗种培育水环境监测记录列表")
|
||||||
|
public ResponseResult getScwemRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getScwemRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fishbreedr/GetKendoListCust")
|
||||||
|
@Operation(summary = "鱼苗和鱼种培育记录列表")
|
||||||
|
public ResponseResult getFishbreedRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFishbreedRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/fishdpacr/GetKendoListCust")
|
||||||
|
@Operation(summary = "鱼病防治记录列表")
|
||||||
|
public ResponseResult getFishdpacRKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getFishdpacRList(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/bsmfr/qgc/GetKendoListCust")
|
@PostMapping("/bsmfr/qgc/GetKendoListCust")
|
||||||
@Operation(summary = "(全过程)增殖站二级页面: 亲鱼选配与培育->亲鱼信息")
|
@Operation(summary = "(全过程)增殖站二级页面: 亲鱼选配与培育->亲鱼信息")
|
||||||
public ResponseResult getBsmfrQgcKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getBsmfrQgcKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
@ -79,6 +162,38 @@ public class FbStationController {
|
|||||||
return ResponseResult.successData(fbStationService.getFbRelatedYrByStcd(stcd));
|
return ResponseResult.successData(fbStationService.getFbRelatedYrByStcd(stcd));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/station/eng/GetAggregateData")
|
||||||
|
@Operation(summary = "电站放流统计-返回有数据的年份")
|
||||||
|
public ResponseResult getAggregateData(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getAggregateData(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/station/eng/GetKendoListCust")
|
||||||
|
@Operation(summary = "电站放流统计")
|
||||||
|
public ResponseResult getEngKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
return ResponseResult.successData(fbStationService.getEngKendoListCust(dataSourceRequest));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/breedStage/GetKendoListCust")
|
||||||
|
@Operation(summary = "条件过滤数据列表定制")
|
||||||
|
public ResponseResult getBreedStageKendoListCust(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
String stcd = null;
|
||||||
|
List<DataSourceRequest.FilterDescriptor> filters = dataSourceRequest.getFilter().getFilters();
|
||||||
|
for (DataSourceRequest.FilterDescriptor filter : filters) {
|
||||||
|
if ("stcd".equals(filter.getField())) {
|
||||||
|
stcd = (String) filter.getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(stcd)) {
|
||||||
|
return ResponseResult.error("增殖站stcd不能为空!");
|
||||||
|
}
|
||||||
|
List<BreedStageVO> breedStageList = fbStationService.getBreedStageList(stcd);
|
||||||
|
DataSourceResult<BreedStageVO> dataSourceResult = new DataSourceResult<>();
|
||||||
|
dataSourceResult.setData(breedStageList);
|
||||||
|
dataSourceResult.setTotal(breedStageList.size());
|
||||||
|
return ResponseResult.successData(dataSourceResult);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/msfbrdm/fbFlData/GetKendoListCust")
|
@PostMapping("/msfbrdm/fbFlData/GetKendoListCust")
|
||||||
@Operation(summary = "增殖站增殖情况(app)")
|
@Operation(summary = "增殖站增殖情况(app)")
|
||||||
public ResponseResult getFbFlData(@RequestBody DataSourceRequest dataSourceRequest) {
|
public ResponseResult getFbFlData(@RequestBody DataSourceRequest dataSourceRequest) {
|
||||||
|
|||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类增殖阶段
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class BreedStageVO {
|
||||||
|
|
||||||
|
/** 增殖站编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 阶段名称 */
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
/** 阶段状态:1=有数据 2=无数据 */
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/** 是否为最新数据 */
|
||||||
|
private Boolean newest;
|
||||||
|
|
||||||
|
/** 最新表 */
|
||||||
|
private String newSurface;
|
||||||
|
|
||||||
|
/** 主菜单 */
|
||||||
|
private String firstGrade;
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育方式 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbBsctmoBVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼池名称 */
|
||||||
|
private String fpName;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 鱼类名称 */
|
||||||
|
private String ftpName;
|
||||||
|
|
||||||
|
/** 数量(尾) */
|
||||||
|
private Long value;
|
||||||
|
|
||||||
|
/** 全长(cm) */
|
||||||
|
private BigDecimal length;
|
||||||
|
|
||||||
|
/** 体重(g) */
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
/** 培育方式:1=流水单养 2=流水混养 3=静水 4=循环水 */
|
||||||
|
private Integer ctmo;
|
||||||
|
|
||||||
|
/** 培育方式名称 */
|
||||||
|
private String ctmoName;
|
||||||
|
|
||||||
|
/** 放养密度 */
|
||||||
|
private String skds;
|
||||||
|
|
||||||
|
/** 体重范围值 */
|
||||||
|
private String fwgh;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼死亡记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbBsdeathRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 死亡日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼池名称 */
|
||||||
|
private String fpName;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 鱼类名称 */
|
||||||
|
private String ftpName;
|
||||||
|
|
||||||
|
/** 标记编号 */
|
||||||
|
private String signnum;
|
||||||
|
|
||||||
|
/** 全长(cm) */
|
||||||
|
private BigDecimal length;
|
||||||
|
|
||||||
|
/** 体重(g) */
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
/** 死亡症状 */
|
||||||
|
private String spod;
|
||||||
|
|
||||||
|
/** 死亡诊断 */
|
||||||
|
private String deathd;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 数量(尾) */
|
||||||
|
private Long value;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,82 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼档案管理记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbBsmfRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 引进日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 鱼类名称 */
|
||||||
|
private String ftpName;
|
||||||
|
|
||||||
|
/** 亲鱼来源 */
|
||||||
|
private String bssr;
|
||||||
|
|
||||||
|
/** 亲鱼来源名称 */
|
||||||
|
private String bssrName;
|
||||||
|
|
||||||
|
/** 全长(cm) */
|
||||||
|
private BigDecimal length;
|
||||||
|
|
||||||
|
/** 体重(g) */
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
/** 鱼龄 */
|
||||||
|
private BigDecimal age;
|
||||||
|
|
||||||
|
/** 性别:1=雄鱼 2=雌鱼 */
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
/** 性别名称 */
|
||||||
|
private String sexName;
|
||||||
|
|
||||||
|
/** 标记编号 */
|
||||||
|
private String signnum;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
private Long value;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育投喂记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbBsrfiRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 投喂日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 饲料种类 */
|
||||||
|
private String ftype;
|
||||||
|
|
||||||
|
/** 投食量(g) */
|
||||||
|
private BigDecimal cfe;
|
||||||
|
|
||||||
|
/** 水交换频次(次/d) */
|
||||||
|
private Long warfre;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 总体量(g) */
|
||||||
|
private BigDecimal tbw;
|
||||||
|
|
||||||
|
/** 日投喂率(%) */
|
||||||
|
private BigDecimal dfr;
|
||||||
|
|
||||||
|
/** 摄食情况 */
|
||||||
|
private String fdi;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站放流统计-有数据的年份
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbEngFishVo {
|
||||||
|
/** 电站编码 */
|
||||||
|
private String stcd;
|
||||||
|
/** 电站名称 */
|
||||||
|
private String ennm;
|
||||||
|
/** 计划放流尾数 */
|
||||||
|
private BigDecimal fcntjh;
|
||||||
|
/** 实际放流尾数 */
|
||||||
|
private BigDecimal fcntjc;
|
||||||
|
/** 计划放流日期(年份) */
|
||||||
|
private String plansd;
|
||||||
|
}
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育水温观测记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFbbwtRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 观测日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼池名称 */
|
||||||
|
private String fpName;
|
||||||
|
|
||||||
|
/** 8点水温 */
|
||||||
|
private BigDecimal wte;
|
||||||
|
|
||||||
|
/** 14点水温 */
|
||||||
|
private BigDecimal wtf;
|
||||||
|
|
||||||
|
/** 20点水温 */
|
||||||
|
private BigDecimal wtt;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育水质监测记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFbcwqRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼池名称 */
|
||||||
|
private String fpName;
|
||||||
|
|
||||||
|
/** 氨氮(mg/L) */
|
||||||
|
private BigDecimal nh3n;
|
||||||
|
|
||||||
|
/** 亚硝酸盐(mg/L) */
|
||||||
|
private BigDecimal no2;
|
||||||
|
|
||||||
|
/** 溶解氧(mg/L) */
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
/** pH */
|
||||||
|
private BigDecimal ph;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 是否符合标准 */
|
||||||
|
private Integer iffit;
|
||||||
|
|
||||||
|
/** 监测时段 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类人工催产记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFishartinlRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 催产日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 雌鱼数量 */
|
||||||
|
private Long ffisht;
|
||||||
|
|
||||||
|
/** 雌鱼催产剂种类 */
|
||||||
|
private Integer fpitocintype;
|
||||||
|
|
||||||
|
/** 雌鱼总剂量 */
|
||||||
|
private BigDecimal fdose;
|
||||||
|
|
||||||
|
/** 雌鱼注射方式 */
|
||||||
|
private String finjmo;
|
||||||
|
|
||||||
|
/** 气温(℃) */
|
||||||
|
private BigDecimal air;
|
||||||
|
|
||||||
|
/** 水温(℃) */
|
||||||
|
private BigDecimal wartem;
|
||||||
|
|
||||||
|
/** 溶解氧(mg/L) */
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 性别:1=雄鱼 2=雌鱼 */
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 雄鱼注射方式 */
|
||||||
|
private Long mfisht;
|
||||||
|
|
||||||
|
/** 雄鱼催产剂种类 */
|
||||||
|
private Integer mpitocintype;
|
||||||
|
|
||||||
|
/** 雄鱼总剂量 */
|
||||||
|
private BigDecimal mdose;
|
||||||
|
|
||||||
|
/** 雄鱼注射方式 */
|
||||||
|
private String minjmo;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼苗和鱼种培育记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFishbreedRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 培育日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String farmno;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 数量(尾) */
|
||||||
|
private Long counts;
|
||||||
|
|
||||||
|
/** 平均规格全长(cm) */
|
||||||
|
private BigDecimal length;
|
||||||
|
|
||||||
|
/** 平均规格体重(g) */
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
/** 饲料或饵料种类 */
|
||||||
|
private String feedtp;
|
||||||
|
|
||||||
|
/** 投食量(g) */
|
||||||
|
private BigDecimal foodint;
|
||||||
|
|
||||||
|
/** 日投食率(%) */
|
||||||
|
private BigDecimal dfr;
|
||||||
|
|
||||||
|
/** 摄食情况 */
|
||||||
|
private String fin;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼病防治记录表 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFishdpacRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 平均体重(g) */
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
/** 发病症状 */
|
||||||
|
private String symptoms;
|
||||||
|
|
||||||
|
/** 鱼药种类 */
|
||||||
|
private String fishdrugtype;
|
||||||
|
|
||||||
|
/** 用药方法 */
|
||||||
|
private Integer method;
|
||||||
|
|
||||||
|
/** 用药剂量(mg/kg) */
|
||||||
|
private BigDecimal dose;
|
||||||
|
|
||||||
|
/** 用药天数(d) */
|
||||||
|
private BigDecimal days;
|
||||||
|
|
||||||
|
/** 治疗效果 */
|
||||||
|
private Integer treateffect;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,82 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类孵化过程巡查记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFishhatchproRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 孵化设施编号 */
|
||||||
|
private String devno;
|
||||||
|
|
||||||
|
/** 记录时间 */
|
||||||
|
private Date recordtm;
|
||||||
|
|
||||||
|
/** 水温(℃) */
|
||||||
|
private BigDecimal wartem;
|
||||||
|
|
||||||
|
/** 与上一时段水温差(℃) */
|
||||||
|
private BigDecimal wtdiff;
|
||||||
|
|
||||||
|
/** 溶解氧(mg/L) */
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
/** pH */
|
||||||
|
private BigDecimal ph;
|
||||||
|
|
||||||
|
/** 胚胎发育时期 */
|
||||||
|
private String empsta;
|
||||||
|
|
||||||
|
/** 水交换频次(次/d) */
|
||||||
|
private Long warfre;
|
||||||
|
|
||||||
|
/** 孵化密度是否均匀:0=否 1=是 */
|
||||||
|
private Integer iseven;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
/** 产卵时间 */
|
||||||
|
private Date spawntm;
|
||||||
|
|
||||||
|
/** 巡查时间 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类受精卵孵化过程记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbFishhatchrecRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 亲鱼来源 */
|
||||||
|
private String fishsrc;
|
||||||
|
|
||||||
|
/** 鱼卵数量(万粒) */
|
||||||
|
private BigDecimal eggcount;
|
||||||
|
|
||||||
|
/** 受精率(%) */
|
||||||
|
private BigDecimal ferrate;
|
||||||
|
|
||||||
|
/** 孵化率(%) */
|
||||||
|
private BigDecimal hatchrate;
|
||||||
|
|
||||||
|
/** 出苗时长(h) */
|
||||||
|
private BigDecimal outhour;
|
||||||
|
|
||||||
|
/** 出苗数量(万尾) */
|
||||||
|
private BigDecimal outcount;
|
||||||
|
|
||||||
|
/** 出苗率(%) */
|
||||||
|
private BigDecimal outrate;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 孵化时间 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,85 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 淘汰亲鱼基本信息记录 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbOutfishRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 录入时间 */
|
||||||
|
private Date recordertm;
|
||||||
|
|
||||||
|
/** 标记编号 */
|
||||||
|
private String signno;
|
||||||
|
|
||||||
|
/** 鱼种类 */
|
||||||
|
private String ftp;
|
||||||
|
|
||||||
|
/** 亲鱼来源 */
|
||||||
|
private String src;
|
||||||
|
|
||||||
|
/** 性别:1=雄鱼 2=雌鱼 */
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
/** 鱼龄 */
|
||||||
|
private BigDecimal age;
|
||||||
|
|
||||||
|
/** 全长(cm) */
|
||||||
|
private BigDecimal length;
|
||||||
|
|
||||||
|
/** 体重(g) */
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
|
/** 繁殖年限 */
|
||||||
|
private Long agelmt;
|
||||||
|
|
||||||
|
/** 繁殖次数 */
|
||||||
|
private Long brecount;
|
||||||
|
|
||||||
|
/** 淘汰日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 淘汰原因 */
|
||||||
|
private String outrea;
|
||||||
|
|
||||||
|
/** 处置方式 */
|
||||||
|
private Integer hand;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.yfd.platform.qgc_env.fb.entity.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 苗种培育水环境监测记录表 VO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FbScwemRVo {
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** 设施编码 */
|
||||||
|
private String stcd;
|
||||||
|
|
||||||
|
/** 监测日期 */
|
||||||
|
private Date tm;
|
||||||
|
|
||||||
|
/** 鱼池编号 */
|
||||||
|
private String fpnum;
|
||||||
|
|
||||||
|
/** 鱼池名称 */
|
||||||
|
private String fpName;
|
||||||
|
|
||||||
|
/** 水温(℃) */
|
||||||
|
private BigDecimal wartem;
|
||||||
|
|
||||||
|
/** 与上一时段水温差(℃) */
|
||||||
|
private BigDecimal wtdiff;
|
||||||
|
|
||||||
|
/** 氨氮(mg/L) */
|
||||||
|
private BigDecimal nh3n;
|
||||||
|
|
||||||
|
/** 亚硝酸盐(mg/L) */
|
||||||
|
private BigDecimal no2;
|
||||||
|
|
||||||
|
/** 溶解氧(mg/L) */
|
||||||
|
private BigDecimal dox;
|
||||||
|
|
||||||
|
/** pH */
|
||||||
|
private BigDecimal ph;
|
||||||
|
|
||||||
|
/** 记录人 */
|
||||||
|
private String recorder;
|
||||||
|
|
||||||
|
/** 附件ID */
|
||||||
|
private String fid;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private String recordUser;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date recordTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
private String modifyUser;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date modifyTime;
|
||||||
|
|
||||||
|
/** 是否已删除 */
|
||||||
|
private Integer isDeleted;
|
||||||
|
|
||||||
|
/** 删除人 */
|
||||||
|
private String deleteUser;
|
||||||
|
|
||||||
|
/** 删除时间 */
|
||||||
|
private Date deleteTime;
|
||||||
|
}
|
||||||
@ -2,22 +2,7 @@ package com.yfd.platform.qgc_env.fb.service;
|
|||||||
|
|
||||||
import com.yfd.platform.common.DataSourceRequest;
|
import com.yfd.platform.common.DataSourceRequest;
|
||||||
import com.yfd.platform.common.DataSourceResult;
|
import com.yfd.platform.common.DataSourceResult;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbBsmfRQgcVo;
|
import com.yfd.platform.qgc_env.fb.entity.vo.*;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbBsmfRFishTableVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFlDataVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishCountFinishVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishRunQgcVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishTypeStcdVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbFishTypeFinishVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbRelatedYrVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbMsfbrdmQgcVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbResearchVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStInfoResultVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationStaticsDataVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.YearRpStatisticsVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbStationOverviewSecondVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbTracingPointVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.TableVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -67,4 +52,84 @@ public interface FbStationService {
|
|||||||
DataSourceResult<FbTracingPointVo> getFbPointKendoListCust(DataSourceRequest dataSourceRequest);
|
DataSourceResult<FbTracingPointVo> getFbPointKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
DataSourceResult<FbTracingPointVo> getFbBuiltPointKendoListCust(DataSourceRequest dataSourceRequest);
|
DataSourceResult<FbTracingPointVo> getFbBuiltPointKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站放流统计-返回有数据的年份
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbEngFishVo> getAggregateData(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站放流统计列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbEngFishVo> getEngKendoListCust(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取增殖站各阶段数据状态(选配/繁殖/培育/防治)
|
||||||
|
*/
|
||||||
|
List<BreedStageVO> getBreedStageList(String stcd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼档案管理记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbBsmfRVo> getBsmfRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼死亡记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbBsdeathRVo> getBsdeathRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育方式列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbBsctmoBVo> getBsctmoBList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育水温观测记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFbbwtRVo> getFbbwtRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育水质监测记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFbcwqRVo> getFbcwqRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲鱼培育投喂记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbBsrfiRVo> getBsrfiRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 淘汰亲鱼基本信息记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbOutfishRVo> getOutfishRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类人工催产记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFishartinlRVo> getFishartinlRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类受精卵孵化过程记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFishhatchrecRVo> getFishhatchrecRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼类孵化过程巡查记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFishhatchproRVo> getFishhatchproRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 苗种培育水环境监测记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbScwemRVo> getScwemRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼苗和鱼种培育记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFishbreedRVo> getFishbreedRList(DataSourceRequest dataSourceRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鱼病防治记录列表
|
||||||
|
*/
|
||||||
|
DataSourceResult<FbFishdpacRVo> getFishdpacRList(DataSourceRequest dataSourceRequest);
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -285,7 +285,10 @@ public class SdWtvtRServiceImpl extends ServiceImpl<SdWtvtRMapper, SdWtvtYearVo>
|
|||||||
sql.append("(STCD = ? AND TM = TO_DATE(SUBSTR(?, 1, 19), 'YYYY-MM-DD HH24:MI:SS'))");
|
sql.append("(STCD = ? AND TM = TO_DATE(SUBSTR(?, 1, 19), 'YYYY-MM-DD HH24:MI:SS'))");
|
||||||
DataParam item = dataParamList.get(i);
|
DataParam item = dataParamList.get(i);
|
||||||
params.add(item == null ? null : item.getId());
|
params.add(item == null ? null : item.getId());
|
||||||
params.add(item == null ? null : item.getDt());
|
String timeStr = (item.getDt() != null && !item.getDt().isEmpty())
|
||||||
|
? item.getDt()
|
||||||
|
: item.getTm();
|
||||||
|
params.add(timeStr);
|
||||||
}
|
}
|
||||||
jdbcTemplate.update(sql.toString(), params.toArray());
|
jdbcTemplate.update(sql.toString(), params.toArray());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,89 @@
|
|||||||
|
package com.yfd.platform.system.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.yfd.platform.config.ResponseResult;
|
||||||
|
import com.yfd.platform.utils.DictCodeToNameConverter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典缓存管理接口
|
||||||
|
*
|
||||||
|
* <p>提供手动刷新字典缓存的功能,用于紧急情况或运维场景。
|
||||||
|
*
|
||||||
|
* <h3>使用方式</h3>
|
||||||
|
* <ul>
|
||||||
|
* <li>清除全部缓存:POST /dict/cache/clearAll</li>
|
||||||
|
* <li>清除指定静态字典缓存:POST /dict/cache/clearStatic?dictCode=xxx</li>
|
||||||
|
* <li>清除指定动态字典缓存:POST /dict/cache/clearDynamic?tableName=xxx&codeColumn=xxx&nameColumn=xxx</li>
|
||||||
|
* <li>查看缓存统计:GET /dict/cache/stats</li>
|
||||||
|
* </ul>
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dict/cache")
|
||||||
|
@Tag(name = "字典缓存管理")
|
||||||
|
public class DictCacheManageController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DictCodeToNameConverter dictCodeToNameConverter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除所有字典缓存
|
||||||
|
*/
|
||||||
|
@PostMapping("/clearAll")
|
||||||
|
@Operation(summary = "清除所有字典缓存")
|
||||||
|
public ResponseResult clearAllCache() {
|
||||||
|
dictCodeToNameConverter.clearCache();
|
||||||
|
return ResponseResult.success("所有字典缓存已清除");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除指定静态字典缓存
|
||||||
|
*
|
||||||
|
* @param dictCode 字典编码
|
||||||
|
*/
|
||||||
|
@PostMapping("/clearStatic")
|
||||||
|
@Operation(summary = "清除指定静态字典缓存")
|
||||||
|
public ResponseResult clearStaticCache(@RequestParam String dictCode) {
|
||||||
|
if (StrUtil.isBlank(dictCode)) {
|
||||||
|
return ResponseResult.error("dictCode 不能为空");
|
||||||
|
}
|
||||||
|
dictCodeToNameConverter.clearStaticDictCache(dictCode);
|
||||||
|
return ResponseResult.success("静态字典缓存已清除: " + dictCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除指定动态字典缓存
|
||||||
|
*
|
||||||
|
* @param tableName 数据库表名
|
||||||
|
* @param codeColumn 编码列名
|
||||||
|
* @param nameColumn 名称列名
|
||||||
|
* @param filter 额外过滤条件(可选)
|
||||||
|
*/
|
||||||
|
@PostMapping("/clearDynamic")
|
||||||
|
@Operation(summary = "清除指定动态字典缓存")
|
||||||
|
public ResponseResult clearDynamicCache(@RequestParam String tableName,
|
||||||
|
@RequestParam String codeColumn,
|
||||||
|
@RequestParam String nameColumn,
|
||||||
|
@RequestParam(required = false) String filter) {
|
||||||
|
if (StrUtil.isBlank(tableName) || StrUtil.isBlank(codeColumn) || StrUtil.isBlank(nameColumn)) {
|
||||||
|
return ResponseResult.error("tableName、codeColumn、nameColumn 不能为空");
|
||||||
|
}
|
||||||
|
dictCodeToNameConverter.clearDynamicDictCache(tableName, codeColumn, nameColumn, filter);
|
||||||
|
return ResponseResult.success("动态字典缓存已清除: " + tableName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看缓存统计信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/stats")
|
||||||
|
@Operation(summary = "查看字典缓存统计信息")
|
||||||
|
public ResponseResult getCacheStats() {
|
||||||
|
Map<String, Object> stats = dictCodeToNameConverter.getCacheStats();
|
||||||
|
return ResponseResult.successData(stats);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,8 +8,10 @@ import com.yfd.platform.system.domain.SysDictionaryItems;
|
|||||||
import com.yfd.platform.system.mapper.SysDictionaryItemsMapper;
|
import com.yfd.platform.system.mapper.SysDictionaryItemsMapper;
|
||||||
import com.yfd.platform.system.service.ISysDictionaryService;
|
import com.yfd.platform.system.service.ISysDictionaryService;
|
||||||
import com.yfd.platform.system.service.ISysDictionaryItemsService;
|
import com.yfd.platform.system.service.ISysDictionaryItemsService;
|
||||||
|
import com.yfd.platform.utils.DictCacheInvalidateEvent;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -36,6 +38,9 @@ public class SysDictionaryController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ISysDictionaryItemsService sysDictionaryItemsService;
|
private ISysDictionaryItemsService sysDictionaryItemsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
/**********************************
|
/**********************************
|
||||||
* 用途说明: 获取数据字典列表
|
* 用途说明: 获取数据字典列表
|
||||||
* 参数说明 dictType 字典类型
|
* 参数说明 dictType 字典类型
|
||||||
@ -61,8 +66,15 @@ public class SysDictionaryController {
|
|||||||
@PostMapping("/deleteById")
|
@PostMapping("/deleteById")
|
||||||
@Operation(summary = "根据ID删除字典")
|
@Operation(summary = "根据ID删除字典")
|
||||||
public ResponseResult deleteDictById(@RequestParam String id) {
|
public ResponseResult deleteDictById(@RequestParam String id) {
|
||||||
|
// 删除前获取 dictCode,用于后续清除缓存
|
||||||
|
SysDictionary dict = sysDictionaryService.getById(id);
|
||||||
|
String dictCode = dict != null ? dict.getDictCode() : null;
|
||||||
boolean ok = sysDictionaryService.deleteDictById(id);
|
boolean ok = sysDictionaryService.deleteDictById(id);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
// 发布静态字典缓存失效事件
|
||||||
|
if (StrUtil.isNotBlank(dictCode)) {
|
||||||
|
eventPublisher.publishEvent(new DictCacheInvalidateEvent(this, dictCode));
|
||||||
|
}
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
} else {
|
} else {
|
||||||
return ResponseResult.error();
|
return ResponseResult.error();
|
||||||
|
|||||||
@ -5,11 +5,15 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.yfd.platform.annotation.Log;
|
import com.yfd.platform.annotation.Log;
|
||||||
import com.yfd.platform.config.ResponseResult;
|
import com.yfd.platform.config.ResponseResult;
|
||||||
|
import com.yfd.platform.system.domain.SysDictionary;
|
||||||
import com.yfd.platform.system.domain.SysDictionaryItems;
|
import com.yfd.platform.system.domain.SysDictionaryItems;
|
||||||
import com.yfd.platform.system.mapper.SysDictionaryItemsMapper;
|
import com.yfd.platform.system.mapper.SysDictionaryItemsMapper;
|
||||||
import com.yfd.platform.system.service.ISysDictionaryItemsService;
|
import com.yfd.platform.system.service.ISysDictionaryItemsService;
|
||||||
|
import com.yfd.platform.system.service.ISysDictionaryService;
|
||||||
|
import com.yfd.platform.utils.DictCacheInvalidateEvent;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@ -33,6 +37,31 @@ public class SysDictionaryItemsController {
|
|||||||
@Resource
|
@Resource
|
||||||
private ISysDictionaryItemsService sysDictionaryItemsService;
|
private ISysDictionaryItemsService sysDictionaryItemsService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysDictionaryService sysDictionaryService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据 dictId 查询 dictCode,用于发布缓存失效事件
|
||||||
|
*/
|
||||||
|
private String getDictCodeByDictId(String dictId) {
|
||||||
|
if (StrUtil.isBlank(dictId)) return null;
|
||||||
|
SysDictionary dict = sysDictionaryService.getById(dictId);
|
||||||
|
return dict != null ? dict.getDictCode() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布静态字典缓存失效事件
|
||||||
|
*/
|
||||||
|
private void invalidateStaticCache(String dictId) {
|
||||||
|
String dictCode = getDictCodeByDictId(dictId);
|
||||||
|
if (StrUtil.isNotBlank(dictCode)) {
|
||||||
|
eventPublisher.publishEvent(new DictCacheInvalidateEvent(this, dictCode));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************
|
/**********************************
|
||||||
* 用途说明: 分页查询字典项信息
|
* 用途说明: 分页查询字典项信息
|
||||||
* 参数说明 dictID 字典ID ItemName 字典项名称 pageNum 当前页
|
* 参数说明 dictID 字典ID ItemName 字典项名称 pageNum 当前页
|
||||||
@ -77,6 +106,8 @@ public class SysDictionaryItemsController {
|
|||||||
boolean ok =
|
boolean ok =
|
||||||
sysDictionaryItemsService.addDictionaryItem(sysDictionaryItems);
|
sysDictionaryItemsService.addDictionaryItem(sysDictionaryItems);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
// 发布静态字典缓存失效事件
|
||||||
|
invalidateStaticCache(sysDictionaryItems.getDictId());
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
} else {
|
} else {
|
||||||
return ResponseResult.error();
|
return ResponseResult.error();
|
||||||
@ -98,6 +129,8 @@ public class SysDictionaryItemsController {
|
|||||||
boolean ok =
|
boolean ok =
|
||||||
sysDictionaryItemsService.updateById(sysDictionaryItems);
|
sysDictionaryItemsService.updateById(sysDictionaryItems);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
// 发布静态字典缓存失效事件
|
||||||
|
invalidateStaticCache(sysDictionaryItems.getDictId());
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
} else {
|
} else {
|
||||||
return ResponseResult.error();
|
return ResponseResult.error();
|
||||||
@ -132,8 +165,13 @@ public class SysDictionaryItemsController {
|
|||||||
if (StrUtil.isBlank(id)) {
|
if (StrUtil.isBlank(id)) {
|
||||||
return ResponseResult.error("参数为空");
|
return ResponseResult.error("参数为空");
|
||||||
}
|
}
|
||||||
|
// 删除前获取 dictId,用于清除缓存
|
||||||
|
SysDictionaryItems item = sysDictionaryItemsService.getById(id);
|
||||||
|
String dictId = item != null ? item.getDictId() : null;
|
||||||
boolean ok = sysDictionaryItemsService.removeById(id);
|
boolean ok = sysDictionaryItemsService.removeById(id);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
// 发布静态字典缓存失效事件
|
||||||
|
invalidateStaticCache(dictId);
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
} else {
|
} else {
|
||||||
return ResponseResult.error();
|
return ResponseResult.error();
|
||||||
@ -155,8 +193,18 @@ public class SysDictionaryItemsController {
|
|||||||
String[] splitIds = id.split(",");
|
String[] splitIds = id.split(",");
|
||||||
// 数组转集合
|
// 数组转集合
|
||||||
List<String> ids = Arrays.asList(splitIds);
|
List<String> ids = Arrays.asList(splitIds);
|
||||||
|
// 批量删除前获取所有相关的 dictId,去重后逐个清除缓存
|
||||||
|
List<SysDictionaryItems> items = sysDictionaryItemsService.listByIds(ids);
|
||||||
boolean ok = sysDictionaryItemsService.removeByIds(ids);
|
boolean ok = sysDictionaryItemsService.removeByIds(ids);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
|
// 发布静态字典缓存失效事件
|
||||||
|
if (items != null) {
|
||||||
|
items.stream()
|
||||||
|
.map(SysDictionaryItems::getDictId)
|
||||||
|
.filter(StrUtil::isNotBlank)
|
||||||
|
.distinct()
|
||||||
|
.forEach(dictId -> invalidateStaticCache(dictId));
|
||||||
|
}
|
||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
} else {
|
} else {
|
||||||
return ResponseResult.error();
|
return ResponseResult.error();
|
||||||
|
|||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.yfd.platform.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class DictCacheHelper {
|
||||||
|
private final ApplicationEventPublisher publisher;
|
||||||
|
|
||||||
|
public DictCacheHelper(ApplicationEventPublisher publisher) {
|
||||||
|
this.publisher = publisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 统一的Key生成器(唯一维护点)
|
||||||
|
public String buildDynamicKey(String tableName, String codeColumn, String nameColumn, String filter) {
|
||||||
|
return tableName + "|" + codeColumn + "|" + nameColumn + "|" + StrUtil.nullToDefault(filter, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 核心:触发清理事件(参数与加载方法完全一致)
|
||||||
|
public void evictDynamic(String tableName, String codeColumn, String nameColumn, String filter) {
|
||||||
|
String cacheKey = buildDynamicKey(tableName, codeColumn, nameColumn, filter);
|
||||||
|
// (携带cacheKey)
|
||||||
|
publisher.publishEvent(new DictCacheInvalidateEvent(this, "DYNAMIC", cacheKey));
|
||||||
|
log.info("已发布动态字典清理事件: table={}, key={}", tableName, cacheKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
package com.yfd.platform.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典缓存失效事件
|
||||||
|
*
|
||||||
|
* <p>当静态字典或动态字典数据发生变更时发布此事件,通知
|
||||||
|
* {@link DictCodeToNameConverter} 清除对应缓存。
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public class DictCacheInvalidateEvent extends ApplicationEvent {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 缓存类型:STATIC / DYNAMIC(仅供日志或监控使用) */
|
||||||
|
private final String cacheType;
|
||||||
|
|
||||||
|
/** 完整的缓存键(最重要,监听器直接用这个去 invalidate) */
|
||||||
|
private final String cacheKey;
|
||||||
|
|
||||||
|
// ========== 静态字典专用构造 ==========
|
||||||
|
public DictCacheInvalidateEvent(Object source, String dictCode) {
|
||||||
|
super(source);
|
||||||
|
this.cacheType = "STATIC";
|
||||||
|
this.cacheKey = dictCode; // 静态字典的 cacheKey 就是 dictCode
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 动态字典专用构造 ==========
|
||||||
|
public DictCacheInvalidateEvent(Object source, String tableName,
|
||||||
|
String codeColumn, String nameColumn, String filter) {
|
||||||
|
super(source);
|
||||||
|
this.cacheType = "DYNAMIC";
|
||||||
|
// ★ 关键:Key 在这里拼好,监听器直接拿 cacheKey 用,不再二次拼接
|
||||||
|
this.cacheKey = tableName + "|" + codeColumn + "|" + nameColumn + "|"
|
||||||
|
+ StrUtil.nullToDefault(filter, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果外部已经拼好了 Key,也可以直接传入(更灵活)
|
||||||
|
public DictCacheInvalidateEvent(Object source, String cacheType, String cacheKey) {
|
||||||
|
super(source);
|
||||||
|
this.cacheType = cacheType;
|
||||||
|
this.cacheKey = cacheKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,25 +2,29 @@ package com.yfd.platform.utils;
|
|||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.github.benmanes.caffeine.cache.Cache;
|
||||||
|
import com.github.benmanes.caffeine.cache.Caffeine;
|
||||||
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
import com.yfd.platform.common.MicroservicDynamicSQLMapper;
|
||||||
import com.yfd.platform.system.domain.SysDictionary;
|
import com.yfd.platform.system.domain.SysDictionary;
|
||||||
import com.yfd.platform.system.domain.SysDictionaryItems;
|
import com.yfd.platform.system.domain.SysDictionaryItems;
|
||||||
import com.yfd.platform.system.mapper.SysDictionaryItemsMapper;
|
import com.yfd.platform.system.mapper.SysDictionaryItemsMapper;
|
||||||
import com.yfd.platform.system.mapper.SysDictionaryMapper;
|
import com.yfd.platform.system.mapper.SysDictionaryMapper;
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.context.event.EventListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典代码转名称转换器
|
* 字典代码转名称转换器
|
||||||
* <p>
|
* <p>
|
||||||
* 支持静态字典(SYS_DICTIONARY / SYS_DICTIONARY_ITEMS)和动态字典(业务表查询),
|
* 使用 Caffeine Cache 存储字典映射,TTL=1小时自动过期(兜底),
|
||||||
* 将 VO 中的 code 字段值转换为对应的 name 字段值。
|
* 并通过监听 {@link DictCacheInvalidateEvent} 在字典数据变更时即时清除缓存。
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <h3>使用方式</h3>
|
* <h3>使用方式</h3>
|
||||||
@ -56,13 +60,17 @@ import java.util.stream.Collectors;
|
|||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author Generated
|
|
||||||
* @since 2025-05-18
|
* @since 2025-05-18
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
@Component
|
||||||
public class DictCodeToNameConverter {
|
public class DictCodeToNameConverter {
|
||||||
|
|
||||||
|
/** 默认缓存 TTL:1 小时 */
|
||||||
|
private static final long CACHE_TTL_HOURS = 1;
|
||||||
|
/** 最大缓存条目数 */
|
||||||
|
private static final long MAX_CACHE_SIZE = 500;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SysDictionaryMapper sysDictionaryMapper;
|
private SysDictionaryMapper sysDictionaryMapper;
|
||||||
|
|
||||||
@ -73,14 +81,52 @@ public class DictCodeToNameConverter {
|
|||||||
private MicroservicDynamicSQLMapper<?> microservicDynamicSQLMapper;
|
private MicroservicDynamicSQLMapper<?> microservicDynamicSQLMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 静态字典缓存:dictCode -> Map<itemCode, dictName>
|
* 静态字典缓存:dictCode -> Map<itemCode, dictName>
|
||||||
|
* TTL=1小时,最大 500 条目
|
||||||
*/
|
*/
|
||||||
private final Map<String, Map<String, String>> staticDictCache = new ConcurrentHashMap<>();
|
private Cache<String, Map<String, String>> staticDictCache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态字典缓存:缓存key -> Map<code, name>
|
* 动态字典缓存:缓存key -> Map<code, name>
|
||||||
|
* TTL=1小时,最大 500 条目
|
||||||
*/
|
*/
|
||||||
private final Map<String, Map<String, String>> dynamicDictCache = new ConcurrentHashMap<>();
|
private Cache<String, Map<String, String>> dynamicDictCache;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
staticDictCache = Caffeine.newBuilder()
|
||||||
|
.expireAfterWrite(CACHE_TTL_HOURS, TimeUnit.HOURS)
|
||||||
|
.maximumSize(MAX_CACHE_SIZE)
|
||||||
|
.removalListener((key, value, cause) ->
|
||||||
|
log.debug("静态字典缓存失效: dictCode={}, cause={}", key, cause))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
dynamicDictCache = Caffeine.newBuilder()
|
||||||
|
.expireAfterWrite(CACHE_TTL_HOURS, TimeUnit.HOURS)
|
||||||
|
.maximumSize(MAX_CACHE_SIZE)
|
||||||
|
.removalListener((key, value, cause) ->
|
||||||
|
log.debug("动态字典缓存失效: key={}, cause={}", key, cause))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
log.info("DictCodeToNameConverter 初始化完成, TTL={}小时, maxSize={}", CACHE_TTL_HOURS, MAX_CACHE_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 缓存失效事件监听 ====================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听字典缓存失效事件,即时清除对应缓存
|
||||||
|
*/
|
||||||
|
@EventListener
|
||||||
|
public void onDictCacheInvalidate(DictCacheInvalidateEvent event) {
|
||||||
|
if ("STATIC".equalsIgnoreCase(event.getCacheType())) {
|
||||||
|
staticDictCache.invalidate(event.getCacheKey());
|
||||||
|
} else if ("DYNAMIC".equalsIgnoreCase(event.getCacheType())) {
|
||||||
|
dynamicDictCache.invalidate(event.getCacheKey());
|
||||||
|
}
|
||||||
|
log.info("字典缓存已清除: type={}, key={}", event.getCacheType(), event.getCacheKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 对外转换方法 ====================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量转换:根据元数据配置,将 VO 列表中的 code 字段转换为对应的 name 字段
|
* 批量转换:根据元数据配置,将 VO 列表中的 code 字段转换为对应的 name 字段
|
||||||
@ -108,17 +154,7 @@ public class DictCodeToNameConverter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页结果转换:将 Page 中所有记录的 code 字段转换为对应的 name 字段
|
* 分页结果转换
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* 使用示例:
|
|
||||||
* Page<SdHbrvDic> page = hbrvDicService.queryPageList(...);
|
|
||||||
* dictCodeToNameConverter.convertCodeToName(page, CODE_TO_NAME_META_LIST);
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @param page 分页对象
|
|
||||||
* @param metadataList 元数据配置列表
|
|
||||||
* @param <T> VO 类型
|
|
||||||
*/
|
*/
|
||||||
public <T> void convertCodeToName(Page<T> page, List<CodeToNameMetadataBo> metadataList) {
|
public <T> void convertCodeToName(Page<T> page, List<CodeToNameMetadataBo> metadataList) {
|
||||||
if (page == null || page.getRecords() == null || page.getRecords().isEmpty()) {
|
if (page == null || page.getRecords() == null || page.getRecords().isEmpty()) {
|
||||||
@ -128,17 +164,7 @@ public class DictCodeToNameConverter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单个对象转换:将单个对象的 code 字段转换为对应的 name 字段
|
* 单个对象转换
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* 使用示例:
|
|
||||||
* SdHbrvDic hbrvDic = hbrvDicService.getById(hbrvcd);
|
|
||||||
* dictCodeToNameConverter.convertCodeToName(hbrvDic, CODE_TO_NAME_META_LIST);
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @param obj 单个对象
|
|
||||||
* @param metadataList 元数据配置列表
|
|
||||||
* @param <T> VO 类型
|
|
||||||
*/
|
*/
|
||||||
public <T> void convertCodeToName(T obj, List<CodeToNameMetadataBo> metadataList) {
|
public <T> void convertCodeToName(T obj, List<CodeToNameMetadataBo> metadataList) {
|
||||||
if (obj == null || metadataList == null || metadataList.isEmpty()) {
|
if (obj == null || metadataList == null || metadataList.isEmpty()) {
|
||||||
@ -147,14 +173,13 @@ public class DictCodeToNameConverter {
|
|||||||
convertCodeToName(Collections.singletonList(obj), metadataList);
|
convertCodeToName(Collections.singletonList(obj), metadataList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== 缓存管理方法 ====================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载静态字典映射
|
* 加载静态字典映射(从 Caffeine Cache 获取,缓存未命中则查库)
|
||||||
*
|
|
||||||
* @param dictCode 字典编码
|
|
||||||
* @return Map<itemCode, dictName>
|
|
||||||
*/
|
*/
|
||||||
public Map<String, String> loadStaticDictMap(String dictCode) {
|
public Map<String, String> loadStaticDictMap(String dictCode) {
|
||||||
return staticDictCache.computeIfAbsent(dictCode, key -> {
|
return staticDictCache.get(dictCode, key -> {
|
||||||
Map<String, String> map = new LinkedHashMap<>();
|
Map<String, String> map = new LinkedHashMap<>();
|
||||||
try {
|
try {
|
||||||
SysDictionary dict = sysDictionaryMapper.selectOne(
|
SysDictionary dict = sysDictionaryMapper.selectOne(
|
||||||
@ -175,6 +200,7 @@ public class DictCodeToNameConverter {
|
|||||||
map.put(item.getItemCode(), StrUtil.nullToDefault(item.getDictName(), item.getItemCode()));
|
map.put(item.getItemCode(), StrUtil.nullToDefault(item.getDictName(), item.getItemCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
log.debug("静态字典已加载: dictCode={}, size={}", key, map.size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("加载静态字典失败: dictCode={}", key, e);
|
log.error("加载静态字典失败: dictCode={}", key, e);
|
||||||
}
|
}
|
||||||
@ -183,17 +209,11 @@ public class DictCodeToNameConverter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载动态字典映射(从业务表查询)
|
* 加载动态字典映射(从 Caffeine Cache 获取,缓存未命中则查库)
|
||||||
*
|
|
||||||
* @param tableName 表名
|
|
||||||
* @param codeColumn 编码列名
|
|
||||||
* @param nameColumn 名称列名
|
|
||||||
* @param filter 额外过滤条件
|
|
||||||
* @return Map<code, name>
|
|
||||||
*/
|
*/
|
||||||
public Map<String, String> loadDynamicDictMap(String tableName, String codeColumn, String nameColumn, String filter) {
|
public Map<String, String> loadDynamicDictMap(String tableName, String codeColumn, String nameColumn, String filter) {
|
||||||
String cacheKey = tableName + "|" + codeColumn + "|" + nameColumn + "|" + StrUtil.nullToDefault(filter, "");
|
String cacheKey = tableName + "|" + codeColumn + "|" + nameColumn + "|" + StrUtil.nullToDefault(filter, "");
|
||||||
return dynamicDictCache.computeIfAbsent(cacheKey, key -> {
|
return dynamicDictCache.get(cacheKey, key -> {
|
||||||
Map<String, String> map = new LinkedHashMap<>();
|
Map<String, String> map = new LinkedHashMap<>();
|
||||||
try {
|
try {
|
||||||
StringBuilder sql = new StringBuilder();
|
StringBuilder sql = new StringBuilder();
|
||||||
@ -213,6 +233,7 @@ public class DictCodeToNameConverter {
|
|||||||
map.put(code, StrUtil.nullToDefault(name, code));
|
map.put(code, StrUtil.nullToDefault(name, code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
log.debug("动态字典已加载: tableName={}, size={}", tableName, map.size());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("加载动态字典失败: tableName={}", tableName, e);
|
log.error("加载动态字典失败: tableName={}", tableName, e);
|
||||||
}
|
}
|
||||||
@ -220,6 +241,48 @@ public class DictCodeToNameConverter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除所有缓存
|
||||||
|
*/
|
||||||
|
public void clearCache() {
|
||||||
|
staticDictCache.invalidateAll();
|
||||||
|
dynamicDictCache.invalidateAll();
|
||||||
|
log.info("所有字典缓存已清除");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除指定静态字典缓存
|
||||||
|
*/
|
||||||
|
public void clearStaticDictCache(String dictCode) {
|
||||||
|
if (StrUtil.isNotBlank(dictCode)) {
|
||||||
|
staticDictCache.invalidate(dictCode);
|
||||||
|
log.info("静态字典缓存已清除: dictCode={}", dictCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清除指定动态字典缓存
|
||||||
|
*/
|
||||||
|
public void clearDynamicDictCache(String tableName, String codeColumn, String nameColumn, String filter) {
|
||||||
|
String cacheKey = tableName + "|" + codeColumn + "|" + nameColumn + "|" + StrUtil.nullToDefault(filter, "");
|
||||||
|
dynamicDictCache.invalidate(cacheKey);
|
||||||
|
log.info("动态字典缓存已清除: key={}", cacheKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取缓存统计信息
|
||||||
|
*/
|
||||||
|
public Map<String, Object> getCacheStats() {
|
||||||
|
Map<String, Object> stats = new LinkedHashMap<>();
|
||||||
|
stats.put("staticDictSize", staticDictCache.estimatedSize());
|
||||||
|
stats.put("dynamicDictSize", dynamicDictCache.estimatedSize());
|
||||||
|
stats.put("ttlHours", CACHE_TTL_HOURS);
|
||||||
|
stats.put("maxSize", MAX_CACHE_SIZE);
|
||||||
|
return stats;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==================== 私有方法 ====================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据元数据加载 code->name 映射
|
* 根据元数据加载 code->name 映射
|
||||||
*/
|
*/
|
||||||
@ -231,7 +294,7 @@ public class DictCodeToNameConverter {
|
|||||||
metadata.getDictSource(),
|
metadata.getDictSource(),
|
||||||
metadata.getCodeColumn(),
|
metadata.getCodeColumn(),
|
||||||
metadata.getNameColumn(),
|
metadata.getNameColumn(),
|
||||||
metadata.getFilter()
|
null
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
log.warn("未知字典类型: dictType={}", metadata.getDictType());
|
log.warn("未知字典类型: dictType={}", metadata.getDictType());
|
||||||
@ -251,7 +314,6 @@ public class DictCodeToNameConverter {
|
|||||||
|
|
||||||
String nameValue;
|
String nameValue;
|
||||||
if (metadata.isMulti()) {
|
if (metadata.isMulti()) {
|
||||||
// 多选:逗号分隔的多个code
|
|
||||||
nameValue = Arrays.stream(codeValue.split(","))
|
nameValue = Arrays.stream(codeValue.split(","))
|
||||||
.map(String::trim)
|
.map(String::trim)
|
||||||
.filter(StrUtil::isNotBlank)
|
.filter(StrUtil::isNotBlank)
|
||||||
@ -267,40 +329,12 @@ public class DictCodeToNameConverter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 清除所有缓存
|
|
||||||
*/
|
|
||||||
public void clearCache() {
|
|
||||||
staticDictCache.clear();
|
|
||||||
dynamicDictCache.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清除指定静态字典缓存
|
|
||||||
*/
|
|
||||||
public void clearStaticDictCache(String dictCode) {
|
|
||||||
staticDictCache.remove(dictCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清除指定动态字典缓存
|
|
||||||
*/
|
|
||||||
public void clearDynamicDictCache(String tableName, String codeColumn, String nameColumn, String filter) {
|
|
||||||
String cacheKey = tableName + "|" + codeColumn + "|" + nameColumn + "|" + StrUtil.nullToDefault(filter, "");
|
|
||||||
dynamicDictCache.remove(cacheKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 反射工具方法 ====================
|
// ==================== 反射工具方法 ====================
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过反射获取对象的字段值(转为字符串),支持驼峰命名
|
|
||||||
*/
|
|
||||||
private <T> String getFieldValue(T obj, String fieldName) {
|
private <T> String getFieldValue(T obj, String fieldName) {
|
||||||
try {
|
try {
|
||||||
Field field = findField(obj.getClass(), fieldName);
|
Field field = findField(obj.getClass(), fieldName);
|
||||||
if (field == null) {
|
if (field == null) return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
Object value = field.get(obj);
|
Object value = field.get(obj);
|
||||||
return value != null ? value.toString() : null;
|
return value != null ? value.toString() : null;
|
||||||
@ -309,82 +343,51 @@ public class DictCodeToNameConverter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过反射设置对象的字段值,支持驼峰命名
|
|
||||||
*/
|
|
||||||
private <T> void setFieldValue(T obj, String fieldName, String value) {
|
private <T> void setFieldValue(T obj, String fieldName, String value) {
|
||||||
try {
|
try {
|
||||||
Field field = findField(obj.getClass(), fieldName);
|
Field field = findField(obj.getClass(), fieldName);
|
||||||
if (field == null) {
|
if (field == null) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
field.set(obj, value);
|
field.set(obj, value);
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
// 忽略设置失败
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查找字段(忽略大小写,支持驼峰和下划线变体),递归查找父类
|
|
||||||
*/
|
|
||||||
private Field findField(Class<?> clazz, String fieldName) {
|
private Field findField(Class<?> clazz, String fieldName) {
|
||||||
if (clazz == null || clazz == Object.class) {
|
if (clazz == null || clazz == Object.class) return null;
|
||||||
return null;
|
|
||||||
}
|
|
||||||
// 先精确匹配
|
|
||||||
for (Field field : clazz.getDeclaredFields()) {
|
for (Field field : clazz.getDeclaredFields()) {
|
||||||
if (field.getName().equals(fieldName)) {
|
if (field.getName().equals(fieldName)) return field;
|
||||||
return field;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 忽略大小写匹配
|
|
||||||
for (Field field : clazz.getDeclaredFields()) {
|
for (Field field : clazz.getDeclaredFields()) {
|
||||||
if (field.getName().equalsIgnoreCase(fieldName)) {
|
if (field.getName().equalsIgnoreCase(fieldName)) return field;
|
||||||
return field;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 驼峰-下划线互转匹配
|
|
||||||
String camelName = underlineToCamel(fieldName);
|
String camelName = underlineToCamel(fieldName);
|
||||||
String underlineName = camelToUnderline(fieldName);
|
String underlineName = camelToUnderline(fieldName);
|
||||||
for (Field field : clazz.getDeclaredFields()) {
|
for (Field field : clazz.getDeclaredFields()) {
|
||||||
String fName = field.getName();
|
String fName = field.getName();
|
||||||
if (fName.equalsIgnoreCase(camelName) || fName.equalsIgnoreCase(underlineName)) {
|
if (fName.equalsIgnoreCase(camelName) || fName.equalsIgnoreCase(underlineName)) return field;
|
||||||
return field;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return findField(clazz.getSuperclass(), fieldName);
|
return findField(clazz.getSuperclass(), fieldName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String underlineToCamel(String str) {
|
private String underlineToCamel(String str) {
|
||||||
if (StrUtil.isBlank(str) || !str.contains("_")) {
|
if (StrUtil.isBlank(str) || !str.contains("_")) return str;
|
||||||
return str;
|
|
||||||
}
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
boolean upper = false;
|
boolean upper = false;
|
||||||
for (char c : str.toCharArray()) {
|
for (char c : str.toCharArray()) {
|
||||||
if (c == '_') {
|
if (c == '_') { upper = true; }
|
||||||
upper = true;
|
else { sb.append(upper ? Character.toUpperCase(c) : c); upper = false; }
|
||||||
} else {
|
|
||||||
sb.append(upper ? Character.toUpperCase(c) : c);
|
|
||||||
upper = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String camelToUnderline(String str) {
|
private String camelToUnderline(String str) {
|
||||||
if (StrUtil.isBlank(str)) {
|
if (StrUtil.isBlank(str)) return str;
|
||||||
return str;
|
|
||||||
}
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < str.length(); i++) {
|
for (int i = 0; i < str.length(); i++) {
|
||||||
char c = str.charAt(i);
|
char c = str.charAt(i);
|
||||||
if (Character.isUpperCase(c)) {
|
if (Character.isUpperCase(c)) sb.append('_').append(Character.toLowerCase(c));
|
||||||
sb.append('_').append(Character.toLowerCase(c));
|
else sb.append(c);
|
||||||
} else {
|
|
||||||
sb.append(c);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,83 @@
|
|||||||
|
<?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.yfd.platform.qgc_base.mapper.SdFpssrlAiRMapper">
|
||||||
|
|
||||||
|
<!-- 批量合并过鱼AI自动数据(基于 STCD + TM + FTP + AI_BOX_CODE 唯一) -->
|
||||||
|
<insert id="mergeFishRecords" parameterType="java.util.List">
|
||||||
|
MERGE INTO SD_FPSSRL_AI_R T
|
||||||
|
USING (
|
||||||
|
<foreach collection="list" item="obj" index="index" separator="UNION ALL">
|
||||||
|
SELECT
|
||||||
|
#{obj.stcd, jdbcType=VARCHAR} AS STCD,
|
||||||
|
#{obj.tm, jdbcType=TIMESTAMP} AS TM,
|
||||||
|
#{obj.ftp, jdbcType=VARCHAR} AS FTP,
|
||||||
|
#{obj.fcnt, jdbcType=INTEGER} AS FCNT,
|
||||||
|
#{obj.fsz, jdbcType=VARCHAR} AS FSZ,
|
||||||
|
#{obj.length, jdbcType=DECIMAL} AS LENGTH,
|
||||||
|
#{obj.width, jdbcType=DECIMAL} AS WIDTH,
|
||||||
|
#{obj.fishspeed, jdbcType=VARCHAR} AS FISHSPEED,
|
||||||
|
#{obj.direction, jdbcType=INTEGER} AS DIRECTION,
|
||||||
|
#{obj.fishposition, jdbcType=DECIMAL} AS FISHPOSITION,
|
||||||
|
#{obj.firstImgUrl, jdbcType=VARCHAR} AS FIRSTIMGURL,
|
||||||
|
#{obj.secondImgUrl, jdbcType=VARCHAR} AS SECONDIMGURL,
|
||||||
|
#{obj.videoUrl, jdbcType=VARCHAR} AS VIDEOURL,
|
||||||
|
#{obj.temperature, jdbcType=DECIMAL} AS TEMPERATURE,
|
||||||
|
#{obj.waterlevel, jdbcType=DECIMAL} AS WATERLEVEL,
|
||||||
|
#{obj.speed, jdbcType=DECIMAL} AS SPEED,
|
||||||
|
#{obj.q, jdbcType=DECIMAL} AS Q,
|
||||||
|
#{obj.dox, jdbcType=DECIMAL} AS DOX,
|
||||||
|
#{obj.tu, jdbcType=INTEGER} AS TU,
|
||||||
|
#{obj.channelno, jdbcType=VARCHAR} AS CHANNELNO,
|
||||||
|
#{obj.aiBoxCode, jdbcType=VARCHAR} AS AI_BOX_CODE,
|
||||||
|
#{obj.fid, jdbcType=VARCHAR} AS FID,
|
||||||
|
#{obj.remark, jdbcType=VARCHAR} AS REMARK,
|
||||||
|
#{obj.recordUser, jdbcType=VARCHAR} AS RECORD_USER,
|
||||||
|
#{obj.modifyUser, jdbcType=VARCHAR} AS MODIFY_USER
|
||||||
|
FROM DUAL
|
||||||
|
</foreach>
|
||||||
|
) S
|
||||||
|
ON (T.STCD = S.STCD AND T.TM = S.TM AND T.FTP = S.FTP
|
||||||
|
AND T.AI_BOX_CODE = S.AI_BOX_CODE AND T.IS_DELETED = 0)
|
||||||
|
WHEN MATCHED THEN
|
||||||
|
UPDATE SET
|
||||||
|
T.FCNT = S.FCNT,
|
||||||
|
T.FSZ = S.FSZ,
|
||||||
|
T.LENGTH = S.LENGTH,
|
||||||
|
T.WIDTH = S.WIDTH,
|
||||||
|
T.FISHSPEED = S.FISHSPEED,
|
||||||
|
T.DIRECTION = S.DIRECTION,
|
||||||
|
T.FISHPOSITION = S.FISHPOSITION,
|
||||||
|
T.FIRSTIMGURL = S.FIRSTIMGURL,
|
||||||
|
T.SECONDIMGURL = S.SECONDIMGURL,
|
||||||
|
T.VIDEOURL = S.VIDEOURL,
|
||||||
|
T.TEMPERATURE = S.TEMPERATURE,
|
||||||
|
T.WATERLEVEL = S.WATERLEVEL,
|
||||||
|
T.SPEED = S.SPEED,
|
||||||
|
T.Q = S.Q,
|
||||||
|
T.DOX = S.DOX,
|
||||||
|
T.TU = S.TU,
|
||||||
|
T.CHANNELNO = S.CHANNELNO,
|
||||||
|
T.FID = S.FID,
|
||||||
|
T.REMARK = S.REMARK,
|
||||||
|
T.MODIFY_USER = S.MODIFY_USER,
|
||||||
|
T.MODIFY_TIME = SYSDATE
|
||||||
|
WHEN NOT MATCHED THEN
|
||||||
|
INSERT (
|
||||||
|
ID, STCD, TM, FTP, FCNT, FSZ, LENGTH, WIDTH, FISHSPEED,
|
||||||
|
DIRECTION, FISHPOSITION, FIRSTIMGURL, SECONDIMGURL, VIDEOURL,
|
||||||
|
TEMPERATURE, WATERLEVEL, SPEED, Q, DOX, TU, CHANNELNO, AI_BOX_CODE,
|
||||||
|
FID, REMARK, RECORD_USER, RECORD_TIME, MODIFY_USER, MODIFY_TIME,
|
||||||
|
IS_DELETED
|
||||||
|
) VALUES (
|
||||||
|
SYS_GUID(),
|
||||||
|
S.STCD, S.TM, S.FTP, S.FCNT, S.FSZ, S.LENGTH, S.WIDTH, S.FISHSPEED,
|
||||||
|
S.DIRECTION, S.FISHPOSITION, S.FIRSTIMGURL, S.SECONDIMGURL, S.VIDEOURL,
|
||||||
|
S.TEMPERATURE, S.WATERLEVEL, S.SPEED, S.Q, S.DOX, S.TU, S.CHANNELNO,
|
||||||
|
NVL(S.AI_BOX_CODE, '未知'),
|
||||||
|
S.FID, S.REMARK, S.RECORD_USER, SYSDATE, S.MODIFY_USER, SYSDATE,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -11,9 +11,9 @@ VITE_APP_BASE_URL = 'http://localhost:8093'
|
|||||||
# 测试环境
|
# 测试环境
|
||||||
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
# VITE_APP_BASE_URL = 'http://172.16.21.142:8093'
|
||||||
# 汤伟
|
# 汤伟
|
||||||
VITE_APP_BASE_URL = 'http://10.84.111.235:8093'
|
# VITE_APP_BASE_URL = 'http://10.84.111.235:8093'
|
||||||
# 李林
|
# 李林
|
||||||
# VITE_APP_BASE_URL = 'http://10.84.111.25:8093'
|
VITE_APP_BASE_URL = 'http://10.84.111.25:8093'
|
||||||
|
|
||||||
## 开发环境 附件服务地址
|
## 开发环境 附件服务地址
|
||||||
VITE_APP_ATTACHMENT_URL = 'https://211.99.26.225:12125'
|
VITE_APP_ATTACHMENT_URL = 'https://211.99.26.225:12125'
|
||||||
|
|||||||
@ -109,7 +109,7 @@ export class MapCesium implements MapInterface {
|
|||||||
this.containerId = container.id;
|
this.containerId = container.id;
|
||||||
this.containerElement = container;
|
this.containerElement = container;
|
||||||
this.showLoadingOverlay(container);
|
this.showLoadingOverlay(container);
|
||||||
const token = 'bearer fa8aa37c-1e52-4631-a699-625b4147ace8';
|
const token = 'bearer b734a443-2c8f-4f4a-8698-44828cc5f709';
|
||||||
|
|
||||||
this.viewer = new Cesium.Viewer(container, {
|
this.viewer = new Cesium.Viewer(container, {
|
||||||
animation: false,
|
animation: false,
|
||||||
|
|||||||
@ -0,0 +1,115 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 第一步:输入修改依据 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:open="dataSourceVisible"
|
||||||
|
:title="title"
|
||||||
|
ok-text="确定"
|
||||||
|
cancel-text="取消"
|
||||||
|
@ok="handleDataSourceConfirm"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<p style="color: red; margin-bottom: 8px">请输入修改依据以继续删除操作</p>
|
||||||
|
<a-textarea
|
||||||
|
v-model:value="dataSource"
|
||||||
|
placeholder="请输入修改依据"
|
||||||
|
:rows="4"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
|
||||||
|
<!-- 第二步:确认删除 -->
|
||||||
|
<a-modal
|
||||||
|
v-model:open="confirmVisible"
|
||||||
|
title="确认删除"
|
||||||
|
ok-text="确认删除"
|
||||||
|
cancel-text="取消"
|
||||||
|
:ok-button-props="{ danger: true }"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="handleFinalDelete"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<p style="color: red; font-weight: bold">请慎重操作!</p>
|
||||||
|
<p>{{ label }}名称:{{ deleteRecord?.stnm }}</p>
|
||||||
|
<p>修改依据:{{ dataSource || '无' }}</p>
|
||||||
|
<p>确定要删除该{{ label }}吗?</p>
|
||||||
|
</div>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
import { deletePowerInfo } from '@/api/DataQueryMenuModule';
|
||||||
|
import { useDraggable } from '@/utils/drag';
|
||||||
|
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
/** 自定义删除函数,接收 (record, reason) 参数 */
|
||||||
|
deleteFn?: (record: any, reason: string) => Promise<any>;
|
||||||
|
/** 弹窗标题 */
|
||||||
|
title?: string;
|
||||||
|
/** 显示标签(如"电站"、"数据") */
|
||||||
|
label?: string;
|
||||||
|
}>(),
|
||||||
|
{
|
||||||
|
title: '删除电站',
|
||||||
|
label: '电站'
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
const emit = defineEmits(['success']);
|
||||||
|
|
||||||
|
const dataSourceVisible = ref(false);
|
||||||
|
const confirmVisible = ref(false);
|
||||||
|
const confirmLoading = ref(false);
|
||||||
|
const dataSource = ref('');
|
||||||
|
const deleteRecord = ref<any>(null);
|
||||||
|
const onSuccess = ref<Function>(() => {});
|
||||||
|
|
||||||
|
// 打开删除弹窗
|
||||||
|
const open = (record: any, callback: Function) => {
|
||||||
|
deleteRecord.value = record;
|
||||||
|
dataSource.value = '';
|
||||||
|
dataSourceVisible.value = true;
|
||||||
|
onSuccess.value = callback;
|
||||||
|
};
|
||||||
|
useDraggable(dataSourceVisible, { boundary: true, resetOnOpen: true });
|
||||||
|
useDraggable(confirmVisible, { boundary: true, resetOnOpen: true });
|
||||||
|
// 修改依据确认
|
||||||
|
const handleDataSourceConfirm = () => {
|
||||||
|
dataSourceVisible.value = false;
|
||||||
|
confirmVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 最终删除
|
||||||
|
const handleFinalDelete = async () => {
|
||||||
|
confirmLoading.value = true; // 开始加载
|
||||||
|
try {
|
||||||
|
let res: any;
|
||||||
|
if (props.deleteFn) {
|
||||||
|
// 使用外部传入的删除函数
|
||||||
|
res = await props.deleteFn(deleteRecord.value, dataSource.value);
|
||||||
|
} else {
|
||||||
|
// 默认使用电站删除接口
|
||||||
|
const params = {
|
||||||
|
ids: [deleteRecord.value.stcd],
|
||||||
|
source: dataSource.value
|
||||||
|
};
|
||||||
|
res = await deletePowerInfo(params);
|
||||||
|
}
|
||||||
|
if (res?.code == 0 || res?.success) {
|
||||||
|
message.success('删除成功');
|
||||||
|
confirmVisible.value = false;
|
||||||
|
onSuccess.value();
|
||||||
|
} else {
|
||||||
|
message.error(res?.msg || '删除失败');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
message.error('删除失败,请重试');
|
||||||
|
} finally {
|
||||||
|
confirmLoading.value = false; // 结束加载
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
defineExpose({ open });
|
||||||
|
</script>
|
||||||
@ -103,7 +103,7 @@ const buildGroupedColumns = () => {
|
|||||||
const groupMap = new Map<string, ColumnItem[]>();
|
const groupMap = new Map<string, ColumnItem[]>();
|
||||||
|
|
||||||
// 过滤掉 defaultConfig: true 的项(兼容字符串类型)
|
// 过滤掉 defaultConfig: true 的项(兼容字符串类型)
|
||||||
const filteredList = props.userColumnList.filter(item => item.defaultConfig !== true);
|
const filteredList = props.userColumnList.filter(item => item.enable == 1);
|
||||||
|
|
||||||
// 按 groupType 分组
|
// 按 groupType 分组
|
||||||
for (const item of filteredList) {
|
for (const item of filteredList) {
|
||||||
|
|||||||
@ -19,6 +19,16 @@
|
|||||||
<!-- ===== 概述 ===== -->
|
<!-- ===== 概述 ===== -->
|
||||||
<a-col :span="24"><div class="form-group-title">概述</div></a-col>
|
<a-col :span="24"><div class="form-group-title">概述</div></a-col>
|
||||||
|
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="电站编码" name="stcd">
|
||||||
|
<a-input
|
||||||
|
v-model:value="formData.stcd"
|
||||||
|
placeholder="请输入电站编码"
|
||||||
|
:disabled="!isAdd"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="电站名称" name="ennm">
|
<a-form-item label="电站名称" name="ennm">
|
||||||
<a-input
|
<a-input
|
||||||
@ -1121,11 +1131,14 @@ const formRef = ref();
|
|||||||
const confirmLoading = ref(false);
|
const confirmLoading = ref(false);
|
||||||
const formData = ref<any>({});
|
const formData = ref<any>({});
|
||||||
const originalRecord = ref<any>({});
|
const originalRecord = ref<any>({});
|
||||||
const formRules = ref<any>({
|
const formRules = computed(() => ({
|
||||||
|
stcd: props.isAdd
|
||||||
|
? [{ required: true, message: '请输入电站编码', trigger: 'blur' }]
|
||||||
|
: [],
|
||||||
ennm: [{ required: true, message: '请输入电站名称', trigger: 'blur' }],
|
ennm: [{ required: true, message: '请输入电站名称', trigger: 'blur' }],
|
||||||
baseId: [{ required: true, message: '请选择基地', trigger: 'change' }],
|
baseId: [{ required: true, message: '请选择基地', trigger: 'change' }],
|
||||||
reachcd: [{ required: true, message: '请选择所在河段', trigger: 'change' }]
|
reachcd: [{ required: true, message: '请选择所在河段', trigger: 'change' }]
|
||||||
});
|
}));
|
||||||
|
|
||||||
// 确认弹框状态
|
// 确认弹框状态
|
||||||
const confirmModalVisible = ref(false);
|
const confirmModalVisible = ref(false);
|
||||||
|
|||||||
@ -60,6 +60,7 @@
|
|||||||
<!-- 编辑电站 Modal -->
|
<!-- 编辑电站 Modal -->
|
||||||
<EditPowerModal
|
<EditPowerModal
|
||||||
v-model:open="editVisible"
|
v-model:open="editVisible"
|
||||||
|
:is-add="isAdd"
|
||||||
:dvtp-list="dvtpList"
|
:dvtp-list="dvtpList"
|
||||||
:record="editRecord"
|
:record="editRecord"
|
||||||
:top-hynm-list="topHynmList"
|
:top-hynm-list="topHynmList"
|
||||||
@ -491,7 +492,7 @@ const fetchColumnConfig = () => {
|
|||||||
|
|
||||||
// 根据 API 数据动态构建表格列,按 orderIndex 排序,只保留 checked 为 1 的列
|
// 根据 API 数据动态构建表格列,按 orderIndex 排序,只保留 checked 为 1 的列
|
||||||
const sorted = [...list]
|
const sorted = [...list]
|
||||||
.filter((item: any) => item.checked === 1 && item.defaultConfig !== true)
|
.filter((item: any) => item.checked === 1 && item.enable == 1)
|
||||||
.sort((a: any, b: any) => a.orderIndex - b.orderIndex);
|
.sort((a: any, b: any) => a.orderIndex - b.orderIndex);
|
||||||
|
|
||||||
const cols = sorted.map((item: any) => {
|
const cols = sorted.map((item: any) => {
|
||||||
|
|||||||
@ -42,7 +42,7 @@ const columns = ref<any[]>([
|
|||||||
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
{ key: 'baseName', title: '水电基地', dataIndex: 'baseName', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 100, ellipsis: true },
|
{ key: 'ennm', title: '所属电站', dataIndex: 'ennm', visible: true, width: 100, ellipsis: true },
|
||||||
|
|
||||||
{ key: 'zzfldxName', title: '放流对象', dataIndex: 'zzfldxName', visible: true, width: 120, ellipsis: true },
|
{ key: 'zzfldx', title: '放流对象', dataIndex: 'zzfldx', visible: true, width: 120, ellipsis: true },
|
||||||
{ key: 'zzflcnt', title: '放流规模(尾)', dataIndex: 'zzflcnt', visible: true, width: 120 },
|
{ key: 'zzflcnt', title: '放流规模(尾)', dataIndex: 'zzflcnt', visible: true, width: 120 },
|
||||||
|
|
||||||
{ key: 'zzflbjfs', title: '标记方式', dataIndex: 'zzflbjfs', visible: true, width: 100, ellipsis: true },
|
{ key: 'zzflbjfs', title: '标记方式', dataIndex: 'zzflbjfs', visible: true, width: 100, ellipsis: true },
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="export-container">
|
<div class="export-container body_one">
|
||||||
<a-form
|
<a-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
@ -321,4 +321,9 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.body_one {
|
||||||
|
position: relative;
|
||||||
|
z-index: 900;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -548,4 +548,9 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss">
|
||||||
|
.body_one {
|
||||||
|
position: relative;
|
||||||
|
z-index: 900;
|
||||||
|
pointer-events: all;
|
||||||
|
}</style>
|
||||||
|
|||||||
@ -205,4 +205,9 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss">
|
||||||
|
.body_one {
|
||||||
|
position: relative;
|
||||||
|
z-index: 900;
|
||||||
|
pointer-events: all;
|
||||||
|
}</style>
|
||||||
|
|||||||
@ -14,9 +14,16 @@ VITE_APP_BASE_URL = 'http://localhost:8093'
|
|||||||
VITE_APP_BASE_URL = 'http://10.84.111.235:8093'
|
VITE_APP_BASE_URL = 'http://10.84.111.235:8093'
|
||||||
# 李林
|
# 李林
|
||||||
# VITE_APP_BASE_URL = 'http://10.84.111.25:8093'
|
# VITE_APP_BASE_URL = 'http://10.84.111.25:8093'
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
# 小扈
|
||||||
|
# VITE_APP_BASE_URL = 'http://10.84.111.182:8093'
|
||||||
|
>>>>>>> 0401f9354ff2bc8266a31aa2b2c445832e5da807
|
||||||
|
|
||||||
## 开发环境 附件服务地址
|
## 开发环境 附件服务地址
|
||||||
VITE_APP_ATTACHMENT_URL = 'https://211.99.26.225:12125'
|
VITE_APP_ATTACHMENT_URL = 'https://211.99.26.225:12125'
|
||||||
|
## 生产环境 附件服务地址
|
||||||
|
VITE_APP_ATTACHMENT_URL1 = 'http://211.99.26.225:12127'
|
||||||
# 地图服务地址
|
# 地图服务地址
|
||||||
VITE_APP_MAP_URL = 'https://211.99.26.225:18085'
|
VITE_APP_MAP_URL = 'https://211.99.26.225:18085'
|
||||||
# ?menu=systemManageMenu&page=disposeManage
|
# ?menu=systemManageMenu&page=disposeManage
|
||||||
@ -10,5 +10,7 @@ VITE_APP_BASE_URL = 'http://localhost:8093'
|
|||||||
VITE_APP_BASE_API_URL = 'https://211.99.26.225:12130/prod-api'
|
VITE_APP_BASE_API_URL = 'https://211.99.26.225:12130/prod-api'
|
||||||
## 生产环境 附件服务地址
|
## 生产环境 附件服务地址
|
||||||
VITE_APP_ATTACHMENT_URL = 'https://211.99.26.225:12125'
|
VITE_APP_ATTACHMENT_URL = 'https://211.99.26.225:12125'
|
||||||
|
## 生产环境 附件服务地址
|
||||||
|
VITE_APP_ATTACHMENT_URL1 = 'http://211.99.26.225:12127'
|
||||||
# 地图服务地址
|
# 地图服务地址
|
||||||
VITE_APP_MAP_URL = 'https://211.99.26.225:18085'
|
VITE_APP_MAP_URL = 'https://211.99.26.225:18085'
|
||||||
47
frontend/src/api/ZXZWYYunXingShuJu/index.ts
Normal file
47
frontend/src/api/ZXZWYYunXingShuJu/index.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取珍稀植物园下拉列表(植物园 + 年份)
|
||||||
|
* POST /wmp-env-server/env/vp/basin/GetKendoListCust
|
||||||
|
* @param params -- { filter: { rstcd }, group, groupResultFlat }
|
||||||
|
*/
|
||||||
|
export function getBotanicalGardenList(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/wmp-env-server/env/vp/basin/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取珍稀植物园统计数据(卡片展示用)
|
||||||
|
* POST /wmp-env-server/env/vp/bcount/GetKendoListCust
|
||||||
|
* @param params -- { filter: { year, stcd } }
|
||||||
|
*/
|
||||||
|
export function getBotanicalGardenStatistic(params: any) {
|
||||||
|
const { filter, group, groupResultFlat } = params;
|
||||||
|
return request({
|
||||||
|
url: '/wmp-env-server/env/vp/bcount/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
data: {
|
||||||
|
filter,
|
||||||
|
group,
|
||||||
|
groupResultFlat
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 珍稀植物园详情表格(BasicTable listUrl 用)
|
||||||
|
* POST /wmp-env-server/env/vpr/basinVpIntDetail
|
||||||
|
* @param params -- BasicTable 传入的 { filter, skip, take, sort, ... }
|
||||||
|
*/
|
||||||
|
export function getBotanicalGardenDetailData(params: any) {
|
||||||
|
return request({
|
||||||
|
url: '/vap/vpr/basinVpIntDetail',
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
});
|
||||||
|
}
|
||||||
154
frontend/src/api/dianZhanZhuanTi/index.ts
Normal file
154
frontend/src/api/dianZhanZhuanTi/index.ts
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电站树形数据(用于 TreeSelect)
|
||||||
|
* POST /sys/psbmodulelbb/getTreeConfiguredps
|
||||||
|
* 与告警规则模块 getStationList 同接口
|
||||||
|
*/
|
||||||
|
export function getTreeConfiguredps() {
|
||||||
|
return request({
|
||||||
|
url: '/sys/psbmodulelbb/getTreeConfiguredps',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
filter: {
|
||||||
|
logic: 'and',
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
field: 'wbsType',
|
||||||
|
operator: 'eq',
|
||||||
|
value: 'PSB_RVCD'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
sort: [
|
||||||
|
{
|
||||||
|
field: 'baseId',
|
||||||
|
dir: 'asc'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电站专题的布局配置(psbmodulelbb)
|
||||||
|
* POST /wmp-sys-server/sys/psbmodulelbb/GetKendoListCust
|
||||||
|
*/
|
||||||
|
export function getPowerSubjectLayout(
|
||||||
|
stcd: string,
|
||||||
|
templateId?: string,
|
||||||
|
ext = 'true'
|
||||||
|
) {
|
||||||
|
const filters = {
|
||||||
|
logic: 'and',
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
field: 'stcd',
|
||||||
|
operator: 'eq',
|
||||||
|
dataType: 'string',
|
||||||
|
value: stcd
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'templateId',
|
||||||
|
operator: 'eq',
|
||||||
|
dataType: 'string',
|
||||||
|
value: templateId || null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'ext',
|
||||||
|
operator: 'eq',
|
||||||
|
dataType: 'string',
|
||||||
|
value: ext
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return request({
|
||||||
|
url: '/sys/psbmodulelbb/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: { filter: filters }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电站放流统计 - 年份聚合(获取数据年份范围)
|
||||||
|
* POST /wmp-env-server/fb/station/eng/GetAggregateData
|
||||||
|
*/
|
||||||
|
export function getPowerStationReleaseYear(data) {
|
||||||
|
return request({
|
||||||
|
url: '/fb/station/eng/GetAggregateData',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电站放流统计 - 明细数据
|
||||||
|
* POST /wmp-env-server/fb/station/eng/GetKendoListCust
|
||||||
|
*/
|
||||||
|
export function getPowerStationReleaseData(params: any) {
|
||||||
|
return request({
|
||||||
|
url: '/fb/station/eng/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data:params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取社会投资扶贫就业统计数据
|
||||||
|
* POST /wmp-eng-server/common/societyeffb/GetKendoListCust
|
||||||
|
*/
|
||||||
|
export function getSocialInvestmentData(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/wmp-eng-server/common/societyeffb/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取增殖站下拉列表
|
||||||
|
* POST /dec-lygk-base-server/base/msstbprpt/GetKendoList
|
||||||
|
*/
|
||||||
|
export function getZenZhiZhanList(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/fb/msstbprpt/GetKendoList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取增殖站各步骤运行状态
|
||||||
|
* POST /wmp-env-server/fb/breedStage/GetKendoListCust
|
||||||
|
*/
|
||||||
|
export function getHatcheryOperationData(data:any) {
|
||||||
|
return request({
|
||||||
|
url: '/fb/breedStage/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取鱼类字典
|
||||||
|
* POST /wmp-env-server/env/fishDic/GetKendoList
|
||||||
|
*/
|
||||||
|
export function getFishDic(data:any) {
|
||||||
|
return request({
|
||||||
|
url: '/fpr/fishDic/GetKendoList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电站放流统计 - 详情弹窗列表
|
||||||
|
* POST /wmp-env-server/fb/msfbrd/qgc/GetKendoListCust
|
||||||
|
*/
|
||||||
|
export function getPowerStationReleaseDetail(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/fb/msfbrdm/qgc/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
@ -1,26 +1,98 @@
|
|||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
|
|
||||||
// 获取所有倾斜摄影
|
//
|
||||||
export function warnruleGetKendoList(data: any) {
|
export function warnruleGetKendoList(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/sys/warn/rule/GetKendoList',
|
url: '/sys/warnRule/GetKendoListCust',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//预警类型下拉框 //水质等级下拉框
|
export function bindGetKendoList(data: any) {
|
||||||
export function dictGetRemoteDictValue(data: any) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/api/dec-modules-usm-springcloud-starter/usm/v1/dict/getRemoteDictValue',
|
url: '/sys/warnRule/bind/GetKendoList',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//新增修改获取相关输入数据
|
//新增修改获取相关输入数据
|
||||||
export function ruleysList(data: any) {
|
export function ruleysList(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/wmp-sys-server/sys/warn/rule/ysList',
|
url: '/sys/warnRule/ysList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 新增/修改预警规则
|
||||||
|
export function warnruleAddOrUpdate(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/warnRule/addOrUpdate',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除预警规则
|
||||||
|
export function warnruleDelete(params: { id: string }) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/warnRule/delete',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取所属电站列表
|
||||||
|
export function getStationList() {
|
||||||
|
return request({
|
||||||
|
url: '/sys/psbmodulelbb/getTreeConfiguredps',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
filter: {
|
||||||
|
logic: 'and',
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
field: 'wbsType',
|
||||||
|
operator: 'eq',
|
||||||
|
value: 'PSB_RVCD'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除绑定预警规则
|
||||||
|
export function warnruleBindDelete(params: { id: string }) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/warnRule/bind/delete',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据电站获取预警规则列表
|
||||||
|
export function getRuleListByStcd(params: { stcd: string; ruleType: string }) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/warnRule/getRuleListByStcd',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据预警规则ID获取详情(含 detail 数据)
|
||||||
|
export function getDetailById(params: { ruleId: string }) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/warnRule/getDetailById',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 修改规则是否展示
|
||||||
|
export function updateShow(data:any) {
|
||||||
|
return request({
|
||||||
|
url: '/sys/warnRule/updateShow',
|
||||||
|
method: 'post',
|
||||||
|
params:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
25
frontend/src/api/video/index.ts
Normal file
25
frontend/src/api/video/index.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控视频站点查询
|
||||||
|
* 根据 rstcd 和 sttpCode 查询电站下的监控视频站点列表
|
||||||
|
*/
|
||||||
|
export function videoSurveillance(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/vd/msstbprpt/GetKendoList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时视频数据查询
|
||||||
|
* 根据 stcd 列表查询实时视频数据(截图、视频流地址等)
|
||||||
|
*/
|
||||||
|
export function realTimeVideo(data:any) {
|
||||||
|
return request({
|
||||||
|
url: '/vd/runData/GetKendoListCust',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
27
frontend/src/assets/icons/arrowDownLine2.svg
Normal file
27
frontend/src/assets/icons/arrowDownLine2.svg
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="20px" height="8px" viewBox="0 0 20 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>arrowDownLine2</title>
|
||||||
|
<defs>
|
||||||
|
<filter id="filter-1">
|
||||||
|
<feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 0.184314 0 0 0 0 0.419608 0 0 0 0 0.596078 0 0 0 1.000000 0"></feColorMatrix>
|
||||||
|
</filter>
|
||||||
|
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
|
||||||
|
<stop stop-color="#00F4FE" stop-opacity="0" offset="0%"></stop>
|
||||||
|
<stop stop-color="#00EDFD" offset="50.3632549%"></stop>
|
||||||
|
<stop stop-color="#00E6FC" stop-opacity="0" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g id="1-首页" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="1.1.1-电站专题" transform="translate(-1544.000000, -1239.000000)">
|
||||||
|
<g id="编组备份-4" transform="translate(1476.000000, 70.000000)">
|
||||||
|
<g id="编组-3" transform="translate(16.000000, 1072.000000)">
|
||||||
|
<g id="arrowDownLine2" transform="translate(51.571254, 96.742752)" filter="url(#filter-1)">
|
||||||
|
<g>
|
||||||
|
<polygon id="ArrowDownLine" fill="url(#linearGradient-2)" fill-rule="nonzero" transform="translate(10.505921, 4.257248) scale(-1, 1) rotate(-270.000000) translate(-10.505921, -4.257248) " points="7 -5.48550424 7.85749293 -6 14.0118417 4.25724788 7.85749293 14.5144958 7 14 12.8457465 4.25724788"></polygon>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
34
frontend/src/assets/icons/fishStation2.svg
Normal file
34
frontend/src/assets/icons/fishStation2.svg
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<title>FishStation</title>
|
||||||
|
<defs>
|
||||||
|
<path d="M9.0836405,48.6439317 C20.4848773,59.0912405 38.196623,58.3179289 48.6439317,46.9166921 C59.0912405,35.5154553 58.3179289,17.8037096 46.9166921,7.35640088 C35.5154553,-3.09090785 17.8037096,-2.31759633 7.35640088,9.0836405 C-3.09090785,20.4848773 -2.31759633,38.196623 9.0836405,48.6439317 Z" id="path-1"></path>
|
||||||
|
<mask id="mask-2" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="0" y="0" width="56.0003326" height="56.0003326" fill="white">
|
||||||
|
<use xlink:href="#path-1"></use>
|
||||||
|
</mask>
|
||||||
|
<circle id="path-3" cx="28.0001663" cy="28.0001663" r="21"></circle>
|
||||||
|
<mask id="mask-4" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="0" y="0" width="42" height="42" fill="white">
|
||||||
|
<use xlink:href="#path-3"></use>
|
||||||
|
</mask>
|
||||||
|
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-5">
|
||||||
|
<stop stop-color="#05D9FF" offset="0%"></stop>
|
||||||
|
<stop stop-color="#02B2FF" offset="100%"></stop>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
|
<g id="08_增殖放流" transform="translate(-1512.000000, -537.000000)">
|
||||||
|
<g id="BGSM备份-4" transform="translate(1464.000000, 436.000000)">
|
||||||
|
<g id="编组-3" transform="translate(16.000000, 61.000000)">
|
||||||
|
<g id="FishStation" transform="translate(32.000000, 40.000000)">
|
||||||
|
<use id="椭圆形" stroke-opacity="0.45" stroke="#007FCC" mask="url(#mask-2)" stroke-width="8.75" stroke-dasharray="42,1.75" xlink:href="#path-1"></use>
|
||||||
|
<circle id="椭圆形" stroke-opacity="0.65" stroke="#02B2FF" stroke-width="0.875" fill="#014380" cx="28.0001663" cy="28.0001663" r="24.0625"></circle>
|
||||||
|
<use id="椭圆形备份-3" stroke="#02B2FF" mask="url(#mask-4)" stroke-width="3.5" stroke-dasharray="3.5,0.875" xlink:href="#path-3"></use>
|
||||||
|
<path d="M23.6237633,32.0387229 L23.6237633,35.0001891 L26.7401593,33.2949884 C36.8668397,35.0001891 42.0001663,28.7188456 42.0001663,28.7188456 C39.2962975,25.3989847 32.606162,24.0521677 32.606162,24.0521677 L26.464835,21.0001663 L26.4191017,24.2761678 C23.5323113,24.634568 19.2697742,27.7313803 19.2697742,27.7313803 C18.6295063,27.1023125 14.0001663,24.0960544 14.0001663,24.0960544 C16.2000349,25.7116552 16.2000349,31.7689877 14.0001663,33.3845939 L19.2697742,29.7949868 C19.8204292,30.3335222 23.6237633,32.0387229 23.6237633,32.0387229 Z M36.6838963,26.9231206 C37.5089642,26.9231206 38.151097,27.5960533 38.151097,28.4043213 C38.151097,29.166854 37.5089642,29.8397895 36.6838963,29.8397895 C35.8597635,29.8397895 35.2185622,29.1668568 35.2185622,28.4043213 C35.217628,27.5960533 35.8597608,26.9231206 36.6838963,26.9231206 Z" id="形状" fill="url(#linearGradient-5)" fill-rule="nonzero"></path>
|
||||||
|
<circle id="椭圆形" fill="#FDDD60" cx="21" cy="22.75" r="1"></circle>
|
||||||
|
<circle id="椭圆形备份-5" fill="#FDDD60" cx="40.2501663" cy="21.8751663" r="1.75"></circle>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.4 KiB |
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
|
id="map-baselayer"
|
||||||
class="baselayer-switcher"
|
class="baselayer-switcher"
|
||||||
:style="{ right: drawerOpen ? '480px' : '12px' }"
|
:style="{ right: drawerOpen ? '480px' : '12px' }"
|
||||||
v-if="uiStore.mapType == '2D'"
|
v-if="uiStore.mapType == '2D'"
|
||||||
@ -62,6 +63,16 @@ const nineSectionsImg: any = {
|
|||||||
|
|
||||||
const activeKey = ref(layers[0].key);
|
const activeKey = ref(layers[0].key);
|
||||||
|
|
||||||
|
// 监听外部通过 store 切换底图(如电站专题页)
|
||||||
|
watch(
|
||||||
|
() => mapViewStore.activeBaseLayerKey,
|
||||||
|
(newKey) => {
|
||||||
|
if (newKey && layers.some(l => l.key === newKey)) {
|
||||||
|
activeKey.value = newKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断图层管理中的基础底图(customBaseLayer)是否被选中
|
* 判断图层管理中的基础底图(customBaseLayer)是否被选中
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -974,7 +974,8 @@ onUnmounted(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
background-color: #fff;
|
||||||
|
// box-shadow: 0 1px 2px #00000026;
|
||||||
.qgc_title {
|
.qgc_title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #e5edf3;
|
background-color: #e5edf3;
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import {
|
|||||||
drawDotImg5,
|
drawDotImg5,
|
||||||
offset5
|
offset5
|
||||||
} from '@/utils/GisUrlList';
|
} from '@/utils/GisUrlList';
|
||||||
|
import { LAYOUT_GRID_SKELETONS } from '@/views/dianZhanZhuanTi/layoutGridSkeletons';
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
__lyConfigs?: {
|
__lyConfigs?: {
|
||||||
@ -321,162 +322,82 @@ const getListByPosition = (data: any, position: string) =>
|
|||||||
/**
|
/**
|
||||||
* 设置地图组件位置
|
* 设置地图组件位置
|
||||||
* @param layoutType - 布局类型
|
* @param layoutType - 布局类型
|
||||||
* @param data - 布局数据
|
* @param data - 布局数据({ type, data: BclDataItem[] })
|
||||||
* @param offset - 偏移量
|
* @param offset - 面板宽度 + padding + gap,默认 460(440px + 10px + 10px)
|
||||||
|
* @param bottomRowHeight - 底部行高度(如 '200px'),无底部模块时不传
|
||||||
*/
|
*/
|
||||||
export const setMapLegendPos = (
|
export const setMapLegendPos = (
|
||||||
layoutType: string,
|
layoutType: string,
|
||||||
data: any,
|
data: any,
|
||||||
offset = 456
|
offset = 460,
|
||||||
|
bottomRowHeight?: string
|
||||||
) => {
|
) => {
|
||||||
const menuStateString = localStorage.getItem('menuState'); //处理澜沧江左侧菜单状态
|
const menuStateString = localStorage.getItem('menuState');
|
||||||
const menuState =
|
const menuState =
|
||||||
menuStateString !== null ? JSON.parse(menuStateString) : true;
|
menuStateString !== null ? JSON.parse(menuStateString) : true;
|
||||||
const _theme = localStorage.getItem('ly-theme') || window.__lyConfigs?.theme;
|
const _theme = localStorage.getItem('ly-theme') || window.__lyConfigs?.theme;
|
||||||
const leftEle = document.querySelector('#page-layout-left') as HTMLElement;
|
|
||||||
const rightEle = document.querySelector('#page-layout-right') as HTMLElement;
|
const legend = document.querySelector('#qgc-legendtl') as HTMLElement;
|
||||||
const bottomEle = document.querySelector(
|
const filter = document.querySelector('#map-filter-container') as HTMLElement;
|
||||||
'#page-layout-bottom'
|
const compassControl = document.querySelector('#map-compassControl') as HTMLElement;
|
||||||
) as HTMLElement;
|
const controller = document.querySelector('#map-controller') as HTMLElement;
|
||||||
const legend = document.querySelector('#qgc-legendtl') as HTMLElement; // 图例
|
const monitor = document.querySelector('#map-monitor') as HTMLElement;
|
||||||
const filter = document.querySelector('#map-filter-container') as HTMLElement; // 全局表单
|
const baselayer = document.querySelector('#map-baselayer') as HTMLElement;
|
||||||
const compassControl = document.querySelector(
|
|
||||||
'#map-compassControl'
|
|
||||||
) as HTMLElement; // 全局表单
|
|
||||||
const controller = document.querySelector('#map-controller') as HTMLElement; // 地图工具栏
|
|
||||||
const monitor = document.querySelector('#map-monitor') as HTMLElement; // 地图工具栏
|
|
||||||
const baselayer = document.querySelector('#map-baselayer') as HTMLElement; // 底图模式切换
|
|
||||||
// const vd = document.querySelector('#vd_operate') as HTMLElement // 底部视频
|
|
||||||
const left = [
|
|
||||||
'layout1',
|
|
||||||
'layout2',
|
|
||||||
'layout3',
|
|
||||||
'layout4',
|
|
||||||
'layout6',
|
|
||||||
'layout7',
|
|
||||||
'layout8',
|
|
||||||
'layout9',
|
|
||||||
'layout10',
|
|
||||||
'layout11',
|
|
||||||
'layout14',
|
|
||||||
'layout15',
|
|
||||||
'layout16',
|
|
||||||
'layout17'
|
|
||||||
]; // 左侧布局
|
|
||||||
const right = [
|
|
||||||
'layout1',
|
|
||||||
'layout2',
|
|
||||||
'layout3',
|
|
||||||
'layout4',
|
|
||||||
'layout5',
|
|
||||||
'layout6',
|
|
||||||
'layout8',
|
|
||||||
'layout10',
|
|
||||||
'layout11',
|
|
||||||
'layout15',
|
|
||||||
'layout16',
|
|
||||||
'layout17'
|
|
||||||
]; // 右侧布局
|
|
||||||
const bottom1 = [
|
|
||||||
'layout1',
|
|
||||||
'layout6',
|
|
||||||
'layout8',
|
|
||||||
'layout9',
|
|
||||||
'layout10',
|
|
||||||
'layout16'
|
|
||||||
]; // 三行底部布局
|
|
||||||
const bottom2 = ['layout2', 'layout15']; // 四行底部布局
|
|
||||||
const w = `${offset}px`;
|
|
||||||
const l = `${_theme === 'ly-8' ? (menuState ? 643 : 510) : offset}px`;
|
|
||||||
let b = `0px`;
|
|
||||||
const le = ['layout17', 'layout10'].includes(layoutType) ? 0 : 1;
|
|
||||||
const leftList = getListByPosition(data, 'left');
|
const leftList = getListByPosition(data, 'left');
|
||||||
const rightList = getListByPosition(data, 'right');
|
const rightList = getListByPosition(data, 'right');
|
||||||
const bottomList = getListByPosition(data, 'bottom');
|
const bottomList = getListByPosition(data, 'bottom');
|
||||||
let bottom = '0';
|
|
||||||
|
const hasLeft = leftList?.length > 0;
|
||||||
|
const hasRight = rightList?.length > 0;
|
||||||
|
const hasBottom = bottomList?.length > 0;
|
||||||
|
|
||||||
|
console.log('[图例] hasLeft:', hasLeft, 'hasBottom:', hasBottom, 'bottomRowHeight:', bottomRowHeight);
|
||||||
|
|
||||||
|
const w = `${offset}px`;
|
||||||
|
const l = `${_theme === 'ly-8' ? (menuState ? 643 : 510) : offset}px`;
|
||||||
|
let b = `0px`;
|
||||||
|
|
||||||
if (_theme === 'ly-8') {
|
if (_theme === 'ly-8') {
|
||||||
if (window.__mapMode === '3D') {
|
b = window.__mapMode === '3D' ? '200px' : `${menuState ? 200 : 50}px`;
|
||||||
b = `200px`;
|
}
|
||||||
} else {
|
|
||||||
b = `${menuState ? 200 : 50}px`;
|
// 底部偏移
|
||||||
|
// px 值:直接 + padding(10px)
|
||||||
|
// fr 值:按占比算,如 3 行各 1fr = calc((100% - 40px) / 3 + 10px)
|
||||||
|
let bottomOffset = '12px';
|
||||||
|
if (hasBottom && bottomRowHeight) {
|
||||||
|
const pxMatch = bottomRowHeight.match(/^(\d+)px$/);
|
||||||
|
if (pxMatch) {
|
||||||
|
bottomOffset = `${parseInt(pxMatch[1]) + 10}px`;
|
||||||
|
} else if (bottomRowHeight.endsWith('fr')) {
|
||||||
|
const rows = (LAYOUT_GRID_SKELETONS[layoutType]?.gridTemplateRows || '').split(' ').filter(Boolean);
|
||||||
|
const n = rows.length; // 总行数
|
||||||
|
const gaps = (n - 1) * 10; // 行间距
|
||||||
|
bottomOffset = `calc((100% - 20px - ${gaps}px) / ${n} + 10px)`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bottomList?.length > 0) {
|
|
||||||
if (bottom1.includes(layoutType)) {
|
|
||||||
bottom = 'calc((100% - 16px) / 3 + 8px)';
|
|
||||||
}
|
|
||||||
if (bottom2.includes(layoutType)) {
|
|
||||||
bottom = 'calc((100% - 24px) / 4 + 8px)';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// 没有底部布局时,底部高度为
|
|
||||||
bottom = '28px';
|
|
||||||
}
|
|
||||||
|
|
||||||
const rle = ['layout6'].includes(layoutType) || bottom != '28px' ? 0 : 1;
|
|
||||||
|
|
||||||
const leftHide = leftEle?.classList?.contains('hide');
|
|
||||||
const rightHide = rightEle?.classList?.contains('hide');
|
|
||||||
const bottomHide = bottomEle?.classList?.contains('hide');
|
|
||||||
if (legend) {
|
if (legend) {
|
||||||
legend.style.left =
|
legend.style.left = hasLeft ? `calc(${l} - 10px)` : b;
|
||||||
!leftHide && left.includes(layoutType) && leftList?.length > le ? l : b;
|
legend.style.bottom = bottomOffset;
|
||||||
legend.style.bottom = bottomHide
|
|
||||||
? '0'
|
|
||||||
: bottomList?.length > 0
|
|
||||||
? bottom
|
|
||||||
: '12px';
|
|
||||||
}
|
}
|
||||||
if (filter) {
|
if (filter) {
|
||||||
if (layoutType === 'layout10') {
|
filter.style.left = hasLeft ? l : b;
|
||||||
filter.style.left =
|
|
||||||
!leftHide && left.includes(layoutType) && leftList?.length > 1 ? l : b;
|
|
||||||
} else {
|
|
||||||
filter.style.left =
|
|
||||||
!leftHide &&
|
|
||||||
left.includes(layoutType) &&
|
|
||||||
leftList?.length > 0 &&
|
|
||||||
layoutType !== 'layout17'
|
|
||||||
? l
|
|
||||||
: b;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (compassControl) {
|
if (compassControl) {
|
||||||
if (layoutType === 'layout10') {
|
compassControl.style.left = hasLeft ? l : b;
|
||||||
compassControl.style.left =
|
|
||||||
!leftHide && left.includes(layoutType) && leftList?.length > 1 ? l : b;
|
|
||||||
} else {
|
|
||||||
compassControl.style.left =
|
|
||||||
!leftHide &&
|
|
||||||
left.includes(layoutType) &&
|
|
||||||
leftList?.length > 0 &&
|
|
||||||
layoutType !== 'layout17'
|
|
||||||
? l
|
|
||||||
: b;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (controller) {
|
if (controller) {
|
||||||
controller.style.right =
|
controller.style.right = hasRight ? w : '0';
|
||||||
!rightHide && right.includes(layoutType) && rightList?.length > rle
|
controller.style.bottom = hasBottom ? `calc(${bottomOffset} + 10px)` : '0';
|
||||||
? w
|
|
||||||
: '0';
|
|
||||||
controller.style.bottom = bottomHide ? '0' : bottom;
|
|
||||||
}
|
}
|
||||||
if (monitor) {
|
if (monitor) {
|
||||||
monitor.style.right =
|
monitor.style.right = hasRight ? w : '0';
|
||||||
!rightHide && right.includes(layoutType) && rightList?.length > rle
|
|
||||||
? w
|
|
||||||
: '0';
|
|
||||||
// monitor.style.bottom = bottomHide ? '0' : bottom
|
|
||||||
}
|
}
|
||||||
if (baselayer) {
|
if (baselayer) {
|
||||||
baselayer.style.right =
|
baselayer.style.right = hasRight ? `calc(${w} + 60px)` : '60px';
|
||||||
!rightHide && right.includes(layoutType) && rightList?.length > rle
|
baselayer.style.bottom = hasBottom ? bottomOffset : '0';
|
||||||
? `calc(${w} + 60px)`
|
|
||||||
: '60px';
|
|
||||||
baselayer.style.bottom = bottomHide ? '0' : bottom;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -142,7 +142,7 @@ export class MapCesium implements MapInterface {
|
|||||||
try {
|
try {
|
||||||
this.containerId = container.id;
|
this.containerId = container.id;
|
||||||
this.containerElement = container;
|
this.containerElement = container;
|
||||||
const token = 'bearer fa8aa37c-1e52-4631-a699-625b4147ace8';
|
const token = 'bearer b734a443-2c8f-4f4a-8698-44828cc5f709';
|
||||||
|
|
||||||
this.viewer = new Cesium.Viewer(container, {
|
this.viewer = new Cesium.Viewer(container, {
|
||||||
animation: false,
|
animation: false,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="map-controller" :style="{ right: drawerOpen ? '480px' : '12px' }">
|
<div id="map-controller" class="map-controller" :style="{ right: drawerOpen ? '480px' : '12px' }">
|
||||||
<div
|
<div
|
||||||
class="map-controller-group"
|
class="map-controller-group"
|
||||||
v-for="(item, index) in controllers"
|
v-for="(item, index) in controllers"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mapLegendView" v-show="!uiStore.isRoaming">
|
<div id="qgc-legendtl" class="mapLegendView" v-show="!uiStore.isRoaming">
|
||||||
<div class="legendTitle">
|
<div class="legendTitle">
|
||||||
图例
|
图例
|
||||||
<span class="legendBtn" @click="isOpen = !isOpen">
|
<span class="legendBtn" @click="isOpen = !isOpen">
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, watch, nextTick, computed } from 'vue';
|
import { ref, onMounted, onUnmounted, watch, nextTick, computed, inject } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import { wqGetKendoListCust } from '@/api/sz'
|
import { wqGetKendoListCust } from '@/api/sz'
|
||||||
@ -247,8 +247,12 @@ watch(tabs, (newVal) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal && newVal.wbsCode) {
|
if (newVal && newVal.wbsCode) {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
@ -751,8 +755,9 @@ onMounted(() => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
initChart();
|
initChart();
|
||||||
// 如果已有 selectedItem,触发数据加载
|
// 如果已有 selectedItem,触发数据加载
|
||||||
if (JidiSelectEventStore.selectedItem?.wbsCode) {
|
const currentStation = injectedStation?.value || JidiSelectEventStore.selectedItem;
|
||||||
baseid.value = JidiSelectEventStore.selectedItem.wbsCode;
|
if (currentStation?.wbsCode) {
|
||||||
|
baseid.value = currentStation.wbsCode;
|
||||||
getEchartsData();
|
getEchartsData();
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|||||||
@ -29,7 +29,8 @@ import {
|
|||||||
onMounted,
|
onMounted,
|
||||||
onBeforeUnmount,
|
onBeforeUnmount,
|
||||||
watch,
|
watch,
|
||||||
nextTick
|
nextTick,
|
||||||
|
inject
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import type { ECharts } from 'echarts';
|
import type { ECharts } from 'echarts';
|
||||||
@ -727,8 +728,12 @@ onBeforeUnmount(() => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
async newVal => {
|
async newVal => {
|
||||||
if (!newVal || !newVal.wbsCode) {
|
if (!newVal || !newVal.wbsCode) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch, inject, computed } from 'vue';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import { environmentalProtectionConstruction } from '@/api/home';
|
import { environmentalProtectionConstruction } from '@/api/home';
|
||||||
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
||||||
@ -142,9 +142,12 @@ const handleCardClick = (facility: any) => {
|
|||||||
modalVisible.value = true;
|
modalVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 监听基地变化
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal && newVal.wbsCode) {
|
if (newVal && newVal.wbsCode) {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
|
|||||||
@ -62,8 +62,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, nextTick,watch } from 'vue';
|
import { ref, onMounted, onUnmounted, nextTick, watch, inject, computed } from 'vue';
|
||||||
// import { ref, watch } from 'vue';
|
|
||||||
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import LsstjkTk from './LsstjkTk.vue';
|
import LsstjkTk from './LsstjkTk.vue';
|
||||||
@ -288,9 +287,13 @@ const getSelectData = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
// ==================== 监听基地变化 ====================
|
// ==================== 监听基地变化 ====================
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
async newVal => {
|
async newVal => {
|
||||||
if (newVal && newVal.wbsCode) {
|
if (newVal && newVal.wbsCode) {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ export const useMapViewStore = defineStore('map-view', () => {
|
|||||||
const searchTimeRange = ref<[any, any]>([dayjs().subtract(1, 'M'), dayjs()]);
|
const searchTimeRange = ref<[any, any]>([dayjs().subtract(1, 'M'), dayjs()]);
|
||||||
const selectedBaseId = ref('');
|
const selectedBaseId = ref('');
|
||||||
const currentZoomLevel = ref(4.5);
|
const currentZoomLevel = ref(4.5);
|
||||||
|
const activeBaseLayerKey = ref('s_province_boundaries');
|
||||||
|
|
||||||
// 备注:统一写入当前选中的图层 key,始终保持去重后的结果。
|
// 备注:统一写入当前选中的图层 key,始终保持去重后的结果。
|
||||||
const setCheckedLayerKeys = (keys: string[] = []) => {
|
const setCheckedLayerKeys = (keys: string[] = []) => {
|
||||||
@ -72,12 +73,18 @@ export const useMapViewStore = defineStore('map-view', () => {
|
|||||||
currentZoomLevel.value = 4.5;
|
currentZoomLevel.value = 4.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const setActiveBaseLayerKey = (key: string) => {
|
||||||
|
activeBaseLayerKey.value = key;
|
||||||
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
checkedLayerKeys,
|
checkedLayerKeys,
|
||||||
legendCheckedState,
|
legendCheckedState,
|
||||||
searchTimeRange,
|
searchTimeRange,
|
||||||
selectedBaseId,
|
selectedBaseId,
|
||||||
currentZoomLevel,
|
currentZoomLevel,
|
||||||
|
activeBaseLayerKey,
|
||||||
|
setActiveBaseLayerKey,
|
||||||
setCheckedLayerKeys,
|
setCheckedLayerKeys,
|
||||||
getCheckedLayerKeys,
|
getCheckedLayerKeys,
|
||||||
setLegendCheckedState,
|
setLegendCheckedState,
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
import { ref, onMounted, onUnmounted, nextTick, watch, inject, computed } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import type { EChartsOption } from 'echarts';
|
import type { EChartsOption } from 'echarts';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
@ -637,8 +637,12 @@ const getselsectData = async () => {
|
|||||||
//
|
//
|
||||||
};
|
};
|
||||||
////
|
////
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
newVal => {
|
newVal => {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
getselsectData();
|
getselsectData();
|
||||||
|
|||||||
@ -98,7 +98,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, watch } from 'vue';
|
import { ref, onMounted, watch, inject, computed } from 'vue';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import {
|
import {
|
||||||
qgcetQgcStaticData,
|
qgcetQgcStaticData,
|
||||||
@ -301,8 +301,12 @@ const getData = async () => {
|
|||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
newVal => {
|
newVal => {
|
||||||
if (newVal && newVal.wbsCode) {
|
if (newVal && newVal.wbsCode) {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch, inject, computed } from 'vue';
|
||||||
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
import { useJidiSelectEventStore } from '@/store/modules/jidiSelectEvent';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
import SsstdcgkTk from './SsstdcgkTk.vue';
|
import SsstdcgkTk from './SsstdcgkTk.vue';
|
||||||
@ -322,9 +322,13 @@ const getSelectData = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
// ==================== 监听基地变化 ====================
|
// ==================== 监听基地变化 ====================
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
async newVal => {
|
async newVal => {
|
||||||
if (newVal && newVal.wbsCode) {
|
if (newVal && newVal.wbsCode) {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onBeforeUnmount, nextTick, watch } from 'vue';
|
import { ref, onMounted, onBeforeUnmount, nextTick, watch, inject, computed } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import type { EChartsOption } from 'echarts';
|
import type { EChartsOption } from 'echarts';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
@ -1170,9 +1170,13 @@ watch(
|
|||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
const wbsCode = ref('');
|
const wbsCode = ref('');
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
newVal => {
|
newVal => {
|
||||||
console.log(newVal);
|
console.log(newVal);
|
||||||
wbsCode.value = newVal.wbsCode;
|
wbsCode.value = newVal.wbsCode;
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue';
|
import { ref, onMounted, onUnmounted, nextTick, watch, inject, computed } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import type { ECharts } from 'echarts';
|
import type { ECharts } from 'echarts';
|
||||||
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
import SidePanelItem from '@/components/SidePanelItem/index.vue';
|
||||||
@ -282,8 +282,12 @@ const handlePanelChange1 = async data => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 监听电站变化(优先使用父组件 provide 的电站上下文,兜底 jidiStore)
|
||||||
|
const injectedStation = inject<any>('dianZhanStation', null);
|
||||||
|
const stationSource = computed(() => injectedStation?.value || JidiSelectEventStore.selectedItem);
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => JidiSelectEventStore.selectedItem,
|
() => stationSource.value,
|
||||||
newVal => {
|
newVal => {
|
||||||
if (newVal && newVal.wbsCode) {
|
if (newVal && newVal.wbsCode) {
|
||||||
baseid.value = newVal.wbsCode;
|
baseid.value = newVal.wbsCode;
|
||||||
|
|||||||
@ -103,7 +103,7 @@ const buildGroupedColumns = () => {
|
|||||||
const groupMap = new Map<string, ColumnItem[]>();
|
const groupMap = new Map<string, ColumnItem[]>();
|
||||||
|
|
||||||
// 过滤掉 defaultConfig: true 的项(兼容字符串类型)
|
// 过滤掉 defaultConfig: true 的项(兼容字符串类型)
|
||||||
const filteredList = props.userColumnList.filter(item => item.defaultConfig !== true);
|
const filteredList = props.userColumnList.filter(item => item.enable == 1);
|
||||||
|
|
||||||
// 按 groupType 分组
|
// 按 groupType 分组
|
||||||
for (const item of filteredList) {
|
for (const item of filteredList) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user