初次提交
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fancl
|
||||
* @desc: 一天24小时的常量
|
||||
* @date 2023/1/7
|
||||
*/
|
||||
public class BusiConstant {
|
||||
|
||||
//24小时的常量
|
||||
public static List<String> hour24List = new ArrayList<>();
|
||||
|
||||
static {
|
||||
for (int i = 0; i < 24; i++) {
|
||||
String hourPrefix = StrUtil.fillBefore(String.valueOf(i), '0', 2) + ":00";
|
||||
hour24List.add(hourPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
import com.ho.business.entity.BusiIdControl;
|
||||
import com.ho.business.mapper.BusiIdControlMapper;
|
||||
import com.ho.common.tools.constant.CommonConstant;
|
||||
import com.ho.common.tools.constant.RedisKeyConstant;
|
||||
import com.ho.common.tools.entity.SimpleUser;
|
||||
import com.ho.common.tools.entity.UserDetailRespVO;
|
||||
import com.ho.common.tools.exception.BaseResponseCode;
|
||||
import com.ho.common.tools.exception.BusinessException;
|
||||
import com.ho.common.tools.service.RedisService;
|
||||
import com.ho.common.tools.util.CodeUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author fancl
|
||||
* @desc: 业务模块工具类
|
||||
* @date 2022/10/14
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class BusiTool {
|
||||
|
||||
@Autowired
|
||||
RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
BusiIdControlMapper busiMapper;
|
||||
|
||||
@Autowired
|
||||
RedissonClient redissonClient;
|
||||
|
||||
|
||||
//根据token获取当前人缓存信息
|
||||
public SimpleUser getSimpleUser(String token) {
|
||||
UserDetailRespVO userDetailRespVO = getUserDetailRespVO(token);
|
||||
String userNameKey = redisService.getUserNameKey(userDetailRespVO,userDetailRespVO.getUsername() );
|
||||
SimpleUser user = (SimpleUser) redisService.get(userNameKey);
|
||||
return user;
|
||||
}
|
||||
|
||||
//根据token获取当前人缓存token信息
|
||||
public UserDetailRespVO getUserDetailRespVO(String token) {
|
||||
if (StringUtils.isEmpty(token)) {
|
||||
throw new BusinessException(BaseResponseCode.TOKEN_PARSE_ERROR);
|
||||
}
|
||||
String userTokenKey = RedisKeyConstant.User.TOKEN + token;
|
||||
UserDetailRespVO userDetailRespVO = (UserDetailRespVO) redisService.get(userTokenKey);
|
||||
return userDetailRespVO;
|
||||
}
|
||||
|
||||
//获取电价模板号
|
||||
public String getNextPriceTemplateId(String type) {
|
||||
//类型必须为已经定义的
|
||||
if (!CommonConstant.IdTypePriceTemplate.equals(type)) {
|
||||
throw new BusinessException(BaseResponseCode.PRICE_TEMPLATE_ID_TYPE_NOT_RIGHT);
|
||||
}
|
||||
//定义锁
|
||||
RLock lock = null;
|
||||
//返回的电价模板号
|
||||
Long id = null;
|
||||
try {
|
||||
lock = redissonClient.getLock(RedisKeyConstant.LOCK_KEY_PRICE_TEMPLATE);
|
||||
//获取锁,没有获取到锁的阻塞在lock.lock() 这行
|
||||
lock.lock();
|
||||
BusiIdControl busiIdControl = busiMapper.selectByType(type);
|
||||
//首次直接变为2,因为1已经返回被使用了
|
||||
if (busiIdControl != null) {
|
||||
Long currentValue = busiIdControl.getCurrentValue();
|
||||
id = currentValue;
|
||||
//每次返回数值后+1
|
||||
busiIdControl.setCurrentValue(++currentValue);
|
||||
busiMapper.update(busiIdControl);
|
||||
} else {
|
||||
id = 1L;
|
||||
//没有对象,创建一条记录
|
||||
BusiIdControl busi = new BusiIdControl();
|
||||
busi.setIdType(type);
|
||||
busi.setCurrentValue(2L);
|
||||
busiMapper.insert(busi);
|
||||
}
|
||||
} finally {
|
||||
if (lock != null && lock.isHeldByCurrentThread()) {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
log.info("电价模板id: {}", id);
|
||||
String workSn = CodeUtil.getCode(CodeUtil.PRICE_TEMPLATE_PREFIX, String.valueOf(id), 10, "0");
|
||||
log.info("电价模板号: {}", workSn);
|
||||
return workSn;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import okhttp3.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author fancl
|
||||
* @desc:
|
||||
* @date 2024/1/30
|
||||
*/
|
||||
public class CustomLoggingInterceptor implements Interceptor {
|
||||
@NotNull
|
||||
@Override
|
||||
public Response intercept(@NotNull Chain chain) throws IOException {
|
||||
Request request = chain.request();
|
||||
|
||||
long startTime = System.nanoTime();
|
||||
System.out.println("Sending request " + request.url() + " on " + chain.connection() + "\n" + request.headers());
|
||||
|
||||
Response response = chain.proceed(request);
|
||||
|
||||
long endTime = System.nanoTime();
|
||||
System.out.println("Received response for " + response.request().url() + " in " + ((endTime - startTime) / 1e6) + "ms\n" + response.headers());
|
||||
|
||||
MediaType contentType = response.body().contentType();
|
||||
String content = response.body().string();
|
||||
System.out.println("Response body:\n" + content);
|
||||
|
||||
ResponseBody wrappedBody = ResponseBody.create(contentType, content);
|
||||
return response.newBuilder().body(wrappedBody).build();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,168 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import io.minio.BucketExistsArgs;
|
||||
import io.minio.MinioClient;
|
||||
import io.minio.messages.Bucket;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author yule
|
||||
* @Date 2023/05/05 11:03
|
||||
*/
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class MinioClientConfig {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MinioClientConfig.class);
|
||||
|
||||
/*
|
||||
private static MinioClient minioClient;*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @description: 获取minioClient
|
||||
* @date 2021/6/22 16:55
|
||||
* @return io.minio.MinioClient
|
||||
*/
|
||||
/* public static MinioClient getMinioClient(){
|
||||
return minioClient;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 判断 bucket是否存在
|
||||
*
|
||||
* @param bucketName:
|
||||
* 桶名
|
||||
* @return: boolean
|
||||
* @date : 2020/8/16 20:53
|
||||
*/
|
||||
@SneakyThrows(Exception.class)
|
||||
public static boolean bucketExists(String bucketName) {
|
||||
//return minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取全部bucket
|
||||
*
|
||||
* @param :
|
||||
* @return: java.util.List<io.minio.messages.Bucket>
|
||||
* @date : 2020/8/16 23:28
|
||||
*/
|
||||
@SneakyThrows(Exception.class)
|
||||
public static List<Bucket> getAllBuckets() {
|
||||
//return minioClient.listBuckets();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
String endpoint;
|
||||
|
||||
@Value("${minio.accessKey}")
|
||||
String accessKey;
|
||||
|
||||
@Value("${minio.secretKey}")
|
||||
String secretKey;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 初始化minio配置
|
||||
*
|
||||
* @param :
|
||||
* @return: void
|
||||
* @date : 2020/8/16 20:56
|
||||
*/
|
||||
|
||||
|
||||
@Bean
|
||||
public MinioClient minioClient() {
|
||||
|
||||
OkHttpClient customHttpClient = null;
|
||||
if (endpoint.startsWith("https://")) {
|
||||
// 如果是HTTPS,使用自定义的OkHttpClient处理自签名的HTTPS请求
|
||||
customHttpClient = createCustomOkHttpClient();
|
||||
}
|
||||
|
||||
MinioClient minioClient;
|
||||
if (customHttpClient != null) {
|
||||
// 如果使用了自定义的OkHttpClient
|
||||
minioClient = MinioClient.builder()
|
||||
.endpoint(endpoint)
|
||||
.credentials(accessKey, secretKey)
|
||||
.httpClient(customHttpClient)
|
||||
.build();
|
||||
|
||||
} else {
|
||||
// 如果是普通HTTP,使用默认的OkHttpClient
|
||||
minioClient = MinioClient.builder()
|
||||
.endpoint(endpoint)
|
||||
.credentials(accessKey, secretKey)
|
||||
.build();
|
||||
|
||||
}
|
||||
return minioClient;
|
||||
|
||||
}
|
||||
|
||||
private static OkHttpClient createCustomOkHttpClient() {
|
||||
// 创建自定义的OkHttpClient,用于处理自签名的HTTPS请求
|
||||
|
||||
// Create a trust manager that does not validate certificate chains
|
||||
TrustManager[] trustAllCerts = new TrustManager[]{
|
||||
new X509TrustManager() {
|
||||
@Override
|
||||
public X509Certificate[] getAcceptedIssuers() {
|
||||
return new X509Certificate[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkClientTrusted(X509Certificate[] certs, String authType) {
|
||||
// Do nothing (trust any client certificate)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] certs, String authType) {
|
||||
// Do nothing (trust any server certificate)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Install the all-trusting trust manager
|
||||
SSLContext sslContext = null;
|
||||
try {
|
||||
sslContext = SSLContext.getInstance("SSL");
|
||||
sslContext.init(null, trustAllCerts, new SecureRandom());
|
||||
} catch (Exception e) {
|
||||
LOGGER.error("Install the all-trusting trust manager error:{}", e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
// Create a custom OkHttpClient that trusts all certificates
|
||||
OkHttpClient customHttpClient = new OkHttpClient.Builder()
|
||||
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
||||
.hostnameVerifier((hostname, session) -> true)
|
||||
// 增加minio http请求日志打印
|
||||
.addInterceptor(new CustomLoggingInterceptor()) // Add custom interceptor here
|
||||
.build();
|
||||
return customHttpClient;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import io.minio.MinioClient;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Author yule
|
||||
* @Date 2023/05/05 11:03
|
||||
*/
|
||||
@Slf4j
|
||||
//@Configuration
|
||||
public class MinioClientConfigBakk {
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
String url;
|
||||
|
||||
@Value("${minio.accessKey}")
|
||||
String accessKey;
|
||||
|
||||
@Value("${minio.secretKey}")
|
||||
String secretKey;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 初始化minio配置
|
||||
*
|
||||
* @param :
|
||||
* @return: void
|
||||
* @date : 2020/8/16 20:56
|
||||
*/
|
||||
@Bean
|
||||
public MinioClient minioClient(){
|
||||
MinioClient minioClient = null;
|
||||
try {
|
||||
minioClient = MinioClient.builder()
|
||||
.endpoint(url)
|
||||
.credentials(accessKey,secretKey)
|
||||
.build();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("初始化minio配置异常: 【{}】", e.fillInStackTrace());
|
||||
}
|
||||
return minioClient;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,371 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import com.ho.business.constant.DeviceTypeConstant;
|
||||
import com.ho.common.tools.exception.BaseResponseCode;
|
||||
import com.ho.common.tools.exception.BusinessException;
|
||||
import io.minio.*;
|
||||
import io.minio.messages.Bucket;
|
||||
import io.minio.messages.Item;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author yule
|
||||
* @Date 2023/1/3 14:15
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MinioNewUtil {
|
||||
|
||||
@Autowired
|
||||
MinioClient minioClient;
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
String endpoint;
|
||||
|
||||
@Value("${minio.prefixUrl}")
|
||||
String prefixUrl;
|
||||
|
||||
|
||||
/**
|
||||
* Minio文件上传
|
||||
*
|
||||
* @param file 文件实体
|
||||
* @param fileName 修饰过的文件名 非源文件名
|
||||
* @param bucketName 所存文件夹(桶名)
|
||||
* @return
|
||||
*/
|
||||
public String minioUpload(MultipartFile file, String fileName, String bucketName) {
|
||||
String url = "";
|
||||
try {
|
||||
//桶使用固定minio
|
||||
String filestore="filestore";
|
||||
InputStream inputStream = file.getInputStream();
|
||||
PutObjectArgs objectArgs = PutObjectArgs.builder().bucket(filestore).object(bucketName + "/" + fileName)
|
||||
.stream(inputStream, file.getSize(), -1).contentType(file.getContentType()).build();
|
||||
//文件名称相同会覆盖
|
||||
minioClient.putObject(objectArgs);
|
||||
//获取文件的存储路径
|
||||
url = getPreviewFileUrl(bucketName, fileName);
|
||||
} catch (Exception e) {
|
||||
log.error("minioUpload Error:" +e.getMessage());
|
||||
throw new BusinessException(BaseResponseCode.FILE_UPLOAD_ERROR);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Minio文件上传
|
||||
*
|
||||
* @param bytes 文件实体
|
||||
* @param fileName 修饰过的文件名 非源文件名
|
||||
* @param bucketName 所存文件夹(桶名)
|
||||
* @return
|
||||
*/
|
||||
public String minioUploadByByteStream (byte[] bytes, String fileName, String bucketName) {
|
||||
String url = "";
|
||||
try {
|
||||
//桶使用固定minio
|
||||
String filestore="filestore";
|
||||
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
|
||||
PutObjectArgs objectArgs = PutObjectArgs.builder().bucket(filestore).object(bucketName + "/" + fileName)
|
||||
.stream(in, bytes.length, -1).contentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document").build();
|
||||
//文件名称相同会覆盖
|
||||
minioClient.putObject(objectArgs);
|
||||
//获取文件的存储路径
|
||||
url = getPreviewFileUrl(bucketName, fileName);
|
||||
} catch (Exception e) {
|
||||
log.error("minioUpload Error:" +e.getMessage());
|
||||
throw new BusinessException(BaseResponseCode.FILE_UPLOAD_ERROR);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 上传文件到minio文件服务系统
|
||||
* @param file 文件实体
|
||||
* @param bucketName
|
||||
* @param filePathName 当filePathName 为空时,默认上传路径位 /station 目录下
|
||||
* @return
|
||||
*/
|
||||
public String commonUploadMinio(MultipartFile file, String bucketName ,String filePathName) {
|
||||
//判断该集团的bucket是否存在,不存在就创建
|
||||
boolean flag = bucketExists(bucketName);
|
||||
if (!flag) {
|
||||
createBucketName(bucketName);
|
||||
}
|
||||
if(filePathName==null){
|
||||
filePathName = DeviceTypeConstant.STATION + "/" + file.getOriginalFilename();
|
||||
}
|
||||
String url = minioUpload(file, filePathName, bucketName);
|
||||
return url;
|
||||
}
|
||||
/**
|
||||
* 检查存储桶是否存在
|
||||
*
|
||||
* @param bucketName 存储桶名称
|
||||
* @return
|
||||
*/
|
||||
public boolean bucketExists(String bucketName) {
|
||||
boolean flag = false;
|
||||
try {
|
||||
flag = minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
|
||||
if (flag) {
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件流
|
||||
*
|
||||
* @param fileName 文件名
|
||||
* @param bucketName 桶名(文件夹)
|
||||
* @return
|
||||
*/
|
||||
public InputStream getFileInputStream(String fileName, String bucketName) {
|
||||
try {
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
return minioClient.getObject(GetObjectArgs.builder().bucket(bucketName).object(fileName).build());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param bucketName:
|
||||
* @author
|
||||
* @description: 创建桶
|
||||
*/
|
||||
public void createBucketName(String bucketName) {
|
||||
try {
|
||||
if (StringUtils.isBlank(bucketName)) {
|
||||
return;
|
||||
}
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
boolean isExist = minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
|
||||
if (isExist) {
|
||||
log.info("Bucket {} already exists.", bucketName);
|
||||
} else {
|
||||
minioClient.makeBucket(MakeBucketArgs.builder().bucket(bucketName).build());
|
||||
setPolicy(bucketName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置桶的权限
|
||||
* @param bucket 桶名称
|
||||
*/
|
||||
private void setPolicy(String bucket) {
|
||||
//判断该集团的bucket是否存在,不存在就创建
|
||||
boolean flag = bucketExists(bucket);
|
||||
String policy = "{\n" +
|
||||
" \"Version\": \"2012-10-17\",\n" +
|
||||
" \"Statement\": [\n" +
|
||||
" {\n" +
|
||||
" \"Effect\": \"Allow\",\n" +
|
||||
" \"Principal\": {\n" +
|
||||
" \"AWS\": [\n" +
|
||||
" \"*\"\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
" \"Action\": [\n" +
|
||||
" \"s3:GetBucketLocation\",\n" +
|
||||
" \"s3:ListBucket\",\n" +
|
||||
" \"s3:ListBucketMultipartUploads\"\n" +
|
||||
" ],\n" +
|
||||
" \"Resource\": [\n" +
|
||||
" \"arn:aws:s3:::"+bucket+"\"\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
" {\n" +
|
||||
" \"Effect\": \"Allow\",\n" +
|
||||
" \"Principal\": {\n" +
|
||||
" \"AWS\": [\n" +
|
||||
" \"*\"\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
" \"Action\": [\n" +
|
||||
" \"s3:AbortMultipartUpload\",\n" +
|
||||
" \"s3:DeleteObject\",\n" +
|
||||
" \"s3:GetObject\",\n" +
|
||||
" \"s3:ListMultipartUploadParts\",\n" +
|
||||
" \"s3:PutObject\"\n" +
|
||||
" ],\n" +
|
||||
" \"Resource\": [\n" +
|
||||
" \"arn:aws:s3:::"+bucket+"/*\"\n" +
|
||||
" ]\n" +
|
||||
" }\n" +
|
||||
" ]\n" +
|
||||
"}";
|
||||
|
||||
if (flag){
|
||||
try {
|
||||
SetBucketPolicyArgs bucketPolicyArgs = SetBucketPolicyArgs.builder().bucket(bucket).config(policy).build();
|
||||
//MinioClientConfig.getMinioClient().setBucketPolicy(bucketPolicyArgs);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 下载文件
|
||||
*
|
||||
* @param originalName 文件路径
|
||||
*/
|
||||
public InputStream downloadFile(String bucketName, String originalName, HttpServletResponse response) {
|
||||
try {
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
InputStream file = minioClient.getObject(GetObjectArgs.builder().bucket(bucketName).object(originalName).build());
|
||||
String filename = new String(originalName.getBytes("ISO8859-1"), StandardCharsets.UTF_8);
|
||||
if (StringUtils.isNotBlank(originalName)) {
|
||||
filename = originalName;
|
||||
}
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + filename);
|
||||
ServletOutputStream servletOutputStream = response.getOutputStream();
|
||||
int len;
|
||||
byte[] buffer = new byte[1024];
|
||||
while ((len = file.read(buffer)) > 0) {
|
||||
servletOutputStream.write(buffer, 0, len);
|
||||
}
|
||||
servletOutputStream.flush();
|
||||
file.close();
|
||||
servletOutputStream.close();
|
||||
return file;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bucketName:
|
||||
* @description: 删除桶
|
||||
* @date 2022/8/16 14:36
|
||||
*/
|
||||
public void deleteBucketName(String bucketName) {
|
||||
try {
|
||||
if (StringUtils.isBlank(bucketName)) {
|
||||
return;
|
||||
}
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
boolean isExist = minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
|
||||
if (isExist) {
|
||||
minioClient.removeBucket(RemoveBucketArgs.builder().bucket(bucketName).build());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean deleteFile(String bucketName,String fileName) {
|
||||
boolean flag = false;
|
||||
try {
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
boolean isExist = minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
|
||||
if (isExist) {
|
||||
minioClient.removeObject(RemoveObjectArgs.builder().bucket(bucketName).object(fileName).build());
|
||||
flag = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
/**
|
||||
* @param bucketName:
|
||||
* @description: 删除桶下面所有文件
|
||||
* @date 2022/8/16 14:36
|
||||
*/
|
||||
public void deleteBucketFile(String bucketName) {
|
||||
try {
|
||||
if (StringUtils.isBlank(bucketName)) {
|
||||
return;
|
||||
}
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
boolean isExist = minioClient.bucketExists(BucketExistsArgs.builder().bucket(bucketName).build());
|
||||
if (isExist) {
|
||||
minioClient.deleteBucketEncryption(DeleteBucketEncryptionArgs.builder().bucket(bucketName).build());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
String url;
|
||||
/**
|
||||
* 根据文件路径得到预览文件绝对地址
|
||||
*
|
||||
* @param bucketName
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
public String getPreviewFileUrl(String bucketName, String fileName) {
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
String urlPath = "";
|
||||
try {
|
||||
//urlPath = minioClient.g(bucketName, fileName);
|
||||
//urlPath = endpoint+"/filestore/"+bucketName+"/"+fileName;
|
||||
urlPath = prefixUrl+"/filestore/"+bucketName+"/"+fileName;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return urlPath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 清空bucket(删除桶下所有文件)
|
||||
* @param bucketName 桶名称
|
||||
*/
|
||||
public void clearBucket(String bucketName){
|
||||
//MinioClient minioClient = MinioClientConfig.getMinioClient();
|
||||
boolean flag = bucketExists(bucketName);
|
||||
if (flag) {
|
||||
try {
|
||||
// 递归列举某个bucket下的所有文件,然后循环删除
|
||||
Iterable<Result<Item>> iterable = minioClient.listObjects(ListObjectsArgs.builder()
|
||||
.bucket(bucketName)
|
||||
.recursive(true)
|
||||
.build());
|
||||
for (Result<Item> itemResult : iterable) {
|
||||
String decode = URLDecoder.decode(itemResult.get().objectName(), "utf-8");
|
||||
deleteFile(bucketName,decode);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
package com.ho.business.common;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description TODO
|
||||
* Author yule
|
||||
* Date 2023/3/13 15:42
|
||||
*/
|
||||
@Data
|
||||
public class StaticData {
|
||||
|
||||
public static Map<String,String> map = new HashMap<>();
|
||||
|
||||
static {
|
||||
map.put("00:00:00-04:59:59","-3.5~-5.5");
|
||||
map.put("05:00:00-08:59:59","-1.1~1.5");
|
||||
map.put("09:00:00-13:59:59","4.5~7.5");
|
||||
map.put("14:00:00-18:59:59","-1.1~1.5");
|
||||
map.put("19:00:00-21:59:59","4.5~7.5");
|
||||
map.put("22:00:00-23:59:59","-3.5~-5.5");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<String, String> map = StaticData.map;
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description 驾驶舱实时功率取值对象
|
||||
* Author yule
|
||||
* Date 2023/3/13 15:45
|
||||
*/
|
||||
@Data
|
||||
public class CockpitEnergyCurrentPower {
|
||||
//开始时间
|
||||
String beginTime ;
|
||||
//结束时间
|
||||
String endTime;
|
||||
//最小值
|
||||
Double min;
|
||||
//最大值
|
||||
Double max;
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
* @date 2023年10月18日 16:53
|
||||
*/
|
||||
@Data
|
||||
public class HeartbeatResp {
|
||||
@ApiModelProperty(value = "心跳状态(1代表心跳正常,0代表没有心跳)")
|
||||
Integer heartbeatStatus;
|
||||
|
||||
@ApiModelProperty(value = "心跳消息")
|
||||
String msg;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用于保存电站当前计算进度用的bean
|
||||
* 请勿在别处使用
|
||||
*/
|
||||
@Data
|
||||
public class OneKeyProgress {
|
||||
|
||||
List<String> baseDates;
|
||||
|
||||
List<String> accomplishDates;
|
||||
|
||||
/**
|
||||
* 当前计算到的日期
|
||||
*/
|
||||
String date;
|
||||
|
||||
Double progress = 0.0;
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
* @date 2023年10月18日 18:50
|
||||
*/
|
||||
@Data
|
||||
public class OrderIssuedReqVO {
|
||||
@ApiModelProperty(value = "sn",hidden = true)
|
||||
String sn;
|
||||
@ApiModelProperty(value = "指令下发数据")
|
||||
List<OrderIssuedVO> list;
|
||||
|
||||
@ApiModelProperty(value = "电站id",hidden = true)
|
||||
private Integer stationId;
|
||||
|
||||
@ApiModelProperty(value = "设备id",hidden = true)
|
||||
private Integer srcId;
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
* @date 2023年10月18日 18:50
|
||||
*/
|
||||
@Data
|
||||
public class OrderIssuedVO {
|
||||
@ApiModelProperty(value = "电站id")
|
||||
private Integer stationId;
|
||||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private Integer srcId;
|
||||
|
||||
@ApiModelProperty(value = "sn")
|
||||
private String sn;
|
||||
|
||||
@ApiModelProperty(value = "col")
|
||||
private String col;
|
||||
|
||||
@ApiModelProperty(value = "col修改后的值")
|
||||
private BigDecimal modifyValue;
|
||||
|
||||
@ApiModelProperty(value = "最大值")
|
||||
BigDecimal maxValue;
|
||||
|
||||
@ApiModelProperty(value = "最小值")
|
||||
BigDecimal minValue;
|
||||
|
||||
String tabName;
|
||||
|
||||
String tagName;
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderPlanPowerReq {
|
||||
@ApiModelProperty(value = "sn")
|
||||
String sn;
|
||||
|
||||
@ApiModelProperty(value = "电站id")
|
||||
private Integer stationId;
|
||||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private Integer srcId;
|
||||
|
||||
@ApiModelProperty(value = "发送报文")
|
||||
private JSONObject jsonObject;
|
||||
|
||||
@ApiModelProperty("主题类型(curve/dispatch)")
|
||||
String topicType;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderProcessDetailResp {
|
||||
@ApiModelProperty(value = "col值")
|
||||
private String col;
|
||||
|
||||
@ApiModelProperty(value = "指令下发成功消息")
|
||||
private String msg;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class OrderProcessResp {
|
||||
@ApiModelProperty(value = "下发状态(0:下发中;1:下发成功;2:下发失败)")
|
||||
private Integer isEnd;
|
||||
|
||||
@ApiModelProperty(value = "提示消息(字段先保留)")
|
||||
private String msg;
|
||||
|
||||
@ApiModelProperty(value = "指令进度详细信息展示")
|
||||
private List<OrderProcessDetailResp> processList;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
* @date 2023年10月18日 18:54
|
||||
*/
|
||||
@Data
|
||||
public class PlanningTemplateVo extends PlanningCurveTemplate {
|
||||
|
||||
private Integer stationId;
|
||||
|
||||
List<OrderIssuedVO> orderIssuedReqVO;
|
||||
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ResutData {
|
||||
private String tabName;
|
||||
|
||||
private String tagName;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package com.ho.business.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SendResultVo {
|
||||
|
||||
// 0 还没下发 1已经开始下发
|
||||
private Integer type;
|
||||
private Integer isEnd;
|
||||
private String bar;
|
||||
private Integer sussessTimes;
|
||||
private Integer failTimes;
|
||||
List<ResutData> sussessDatas;
|
||||
List<ResutData> failDatas;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.ho.business.factory;
|
||||
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
public class Factory implements ThreadFactory {
|
||||
/**
|
||||
* 该方法用来创建线程
|
||||
* @param r
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Thread newThread(Runnable r) {
|
||||
Thread newThread = new Thread(r);
|
||||
return newThread;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.ho.business.factory;
|
||||
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
import java.util.concurrent.RejectedExecutionHandler;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
*/
|
||||
public class ThreadRejectedExecutionHandler implements RejectedExecutionHandler{
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {}
|
||||
|
||||
/**
|
||||
* 饱和策略一:调用者线程执行策略
|
||||
* 在该策略下,在调用者中执行被拒绝任务的run方法。除非线程池showdown,否则直接丢弃线程
|
||||
*/
|
||||
public static class CallerRunsPolicy extends ThreadRejectedExecutionHandler {
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
|
||||
//判断线程池是否在正常运行,如果线程池在正常运行则由调用者线程执行被拒绝的任务。如果线程池停止运行,则直接丢弃该任务
|
||||
if (!executor.isShutdown()){
|
||||
r.run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 饱和策略二:终止策略
|
||||
* 在该策略下,丢弃被拒绝的任务,并抛出拒绝执行异常
|
||||
*/
|
||||
public static class AbortPolicy extends ThreadRejectedExecutionHandler {
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
|
||||
throw new RejectedExecutionException("请求任务:" + r.toString() + ",线程池负载过高执行饱和终止策略!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 饱和策略三:丢弃策略
|
||||
* 在该策略下,什么都不做直接丢弃被拒绝的任务
|
||||
*/
|
||||
public static class DiscardPolicy extends ThreadRejectedExecutionHandler {
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* 饱和策略四:弃老策略
|
||||
* 在该策略下,丢弃最早放入阻塞队列中的线程,并尝试将拒绝任务加入阻塞队列
|
||||
*/
|
||||
public static class DiscardOldestPolicy extends ThreadRejectedExecutionHandler {
|
||||
@Override
|
||||
public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
|
||||
//判断线程池是否正常运行,如果线程池正常运行则弹出(或丢弃)最早放入阻塞队列中的任务,并尝试将拒绝任务加入阻塞队列。如果线程池停止运行,则直接丢弃该任务
|
||||
if (!executor.isShutdown()){
|
||||
executor.getQueue().poll();
|
||||
executor.execute(r);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.business.entity.HeartbeatResp;
|
||||
import com.ho.business.entity.OrderIssuedReqVO;
|
||||
import com.ho.business.entity.OrderPlanPowerReq;
|
||||
import com.ho.business.entity.OrderProcessResp;
|
||||
import com.ho.business.vo.req.StationReq;
|
||||
import com.ho.common.tools.annotation.TokenIgnore;
|
||||
import com.ho.common.tools.constant.ContextConstant;
|
||||
import com.ho.common.tools.entity.WeatherRespVo;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.common.tools.vo.req.CardInfoReqVo;
|
||||
import com.ho.common.tools.vo.req.WeatherReq;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @描述 调用file-center
|
||||
* @创建时间 2021/8/9
|
||||
* @修改人
|
||||
*/
|
||||
@FeignClient(value = ContextConstant.FILE_CENTER, fallback = FileCenterFeignClientFallBack.class)
|
||||
public interface FileCenterFeignClient {
|
||||
|
||||
// 查天气
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.MEDIA_CONTEXT + "/weather/getWeatherForOther")
|
||||
DataResult<WeatherRespVo> queryWeather(@RequestBody WeatherReq weatherReq);
|
||||
|
||||
//根据sn判断通道是否在线
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FILE_CENTER + "outerApi/getBySnIsOnline")
|
||||
Boolean getBySnIsOnline(@RequestBody String sn);
|
||||
|
||||
//根据电站查询天气
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.MEDIA_CONTEXT + "weather/stationWeatherInfo")
|
||||
DataResult<WeatherRespVo> getByStationIdWeather(@RequestBody StationReq stationReq);
|
||||
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.MEDIA_CONTEXT + "file/fileUploadForStation",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
DataResult<HeartbeatResp> fileUploadForDevice(@RequestBody MultipartFile file, @RequestParam("stationId") Integer stationId, @RequestParam("serialNo") String serialNo, @RequestParam("filePath") String filePath);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.MEDIA_CONTEXT + "orderSend/orderIssued4plan")
|
||||
DataResult<HeartbeatResp> orderIssued(@RequestBody OrderIssuedReqVO vo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.MEDIA_CONTEXT + "orderSend/progressBar")
|
||||
DataResult<OrderProcessResp> progressBar(@RequestBody OrderIssuedReqVO vo);
|
||||
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.MEDIA_CONTEXT + "orderSend/sendPlanPowerOrder")
|
||||
DataResult<HeartbeatResp> sendPlanPowerOrder(@RequestBody OrderPlanPowerReq vo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FILE_CENTER + "outerApi/selectByCondition")
|
||||
DataResult<List<CardInfoReqVo>> selectByCondition(CardInfoReqVo cardInfo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FILE_CENTER + "outerApi/insertValue")
|
||||
void insertValue(CardInfoReqVo cardInfo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FILE_CENTER + "outerApi/updateValue")
|
||||
void updateValue(CardInfoReqVo cardInfo);
|
||||
|
||||
@DeleteMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FILE_CENTER + "outerApi/deleteByCardIds")
|
||||
void deleteByPrimaryKey(List<Integer> carIdList);
|
||||
}
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.business.entity.HeartbeatResp;
|
||||
import com.ho.business.entity.OrderIssuedReqVO;
|
||||
import com.ho.business.entity.OrderPlanPowerReq;
|
||||
import com.ho.business.entity.OrderProcessResp;
|
||||
import com.ho.business.vo.req.StationReq;
|
||||
import com.ho.common.tools.entity.WeatherRespVo;
|
||||
import com.ho.common.tools.exception.BaseResponseCode;
|
||||
import com.ho.common.tools.exception.BusinessException;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.common.tools.vo.req.CardInfoReqVo;
|
||||
import com.ho.common.tools.vo.req.WeatherReq;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author fancl
|
||||
* @desc: 文件中心FeignFallBack
|
||||
* @date 2023/1/13
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
public class FileCenterFeignClientFallBack implements FileCenterFeignClient{
|
||||
|
||||
@Override
|
||||
public DataResult<WeatherRespVo> queryWeather(WeatherReq weatherReq) {
|
||||
log.error("调用 [FileCenterFeignClientFallBack.queryWeather] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getBySnIsOnline(String sn) {
|
||||
log.error("调用 [Business.getBySnIsOnline] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<WeatherRespVo> getByStationIdWeather(StationReq stationReq) {
|
||||
log.error("调用 [Business.getByStationIdWeather] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<HeartbeatResp> fileUploadForDevice(MultipartFile file, Integer stationId, String serialNo, String filePath) {
|
||||
log.error("调用 [Business.fileUploadForDevice] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<HeartbeatResp> orderIssued(OrderIssuedReqVO vo) {
|
||||
log.error("调用 [Business.orderIssued] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<OrderProcessResp> progressBar(OrderIssuedReqVO vo) {
|
||||
log.error("调用 [Business.progressBar] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<HeartbeatResp> sendPlanPowerOrder(OrderPlanPowerReq vo) {
|
||||
log.error("调用 [Business.sendPlanPowerOrder] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<CardInfoReqVo>> selectByCondition(CardInfoReqVo cardInfo) {
|
||||
log.error("调用 [Business.selectByCondition] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertValue(CardInfoReqVo cardInfo) {
|
||||
log.error("调用 [Business.insertValue] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateValue(CardInfoReqVo cardInfo) {
|
||||
log.error("调用 [Business.updateValue] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByPrimaryKey(List<Integer> carIdList) {
|
||||
log.error("调用 [Business.deleteByPrimaryKey] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.business.entity.DeviceTypeCol;
|
||||
import com.ho.business.vo.DeviceTypeList;
|
||||
import com.ho.common.tools.constant.ContextConstant;
|
||||
import com.ho.common.tools.entity.ProcessOrder;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.flow.vo.Event;
|
||||
import com.ho.flow.vo.req.AlarmConfig.AlarmConfigQueryVo;
|
||||
import com.ho.flow.vo.req.SendSmsConfig.SendSmsConfigQueryReq;
|
||||
import com.ho.flow.vo.req.event.EventAddReq;
|
||||
import com.ho.flow.vo.req.event.EventDemoReqVo;
|
||||
import com.ho.flow.vo.req.event.EventReqPageVO;
|
||||
import com.ho.flow.vo.resp.StationStatusRespVO;
|
||||
import com.ho.flow.vo.resp.event.EventDayNum;
|
||||
import com.ho.flow.vo.resp.event.EventDemo;
|
||||
import com.ho.flow.vo.resp.event.EventTypeAndLevelsReqVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description Flow远程调用
|
||||
* Author yule
|
||||
* Date 2023/2/15 17:53
|
||||
*/
|
||||
@FeignClient(value = ContextConstant.FLOW_CENTER, fallback = FlowFeignClientFallback.class)
|
||||
public interface FlowFeignClient {
|
||||
|
||||
//根据电站id查询工单数据
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/selectWorkOrderByStationId")
|
||||
DataResult<Integer> selectWorkOrderByStationId(@RequestBody Integer stationId);
|
||||
|
||||
|
||||
//新增告警数据入库
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/addEvents")
|
||||
DataResult addEvents(@RequestBody EventAddReq event);
|
||||
|
||||
/**
|
||||
* 多个设备批量增加告警入库
|
||||
* @param event
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT +ContextConstant.FLOW_CONTEXT + "outerApi/addEventsList")
|
||||
DataResult addEventsList(@RequestBody List<EventAddReq> event);
|
||||
|
||||
//新增告警数据入库
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/isRecoveryDevice")
|
||||
Boolean isRecoveryDevice(@RequestBody AlarmConfigQueryVo alarmConfigQueryVo);
|
||||
|
||||
//故障电站统计(同一集团)
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/isNormalStation")
|
||||
DataResult<List<StationStatusRespVO>> normalStation(@RequestBody AlarmConfigQueryVo alarmConfigQueryVo);
|
||||
|
||||
//统计故障开始结束时间
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/faultDuration")
|
||||
DataResult<List<EventDemo>> faultDuration(@RequestBody EventDemoReqVo eventDemoReqVo);
|
||||
|
||||
//统计故障开始结束时间
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/faultDurations")
|
||||
DataResult<List<EventDemo>> faultDurations(@RequestBody EventDemoReqVo eventDemoReqVo);
|
||||
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/deviceColDefine")
|
||||
DataResult deviceColDefine(@RequestBody List<DeviceTypeCol> deviceTypeCols);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/syncAlarmConfig")
|
||||
DataResult syncAlarmConfig(@RequestBody DeviceTypeList deviceTypeList);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/getNotRecovered")
|
||||
DataResult<Event> getNotRecovered(@RequestBody AlarmConfigQueryVo stationStatusReq);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/alarmDataStatistics")
|
||||
DataResult<EventTypeAndLevelsReqVO> alarmDataStatistics(@RequestBody AlarmConfigQueryVo stationStatusReq);
|
||||
|
||||
//发短信
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/getSendSms")
|
||||
DataResult getSendSms(@RequestBody SendSmsConfigQueryReq vo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/countEventByDay")
|
||||
List<EventDayNum> countEventByDay(@RequestBody EventReqPageVO vo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + ContextConstant.FLOW_CONTEXT + "outerApi/initProcessInstance")
|
||||
DataResult initProcessInstance(@RequestBody ProcessOrder processOrder);
|
||||
}
|
||||
@ -0,0 +1,117 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.business.entity.DeviceTypeCol;
|
||||
import com.ho.business.vo.DeviceTypeList;
|
||||
import com.ho.common.tools.entity.ProcessOrder;
|
||||
import com.ho.common.tools.exception.BaseResponseCode;
|
||||
import com.ho.common.tools.exception.BusinessException;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.flow.vo.Event;
|
||||
import com.ho.flow.vo.req.AlarmConfig.AlarmConfigQueryVo;
|
||||
import com.ho.flow.vo.req.SendSmsConfig.SendSmsConfigQueryReq;
|
||||
import com.ho.flow.vo.req.event.EventAddReq;
|
||||
import com.ho.flow.vo.req.event.EventDemoReqVo;
|
||||
import com.ho.flow.vo.req.event.EventReqPageVO;
|
||||
import com.ho.flow.vo.resp.StationStatusRespVO;
|
||||
import com.ho.flow.vo.resp.event.EventDayNum;
|
||||
import com.ho.flow.vo.resp.event.EventDemo;
|
||||
import com.ho.flow.vo.resp.event.EventTypeAndLevelsReqVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 调用flow-center失败
|
||||
* Author yule
|
||||
* Date 2023/2/6 10:14
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FlowFeignClientFallback implements FlowFeignClient {
|
||||
|
||||
@Override
|
||||
public DataResult<Integer> selectWorkOrderByStationId(Integer stationId) {
|
||||
log.error("调用 [FlowFeignClient.selectWorkOrderByStationId] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult addEvents(EventAddReq event) {
|
||||
log.error("调用 [FlowFeignClient.addEvents] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult addEventsList(List<EventAddReq> event) {
|
||||
log.error("调用 [FlowFeignClient.addEventsList] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isRecoveryDevice(AlarmConfigQueryVo alarmConfigQueryVo) {
|
||||
log.error("调用 [FlowFeignClient.isRecoveryDevice] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<StationStatusRespVO>> normalStation(AlarmConfigQueryVo alarmConfigQueryVo) {
|
||||
log.error("调用 [FlowFeignClient.normalStation] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<EventDemo>> faultDuration(EventDemoReqVo eventDemoReqVo) {
|
||||
log.error("调用 [FlowFeignClient.faultDuration] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<EventDemo>> faultDurations(EventDemoReqVo eventDemoReqVo) {
|
||||
log.error("调用 [FlowFeignClient.faultDurations] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult deviceColDefine(List<DeviceTypeCol> deviceTypeCols) {
|
||||
log.error("调用 [FlowFeignClient.deviceColDefine] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult syncAlarmConfig(DeviceTypeList deviceTypeList) {
|
||||
log.error("调用 [FlowFeignClient.syncAlarmConfig] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<Event> getNotRecovered(AlarmConfigQueryVo stationStatusReq) {
|
||||
log.error("调用 [FlowFeignClient.getNotRecovered] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<EventTypeAndLevelsReqVO> alarmDataStatistics(AlarmConfigQueryVo stationStatusReq) {
|
||||
log.error("调用 [FlowFeignClient.alarmDataStatistics] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult getSendSms(SendSmsConfigQueryReq vo) {
|
||||
log.error("调用 [FlowFeignClient.getSendSms] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EventDayNum> countEventByDay(EventReqPageVO vo) {
|
||||
log.error("调用 [FlowFeignClient.countEventByDay] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult initProcessInstance(@RequestBody ProcessOrder processOrder) {
|
||||
log.error("调用 [FlowFeignClient.initProcessInstance] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,118 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.business.vo.resp.point.PointCurveResp;
|
||||
import com.ho.common.tools.constant.ContextConstant;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.common.tools.util.PageResult;
|
||||
import com.ho.common.tools.vo.req.PointData;
|
||||
import com.ho.common.tools.vo.req.StationHomeRespVo;
|
||||
import com.ho.datacollect.api.vo.req.add.TdBase;
|
||||
import com.ho.datacollect.api.vo.req.inverter.InverterCurveListVo;
|
||||
import com.ho.td.api.entity.elecMeter.ElecPowerGeneration;
|
||||
import com.ho.td.api.entity.inverter.InverterCurrent;
|
||||
import com.ho.td.api.entity.inverter.InverterTimingGenerate;
|
||||
import com.ho.td.api.entity.query.TdBaseTimeQuery;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @描述 调用td-service
|
||||
* @创建时间 2021/8/9
|
||||
* @修改人
|
||||
*/
|
||||
@FeignClient(value = ContextConstant.TD_SERVICE, fallback = TdFeignClientFallback.class)
|
||||
public interface TdFeignClient {
|
||||
|
||||
//逆变器
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "inverter/queryInterval")
|
||||
DataResult<InverterCurveListVo> queryInterval(@RequestBody TdBase tdBase);
|
||||
|
||||
//查询逆变器单独字段的历史数据
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "inverter/queryHistoryInterval")
|
||||
DataResult<InverterCurveListVo> queryHistoryInterval(@RequestBody TdBase tdBase);
|
||||
|
||||
//查询逆变器单独字段的历史列表数据
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "inverter/queryColList")
|
||||
DataResult<InverterCurveListVo> queryColList(@RequestBody TdBase tdBase);
|
||||
|
||||
//逆变器每15分钟的发电量列表
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "inverter/timingGenerateList")
|
||||
DataResult<List<InverterTimingGenerate>> timingGenerateList(@RequestBody TdBaseTimeQuery baseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "inverter/getCurrentMonthAndYear")
|
||||
DataResult<List<InverterCurrent>> getCurrentMonthAndYear(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryPointTable")
|
||||
DataResult<List<PointCurveResp>> queryPointTable(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getTodayPowerGeneration")
|
||||
DataResult<ElecPowerGeneration> getTodayPowerGeneration(TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getPointTable")
|
||||
DataResult<List<StationHomeRespVo>> getPointTable(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getPointDataShow")
|
||||
DataResult<List<PointData>> getPointDataShow(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getPointDetails")
|
||||
DataResult<List<PointData>> getPointDetails(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getCountPointDataShow")
|
||||
Integer getCountPointDataShow(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getPointData")
|
||||
DataResult<List<PointData>> getPointData(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
//查询遥信值
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/querySignalValue")
|
||||
DataResult<List<PointCurveResp>> querySignalValue(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
// 查询历史值
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryHisValueList")
|
||||
DataResult<List<StationHomeRespVo>> queryHisValueList(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
//查询所有的点位数据
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryAllValue")
|
||||
PageResult queryAllValue(TdBase tdBase);
|
||||
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getCountData")
|
||||
Integer getCountData(@RequestBody TdBase tdBase);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/selectMaxValue")
|
||||
DataResult<PointData> selectMaxValue(@RequestBody TdBaseTimeQuery query);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryPointTableList")
|
||||
DataResult<List<StationHomeRespVo>> queryPointTableList(@RequestBody TdBaseTimeQuery query);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryPointDataList")
|
||||
DataResult<List<StationHomeRespVo>> queryPointDataList(@RequestBody TdBaseTimeQuery query);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getGeneratorSetInfo")
|
||||
DataResult<StationHomeRespVo> getGeneratorSetInfo(TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/getToDayPVCharge")
|
||||
DataResult<StationHomeRespVo> getToDayPVCharge(TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
//查询遥信值五遥
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/querySignal")
|
||||
DataResult<List<PointCurveResp>> querySignal(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
//查询遥测值五遥
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/queryMeasure")
|
||||
DataResult<List<PointCurveResp>> queryMeasure(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
//更新测点历史值
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/modifyHistoryData")
|
||||
DataResult modifyHistoryData(@RequestBody TdBaseTimeQuery tdBaseTimeQuery);
|
||||
|
||||
@PostMapping(value = ContextConstant.TD_CONTEXT + "device001/selectLastedValue")
|
||||
DataResult<PointData> selectLastedValue(@RequestBody TdBaseTimeQuery query);
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,182 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.business.vo.resp.point.PointCurveResp;
|
||||
import com.ho.common.tools.exception.BaseResponseCode;
|
||||
import com.ho.common.tools.exception.BusinessException;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.common.tools.util.PageResult;
|
||||
import com.ho.common.tools.vo.req.PointData;
|
||||
import com.ho.common.tools.vo.req.StationHomeRespVo;
|
||||
import com.ho.datacollect.api.vo.req.add.TdBase;
|
||||
import com.ho.datacollect.api.vo.req.inverter.InverterCurveListVo;
|
||||
import com.ho.td.api.entity.elecMeter.ElecPowerGeneration;
|
||||
import com.ho.td.api.entity.inverter.InverterCurrent;
|
||||
import com.ho.td.api.entity.inverter.InverterTimingGenerate;
|
||||
import com.ho.td.api.entity.query.TdBaseTimeQuery;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @描述 UserClient失败回调
|
||||
* @创建时间 2021/8/9
|
||||
* @修改人
|
||||
*/
|
||||
@Component
|
||||
public class TdFeignClientFallback implements TdFeignClient{
|
||||
|
||||
Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Override
|
||||
public DataResult<InverterCurveListVo> queryInterval(TdBase tdBase) {
|
||||
log.error("调用 [TdClient.queryInterval] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<InverterCurveListVo> queryHistoryInterval(TdBase tdBase) {
|
||||
log.error("调用 [TdClient.queryHistoryInterval] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<InverterCurveListVo> queryColList(TdBase tdBase) {
|
||||
log.error("调用 [TdClient.queryColList] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<InverterTimingGenerate>> timingGenerateList(TdBaseTimeQuery baseTimeQuery) {
|
||||
log.error("调用 [TdClient.timingGenerateList] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<InverterCurrent>> getCurrentMonthAndYear(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getCurrentMonthAndYear] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
@Override
|
||||
public DataResult<List<PointCurveResp>> queryPointTable(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.queryPointTable] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<ElecPowerGeneration> getTodayPowerGeneration(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getTodayPowerGeneration] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<StationHomeRespVo>> getPointTable(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getPointTable] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<PointData>> getPointDataShow(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getPointDataShow] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<PointData>> getPointDetails(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getPointDataShow] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCountPointDataShow(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getCountPointDataShow] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<PointData>> getPointData(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getPointData] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DataResult<List<PointCurveResp>> querySignalValue(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.querySignalValue] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<StationHomeRespVo>> queryHisValueList(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.queryHisValueList] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult queryAllValue(TdBase tdBase) {
|
||||
log.error("调用 [TdClient.queryAllValue] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getCountData(@RequestBody TdBase tdBase){
|
||||
log.error("调用 [TdClient.getCountData] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<PointData> selectMaxValue(TdBaseTimeQuery query) {
|
||||
log.error("调用 [TdClient.selectMaxValue] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<StationHomeRespVo>> queryPointTableList(TdBaseTimeQuery query) {
|
||||
log.error("调用 [TdClient.queryPointTableList] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<StationHomeRespVo>> queryPointDataList(TdBaseTimeQuery query) {
|
||||
log.error("调用 [TdClient.queryPointDataList] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<StationHomeRespVo> getGeneratorSetInfo(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getGeneratorSetInfo] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<PointCurveResp>> querySignal(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.querySignal] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<PointCurveResp>> queryMeasure(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.queryMeasure] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<StationHomeRespVo> getToDayPVCharge(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.getToDayPVCharge] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult modifyHistoryData(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.modifyHistoryData] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult selectLastedValue(TdBaseTimeQuery tdBaseTimeQuery) {
|
||||
log.error("调用 [TdClient.selectLastedValue] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.common.tools.constant.ContextConstant;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.user.api.entity.SysDept;
|
||||
import com.ho.user.api.entity.SysLog;
|
||||
import com.ho.user.api.entity.SysUser;
|
||||
import com.ho.user.api.vo.req.QueryDeptReqVO;
|
||||
import com.ho.user.api.vo.req.QueryUserReqVO;
|
||||
import com.ho.user.api.vo.req.SysSubDictVO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @描述 调用user-center
|
||||
* @创建时间 2021/8/9
|
||||
* @修改人
|
||||
*/
|
||||
@FeignClient(value = ContextConstant.USER_CENTER, fallback = UserFeignClientFallback.class)
|
||||
public interface UserFeignClient {
|
||||
|
||||
// 根据部门id查对象
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getTopDept")
|
||||
DataResult<SysDept> getTopDept(@RequestBody QueryDeptReqVO vo);
|
||||
|
||||
// 根据部门id查对象
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getDept")
|
||||
DataResult<List<SysDept>> queryDept(@RequestBody List<QueryDeptReqVO> queryDeptReqVOs);
|
||||
|
||||
//根据用户id查询用户
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getUsers")
|
||||
DataResult<List<SysUser>> queryUser(@RequestBody List<QueryUserReqVO> queryUserReqVO);
|
||||
|
||||
//根据用户名模糊 查询用户
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getUserByNameConcat")
|
||||
DataResult<List<SysUser>> getUserByNameConcat(@RequestBody QueryUserReqVO queryUserReqVO);
|
||||
|
||||
//发送用户中心日志
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/insertLog")
|
||||
DataResult insertLog(@RequestBody SysLog sysLog);
|
||||
|
||||
//查询字典
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getSysSubDict")
|
||||
Map<String, String> getSysSubDict(@RequestBody SysSubDictVO vo);
|
||||
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getUserById")
|
||||
DataResult<SysUser> getUserById(String userId);
|
||||
|
||||
/**
|
||||
* 根据deptId获取其本身与其子集的集合
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = ContextConstant.ROOT_CONTEXT + "outerApi/getSysDeptByDeptId")
|
||||
List<SysDept> getSysDeptByDeptId(Integer deptId);
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.ho.business.feignclient;
|
||||
|
||||
import com.ho.common.tools.exception.BaseResponseCode;
|
||||
import com.ho.common.tools.exception.BusinessException;
|
||||
import com.ho.common.tools.exception.DataResult;
|
||||
import com.ho.user.api.entity.SysDept;
|
||||
import com.ho.user.api.entity.SysLog;
|
||||
import com.ho.user.api.entity.SysUser;
|
||||
import com.ho.user.api.vo.req.QueryDeptReqVO;
|
||||
import com.ho.user.api.vo.req.QueryUserReqVO;
|
||||
import com.ho.user.api.vo.req.SysSubDictVO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @描述 UserClient失败回调
|
||||
* @创建时间 2021/8/9
|
||||
* @修改人
|
||||
*/
|
||||
@Component
|
||||
public class UserFeignClientFallback implements UserFeignClient {
|
||||
|
||||
Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Override
|
||||
public DataResult<SysDept> getTopDept(QueryDeptReqVO vo) {
|
||||
log.error("调用 [UserClient.getTopDept] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<List<SysDept>> queryDept(@RequestBody List<QueryDeptReqVO> queryDeptReqVO) {
|
||||
log.error("调用 [UserClient.queryDept] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@PostMapping("/api/outerApi/getUsers")
|
||||
@Override
|
||||
public DataResult<List<SysUser>> queryUser(List<QueryUserReqVO> queryUserReqVO) {
|
||||
log.error("调用 [UserClient.queryUser] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
//用户名查询多个
|
||||
@Override
|
||||
public DataResult<List<SysUser>> getUserByNameConcat(QueryUserReqVO queryUserReqVO) {
|
||||
log.error("调用 [UserClient.getUserByNameConcat] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult insertLog(SysLog sysLog) {
|
||||
log.error("调用 [UserClient.insertLog] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> getSysSubDict(SysSubDictVO vo) {
|
||||
log.error("调用 [UserClient.getSysSubDict] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataResult<SysUser> getUserById(String userId) {
|
||||
log.error("调用 [UserClient.getUserById] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysDept> getSysDeptByDeptId(Integer deptId) {
|
||||
log.error("调用 [UserClient.getSysDeptByDeptId] 异常!");
|
||||
throw new BusinessException(BaseResponseCode.FEIGN_CALL_FAIL);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.ho.business.handler;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import jodd.util.StringUtil;
|
||||
import org.apache.ibatis.type.BaseTypeHandler;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
* @描述 JSON字段处理器
|
||||
* @创建人 fancl
|
||||
* @创建时间 2021/10/21
|
||||
* @修改人
|
||||
*/
|
||||
|
||||
public class JsonHandler extends BaseTypeHandler<JSONObject> {
|
||||
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, JSONObject detail, JdbcType jdbcType) throws SQLException {
|
||||
String jsonString = JSONObject.toJSONString(detail);
|
||||
Object parse = JSON.parse(jsonString);
|
||||
String targetStr = parse.toString();
|
||||
|
||||
ps.setString(i, targetStr);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据列明 获取可以为空的结果
|
||||
*
|
||||
* @param rs
|
||||
* @param columnName
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
@Override
|
||||
public JSONObject getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||
//原始的字符串
|
||||
JSONObject detail = null;
|
||||
String columnStr = rs.getString(columnName);
|
||||
String jsonString = JSONObject.toJSONString(columnStr);
|
||||
//不为空才转换
|
||||
if (!StringUtil.isBlank(columnStr)) {
|
||||
detail = JSONObject.parseObject(columnStr, JSONObject.class);
|
||||
}
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据列索引 查找列内容
|
||||
*
|
||||
* @param rs
|
||||
* @param columnIndex
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
@Override
|
||||
public JSONObject getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||
JSONObject detail = null;
|
||||
String columnStr = rs.getString(columnIndex);
|
||||
if (!StringUtil.isBlank(columnStr)) {
|
||||
detail = JSONObject.parseObject(columnStr, JSONObject.class);
|
||||
}
|
||||
return detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据列索引 获取内容
|
||||
*
|
||||
* @param callableStatement
|
||||
* @param columnIndex
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
@Override
|
||||
public JSONObject getNullableResult(CallableStatement callableStatement, int columnIndex) throws SQLException {
|
||||
JSONObject detail = null;
|
||||
String columnStr = callableStatement.getString(columnIndex);
|
||||
if (!StringUtil.isBlank(columnStr)) {
|
||||
detail = JSONObject.parseObject(columnStr, JSONObject.class);
|
||||
}
|
||||
return detail;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
* @date 2023年10月23日 15:41
|
||||
*/
|
||||
public interface AutoDeviceCurveMapper {
|
||||
|
||||
public Integer getSrcIdByStationId(@Param("stationId")Integer stationId, @Param("deviceType")String deviceType);
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.BusiIdControl;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author fancl
|
||||
* @desc: id控制Mapper
|
||||
* @date 2022/10/14
|
||||
*/
|
||||
@Mapper
|
||||
public interface BusiIdControlMapper {
|
||||
|
||||
BusiIdControl selectByType(String idType);
|
||||
|
||||
int insert(BusiIdControl busiIdControl);
|
||||
|
||||
int update(BusiIdControl busiIdControl);
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ColCount;
|
||||
import com.ho.business.vo.req.colCount.ColCountReq;
|
||||
import com.ho.business.vo.resp.colCount.ColCountResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 指标偏差值
|
||||
* @DateTime: 2023/7/5
|
||||
*/
|
||||
@Mapper
|
||||
public interface ColCountMapper {
|
||||
|
||||
List<ColCountResp> selectByParam(ColCountReq colCountReq);
|
||||
|
||||
int insertColCount(ColCount userHabit);
|
||||
|
||||
int insertList(@Param("list") List<ColCount> list);
|
||||
|
||||
int updateById(ColCount userHabit);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByList(@Param("ids") List<Integer> ids);
|
||||
|
||||
int deleteStationId(@Param("stationId") Integer stationId);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.Convert;
|
||||
import com.ho.business.vo.req.colCount.ColCountReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yy
|
||||
* @description 针对表【convert】的数据库操作Mapper
|
||||
* @createDate 2023-07-11 15:12:50
|
||||
* @Entity entity.Convert
|
||||
*/
|
||||
@Mapper
|
||||
public interface ConvertMapper {
|
||||
|
||||
List<Convert> selectByStationIdAndCol(Integer stationId, String col);
|
||||
|
||||
void insertSelective(Convert vo);
|
||||
|
||||
void delete(Integer id);
|
||||
|
||||
List<Convert> selectByParam(ColCountReq vo);
|
||||
|
||||
List<String> selectByCols(Integer stationId,Integer srcId, List<String> cols);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.CurveConfig;
|
||||
import com.ho.business.entity.DynamicConfig;
|
||||
import com.ho.business.vo.req.dynamicConfig.DynamicConfigQuery;
|
||||
import com.ho.business.vo.resp.dynamicConfig.CurveConfigResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface CurveConfigMapper {
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int insertOne(CurveConfig config);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertList(@Param("list")List<CurveConfig> list);
|
||||
|
||||
/**
|
||||
* 批量更新数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int updateById(CurveConfig config);
|
||||
|
||||
/**
|
||||
* 根据条件查询曲线配置数据
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<CurveConfigResp> selectByParam(DynamicConfigQuery vo);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 批量更新(带id的插入)
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateList(@Param("list")List<CurveConfig> list);
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.CurveConfigRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface CurveConfigRelationMapper {
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertList(@Param("list") List<CurveConfigRelation> list);
|
||||
|
||||
/**
|
||||
* 根据曲线id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByCurveIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DeviceCall;
|
||||
import com.ho.business.vo.req.DeviceReqVO;
|
||||
import com.ho.business.vo.resp.DeviceRespVO;
|
||||
import com.ho.business.vo.resp.chargepile.ChargePileRespVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【device】的数据库操作Mapper
|
||||
* @createDate 2022-08-25 16:38:44
|
||||
* @Entity com.ho.business.entity.Device
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceCallMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(DeviceCall record);
|
||||
|
||||
int insertSelective(DeviceCall record);
|
||||
|
||||
DeviceCall selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(DeviceCall record);
|
||||
|
||||
int updateByPrimaryKey(DeviceCall record);
|
||||
|
||||
DeviceCall selectBySId(Integer id);
|
||||
|
||||
List<ChargePileRespVO> selectBySrcIds(Integer stationId,List<Integer> srcIds);
|
||||
|
||||
List<DeviceRespVO> selectByInfo(@Param("deviceTypeList")List<String> deviceTypeList,@Param("deviceReqVO") DeviceCall deviceReqVO, @Param("stationIds") List<Integer> stationIds);
|
||||
|
||||
List<DeviceRespVO> selectByCondition(DeviceReqVO deviceReqVO);
|
||||
|
||||
DeviceCall selectByStationIdAndSrcId(Integer stationId, Integer srcId);
|
||||
|
||||
List<String> selectDistinctDeviceTypeByStationId(Integer stationId);
|
||||
|
||||
List<DeviceCall> selectDevicesByStationId(Integer stationId);
|
||||
|
||||
List<DeviceRespVO> selectByStationIdAndSrcIds(Integer stationId, List<Integer> srcIds);
|
||||
|
||||
List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,Integer needAccessPoint);
|
||||
|
||||
}
|
||||
@ -0,0 +1,78 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.Device;
|
||||
import com.ho.business.vo.req.DeviceReqVO;
|
||||
import com.ho.business.vo.resp.DeviceRespVO;
|
||||
import com.ho.business.vo.resp.chargepile.ChargePileRespVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【device】的数据库操作Mapper
|
||||
* @createDate 2022-08-25 16:38:44
|
||||
* @Entity com.ho.business.entity.Device
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Device record);
|
||||
|
||||
int insertSelective(Device record);
|
||||
|
||||
Device selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Device record);
|
||||
|
||||
int updateByPrimaryKey(Device record);
|
||||
|
||||
|
||||
Device selectBySId(Integer id);
|
||||
|
||||
List<ChargePileRespVO> selectBySrcIds(Integer stationId,List<Integer> srcIds);
|
||||
|
||||
List<DeviceRespVO> selectByInfo(@Param("deviceTypeList")List<String> deviceTypeList,@Param("deviceReqVO") Device deviceReqVO, @Param("stationIds") List<Integer> stationIds);
|
||||
|
||||
List<DeviceRespVO> selectByCondition(DeviceReqVO deviceReqVO);
|
||||
|
||||
Device selectByStationIdAndSrcId(Integer stationId, Integer srcId);
|
||||
|
||||
List<String> selectDistinctDeviceTypeByStationId(Integer stationId);
|
||||
|
||||
List<Device> selectDevicesByStationId(Integer stationId);
|
||||
|
||||
List<DeviceRespVO> selectByStationIdAndSrcIds(Integer stationId, List<Integer> srcIds);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param stationId
|
||||
* @param needHide 是否需要展示隐藏设备,不为空表示展示所有设备
|
||||
* @param needAccessPoint 是否需要接入点,不为空表示需要
|
||||
* @return
|
||||
*/
|
||||
List<DeviceRespVO> selectByIdAndSrcIdNotZero(Integer stationId,Integer needHide,Integer needAccessPoint);
|
||||
|
||||
int insertBatch(@Param("list")List<Device> deviceList);
|
||||
|
||||
List<Device> selectRealDevice(Device device);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByList(@Param("ids") List<Integer> ids);
|
||||
|
||||
int updateByStationId(Device device);
|
||||
|
||||
/**
|
||||
* 批量更新设备
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateDeviceList(List<Device> list);
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DeviceTypeCol;
|
||||
import com.ho.business.entity.ModelDeviceColComp;
|
||||
import com.ho.business.vo.req.DeviceTypeColReqVO;
|
||||
import com.ho.business.vo.resp.deviceTypeCol.DeviceTypeColCountResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author gyan
|
||||
* @description 针对表【device_type_col】的数据库操作Mapper
|
||||
* @createDate 2023-02-09 17:46:50
|
||||
* @Entity generator.domain.DeviceTypeCol
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceTypeColMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(DeviceTypeCol deviceTypeCol);
|
||||
|
||||
int insertList(@Param("deviceTypeColList")List<DeviceTypeCol> deviceTypeColList);
|
||||
|
||||
int insertSelective(DeviceTypeCol deviceTypeCol);
|
||||
|
||||
int updateByPrimaryKeySelective(DeviceTypeCol deviceTypeCol);
|
||||
|
||||
int updateByPrimaryKey(DeviceTypeCol deviceTypeCol);
|
||||
|
||||
int updateList(@Param("deviceTypeColList")List<DeviceTypeCol> deviceTypeColList);
|
||||
//deviceType查询
|
||||
List<DeviceTypeCol> selectByDeviceType(String deviceType);
|
||||
|
||||
List<DeviceTypeCol> selectByParam(@Param("deviceTypeCol") DeviceTypeCol deviceTypeCol);
|
||||
|
||||
//deviceType查询
|
||||
List<DeviceTypeCol> selectByDeviceTypeList(@Param("deviceTypeColReqVO") DeviceTypeColReqVO deviceTypeColReqVO);
|
||||
|
||||
//deviceType查询
|
||||
List<DeviceTypeCol> selectByDeviceTypeAndIsShow(@Param("deviceType") String deviceType,@Param("isShow") Integer isShow);
|
||||
|
||||
//根据id进行批量查询
|
||||
List<DeviceTypeCol> selectByIds(@Param("ids") List<Integer> deviceColIds);
|
||||
|
||||
/**
|
||||
* @param type :device 设备 model 模型
|
||||
* @param typeName: 设备或模型的具体类型 , 例如 inverter_huawei 或者 inverter
|
||||
* @return
|
||||
*/
|
||||
List<ModelDeviceColComp> getCompListByType(@Param("type") String type, @Param("typeName") String typeName, @Param("modelCol") String modelCol);
|
||||
|
||||
|
||||
List<DeviceTypeCol> selectSameCol(@Param("deviceType") String deviceType, @Param("list") List<String> collect);
|
||||
|
||||
//批量新增设备表字段
|
||||
void addBatchDevice(@Param("list") List<DeviceTypeCol> deviceTypeColList);
|
||||
|
||||
//批量删除设备字段
|
||||
void deleteBatchDevice(List<Integer> ids);
|
||||
|
||||
//批量删除模型字段
|
||||
void deleteBatchModel(List<Integer> ids);
|
||||
|
||||
|
||||
DeviceTypeCol selectTypeAndCol(String col, String deviceType);
|
||||
|
||||
Integer selectCountByDeviceType(@Param("deviceTypeCol")DeviceTypeCol deviceTypeCol);
|
||||
|
||||
/**
|
||||
* 注意:使用该接口拼接设备类型时,用于\\_拼接,可以使用常量CommonConstant.JOIN_STATION_ID
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
List<DeviceTypeCol> selectDimType(String deviceType);
|
||||
|
||||
List<String> selectType(Set<String> collect);
|
||||
|
||||
DeviceTypeCol selectById(Integer id);
|
||||
|
||||
List<DeviceTypeCol> selectAllData(Integer colBeginId, Integer allNum);
|
||||
|
||||
List<DeviceTypeCol> selectByBatchId(@Param("ids")List<Integer> deviceTypeIdList);
|
||||
|
||||
//跟据设备类型统计个测点数据
|
||||
List<DeviceTypeColCountResp> countByDeviceType(@Param("typeList")List<String> typeList);
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DeviceTypeConfig;
|
||||
import com.ho.business.vo.req.device.DeviceTypeQuery;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dell
|
||||
* @description 针对表【device_type_config】的数据库操作Mapper
|
||||
* @createDate 2022-12-22 20:06:53
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceTypeConfigMapper {
|
||||
|
||||
DeviceTypeConfig selectById(Integer id);
|
||||
|
||||
//按条件查询列表
|
||||
List<DeviceTypeConfig> selectListByCondition(DeviceTypeQuery deviceTypeQuery);
|
||||
|
||||
Integer add(DeviceTypeConfig deviceTypeConfig);
|
||||
|
||||
//批量新增设备表字段
|
||||
int addBatchDeviceTypeConfig(@Param("list") List<DeviceTypeConfig> list);
|
||||
|
||||
void update(DeviceTypeConfig deviceTypeConfig);
|
||||
|
||||
//物理删除,暂时用不到,这个表先逻辑删除
|
||||
void deletedById(Integer id);
|
||||
//根据电站id删除设备配置
|
||||
int deleteByStationId(Integer stationId);
|
||||
|
||||
/**
|
||||
* 根据设备类型查询设备类型配置
|
||||
* @param deviceType 设备类型
|
||||
* @return
|
||||
*/
|
||||
DeviceTypeConfig selectByDeviceType(String deviceType,Integer groupId);
|
||||
|
||||
List<DeviceTypeConfig> selectByType(String deviceType, Integer stationId);
|
||||
|
||||
/**
|
||||
* 批量更新设备类型
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateDeviceTypeConfigList(List<DeviceTypeConfig> list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DeviceType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【device_type】的数据库操作Mapper
|
||||
* @createDate 2022-08-31 11:06:40
|
||||
* @Entity com.ho.business.entity.DeviceType
|
||||
*/
|
||||
@Mapper
|
||||
public interface DeviceTypeMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(DeviceType record);
|
||||
|
||||
int insertSelective(Integer record);
|
||||
|
||||
DeviceType selectByPrimaryKey(Integer id);
|
||||
|
||||
DeviceType selectByPid(Integer pid);
|
||||
|
||||
int updateByPrimaryKeySelective(DeviceType record);
|
||||
|
||||
int updateByPrimaryKey(DeviceType record);
|
||||
|
||||
List<DeviceType> selectAll();
|
||||
|
||||
List<DeviceType> selectByIds(List<Integer> typeIds);
|
||||
|
||||
List<DeviceType> selectByPids(Set<Integer> pIds);
|
||||
|
||||
DeviceType getDeviceType(@Param("deviceTypeId") Integer deviceTypeId);
|
||||
|
||||
|
||||
DeviceType selectByDeviceType(String deviceType);
|
||||
|
||||
List<DeviceType> selectName(List<String> deviceTypeList);
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DynamicConfig;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface DynamicConfigMapper {
|
||||
|
||||
/**
|
||||
* 批量插入数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertList(@Param("list") List<DynamicConfig> list);
|
||||
|
||||
/**
|
||||
* 批量更新数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateList(@Param("list") List<DynamicConfig> list);
|
||||
|
||||
/**
|
||||
* 根据条件查询配置数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
List<DynamicConfig> selectByParam(DynamicConfig config);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据曲线id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByCurveIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据配置点id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByPointIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据电站id删除配置信息
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
int deleteByStationId(Integer stationId);
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DynamicConfigTitle;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface DynamicConfigTitleMapper {
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
int insertOne(DynamicConfigTitle vo);
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
int updateById(DynamicConfigTitle vo);
|
||||
|
||||
/**
|
||||
* 根据条件查询配置数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
List<DynamicConfigTitle> selectByParam(DynamicConfigTitle config);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(List<Integer> ids);
|
||||
}
|
||||
@ -0,0 +1,86 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.EarningsCalculate;
|
||||
import com.ho.business.entity.EarningsCalculateSub;
|
||||
import com.ho.business.entity.MonFreezeTotal;
|
||||
import com.ho.business.vo.RegionData;
|
||||
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
|
||||
import com.ho.business.vo.req.carbin.EarningsCalculateReq;
|
||||
import com.ho.business.vo.resp.profit.DayProfitType;
|
||||
import com.ho.business.vo.resp.profit.GroupProfitType;
|
||||
import com.ho.business.vo.resp.profit.StationProfitType;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @description 针对表【earnings_calculate】的数据库操作Mapper
|
||||
* @createDate 2023-09-26
|
||||
* @Entity com.ho.business.entity.EarningsCalculate
|
||||
*/
|
||||
@Mapper
|
||||
public interface EarningsCalculateMapper {
|
||||
|
||||
int insertSelective(EarningsCalculate record);
|
||||
|
||||
int deleteByDay(@Param("day") String day, @Param("typeList") List<Integer> typeList);
|
||||
|
||||
int insertBatch(List<EarningsCalculate> list);
|
||||
// 类型是传入多个
|
||||
//List<EarningsCalculate> selectList(@Param("stationId") Integer stationId, @Param("typeList") List<Integer> typeList, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
List<EarningsCalculate> selectList(@Param("ec") EarningsCalculateReq earningsCalculateReq);
|
||||
|
||||
/**
|
||||
* 直接汇总后的尖峰平谷
|
||||
* @param earningsCalculateReq
|
||||
* @return
|
||||
*/
|
||||
List<EarningsCalculate> totalList(@Param("ec") EarningsCalculateReq earningsCalculateReq);
|
||||
|
||||
/**
|
||||
* 按照每天汇总后尖峰平谷
|
||||
* @param earningsCalculateReq
|
||||
* @return
|
||||
*/
|
||||
List<EarningsCalculate> totalListByDay(@Param("ec") EarningsCalculateReq earningsCalculateReq);
|
||||
|
||||
public List<EarningsCalculateSub> queryElecTemplateSubByStationId(@Param("stationId")Integer stationId, @Param("templateType")Integer templateType,@Param("date")String date);
|
||||
|
||||
public List<EarningsCalculateSub> queryElecRateTemplateSubByStationId(@Param("stationId")Integer stationId, @Param("templateType")Integer templateType,@Param("date")String date);
|
||||
|
||||
public Integer getSrcIdByStationId(@Param("stationId")Integer stationId, @Param("deviceType")String deviceType);
|
||||
|
||||
public Double getColCount(@Param("stationId")Integer stationId, @Param("col")String col);
|
||||
|
||||
public MonFreezeTotal queryData(@Param("stationId")Integer stationId,@Param("month")String month);
|
||||
|
||||
public void batchInsertData(List<MonFreezeTotal> list);
|
||||
|
||||
BigDecimal selectSumIncomeByStationId(@Param("type")Integer type,@Param("stationId")Integer stationId, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 根据区县名称查询当前电站所在的省市区
|
||||
* @param district
|
||||
* @return
|
||||
*/
|
||||
RegionData queryRegionDataByDistrict(@Param("district")String district,@Param("city")String city,@Param("province")String province);
|
||||
|
||||
|
||||
int deleteByStationId(@Param("day") String day,@Param("stationId") Integer stationId, @Param("typeList") List<Integer> typeList);
|
||||
|
||||
List<GroupProfitType> getGroupProfit(@Param("beginTime")String beginTime, @Param("endTime")String endTime, @Param("groupId")Integer groupId);
|
||||
|
||||
List<StationProfitType> getStationProfit(@Param("beginTime")String beginTime, @Param("endTime")String endTime, @Param("groupId")Integer groupId);
|
||||
|
||||
List<DayProfitType> getDayProfit(@Param("beginTime")String beginTime, @Param("endTime")String endTime, @Param("groupId")Integer groupId);
|
||||
|
||||
String getFirstTime();
|
||||
|
||||
List<DayProfitType> getProfit(@Param("beginTime")String begin, @Param("endTime")String end, @Param("groupId")Integer groupId);
|
||||
|
||||
List<DayProfitType> getEarningsByParam(CommonBigScreenReq req);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ElecMeterConfig;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 充放电量时间设定
|
||||
* @DateTime: 2023/9/13
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElecMeterConfigMapper {
|
||||
|
||||
ElecMeterConfig selectByParam(ElecMeterConfig elecMeterConfig);
|
||||
|
||||
int insertElecMeterConfig(ElecMeterConfig elecMeterConfig);
|
||||
|
||||
int updateById(ElecMeterConfig elecMeterConfig);
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.ElecMeterValue;
|
||||
import com.ho.business.vo.req.bigScreen.CommonBigScreenReq;
|
||||
import com.ho.business.vo.req.carbin.ElecMeterReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【elec_meter_value】的数据库操作Mapper
|
||||
* @createDate 2022-11-01 18:38:19
|
||||
* @Entity com.ho.business.entity.ElecMeterValue
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElecMeterValueMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(ElecMeterValue record);
|
||||
|
||||
int insertSelective(ElecMeterValue record);
|
||||
|
||||
ElecMeterValue selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(ElecMeterValue record);
|
||||
|
||||
int updateByPrimaryKey(ElecMeterValue record);
|
||||
|
||||
BigDecimal selectSumByType(@Param("stationId") Integer stationId, @Param("type") Integer type, @Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("srcId") Integer srcId);
|
||||
|
||||
List<ElecMeterValue> selectListByStationAndSrcId(ElecMeterReq elecMeterReq);
|
||||
|
||||
int deleteByDay(@Param("day") String day, @Param("typeList") List<Integer> typeList);
|
||||
|
||||
int deleteByStationAndDay(@Param("stationId") Integer stationId, @Param("day") String day, @Param("typeList") List<Integer> typeList);
|
||||
|
||||
int insertBatch(List<ElecMeterValue> list);
|
||||
|
||||
// 类型是传入多个
|
||||
List<ElecMeterValue> selectList(@Param("stationId") Integer stationId, @Param("typeList") List<Integer> typeList, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
BigDecimal selectSumValue(@Param("stationId") Integer stationId, @Param("type") Integer type, @Param("srcId") Integer srcId);
|
||||
|
||||
List<ElecMeterValue> selectListByStationIds(@Param("stationIds") List<Integer> stationIds, @Param("type") Integer type, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
List<ElecMeterValue> selectByStationIdsAndTime(@Param("stationIds") List<Integer> stationIds, @Param("beginTime") String beginTime, @Param("endTime") String endTime,@Param("srcId") Integer srcId);
|
||||
|
||||
List<ElecMeterValue> selectGroupByDay(CommonBigScreenReq req);
|
||||
|
||||
List<ElecMeterValue> selectAllList(@Param("stationId") Integer stationId, @Param("typeList") List<Integer> typeList, @Param("beginTime") String beginTime, @Param("endTime") String endTime,
|
||||
@Param("deviceTypeList") List<Integer> deviceTypeList);
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ElecPrice;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【elec_price】的数据库操作Mapper
|
||||
* @createDate 2022-08-25 16:39:51
|
||||
* @Entity com.ho.business.entity.ElecPrice
|
||||
*/
|
||||
public interface ElecPriceMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ElecPrice record);
|
||||
|
||||
int insertSelective(ElecPrice record);
|
||||
|
||||
ElecPrice selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ElecPrice record);
|
||||
|
||||
int updateByPrimaryKey(ElecPrice record);
|
||||
|
||||
List<ElecPrice> selectAll();
|
||||
|
||||
List<ElecPrice> selectByStationIdAndTime(@Param("groupId") Integer groupId,
|
||||
@Param("stationId") Integer stationId,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
//根据集团Id查询最新的那天
|
||||
String selectStartTime(@Param("groupId") Integer groupId);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ElecStationValue;
|
||||
import com.ho.business.vo.resp.StatisticsRespVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【elec_station_value】的数据库操作Mapper
|
||||
* @createDate 2022-10-12 08:45:16
|
||||
* @Entity com.ho.business.entity.ElecStationValue
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElecStationValueMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(ElecStationValue record);
|
||||
|
||||
int insertSelective(ElecStationValue record);
|
||||
|
||||
ElecStationValue selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(ElecStationValue record);
|
||||
|
||||
int updateByPrimaryKey(ElecStationValue record);
|
||||
|
||||
//查询电站下网电量集合
|
||||
List<StatisticsRespVO> underElectricityCollection(Map<String, Object> map);
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ElecTemplate;
|
||||
import com.ho.business.vo.req.elecPriceCurve.ElecPriceTemplateReq;
|
||||
import com.ho.business.vo.req.elecPriceCurve.ElecPriceTemplateReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【elec_template】的数据库操作Mapper
|
||||
* @createDate 2023-04-19 13:58:15
|
||||
* @Entity com.ho.business.entity.ElecTemplate
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElecTemplateMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
// int insert(ElecTemplate record);
|
||||
|
||||
int insertSelective(ElecTemplate record);
|
||||
|
||||
ElecTemplate selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ElecTemplate record);
|
||||
|
||||
ElecTemplate selectByTemplateName(String templateName, Integer stationId);
|
||||
|
||||
List<ElecTemplate> selectByInfo(ElecPriceTemplateReqVO vo);
|
||||
|
||||
void deleteByIds(List<Integer> ids);
|
||||
|
||||
int checkTemplate(ElecPriceTemplateReq elecPriceTemplateReq);
|
||||
|
||||
int updateIsEnabled(ElecTemplate record);
|
||||
|
||||
List<ElecTemplate> queryTemplatesByStationId(ElecTemplate template);
|
||||
|
||||
/**
|
||||
* 校验模板名称是否重复(修改模板时校验方法)
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
Integer checkTemplateName(ElecTemplate template);
|
||||
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ElecRateMeterValue;
|
||||
import com.ho.business.entity.ElecTemplateSub;
|
||||
import com.ho.business.vo.req.pcsStation.PcsStationReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【elec_template_sub】的数据库操作Mapper
|
||||
* @createDate 2023-04-19 13:58:32
|
||||
* @Entity com.ho.business.entity.ElecTemplateSub
|
||||
*/
|
||||
@Mapper
|
||||
public interface ElecTemplateSubMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ElecTemplateSub record);
|
||||
|
||||
int insertSelective(ElecTemplateSub record);
|
||||
|
||||
ElecTemplateSub selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(ElecTemplateSub record);
|
||||
|
||||
int updateByPrimaryKey(ElecTemplateSub record);
|
||||
|
||||
void insertList(List<ElecTemplateSub> list);
|
||||
|
||||
void deletedByPid(Integer id);
|
||||
|
||||
List<ElecTemplateSub> selectByPid(Integer id);
|
||||
|
||||
List<ElecTemplateSub> selectByPids(List<Integer> pIds);
|
||||
|
||||
void deletedByPids(List<Integer> pIds);
|
||||
|
||||
/* 根据电站id查询费率详情 */
|
||||
List<ElecTemplateSub> selectByStationId(Integer stationId);
|
||||
|
||||
int insertRateMeterValue(@Param("values")List<ElecRateMeterValue> values);
|
||||
|
||||
List<Map<String,Object>> getPcsIncomeData(@Param("req")PcsStationReq req,@Param("beginTime")String beginTime,@Param("endTime")String endTime);
|
||||
|
||||
int deleteRateMeterValue(@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("type")int type);
|
||||
|
||||
List<ElecRateMeterValue> queryRealTimePcsIncomeData(@Param("stationId")Integer stationId,@Param("dateTime")String dateTime);
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.EmsMetric;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface EmsMetricMapper {
|
||||
|
||||
int insert(EmsMetric emsMetric);
|
||||
|
||||
EmsMetric selectByStationIdAndDay(Integer stationId, LocalDate day);
|
||||
|
||||
List<EmsMetric> listByStationId(Integer id);
|
||||
|
||||
int updateByStationIdAndDay(EmsMetric emsMetric);
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DeviceTypeCol;
|
||||
import com.ho.business.entity.ForwardCol;
|
||||
import com.ho.business.vo.req.ForwardColTemplateReq;
|
||||
import com.ho.business.vo.resp.ForwardColTemplateResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ForwardColTemplateMapper {
|
||||
|
||||
/**
|
||||
* 查询模板列表接口
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
// List<Map<String,Object>> getPlanningCurveTemplates(PlanningCurveTemplate template);
|
||||
|
||||
/**
|
||||
* 新增模板
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
int addForwardColTemplate(ForwardColTemplateReq template);
|
||||
|
||||
/**
|
||||
* 新增测点
|
||||
*
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int addForwardCol(@Param("list") List<ForwardCol> list, @Param("planningTemplateId") Integer planningTemplateId);
|
||||
|
||||
/**
|
||||
* 编辑模板
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
int modifyForwardColTemplate(ForwardColTemplateReq template);
|
||||
|
||||
/**
|
||||
* 删除测点数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int deleteForwardCol(@Param("id") Integer id);
|
||||
|
||||
/**
|
||||
* 根据模板id删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteForwardColTemplates(@Param("ids") List<Integer> ids);
|
||||
|
||||
int deleteForwardCols(@Param("ids") List<Integer> ids);
|
||||
|
||||
int checkName(@Param("templateName")String templateName,@Param("temId")Integer temId);
|
||||
|
||||
List<ForwardColTemplateResp> getForwardColTemplateDetail(ForwardColTemplateReq template);
|
||||
|
||||
/**
|
||||
* 获取转发点
|
||||
* @param typeList
|
||||
* @param tempId
|
||||
* @return
|
||||
*/
|
||||
List<DeviceTypeCol> getForwardCol(List<String> typeList,Integer tempId);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.GateValue;
|
||||
import com.ho.business.vo.resp.StatisticsRespVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【gate_value】的数据库操作Mapper
|
||||
* @createDate 2022-10-12 08:46:03
|
||||
* @Entity com.ho.business.entity.GateValue
|
||||
*/
|
||||
@Mapper
|
||||
public interface GateValueMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(GateValue record);
|
||||
|
||||
int insertSelective(GateValue record);
|
||||
|
||||
GateValue selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(GateValue record);
|
||||
|
||||
int updateByPrimaryKey(GateValue record);
|
||||
|
||||
List<StatisticsRespVO> getStatisticsList(Map<String, Object> map);
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.HisCurveRelate;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yy
|
||||
* @description 针对表【his_curve_relate】的数据库操作Mapper
|
||||
* @createDate 2023-06-20 13:49:44
|
||||
* @Entity entity.HisCurveRelate
|
||||
*/
|
||||
@Mapper
|
||||
public interface HisCurveRelateMapper {
|
||||
|
||||
void insertBatch(@Param("list") List<HisCurveRelate> list);
|
||||
|
||||
List<HisCurveRelate> selectAll(@Param("hisCurveRelate") HisCurveRelate hisCurveRelate);
|
||||
|
||||
int delete(String modelId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.HomeConfig;
|
||||
import com.ho.business.vo.req.HomeConfigAddReqVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gyan
|
||||
* @desc: TODO
|
||||
* @DateTime: 2023/11/16 15:14
|
||||
*/
|
||||
@Mapper
|
||||
public interface HomeConfigMapper {
|
||||
|
||||
void insertSelective(HomeConfigAddReqVO vo);
|
||||
|
||||
void delete(Integer stationId);
|
||||
|
||||
List<HomeConfig> selectByStationId(Integer stationId);
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.IncomeRateMapping;
|
||||
import com.ho.business.entity.IncomeTemplateType;
|
||||
import com.ho.business.entity.RateTemplate;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IncomeMappingMapper {
|
||||
|
||||
public List<RateTemplate> selectRateTemplates(RateTemplate rateTemplate);
|
||||
|
||||
public int insertRateTemplate(RateTemplate rateTemplate);
|
||||
|
||||
public int modifyRateTemplate(RateTemplate rateTemplate);
|
||||
|
||||
public int deleteRateTemplate(long id);
|
||||
|
||||
public List<IncomeTemplateType> getIncomeTemplateTypes();
|
||||
|
||||
public int insertRateMapping(@Param("incomeRateMappings")List<IncomeRateMapping> incomeRateMappings,@Param("templateId") long templateId);
|
||||
|
||||
public int deleteRateMapping(@Param("templateId")long templateId);
|
||||
|
||||
public int checkTemplateName(@Param("templateName") String templateName,@Param("stationId")int stationId);
|
||||
|
||||
public int checkTemplateOpen(RateTemplate rateTemplate);
|
||||
|
||||
public int changeSwitch(RateTemplate rateTemplate);
|
||||
|
||||
public int checkTemplateRate(long id);
|
||||
|
||||
public int checkTemplateQRate(long id);
|
||||
|
||||
public int checkTotalTemplate(long id);
|
||||
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IncomeMeasurementMapper {
|
||||
|
||||
|
||||
// 根据电站id查询费率模板下拉列表数据
|
||||
public List<RateTemplate> getRateTemplateList(@Param("stationId") Integer stationId);
|
||||
|
||||
// 根据模板id查询费率下拉列表数据
|
||||
public List<IncomeRateMapping> getRateList(@Param("templateId") long templateId);
|
||||
|
||||
// 根据模板id和费率id查询费率详情
|
||||
public IncomeRateMapping getRateDetails(@Param("rateId") int rateId,@Param("templateId") long templateId);
|
||||
|
||||
|
||||
|
||||
public List<IncomeRate> selectIncomeRates(IncomeRate incomeRate);
|
||||
|
||||
public int modifyIncomeRate(@Param("incomeRate")IncomeRate incomeRate,@Param("templateId")long templateId,@Param("dataDate")String dataDate);
|
||||
|
||||
public int batchIncomeRates(@Param("incomeRates")List<IncomeRate> incomeRates,@Param("templateId")long templateId,@Param("dataDate")String dataDate);
|
||||
|
||||
public int deleteIncomeRates(IncomeRate incaomeRate);
|
||||
|
||||
public List<IncomeQRate> selectQRate(IncomeQRate surfQRate);
|
||||
|
||||
public int insertSurfQRate(@Param("surfQRate")IncomeQRate surfQRate);
|
||||
|
||||
public int modifySurfRate(IncomeQRate surfQRate);
|
||||
|
||||
public int confirmTwo(IncomeTotal incomeTotal);
|
||||
|
||||
int confirmOne(IncomeTotal incomeTotal);
|
||||
|
||||
public List<IncomeRateMapping> selectRates();
|
||||
|
||||
public IncomeTotal selectTotal(@Param("incomeTotal")IncomeTotal incomeTotal);
|
||||
|
||||
public IncomeTotal selectTotalReal(@Param("incomeTotal")IncomeTotal incomeTotal);
|
||||
|
||||
public int insertTotalFee(@Param("incomeTotal")IncomeTotal incomeTotal);
|
||||
|
||||
public int modifyEleTotalFee(IncomeTotal incomeTotal);
|
||||
|
||||
public IncomeTotal selectTotalFee(@Param("dataDate")String dataDate,@Param("stationId")Integer stationId);
|
||||
|
||||
public IncomeRateMapping selectRate(@Param("templateId")long templateId);
|
||||
|
||||
public String getIncomeFee(IncomeRate incomeRate);
|
||||
|
||||
public String getEleTotalFee(IncomeQRate surfQRate);
|
||||
|
||||
public IncomeRate selectIncomeDetails(IncomeRate incomeRate);
|
||||
|
||||
public int excelInput(@Param("incomeRate")IncomeRate incomeRate,@Param("templateId")long templateId,@Param("dataDate")String dataDate);
|
||||
|
||||
public RateTemplate getTemplateByName(@Param("stationId") Integer stationId,@Param("templateName")String templateName);
|
||||
|
||||
public IncomeRateMapping getRateByName(@Param("templateId")long templateId,@Param("rateName")String rateName);
|
||||
|
||||
public int ischeck(@Param("templateId")Long templateId,@Param("dataDate")String dataDate,@Param("rateId")long rateId,@Param("stationId")Integer stationId,@Param("id")long id);
|
||||
|
||||
public String queryRateTotal(@Param("templateId")Long templateId,@Param("dataDate")String dataDate,@Param("rateId")long rateId);
|
||||
|
||||
/* 根据电站id查询费率 */
|
||||
public IncomeQRate queryPriceBystationId(@Param("stationId")long stationId, @Param("time")String time);
|
||||
|
||||
public int insertRealData(IncomeTotal incomeTotal);
|
||||
|
||||
public List<IncomeRate> selectRealRates(IncomeRate incaomeRate);
|
||||
|
||||
/* 判断企业用电模板选择是否正确 */
|
||||
public int checkTemplate(@Param("templateId")Long templateId,@Param("dataDate")String dataDate,@Param("stationId")Integer stationId,@Param("id")long id);
|
||||
|
||||
public int checkTemplateOpen(long templateId);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.IncomeTotal;
|
||||
import com.ho.business.vo.resp.report.CurrentMonthReportRespVO;
|
||||
import com.ho.business.vo.resp.report.HistoryReportRespVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yy
|
||||
* @description 针对表【income_total】的数据库操作Mapper
|
||||
* @createDate 2023-02-15 19:54:09
|
||||
* @Entity generator.domain.IncomeTotal
|
||||
*/
|
||||
@Mapper
|
||||
public interface IncomeTotalMapper {
|
||||
|
||||
|
||||
List<IncomeTotal> selectByDate(@Param("stationId") Integer id, @Param("list") List<Integer> srcIdList, String startDayTime, String endDayTime);
|
||||
|
||||
int insertRealDataBatch(@Param("list") List<IncomeTotal> list);
|
||||
|
||||
List<IncomeTotal> selectByStations(@Param("list") List<Integer> stationIds, String startDayTime, String endDayTime);
|
||||
|
||||
List<CurrentMonthReportRespVO> selectDailySumByStationId(Integer stationId, Date beginTime, Date endTime);
|
||||
|
||||
List<HistoryReportRespVO> selectFeeByStationId(Integer stationId,Integer groupId, Date beginTime, Date endTime);
|
||||
|
||||
BigDecimal selectSumIncomeByStationId(Integer stationId);
|
||||
|
||||
BigDecimal selectSumIncomeByGroupId(Integer groupId);
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.IndustrialElecPrice;
|
||||
import com.ho.business.vo.req.industrialElec.IndustrialElecPriceReqVo;
|
||||
import com.ho.business.vo.resp.industrialElec.IndustrialElecPriceRspVo;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface IndustrialElecPriceMapper {
|
||||
|
||||
@SelectProvider(type = IndustrialElecPriceMapper.ElecPriceProvider.class, method = "pageList")
|
||||
List<IndustrialElecPrice> selectPriceByCondition(IndustrialElecPriceReqVo industrialElecPriceReqVo);
|
||||
|
||||
|
||||
class ElecPriceProvider {
|
||||
public String pageList(IndustrialElecPriceReqVo industrialElecPriceReqVo) {
|
||||
String sql = "SELECT * FROM industrial_elec_price where 1=1";
|
||||
if (industrialElecPriceReqVo.getRegionId()!= null) {
|
||||
sql += " and region_id=#{regionId}";
|
||||
}
|
||||
if (industrialElecPriceReqVo.getElectricityType()!= null) {
|
||||
sql += " and electricity_type=#{electricityType}";
|
||||
}
|
||||
if (industrialElecPriceReqVo.getCustomerType()!= null) {
|
||||
sql += " and customer_type=#{customerType}";
|
||||
}
|
||||
if (industrialElecPriceReqVo.getVoltageLevel()!= null) {
|
||||
sql += " and voltage_level=#{voltageLevel}";
|
||||
}
|
||||
if (industrialElecPriceReqVo.getExecutionTime()!= null) {
|
||||
sql += " and execution_time=#{executionTime}";
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Insert("insert into industrial_elec_price(electricity_type,customer_type,voltage_level,non_time_price,feed_peak_price,feed_regular_price,feed_low_valley_price,line_peak_price," +
|
||||
"line_low_valley_price,line_regular_price,proxy_price,line_loss_price,transmission_price,running_price,add_price,peak_price,peak_price_interval,spike_price,spike_price_interval," +
|
||||
"regular_price,regular_price_interval,low_valley_price,low_valley_price_interval,deep_valley_price,deep_valley_price_interval,demand_price,capacity_price,execution_time," +
|
||||
"region_id,create_time)" +
|
||||
" values(#{electricityType},#{customerType},#{voltageLevel},#{nonTimePrice},#{feedPeakPrice},#{feedRegularPrice},#{feedLowValleyPrice},#{linePeakPrice}," +
|
||||
"#{lineLowValleyPrice},#{lineRegularPrice},#{proxyPrice},#{lineLossPrice},#{transmissionPrice},#{runningPrice},#{addPrice},#{peakPrice},#{peakPriceInterval},#{spikePrice},#{spikePriceInterval}," +
|
||||
"#{regularPrice},#{regularPriceInterval},#{lowValleyPrice},#{lowValleyPriceInterval},#{deepValleyPrice},#{deepValleyPriceInterval},#{demandPrice},#{capacityPrice},#{executionTime}," +
|
||||
"#{regionId},#{createTime})")
|
||||
int insert(IndustrialElecPrice industrialElecPrice);
|
||||
|
||||
@Delete("delete from industrial_elec_price where id=#{id}")
|
||||
int deleteById(@Param("id") Long id);
|
||||
|
||||
@Update("update industrial_elec_price set electricity_type=#{electricityType},customer_type=#{customerType},voltage_level=#{voltageLevel},non_time_price=#{nonTimePrice},feed_peak_price=#{feedPeakPrice},feed_regular_price=#{feedRegularPrice},feed_low_valley_price=#{feedLowValleyPrice},line_peak_price=#{linePeakPrice}," +
|
||||
"line_low_valley_price=#{lineLowValleyPrice},line_regular_price=#{lineRegularPrice},proxy_price=#{proxyPrice},line_loss_price=#{lineLossPrice},transmission_price=#{transmissionPrice},running_price=#{runningPrice},add_price=#{addPrice},peak_price=#{peakPrice},peak_price_interval=#{peakPriceInterval},spike_price=#{spikePrice},spike_price_interval=#{spikePriceInterval}," +
|
||||
"regular_price=#{regularPrice},regular_price_interval=#{regularPriceInterval},low_valley_price=#{lowValleyPrice},low_valley_price_interval=#{lowValleyPriceInterval},deep_valley_price=#{deepValleyPrice},deep_valley_price_interval=#{deepValleyPriceInterval},demand_price=#{demandPrice},capacity_price=#{capacityPrice},execution_time=#{executionTime}," +
|
||||
"region_id=#{regionId},update_time=#{updateTime} where id=#{id}")
|
||||
int updateById(IndustrialElecPrice industrialElecPrice);
|
||||
|
||||
@Select("select * from industrial_elec_price where electricity_type=#{electricityType} and customer_type=#{customerType} and voltage_level=#{voltageLevel} and region_id=#{regionId} and execution_time=#{executionTime}")
|
||||
IndustrialElecPrice findByCondition(IndustrialElecPriceReqVo industrialElecPriceReqVo);
|
||||
|
||||
@Select("select * from industrial_elec_price where id=#{id}")
|
||||
IndustrialElecPrice findById(@Param("id")Long id);
|
||||
|
||||
@Select("select peak_price,spike_price,regular_price,low_valley_price,deep_valley_price,execution_time from industrial_elec_price where region_id=#{regionId} and electricity_type=#{electricityType} and customer_type=#{customerType}" +
|
||||
" and voltage_level=#{voltageLevel} and execution_time>#{executionStartTime} and execution_time<=#{executionEndTime} order by execution_time")
|
||||
List<IndustrialElecPriceRspVo> findElecPriceListByDate(@Param("regionId")Integer regionId, @Param("electricityType")Integer electricityType,@Param("customerType") Integer customerType, @Param("voltageLevel")Integer voltageLevel,@Param("executionStartTime") String executionStartTime,@Param("executionEndTime")String executionEndTime);
|
||||
|
||||
@Insert({
|
||||
"<script>",
|
||||
"insert into industrial_elec_price(electricity_type,customer_type,voltage_level,non_time_price,feed_peak_price,feed_regular_price,feed_low_valley_price,line_peak_price," +
|
||||
"line_low_valley_price,line_regular_price,proxy_price,line_loss_price,transmission_price,running_price,add_price,peak_price,peak_price_interval,spike_price,spike_price_interval,"+
|
||||
"regular_price,regular_price_interval,low_valley_price,low_valley_price_interval,deep_valley_price,deep_valley_price_interval,demand_price,capacity_price,execution_time,"+
|
||||
"region_id,create_time) values ",
|
||||
"<foreach collection='industrialElecPriceList' item='item' index='index' separator=','>",
|
||||
"(#{item.electricityType},#{item.customerType},#{item.voltageLevel},#{item.nonTimePrice},#{item.feedPeakPrice},#{item.feedRegularPrice},#{item.feedLowValleyPrice},#{item.linePeakPrice},"+
|
||||
"#{item.lineLowValleyPrice},#{item.lineRegularPrice},#{item.proxyPrice},#{item.lineLossPrice},#{item.transmissionPrice},#{item.runningPrice},#{item.addPrice},#{item.peakPrice},#{item.peakPriceInterval},#{item.spikePrice},#{item.spikePriceInterval},"+
|
||||
"#{item.regularPrice},#{item.regularPriceInterval},#{item.lowValleyPrice},#{item.lowValleyPriceInterval},#{item.deepValleyPrice},#{item.deepValleyPriceInterval},#{item.demandPrice},#{item.capacityPrice},#{item.executionTime}," +
|
||||
"#{item.regionId},#{item.createTime})",
|
||||
"</foreach>",
|
||||
"</script>"
|
||||
})
|
||||
int insertCollectList(@Param(value="industrialElecPriceList") List<IndustrialElecPrice> industrialElecPriceList);
|
||||
|
||||
@Delete("delete from industrial_elec_price where region_id=#{regionId} and execution_time=#{executionTime}")
|
||||
int deleteByRegionIdAndDate(@Param("regionId") Integer regionId,@Param("executionTime") String executionTime);
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.IndustrialElecRegion;
|
||||
import com.ho.business.vo.req.industrialElec.IndustrialElecRegionReqVo;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface IndustrialElecRegionMapper {
|
||||
|
||||
|
||||
@SelectProvider(type = IndustrialElecDaoProvider.class, method = "pageList")
|
||||
List<IndustrialElecRegion> selectIndustElecRegion(IndustrialElecRegionReqVo industrialElecRegionReqVo);
|
||||
|
||||
@Delete("delete from industrial_elec_region where id=#{id}")
|
||||
int deleteById(@Param("id") Integer id);
|
||||
|
||||
@Select("select * from industrial_elec_region where id=#{id}")
|
||||
IndustrialElecRegion findById(@Param("id")Integer id);
|
||||
|
||||
@Update("update industrial_elec_region set region_name=#{regionName},`interval`=#{interval},type=#{type},voltage_level=#{voltageLevel},customer_type=#{customerType},electricity_type=#{electricityType},update_time=#{updateTime} where id=#{id}")
|
||||
int updateById(IndustrialElecRegion industrialElecRegion);
|
||||
|
||||
class IndustrialElecDaoProvider {
|
||||
public String pageList(IndustrialElecRegionReqVo industrialElecRegionReqVo) {
|
||||
String sql = "SELECT * FROM industrial_elec_region where 1=1";
|
||||
if (industrialElecRegionReqVo.getRegionName() != null) {
|
||||
sql += " and region_name like CONCAT('%',#{regionName},'%')";
|
||||
}
|
||||
return sql;
|
||||
}
|
||||
}
|
||||
|
||||
@Insert("insert into industrial_elec_region(region_name,`interval`,type,voltage_level,customer_type,electricity_type,create_time) values(#{regionName},#{interval},#{type},#{voltageLevel},#{customerType},#{electricityType},#{createTime})")
|
||||
int insert(IndustrialElecRegion industrialElecRegion);
|
||||
|
||||
@Select("select * from industrial_elec_region")
|
||||
List<IndustrialElecRegion> findAllList();
|
||||
|
||||
@Select("select * from industrial_elec_region where region_name=#{regionName}")
|
||||
IndustrialElecRegion findByRegionName(@Param("regionName")String regionName);
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 用户表单
|
||||
* @DateTime: 2023/7/5
|
||||
*/
|
||||
@Mapper
|
||||
public interface InspectionFaultMapper {
|
||||
|
||||
//根据用户id查询表单数据
|
||||
Integer updateInspectionFault(Integer orderId,Integer status);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.MaintenanceData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yy
|
||||
* @description 针对表【maintenance_data】的数据库操作Mapper
|
||||
* @createDate 2023-09-20 16:15:47
|
||||
* @Entity entity.MaintenanceData
|
||||
*/
|
||||
@Mapper
|
||||
public interface MaintenanceDataMapper{
|
||||
|
||||
void insertSelective(MaintenanceData maintenanceData);
|
||||
|
||||
List<MaintenanceData> selectByParam(MaintenanceData vo);
|
||||
|
||||
int deleteByList(List<Integer> ids);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,36 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.MessageInfoVo;
|
||||
import com.ho.business.entity.MessageReceiverVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface MessageInfoMapper {
|
||||
|
||||
void addMessageInfo(@Param("messageDetail") MessageInfoVo messageDetail);
|
||||
|
||||
void addMessageReceiver(@Param("messageReceiver") List<MessageReceiverVo> messageReceivers);
|
||||
|
||||
void deleteMessageInfo (@Param("messageIds") List<String> messageIds);
|
||||
|
||||
void deleteMessageReceivers (@Param("messageIds") List<String> messageIds);
|
||||
|
||||
List<MessageInfoVo> selectMessageInfo(@Param("condition") Map<String,Object> condition);
|
||||
|
||||
List<MessageReceiverVo> selectMessageReceivers (@Param("condition") Map<String,Object> condition);
|
||||
|
||||
void updateMessageReadStatus( @Param("condition") Map<String,Object> condition);
|
||||
|
||||
void updateCreateStatus(@Param("messageId") List<String> messageId);
|
||||
|
||||
void updateReceivingTime(@Param("messageId") List<String> messageId);
|
||||
|
||||
void refreshMessageReadStatus(@Param("message") MessageInfoVo message);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ModelDevice;
|
||||
import com.ho.business.entity.ModelDeviceCol;
|
||||
import com.ho.business.vo.resp.deviceModel.ModelDeviceColRespVo;
|
||||
import com.ho.business.vo.resp.modelType.ModelColData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gyan
|
||||
* @description 针对表【model_device_col】的数据库操作Mapper
|
||||
* @createDate 2023-02-09 18:04:50
|
||||
* @Entity generator.domain.ModelDeviceCol
|
||||
*/
|
||||
@Mapper
|
||||
public interface ModelDeviceColMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ModelDeviceCol modelDeviceCol);
|
||||
|
||||
int insertSelective(ModelDeviceCol modelDeviceCol);
|
||||
|
||||
int updateByPrimaryKeySelective(ModelDeviceCol modelDeviceCol);
|
||||
|
||||
//deviceType查询
|
||||
List<ModelDeviceCol> selectByDeviceType(String deviceType);
|
||||
|
||||
|
||||
List<ModelDeviceCol> selectByIds(@Param("ids") List<Integer> deviceColIds);
|
||||
|
||||
|
||||
List<ModelDeviceCol> selectByDeviceIds(@Param("ids")List<Integer> ids,String deviceType);
|
||||
|
||||
List<ModelDeviceCol> selectByModelIds(@Param("ids") List<Integer> ids,String deviceType);
|
||||
|
||||
List<ModelDeviceCol> selectByDeviceTypeList(List<String> list);
|
||||
|
||||
void addBatch(List<ModelDeviceCol> modelDeviceCols);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertList(@Param("list")List<ModelDeviceCol> list);
|
||||
|
||||
void deleteBatchDevice(@Param("ids") List<Integer> ids);
|
||||
|
||||
List<ModelDeviceCol> selectByType(String deviceType, String modelType,Integer deviceColId,Integer modelColId);
|
||||
|
||||
List<ModelDeviceCol> selectByModelType(String type,@Param("ids")List<Integer> collect);
|
||||
|
||||
List<ModelDevice> selectByModelTypes(String modelType);
|
||||
|
||||
ModelDeviceCol selectByModelId(@Param("deviceType")String deviceType, @Param("modelColId")Integer modelColId);
|
||||
|
||||
/**
|
||||
* 根据设备类型模型检索(一键同步功能使用)
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
List<ModelDeviceColRespVo> selectByParam(@Param("deviceType")String deviceType);
|
||||
|
||||
/**
|
||||
* 根据设备类型模糊删除(一键同步功能使用)
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
int deleteByDeviceType(@Param("deviceType") String deviceType);
|
||||
|
||||
List<ModelDeviceCol> selectDeviceColsByIds(@Param("ids")List<Integer> modelColIdList,@Param("deviceTypeList")List<String> deviceTypeList);
|
||||
|
||||
/**
|
||||
* 根据id查询绑定的模型点
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<ModelColData> selectModelData(@Param("ids")List<Integer> ids);
|
||||
|
||||
int getStationModelColCount(String stationId,String modelId);
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ModelTypeCol;
|
||||
import com.ho.business.vo.req.deviceModel.DeviceColSelectReqVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gyan
|
||||
* @description 针对表【model_type_col】的数据库操作Mapper
|
||||
* @createDate 2023-02-09 17:59:23
|
||||
* @Entity generator.domain.ModelTypeCol
|
||||
*/
|
||||
@Mapper
|
||||
public interface ModelTypeColMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ModelTypeCol modelTypeCol);
|
||||
|
||||
int insertSelective(ModelTypeCol modelTypeCol);
|
||||
|
||||
int updateByPrimaryKeySelective(ModelTypeCol modelTypeCol);
|
||||
|
||||
//根据model_type_id进行查询
|
||||
List<ModelTypeCol> selectByTypeId(Integer modelTypeId);
|
||||
|
||||
void addBatchModel(@Param("list") List<ModelTypeCol> modelTypeColTypeColList);
|
||||
|
||||
List<ModelTypeCol> selectByModelType(DeviceColSelectReqVo vo);
|
||||
|
||||
//查询模型字段中是否有相同的col
|
||||
List<ModelTypeCol> selectSameModelCol(String deviceType, @Param("list")List<String> collect);
|
||||
|
||||
List<ModelTypeCol> selectByIds(List<Integer> ids);
|
||||
|
||||
ModelTypeCol selectByCol(String col);
|
||||
|
||||
List<ModelTypeCol> selectByColList(@Param("list")List<String> colList);
|
||||
|
||||
ModelTypeCol selectByColValue(String col,String modelType);
|
||||
|
||||
ModelTypeCol selectById(Integer modelColId);
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.ModelDevice;
|
||||
import com.ho.business.entity.ModelDeviceCol;
|
||||
import com.ho.business.entity.ModelType;
|
||||
import com.ho.business.entity.ModelTypeCol;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gyan
|
||||
* @description 针对表【model_device_col】的数据库操作Mapper
|
||||
* @createDate 2023-02-09 18:04:50
|
||||
* @Entity generator.domain.ModelDeviceCol
|
||||
*/
|
||||
@Mapper
|
||||
public interface ModelTypeMapper {
|
||||
|
||||
/**
|
||||
* 新增ModelType表数据
|
||||
* @param modelType
|
||||
* @return
|
||||
*/
|
||||
int insertModelType(ModelType modelType);
|
||||
|
||||
List<ModelType> getModelTypeList(@Param("modelType") ModelType modelType);
|
||||
|
||||
ModelType selectByModelType(String modelType);
|
||||
|
||||
List<ModelType> getModelType(String modelType);
|
||||
|
||||
List<ModelDevice> getDeviceType(String modelType);
|
||||
|
||||
/**
|
||||
* 根据设备类型模糊查询
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
List<ModelDevice> selectByDeviceType(String deviceType);
|
||||
|
||||
/**
|
||||
* 新增ModelDevice表数据
|
||||
* @param modelDevice
|
||||
* @return
|
||||
*/
|
||||
int insertModelDevice(ModelDevice modelDevice);
|
||||
|
||||
/**
|
||||
* 新增ModelDevice表数据
|
||||
* @param modelDevice
|
||||
* @return
|
||||
*/
|
||||
int insertModelDeviceList(List<ModelDevice> modelDevice);
|
||||
|
||||
/**
|
||||
* 更新ModelDevice表数据
|
||||
* @param modelDevice
|
||||
* @return
|
||||
*/
|
||||
int updateModelDevice(ModelDevice modelDevice);
|
||||
|
||||
/**
|
||||
* 删除ModelDevice表数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteModelDevice(List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据设备类型模型删除
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
int deleteModelDeviceByDeviceType(String deviceType);
|
||||
|
||||
ModelType selectSameName(String modelName);
|
||||
|
||||
ModelDevice selectByDict(@Param("deviceType")String deviceType, @Param("modelType")String modelType);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.OneClickSequentialControl;
|
||||
import com.ho.business.vo.req.oneClickSequentialControl.OneClickSequentialControlQueryReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface OneClickSequentialControlMapper {
|
||||
|
||||
List<OneClickSequentialControl> getListByParam(@Param("vo") OneClickSequentialControlQueryReq vo);
|
||||
|
||||
List<OneClickSequentialControl> getListLikeParam(@Param("vo") OneClickSequentialControlQueryReq vo);
|
||||
|
||||
int insertBatch(@Param("list") List<OneClickSequentialControl> list);
|
||||
|
||||
int updateBatch(@Param("list") List<OneClickSequentialControl> list);
|
||||
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
int deleteByControlName(String controlName,Integer stationId);
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PageConfig;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yy
|
||||
* @description 针对表【page_config】的数据库操作Mapper
|
||||
* @createDate 2023-08-08 14:08:50
|
||||
* @Entity entity.PageConfig
|
||||
*/
|
||||
@Mapper
|
||||
public interface PageConfigMapper {
|
||||
|
||||
int addBatch(@Param("list") List<PageConfig> configList);
|
||||
|
||||
List<PageConfig> selectPage(@Param("pageConfig") PageConfig vo);
|
||||
|
||||
int deleteBatch(@Param("ids") List<Integer> ids);
|
||||
|
||||
int deleteStationId(@Param("stationId") Integer stationId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,115 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.*;
|
||||
import com.ho.business.vo.Holiday;
|
||||
import com.ho.business.vo.PolicyConfigVo;
|
||||
import com.ho.business.vo.req.PolicyConfigData;
|
||||
import com.ho.business.vo.resp.planningCurve.PlanningIssueVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PeakShavingMapper {
|
||||
|
||||
public int getSeq();
|
||||
|
||||
public int checkNo(@Param("templateNo")String templateNo,@Param("stationId")Integer stationId,@Param("temId")Integer temId);
|
||||
|
||||
public int checkName(@Param("templateName")String templateName, @Param("stationId")Integer stationId, @Param("temId")Integer temId);
|
||||
|
||||
public int addPlanningCurveTemplate(PlanningCurveTemplate template);
|
||||
|
||||
public int addPlanningCurve(@Param("curves") List<PlanningCurve> curves, @Param("planningTemplateId") Integer planningTemplateId);
|
||||
|
||||
/**
|
||||
* 编辑计划曲线模板
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
public int modifyPlanningCurveTemplate(PlanningCurveTemplate template);
|
||||
|
||||
/**
|
||||
* 删除计划曲线数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public int deleteCurves(@Param("temId") Integer temId);
|
||||
|
||||
public int deleteTemplateById(@Param("temId") Integer temId);
|
||||
|
||||
public int getPeakSeq();
|
||||
|
||||
public int addPolicyConfig(PolicyConfig policyConfig);
|
||||
|
||||
public int addPolicyConfigData(@Param("datas")List<PolicyConfigData> policyConfigData);
|
||||
|
||||
public List<PolicyConfigData> queryPolicyConifg(PolicyConfig policyConfig);
|
||||
|
||||
|
||||
public List<PolicyConfig> queryPolicyConifgMonth(PolicyConfig policyConfig);
|
||||
|
||||
public List<PlanningCurveTemplate> getPlanningCurveTemplates(PlanningCurveTemplate template);
|
||||
|
||||
public List<PlanningCurveTableTemplate> getPlanningCurveTableTemplates(PlanningCurveTemplate template);
|
||||
|
||||
public PlanningCurveTemplate getPlanningCurveTemplate(PlanningCurveTemplate template);
|
||||
|
||||
public List<Integer> getTemplateIds(Integer stationId);
|
||||
|
||||
/**
|
||||
* 根据模板id查询曲线
|
||||
* @param temId
|
||||
* @return
|
||||
*/
|
||||
public List<PlanningCurve> queryTemplateCurves(Integer temId);
|
||||
|
||||
public int deletePolicyConfig(PolicyConfig policyConfig);
|
||||
|
||||
public List<PlanningIssueVo> getIssueDevice(String deviceType);
|
||||
|
||||
public PolicyConfigVo queryPolicyConfigByParam(PolicyConfigVo vo);
|
||||
|
||||
/**
|
||||
* 根据temId查询是否有正在使用的模板
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
public int checkUse(PlanningCurveTemplate template);
|
||||
public int checkUse2(PlanningCurveTemplate template);
|
||||
|
||||
public Integer queryIssueDevice(Integer stationId);
|
||||
|
||||
public String getSnByStationId(Integer stationId);
|
||||
|
||||
public List<PolicyConfigData> queryPeakPolicyConfigData(@Param("stationId")Integer stationId,@Param("type")Integer type);
|
||||
|
||||
public List<PolicyConfigPlan> queryPlanList(PolicyConfigPlan policyConfigPlan);
|
||||
|
||||
public List<PeakShavingBean> queryPeakPolicyList(PolicyConfigPlan policyConfigPlan);
|
||||
|
||||
public void deletePlan(PolicyConfigPlan policyConfigPlan);
|
||||
|
||||
public int checkPlanUse(PolicyConfigPlan policyConfigPlan);
|
||||
|
||||
public int getPlanSeq();
|
||||
|
||||
public int addPlan(PolicyConfigPlan policyConfigPlan);
|
||||
|
||||
public List<PolicyConfigData> queryPolicyConifgDetail(PolicyConfig policyConfig);
|
||||
|
||||
public int deletePolicyConfigByMonth(@Param("stationId")Integer stationId,@Param("month")Integer month);
|
||||
|
||||
public List<Holiday> queryHolidayList(Holiday holiday);
|
||||
|
||||
public int queryTemplateStatus(PlanningCurveTemplate template);
|
||||
|
||||
public int checkPlanName(PolicyConfigPlan policyConfigPlan);
|
||||
|
||||
PlanningCurveTemplate getPCT(@Param("templateNo")String templateNo,@Param("stationId")Integer stationId,@Param("templateName")String templateName);
|
||||
|
||||
int insertPlanningCurve(PlanningCurve planningCurve);
|
||||
|
||||
int deletePlanningCurve(@Param("templateId")Integer templateId,@Param("startTime")String startTime);
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.Picture;
|
||||
import com.ho.business.vo.req.MesFileReqVo;
|
||||
import com.ho.business.vo.req.picture.PictureQueryReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【picture】的数据库操作Mapper
|
||||
* @createDate 2023-01-03 13:57:19
|
||||
* @Entity com.ho.business.entity.Picture
|
||||
*/
|
||||
@Mapper
|
||||
public interface PictureMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Picture record);
|
||||
|
||||
int insertSelective(Picture record);
|
||||
|
||||
Picture selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Picture record);
|
||||
|
||||
int updateByPrimaryKey(Picture record);
|
||||
|
||||
void deletedBySrcIdsAndType(List<Integer> srcIds,Integer type);
|
||||
|
||||
List<Picture> selectBySrcIdAndType(Integer srcId,Integer type);
|
||||
|
||||
List<Picture> selectByParam(PictureQueryReq req);
|
||||
|
||||
List<Picture> selectByParams(PictureQueryReq req);
|
||||
|
||||
Picture selectLastOne(Integer type);
|
||||
|
||||
void setUpSrcIdNUll(List<Integer> pictureIds);
|
||||
|
||||
List<Picture> selectAll();
|
||||
|
||||
void deletedByIds(List<Integer> picturesIds);
|
||||
|
||||
|
||||
Picture selectByStationAndType(Integer id, Integer type);
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.*;
|
||||
import com.ho.business.vo.resp.planningCurve.PlanningIssueVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface PlanningCurveIssueMapper {
|
||||
|
||||
public List<Map<String,Object>> getIssueDevices(PlanningIssueDevice issueDevice);
|
||||
|
||||
public List<Map<String,Object>> getTemplate(PlanningIssueDevice issueDevice);
|
||||
|
||||
public List<PlanningIssueComm> getIssueComms(PlanningIssueVo vo);
|
||||
|
||||
public Device getDeviceById(PlanningIssueVo vo);
|
||||
|
||||
public List<PlanningCurve> getCurveDetail(Integer temId);
|
||||
|
||||
public int insertIssueStatus(PlanningIssueDevice issueDevice);
|
||||
|
||||
public PlanningIssueDevice queryIssueStatus(PlanningIssueDevice issueDevice);
|
||||
|
||||
public int deleteIssueStatus(PlanningIssueDevice issueDevice);
|
||||
|
||||
public PlanningCurveTemplate queryCurrentIssue(PlanningIssueDevice issueDevice);
|
||||
|
||||
int chechTemplateExists(Integer temId);
|
||||
|
||||
void planCurveOperationRecord(@Param("condition") PlanCurveOperationRecordReq planCurveOperationRecordReq);
|
||||
|
||||
void addPlanningCurveHistory(@Param("condition") List<PlanningCurveHistory> PlanningCurveHistory);
|
||||
|
||||
List<PlanCurveOperationRecordReq> getPlanCurveOperationList(@Param("stationId") String stationId);
|
||||
|
||||
List<PlanningCurveHistory> getPlanningCurveHistory(@Param("planningCurveId") String planningCurveId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PlanningCurve;
|
||||
import com.ho.business.entity.PlanningCurveTemplate;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface PlanningCurveMapper {
|
||||
|
||||
/**
|
||||
* 查询模板列表接口
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> getPlanningCurveTemplates(PlanningCurveTemplate template);
|
||||
|
||||
public int getSeq();
|
||||
|
||||
/**
|
||||
* 新增模板
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
public int addPlanningCurveTemplate(PlanningCurveTemplate template);
|
||||
|
||||
/**
|
||||
* 新增曲线
|
||||
*
|
||||
* @param curves
|
||||
* @return
|
||||
*/
|
||||
public int addPlanningCurve(@Param("curves") List<PlanningCurve> curves, @Param("planningTemplateId") Integer planningTemplateId);
|
||||
|
||||
/**
|
||||
* 编辑计划曲线模板
|
||||
*
|
||||
* @param template
|
||||
* @return
|
||||
*/
|
||||
public int modifyPlanningCurveTemplate(PlanningCurveTemplate template);
|
||||
|
||||
/**
|
||||
* 删除计划曲线数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public int deleteCurves(@Param("id") Integer id);
|
||||
|
||||
/**
|
||||
* 根据计划曲线模板id删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public int deletePlanningCurveTemplates(@Param("ids") List<Integer> ids);
|
||||
|
||||
public int batchDeleteCurves(@Param("ids") List<Integer> ids);
|
||||
|
||||
public int checkNo(@Param("templateNo")String templateNo,@Param("stationId")Integer stationId,@Param("temId")Integer temId);
|
||||
|
||||
public int checkName(@Param("templateName")String templateName,@Param("stationId")Integer stationId,@Param("temId")Integer temId);
|
||||
|
||||
public List<PlanningCurveTemplate> getPlanningCurveTemplate(PlanningCurveTemplate template);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PlanningCurve;
|
||||
import com.ho.business.entity.PlanningCurveTactics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PlanningCurveTacticsMapper {
|
||||
|
||||
List<PlanningCurveTactics> getTacticsList(PlanningCurveTactics tactics);
|
||||
|
||||
PlanningCurveTactics getTacticsDetails(PlanningCurveTactics tactics);
|
||||
|
||||
List<PlanningCurve> getPlanningCurves(Integer temId);
|
||||
|
||||
int add(PlanningCurveTactics tactics);
|
||||
|
||||
int modify(PlanningCurveTactics tactics);
|
||||
|
||||
int delete(PlanningCurveTactics tactics);
|
||||
|
||||
List<PlanningCurveTactics> getPlanningCurveTemplates(PlanningCurveTactics tactics);
|
||||
|
||||
List<PlanningCurveTactics> getTacticsByStationId(Integer stationId);
|
||||
}
|
||||
@ -0,0 +1,85 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.DropDownVo;
|
||||
import com.ho.business.entity.PlanningCurveTemplate;
|
||||
import com.ho.business.entity.PlanningPolicy;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface PlanningPolicyMapper {
|
||||
|
||||
/**
|
||||
* 查询策略列表
|
||||
* @param policy
|
||||
* @return
|
||||
*/
|
||||
public List<PlanningPolicy> getPlanningPolicys(PlanningPolicy policy);
|
||||
|
||||
/**
|
||||
* 策略详情查询(详情按钮、编辑)
|
||||
* @param policy
|
||||
* @return
|
||||
*/
|
||||
public List<PlanningPolicy> getPlanningPolicyDetail4Modify(PlanningPolicy policy);
|
||||
|
||||
|
||||
/**
|
||||
* 新增策略
|
||||
* @param policy
|
||||
* @return
|
||||
*/
|
||||
public int addPlanningPolicy(PlanningPolicy policy);
|
||||
|
||||
|
||||
/**
|
||||
* 编辑策略
|
||||
* @param policy
|
||||
* @return
|
||||
*/
|
||||
public int modifyPlanningPolicy(PlanningPolicy policy);
|
||||
|
||||
/**
|
||||
* 删除策略
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public int deletePlanningPolicy(List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 查询策略类型下拉框数据
|
||||
* @return
|
||||
*/
|
||||
public List<DropDownVo> queryPolicyTypes();
|
||||
|
||||
/**
|
||||
* 查询策略优先级下拉框数据
|
||||
* @return
|
||||
*/
|
||||
public List<DropDownVo> queryPolicyPriority();
|
||||
|
||||
/**
|
||||
* 新增策略(批量)
|
||||
* @param policys
|
||||
* @return
|
||||
*/
|
||||
public int batchPlanningPolicy(List<PlanningPolicy> policys);
|
||||
|
||||
/**
|
||||
* 根据电站id获取计划曲线模板
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
public List<PlanningCurveTemplate> getPlanningCurveTemplates(Integer stationId);
|
||||
|
||||
/**
|
||||
* 校验名称是否重复 1:策略名称 2:自定义策略名称
|
||||
* @param policyId
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public int checkName(@Param("policyId")Integer policyId, @Param("name")String name, @Param("type")int type);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PointConfig;
|
||||
import com.ho.business.vo.req.dynamicConfig.DynamicConfigQuery;
|
||||
import com.ho.business.vo.req.dynamicConfig.PointConfigQuery;
|
||||
import com.ho.business.vo.resp.dynamicConfig.CurveConfigResp;
|
||||
import com.ho.business.vo.resp.dynamicConfig.PointConfigResp;
|
||||
import com.ho.business.vo.resp.dynamicConfig.PointConfigResultResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface PointConfigMapper {
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertList(List<PointConfig> list);
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int insertOne(PointConfig config);
|
||||
|
||||
/**
|
||||
* 批量更新数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int updateById(PointConfig config);
|
||||
|
||||
/**
|
||||
* 根据条件查询配置数据
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<PointConfigResp> selectByParam(PointConfigQuery vo);
|
||||
|
||||
/**
|
||||
* 根据条件查询配置数据
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<PointConfigResultResp> selectByParamNew(PointConfigQuery vo);
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 批量更新(带id的插入)
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateList(List<PointConfig> list);
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PointConfigRelation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface PointConfigRelationMapper {
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int insertList(@Param("list") List<PointConfigRelation> list);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据pointId删除关联数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByPointIds(@Param("ids") List<Integer> ids);
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PointDisassembleConfig;
|
||||
import com.ho.business.entity.PointPolysemyConfig;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface PointDisassembleConfigMapper {
|
||||
|
||||
/**
|
||||
* 根据条件查询曲线配置数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<PointDisassembleConfig> selectByPointIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int insertList(List<PointDisassembleConfig> config);
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int insertOne(PointDisassembleConfig config);
|
||||
|
||||
/**
|
||||
* 批量更新数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int updateById(PointDisassembleConfig config);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据pointId删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByPointIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PointPolysemyConfig;
|
||||
import com.ho.business.vo.req.dynamicConfig.DynamicConfigQuery;
|
||||
import com.ho.business.vo.resp.dynamicConfig.CurveConfigResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface PointPolysemyConfigMapper {
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int insertList(List<PointPolysemyConfig> config);
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int insertOne(PointPolysemyConfig config);
|
||||
|
||||
/**
|
||||
* 批量更新数据
|
||||
* @param config
|
||||
* @return
|
||||
*/
|
||||
int updateById(PointPolysemyConfig config);
|
||||
|
||||
/**
|
||||
* 根据条件查询曲线配置数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<PointPolysemyConfig> selectByPointIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据id删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(@Param("ids") List<Integer> ids);
|
||||
|
||||
/**
|
||||
* 根据pointId删除配置信息
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByPointIds(@Param("ids") List<Integer> ids);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.Station;
|
||||
import com.ho.business.vo.req.StationPageListReqVO;
|
||||
import com.ho.business.vo.req.StationPageReqVO;
|
||||
import com.ho.business.vo.req.StationReqVO;
|
||||
import com.ho.business.vo.resp.StationInfoResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【station】的数据库操作Mapper
|
||||
* @createDate 2022-08-29 17:07:07
|
||||
* @Entity com.ho.business.entity.Station
|
||||
*/
|
||||
@Mapper
|
||||
public interface StationMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(@Param("record") Station record);
|
||||
|
||||
void insertSelective(@Param("record") Station record);
|
||||
|
||||
Station selectByPrimaryKey(@Param("id") Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(@Param("record") Station record);
|
||||
|
||||
int updateByPrimaryKey(Station record);
|
||||
|
||||
Station selectByName(String name);
|
||||
|
||||
List<Station> selectByDimName(String name,Integer groupId);
|
||||
|
||||
List<Station> selectByIds(List<Integer> ids);
|
||||
|
||||
Station selectByNameAndId(@Param("name") String name, @Param("id") Integer id, @Param("deptId") Integer deptId);
|
||||
|
||||
List<Station> selectAll();
|
||||
|
||||
List<Station> selectByCondition(@Param("record") StationReqVO vo, @Param("depts") List<Integer> depts);
|
||||
|
||||
//根据dept_id进行查询
|
||||
List<Station> selectByDeptId(Integer deptId);
|
||||
|
||||
/**
|
||||
* 根据条件查询电站信息
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
List<Station> selectByGroupIdNotExclude(@Param("record")StationPageReqVO vo);
|
||||
|
||||
List<Station> getByName(String name);
|
||||
|
||||
List<Station> selectStatistics(Integer deleted, Integer dailyCount);
|
||||
|
||||
List<StationInfoResp> selectByParam(@Param("record") StationPageListReqVO stationPageReqVO);
|
||||
|
||||
List<Station> selectByInverterFlag(@Param("inverterFlag")Integer inverterFlag);
|
||||
|
||||
List<Map<String,String>> getTermDictionary(String language);
|
||||
|
||||
/**
|
||||
* 批量更新站点信息
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
int updateStationList(List<Station> list);
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.RepairFile;
|
||||
import com.ho.business.entity.StationNotepad;
|
||||
import com.ho.business.entity.StationRepair;
|
||||
import com.ho.business.vo.req.StationNotepadReq;
|
||||
import com.ho.business.vo.req.StationRepairReqVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface StationNoteAndRepairMapper {
|
||||
|
||||
void addStationNote(@Param("record") StationNotepad record);
|
||||
|
||||
void deleteStationNote(@Param("id") Integer id);
|
||||
|
||||
void updateStationNote(@Param("record") StationNotepad record);
|
||||
|
||||
List<StationNotepad> selectStationNote(@Param("record") StationNotepadReq record);
|
||||
|
||||
void addStationRepair(@Param("record") StationRepair record);
|
||||
|
||||
void updateRepairFile(@Param("repairFileList") List<RepairFile> repairFileList,@Param("repairId") Integer repairId);
|
||||
|
||||
void updateFileRepairNull (@Param("repairId") Integer repairId);
|
||||
|
||||
void addRepairFile(@Param("record") RepairFile record);
|
||||
|
||||
void deleteStationRepair(@Param("id") Integer id);
|
||||
|
||||
void deleteRepairInfo(@Param("id") Integer id);
|
||||
|
||||
void updateStationRepair(@Param("record") StationRepairReqVo record);
|
||||
|
||||
List<StationRepair> selectStationRepair(@Param("record") StationRepairReqVo record);
|
||||
|
||||
List<RepairFile> selectRepairFile(@Param("id") Integer id);
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.StationSn;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【station_sn】的数据库操作Mapper
|
||||
* @createDate 2023-02-16 11:04:52
|
||||
* @Entity com.ho.business.entity.StationSn
|
||||
*/
|
||||
@Mapper
|
||||
public interface StationSnMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(StationSn record);
|
||||
|
||||
int insertSelective(StationSn record);
|
||||
|
||||
StationSn selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(StationSn record);
|
||||
|
||||
int updateByPrimaryKey(StationSn record);
|
||||
|
||||
void insertSNList(List<StationSn> stationSnList);
|
||||
|
||||
void deleteByStationIds(List<Integer> ids);
|
||||
|
||||
List<StationSn> selectByStationId(Integer stationId);
|
||||
|
||||
StationSn selectBySn(String sn);
|
||||
|
||||
List<StationSn> selectBySnList(List<String> snList);
|
||||
|
||||
List<StationSn> selectByStationIds(List<Integer> stationIds);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.StationStatus;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yy
|
||||
* @description 针对表【station_status】的数据库操作Mapper
|
||||
* @createDate 2023-09-09 17:58:07
|
||||
* @Entity entity.StationStatus
|
||||
*/
|
||||
@Mapper
|
||||
public interface StationStatusMapper{
|
||||
|
||||
int insertSelective(StationStatus record);
|
||||
|
||||
List<StationStatus> selectByStationId(List<Integer> stationIds, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.StrategyOverviewUserSet;
|
||||
import com.ho.business.entity.UserHabit;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 用户习惯
|
||||
* @DateTime: 2023/7/4
|
||||
*/
|
||||
@Mapper
|
||||
public interface StrategyOverviewUserSetMapper {
|
||||
|
||||
StrategyOverviewUserSet selectByUserId(String userId);
|
||||
|
||||
int insertUserHabit(StrategyOverviewUserSet userHabit);
|
||||
|
||||
int updateById(StrategyOverviewUserSet userHabit);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.PlanningIssueComm;
|
||||
import com.ho.business.entity.TabSort;
|
||||
import com.ho.business.vo.resp.tabSort.TabSortExcel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TabSortMapper {
|
||||
|
||||
public List<TabSort> queryIssueDatas(TabSort tabSort);
|
||||
|
||||
public List<PlanningIssueComm> queryPlanControlIssueData(String deviceType);
|
||||
|
||||
public String getStationSn(Integer stationId);
|
||||
|
||||
TabSort queryTabSortById(Integer id);
|
||||
|
||||
List<TabSortExcel> queryExcelDatas(TabSort tabSort);
|
||||
|
||||
String getColNameByCol(@Param("col") String col,@Param("deviceType")String deviceType);
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.TabSort;
|
||||
import com.ho.business.entity.TabTag;
|
||||
import com.ho.business.vo.req.TabReqVo;
|
||||
import com.ho.business.vo.req.TabSortReqVo;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface TabSortWebMapper {
|
||||
|
||||
@Insert("insert into tab_sort(tab_name,tab_order,tab_status,station_id,commissioning,version_no,status) values(#{tabName},#{tabOrder},#{tabStatus},#{stationId},#{commissioning},#{versionNo},#{status})")
|
||||
@Options(useGeneratedKeys=true, keyProperty="tabId", keyColumn="tab_id")
|
||||
int insert(TabSort tabSort);
|
||||
|
||||
@Update("update tab_sort set tab_name=#{tabName},tab_order=#{tabOrder} where tab_id=#{tabId}")
|
||||
int updateByTabId(TabSortReqVo tabSortReqVo);
|
||||
|
||||
@Delete("delete from tab_sort where tab_id=#{tabId}")
|
||||
int deleteTabSort(@Param("tabId") Integer tabId);
|
||||
|
||||
@Select("select * from tab_sort where station_id=#{stationId} and status=1 order by tab_order")
|
||||
List<TabSort> queryTabSortList(@Param("stationId") Integer stationId);
|
||||
|
||||
@Update("update tab_sort set status=0 where station_id=#{stationId} and version_no!=#{versionNo}")
|
||||
int toggleVersion(TabReqVo tabReqVo);
|
||||
|
||||
@Update("update tab_sort set status=1 where station_id=#{stationId} and version_no=#{versionNo}")
|
||||
int updateVersion(TabReqVo tabReqVo);
|
||||
|
||||
@Update("update tab_sort set status=0 where station_id=#{stationId}")
|
||||
int updateExclVersion(@Param("stationId") Integer stationId);
|
||||
|
||||
@Select("select DISTINCT version_no,station_id,status from tab_sort where station_id=#{stationId}")
|
||||
List<Map<String,Object>> queryVersion(@Param("stationId") Integer stationId);
|
||||
|
||||
@Select("select * from tab_sort where station_id=#{stationId} and version_no=#{versionNo}")
|
||||
List<TabSort> showTabSortList(@Param("stationId") Integer stationId,@Param("versionNo") Date versionNo);
|
||||
|
||||
@Select("select version_no from tab_sort where station_id=#{stationId} group by version_no order by version_no")
|
||||
List<TabSort> getList(@Param("stationId") Integer stationId);
|
||||
|
||||
@Delete("delete from tab_sort where station_id=#{stationId} and version_no=#{versionNo}")
|
||||
int deleteTabSortLater(@Param("stationId") Integer stationId,@Param("versionNo") Date versionNo);
|
||||
|
||||
@Select({"<script>",
|
||||
"select count(1) from tab_sort where tab_name = #{tabName} and status = 1" +
|
||||
"<when test='tabId != null'>"+
|
||||
" and tab_id != #{tabId}" +
|
||||
"</when>" +
|
||||
"<when test='stationId != null'>"+
|
||||
" and station_id = #{stationId}" +
|
||||
"</when>" +
|
||||
"</script>"})
|
||||
int checkTabName(@Param("stationId")Integer stationId,@Param("tabName")String tabName,@Param("tabId")Integer tabId);
|
||||
|
||||
@Select("select * from tab_sort where tab_id = #{tabId}")
|
||||
TabSort getTabSortById(Integer tabId);
|
||||
|
||||
@Select("select tab_id from tab_tag where tag_id = #{tagId}")
|
||||
Integer getTabIdByTagId(Integer tagId);
|
||||
|
||||
@Update("update tab_tag set changeover = 0 where tab_id = #{tabId}")
|
||||
int updateChangeover(Integer tabId);
|
||||
|
||||
@Update("update tab_tag set changeover = 1 where tag_id = #{tagId}")
|
||||
void chooseState(Integer tagId);
|
||||
|
||||
@Select(" select * from tab_tag where changeover = 1 and tab_id = #{tabId} limit 1")
|
||||
TabTag queryTabTag(Integer tabId);
|
||||
|
||||
@Select(" select count(1) from tab_tag where tab_id = #{tabId} and changeover = 1 ")
|
||||
int queryTabTagIsChangeover(Integer tabId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
|
||||
import com.ho.business.entity.TabTagDefaultValue;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TabTagDefaultValueMapper {
|
||||
|
||||
@Select("select * from tab_tag_default_value where tag_id=#{tagId}")
|
||||
List<TabTagDefaultValue> queryTabTagDefaultValueList(@Param("tagId") Integer tagId);
|
||||
|
||||
@Delete("delete from tab_tag_default_value where tag_id=#{tagId}")
|
||||
int deleteByTagId(@Param("tagId") Integer tagId);
|
||||
|
||||
@Delete("<script>" +
|
||||
"DELETE FROM tab_tag_default_value WHERE tag_id in " +
|
||||
"<foreach item='tagId' collection='tagIds' open='(' separator=',' close=')'>#{tagId}</foreach>" +
|
||||
"</script>")
|
||||
int deleteTagIds(@Param("tagIds") List<Integer> tagIds);
|
||||
|
||||
@Insert("insert into tab_tag_default_value(def_val,tag_id,def_level) values(#{defVal},#{tagId},#{defLevel})")
|
||||
int insert(TabTagDefaultValue tabTagDefaultValue);
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
|
||||
import com.ho.business.entity.TabTag;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.apache.ibatis.mapping.FetchType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TabTagWebMapper {
|
||||
|
||||
@Select("select * from tab_tag where tab_id=#{tabId}")
|
||||
@Results(id = "userMap",value={
|
||||
@Result(id = true, property = "tagId", column = "tag_id"),
|
||||
@Result(property = "tagName", column = "tag_name"),
|
||||
@Result(property = "tagType", column = "tag_type"),
|
||||
@Result(property = "tagNameEn", column = "tag_name_en"),
|
||||
@Result(property = "srcId", column = "src_id"),
|
||||
@Result(property = "tabId", column = "tab_id"),
|
||||
@Result(property = "col", column = "col"),
|
||||
@Result(property = "maxValue", column = "max_value"),
|
||||
@Result(property = "minValue", column = "min_value"),
|
||||
@Result(property = "frame", column = "frame"),
|
||||
@Result(property = "colName", column = "col_name"),
|
||||
@Result(property = "description", column = "description"),
|
||||
@Result(property = "unit", column = "unit"),
|
||||
@Result(property = "values", column = "tag_id",
|
||||
many = @Many(select = "com.ho.business.mapper.TabTagDefaultValueMapper.queryTabTagDefaultValueList",fetchType= FetchType.EAGER))
|
||||
})
|
||||
List<TabTag> queryTabTags(@Param("tabId") Integer tabId);
|
||||
|
||||
@Delete("delete from tab_tag where tab_id=#{tabId}")
|
||||
int deleteTabTags(@Param("tabId") Integer tabId);
|
||||
|
||||
@Insert("insert into tab_tag(tag_name,tag_type,tag_name_en,src_id,tab_id,col,max_value,min_value,frame,col_name,description,unit,device_type,changeover) values(#{tagName},#{tagType},#{tagNameEn},#{srcId},#{tabId},#{col},#{maxValue},#{minValue},#{frame},#{colName},#{description},#{unit},#{deviceType},#{changeover})")
|
||||
@Options(useGeneratedKeys=true, keyProperty="tagId", keyColumn="tag_id")
|
||||
int insert(TabTag tabTag);
|
||||
|
||||
@Select("select * from tab_tag where tab_id=#{tabId} order by tag_id")
|
||||
List<TabTag> queryTabTagList(@Param("tabId") Integer tabId);
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.TopologyJumpConfig;
|
||||
import com.ho.business.vo.req.topologyJumpConfig.TopologyJumpConfigReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 拓扑配置表
|
||||
* @DateTime: 2024/5/14
|
||||
*/
|
||||
@Mapper
|
||||
public interface TopologyJumpConfigMapper {
|
||||
|
||||
List<TopologyJumpConfig> selectByParam(TopologyJumpConfigReq vo);
|
||||
|
||||
int insertOne(TopologyJumpConfig vo);
|
||||
|
||||
int insertList(@Param("list") List<TopologyJumpConfig> list);
|
||||
|
||||
int updateById(TopologyJumpConfig vo);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByList(@Param("ids") List<Integer> ids);
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.Topology;
|
||||
import com.ho.business.entity.TopologyQuery;
|
||||
import com.ho.business.vo.req.TopologyInReqVo;
|
||||
import com.ho.business.vo.req.TopologyReqVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【topology】的数据库操作Mapper
|
||||
* @createDate 2022-09-03 15:10:34
|
||||
* @Entity com.ho.business.entity.Topology
|
||||
*/
|
||||
@Mapper
|
||||
public interface TopologyMapper {
|
||||
|
||||
//根据id删除
|
||||
int deleteBytopologyId(Integer id);
|
||||
|
||||
int insertSelective(Topology record);
|
||||
|
||||
Topology selectByPrimaryKey(@Param("id") Integer id);
|
||||
|
||||
Topology selectOne(TopologyQuery topologyQuery);
|
||||
|
||||
List<Topology> selectList(TopologyQuery topologyQuery);
|
||||
|
||||
List<Topology> selectListByPid(@Param("stationId") Integer stationId,@Param("list") List<Integer> list);
|
||||
|
||||
|
||||
int updateByPrimaryKeySelective(TopologyInReqVo vo);
|
||||
|
||||
int updateByPrimaryKey(Topology record);
|
||||
|
||||
List<Topology> selectByStationId(Integer id);
|
||||
|
||||
Topology selectBysev(TopologyReqVo vo);
|
||||
|
||||
List<Topology> selectByWarehouse(@Param("srcId") Integer srcId);
|
||||
|
||||
List<Topology> selectByStack(@Param("srcId")Integer srcId);
|
||||
|
||||
Topology selectByStation(@Param("stationId") Integer stationId, @Param("deptId") Integer deptId, @Param("groupId") Integer groupId);
|
||||
|
||||
List<Topology> getAllTopology(@Param("stationId") Integer stationId);
|
||||
|
||||
Topology getStationTopology(@Param("stationId") Integer stationId);
|
||||
|
||||
List<Topology> getCategoryTopology(Topology topology);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.TranslateNation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @description 针对表【Dict_Province】的数据库操作Mapper
|
||||
* @createDate 2024-12-18
|
||||
*/
|
||||
@Mapper
|
||||
public interface TranslateNationMapper {
|
||||
|
||||
List<TranslateNation> getDictNation();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.TranslateProvince;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @description 针对表【Dict_Province】的数据库操作Mapper
|
||||
* @createDate 2024-12-18
|
||||
*/
|
||||
@Mapper
|
||||
public interface TranslateProvinceMapper {
|
||||
|
||||
List<TranslateProvince> getDictProvince();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.Topology;
|
||||
import com.ho.business.entity.TypeContrast;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【type_contrast】的数据库操作Mapper
|
||||
* @createDate 2022-09-03 10:24:57
|
||||
* @Entity com.ho.business.entity.TypeContrast
|
||||
*/
|
||||
@Mapper
|
||||
public interface TypeContrastMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(TypeContrast record);
|
||||
|
||||
int insertSelective(TypeContrast record);
|
||||
|
||||
TypeContrast selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByPrimaryKeySelective(TypeContrast record);
|
||||
|
||||
int updateByPrimaryKey(TypeContrast record);
|
||||
|
||||
List<TypeContrast> selectByCategory(Integer id);
|
||||
|
||||
TypeContrast getDeviceTypeId(@Param("record") Topology topology);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.UserHabit;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 用户习惯
|
||||
* @DateTime: 2023/7/4
|
||||
*/
|
||||
@Mapper
|
||||
public interface UserHabitMapper {
|
||||
|
||||
UserHabit selectByUserId(String userId);
|
||||
|
||||
int insertUserHabit(UserHabit userHabit);
|
||||
|
||||
int updateById(UserHabit userHabit);
|
||||
}
|
||||
@ -0,0 +1,73 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.VirtualDeviceCol;
|
||||
import com.ho.business.vo.resp.VirtualDeviceColResp;
|
||||
import com.ho.business.vo.resp.point.Point;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @description 针对表【virtual_device_col】的数据库操作Mapper
|
||||
* @createDate 2023-05-05
|
||||
* @Entity com.ho.business.entity.VirtualDeviceColMapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface VirtualDeviceColMapper {
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件查询
|
||||
* @param record
|
||||
* @return
|
||||
*/
|
||||
List<VirtualDeviceColResp> selectVirtualDeviceCol(VirtualDeviceCol record);
|
||||
|
||||
/**
|
||||
* 新增单条记录
|
||||
* @param virtualDeviceCol
|
||||
* @return
|
||||
*/
|
||||
int insertVirtualDeviceCol(VirtualDeviceCol virtualDeviceCol);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param virtualDeviceColList
|
||||
* @return
|
||||
*/
|
||||
int insertList(@Param("virtualDeviceColList")List<VirtualDeviceCol> virtualDeviceColList);
|
||||
|
||||
/**
|
||||
* 修改单条记录
|
||||
* @param virtualDeviceCol
|
||||
* @return
|
||||
*/
|
||||
int updateVirtualDeviceCol(VirtualDeviceCol virtualDeviceCol);
|
||||
|
||||
/**
|
||||
* 批量更新
|
||||
* @param virtualDeviceColList
|
||||
* @return
|
||||
*/
|
||||
int updateList(@Param("virtualDeviceColList")List<VirtualDeviceCol> virtualDeviceColList);
|
||||
|
||||
/**
|
||||
* 删除单条记录
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByList(@Param("ids") List<Integer> ids);
|
||||
|
||||
VirtualDeviceCol selectByColId(Point point);
|
||||
|
||||
List<VirtualDeviceCol> selectBySrcId(Integer stationId, List<Integer> collect,String type);
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.VirtualDeviceRelation;
|
||||
import com.ho.business.vo.resp.virtualDeviceRelation.VirtualDeviceRelationResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author xwz
|
||||
* @desc: 虚拟点关联关系
|
||||
* @DateTime: 2023/12/12
|
||||
*/
|
||||
@Mapper
|
||||
public interface VirtualDeviceRelationMapper {
|
||||
|
||||
List<VirtualDeviceRelationResp> selectByParam(VirtualDeviceRelation vo);
|
||||
|
||||
int insertOne(VirtualDeviceRelation vo);
|
||||
|
||||
int insertList(@Param("list") List<VirtualDeviceRelation> list);
|
||||
|
||||
int updateById(VirtualDeviceRelation userHabit);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByList(@Param("ids") List<Integer> ids);
|
||||
|
||||
int deleteStationId(@Param("stationId") Integer stationId);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【work_order_circulation】的数据库操作Mapper
|
||||
* @createDate 2022-10-14 10:37:31
|
||||
* @Entity com.ho.flow.vo.WorkOrderCirculation
|
||||
*/
|
||||
@Mapper
|
||||
public interface WorkOrderCirculationMapper {
|
||||
/*
|
||||
int insert(WorkOrderCirculation record);
|
||||
|
||||
int insertSelective(WorkOrderCirculation record);
|
||||
|
||||
WorkOrderCirculation selectByPrimaryKey(Long id);
|
||||
|
||||
int insertBatch(@Param("list")List<WorkOrderCirculation> workOrderCirculations);
|
||||
|
||||
List<WorkOrderCirculationRespVO> selectByOrderId(String orderId);*/
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【work_order】的数据库操作Mapper
|
||||
* @createDate 2022-10-14 10:37:27
|
||||
* @Entity com.ho.flow.vo.WorkOrder
|
||||
*/
|
||||
//@Mapper
|
||||
public interface WorkOrderMapper {
|
||||
|
||||
/*
|
||||
int deleteByPrimaryKey(List<String> orderIds);
|
||||
|
||||
|
||||
int insertSelective(WorkOrder record);
|
||||
|
||||
WorkOrder selectByPrimaryKey(Long id);
|
||||
//
|
||||
WorkOrder selectByOrderId(String orderId);
|
||||
|
||||
int updateByPrimaryKeySelective(WorkOrder record);
|
||||
|
||||
int updateByPrimaryKey(WorkOrder record);
|
||||
|
||||
WorkOrder selectByStatus(@Param("orderId") String orderId);
|
||||
|
||||
List<WorkOrderPageRespVO> selectByPageInfo(WorkOrderPageReq vo);
|
||||
|
||||
List<WorkOrderPageRespVO> selectByHisPageInfo(WorkOrderPageReq vo);
|
||||
|
||||
int insertBatch(@Param("list")List<WorkOrder> workOrders);
|
||||
|
||||
List<WorkOrder> selectByEventIds(List<Long> eventIds);
|
||||
|
||||
void delete(String orderId);
|
||||
|
||||
//退回工单
|
||||
void updateReturnWorkOrder(WorkOrder workOrder);*/
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package com.ho.business.mapper;
|
||||
|
||||
import com.ho.business.entity.YcValue;
|
||||
import com.ho.business.vo.resp.StatisticsRespVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author yule
|
||||
* @description 针对表【yc_value】的数据库操作Mapper
|
||||
* @createDate 2022-09-13 16:53:34
|
||||
* @Entity com.ho.business.entity.YcValue
|
||||
*/
|
||||
@Mapper
|
||||
public interface YcValueMapper {
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(YcValue record);
|
||||
|
||||
int insertSelective(YcValue record);
|
||||
|
||||
YcValue selectByPrimaryKey( Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(YcValue record);
|
||||
|
||||
int updateByPrimaryKey(YcValue record);
|
||||
|
||||
List<YcValue> selectByStationAndCreateTime(Integer stationId, String first, String current);
|
||||
|
||||
//日期时间段查询
|
||||
List<YcValue> selectByStationAndDay(@Param("stationId") Integer stationId, @Param("beginDay") String beginDay, @Param("endDay") String endDay,
|
||||
@Param("typeList") List<Integer> typeList);
|
||||
|
||||
BigDecimal selectYearChargeE(@Param("stationId") Integer stationId, @Param("type") Integer type, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
|
||||
|
||||
List<StatisticsRespVO> getStatisticsList(Map<String, Object> map);
|
||||
|
||||
//按条件查询
|
||||
List<YcValue> getListByCondition(Map<String, Object> map);
|
||||
|
||||
BigDecimal selectCommandsNum(Map<String, Object> map);
|
||||
|
||||
BigDecimal getHoursCounted(Map<String, Object> map);
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package com.ho.business.service;
|
||||
|
||||
import com.ho.common.tools.vo.req.StationHomeRespVo;
|
||||
import com.ho.td.api.entity.query.TdBaseTimeQuery;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author catkins
|
||||
* @date 2023年10月23日 15:40
|
||||
*/
|
||||
public interface AutoDeviceCurveService {
|
||||
|
||||
public Integer getSrcIdByStationId(Integer stationId,String deviceType);
|
||||
|
||||
/**
|
||||
* 去td查询原始数据
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
public List<StationHomeRespVo> queryData(TdBaseTimeQuery query);
|
||||
|
||||
/**
|
||||
* 获取两个曲线的差值曲线
|
||||
* @param vo1 最大/高曲线
|
||||
* @param vo2 最小/低曲线
|
||||
* @return
|
||||
*/
|
||||
public List<StationHomeRespVo> getCurve(List<StationHomeRespVo> vo1,List<StationHomeRespVo> vo2,List<String> min);
|
||||
|
||||
/**
|
||||
* 获取单个值(曲线首尾相减)
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
public BigDecimal getOneValue(List<StationHomeRespVo> vo);
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.ho.business.service;
|
||||
|
||||
/**
|
||||
* @author fancl
|
||||
* @desc: 电芯接口
|
||||
* @date 2022/9/5
|
||||
*/
|
||||
public interface BatteryCellService {
|
||||
//电芯监控页面查询
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.ho.business.service;
|
||||
|
||||
import com.ho.business.vo.req.batteryStack.CurveReqVo;
|
||||
import com.ho.business.vo.resp.batteryStack.CurveRespVo;
|
||||
import com.ho.business.vo.resp.point.PointCurveResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author gyan
|
||||
* @desc: 电池堆
|
||||
* @DateTime: 2023/5/8 11:11
|
||||
*/
|
||||
public interface BatteryStackService {
|
||||
List<CurveRespVo> getUniversalCurve(CurveReqVo vo);
|
||||
|
||||
List<CurveRespVo> getSocCurve(CurveReqVo vo);
|
||||
|
||||
List<PointCurveResp> getStackHisData(CurveReqVo vo);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user