Merge branch 'main' into dev-lilin
This commit is contained in:
commit
68cb2375c0
@ -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()
|
||||||
@ -115,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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据是否接入
|
* 数据是否接入
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -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
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -96,7 +96,7 @@ public class SdEngInfoBHServiceImpl extends ServiceImpl<SdEngInfoBHMapper, SdEng
|
|||||||
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("dtinEnv").modifyProperty("dtinEnvName").dictType("STATIC").dictSource("DTIN_ENV").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("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("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("runState").modifyProperty("runStateName").dictType("STATIC").dictSource("RUN_STATE").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("warnState").modifyProperty("warnStateName").dictType("STATIC").dictSource("WARN_STATE").build());
|
||||||
|
|||||||
@ -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());
|
||||||
|
|
||||||
|
|||||||
@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -65,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) {
|
||||||
|
|||||||
@ -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,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,24 +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.BreedStageVO;
|
import com.yfd.platform.qgc_env.fb.entity.vo.*;
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbBsmfRQgcVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbBsmfRFishTableVo;
|
|
||||||
import com.yfd.platform.qgc_env.fb.entity.vo.FbEngFishVo;
|
|
||||||
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;
|
||||||
@ -84,4 +67,69 @@ public interface FbStationService {
|
|||||||
* 获取增殖站各阶段数据状态(选配/繁殖/培育/防治)
|
* 获取增殖站各阶段数据状态(选配/繁殖/培育/防治)
|
||||||
*/
|
*/
|
||||||
List<BreedStageVO> getBreedStageList(String stcd);
|
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
@ -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>
|
||||||
Loading…
Reference in New Issue
Block a user