Compare commits
44 Commits
master
...
3862fc379d
| Author | SHA1 | Date | |
|---|---|---|---|
| 3862fc379d | |||
| a9872467c0 | |||
| b7c03dac64 | |||
| 92f6a16106 | |||
| 71dba8bb2d | |||
| 1ab49c4178 | |||
| da9cc7cc76 | |||
| 5f51572b68 | |||
| f9edc2d15d | |||
| dd5cb05649 | |||
| 01b4d80adb | |||
| 49a31edad2 | |||
| 5d0a83cf1c | |||
| bd5108bb7e | |||
| 40dc44374b | |||
| f6e18851de | |||
| 25188a80de | |||
| 2033a7d3c6 | |||
| 77095ac5a2 | |||
| 4b37434057 | |||
| 4a810f3aef | |||
| 56f6c9a446 | |||
| b26cdfa495 | |||
| 9add81d728 | |||
| 052c5c8ea0 | |||
| 8cf7b0125d | |||
| 700e8564ce | |||
| bcc1a5c6d1 | |||
| 28ecf71e0c | |||
| a655f14188 | |||
| c17c53fd95 | |||
| 959030fdb1 | |||
| 772b610bec | |||
| 1e16cfd54e | |||
| f83c10a9ca | |||
| e0c6ab1bfb | |||
| 1404911f53 | |||
| c6a63ade7f | |||
| c975ef553a | |||
| 94e62580c3 | |||
| bc2d41ca89 | |||
| ad55550d9f | |||
| 599df010ea | |||
| 36ee19b6e9 |
2
pom.xml
2
pom.xml
@ -71,7 +71,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
<!-- 环境标识,需要与配置文件的名称相对应 -->
|
||||||
<profiles.active>dev</profiles.active>
|
<profiles.active>dev</profiles.active>
|
||||||
<nacos.server>192.168.110.209:18848</nacos.server>
|
<nacos.server>192.168.110.2:18848</nacos.server>
|
||||||
<nacos.discovery.group>DEFAULT_GROUP</nacos.discovery.group>
|
<nacos.discovery.group>DEFAULT_GROUP</nacos.discovery.group>
|
||||||
<nacos.config.group>DEFAULT_GROUP</nacos.config.group>
|
<nacos.config.group>DEFAULT_GROUP</nacos.config.group>
|
||||||
<nacos.username>nacos</nacos.username>
|
<nacos.username>nacos</nacos.username>
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package org.dromara.resource.api;
|
|||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.resource.api.domain.RemoteFile;
|
import org.dromara.resource.api.domain.RemoteFile;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -35,4 +36,13 @@ public interface RemoteFileService {
|
|||||||
* @return 列表
|
* @return 列表
|
||||||
*/
|
*/
|
||||||
List<RemoteFile> selectByIds(String ossIds);
|
List<RemoteFile> selectByIds(String ossIds);
|
||||||
|
|
||||||
|
|
||||||
|
void deleteFile(Collection<String> urls);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ossId列表删除
|
||||||
|
* @param ossIds
|
||||||
|
*/
|
||||||
|
void deleteFileByIds(Collection<Long> ossIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.resource.api.domain.RemoteFile;
|
import org.dromara.resource.api.domain.RemoteFile;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,4 +51,14 @@ public class RemoteFileServiceMock implements RemoteFileService {
|
|||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFile(Collection<String> urls){
|
||||||
|
log.warn("服务调用异常 -> 降级处理");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFileByIds(Collection<Long> ossIds) {
|
||||||
|
log.warn("服务调用异常 -> 降级处理");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,10 @@
|
|||||||
package org.dromara.system.api;
|
package org.dromara.system.api;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteProjectVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-09-10 16:15
|
* @date 2025-09-10 16:15
|
||||||
@ -14,4 +19,19 @@ public interface RemoteProjectService {
|
|||||||
*/
|
*/
|
||||||
String selectProjectNameById(Long projectId);
|
String selectProjectNameById(Long projectId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*校验用户是否拥有操作项目的权限
|
||||||
|
* @param projectId
|
||||||
|
* @param userId
|
||||||
|
*/
|
||||||
|
void validAuth(Long projectId, Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断项目是否存在
|
||||||
|
* @param projectId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
RemoteProjectVo getById(Long projectId);
|
||||||
|
|
||||||
|
void validAuth(List<Long> projectIdList, Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,4 +189,7 @@ public interface RemoteUserService {
|
|||||||
*/
|
*/
|
||||||
Map<Long, String> selectPostNamesByIds(List<Long> postIds);
|
Map<Long, String> selectPostNamesByIds(List<Long> postIds);
|
||||||
|
|
||||||
|
RemoteUserVo selectUserByPhonenumber(String phone);
|
||||||
|
|
||||||
|
String getPostNameByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,159 @@
|
|||||||
|
package org.dromara.system.api.domain.vo;
|
||||||
|
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目视图对象 project
|
||||||
|
*
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025-03-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class RemoteProjectVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目名称
|
||||||
|
*/
|
||||||
|
private String projectName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目简称
|
||||||
|
*/
|
||||||
|
private String shortName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父项目id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常 1停用)
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目图片
|
||||||
|
*/
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String lng;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private String lat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目类型
|
||||||
|
*/
|
||||||
|
private String projectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目阶段
|
||||||
|
*/
|
||||||
|
private String projectStage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目地址
|
||||||
|
*/
|
||||||
|
private String projectSite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人电话
|
||||||
|
*/
|
||||||
|
private String principalPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际容量
|
||||||
|
*/
|
||||||
|
private String actual;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划容量
|
||||||
|
*/
|
||||||
|
private String plan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开工时间
|
||||||
|
*/
|
||||||
|
private String onStreamTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打卡范围(09:00,18:00)
|
||||||
|
*/
|
||||||
|
private String punchRange;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打卡时间开始
|
||||||
|
*/
|
||||||
|
private String playCardStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打卡时间结束
|
||||||
|
*/
|
||||||
|
private String playCardEnd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计总量
|
||||||
|
*/
|
||||||
|
private Long designTotal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全协议书
|
||||||
|
*/
|
||||||
|
private String securityAgreement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 招标文件
|
||||||
|
*/
|
||||||
|
private String tenderFiles;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示隐藏(0显示 1隐藏)
|
||||||
|
*/
|
||||||
|
private String showHidden;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序字段
|
||||||
|
*/
|
||||||
|
private Long sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package org.dromara.system.api.utils;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/5/27 9:16
|
||||||
|
*/
|
||||||
|
public class BigDecimalUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算百分比
|
||||||
|
*
|
||||||
|
* @param dividend 被除数
|
||||||
|
* @param divisor 除数
|
||||||
|
* @return 百分比(保留2位小数)如 12.34%
|
||||||
|
*/
|
||||||
|
public static BigDecimal toPercentage(BigDecimal dividend, BigDecimal divisor) {
|
||||||
|
if (dividend == null || divisor == null || divisor.compareTo(BigDecimal.ZERO) == 0) {
|
||||||
|
return BigDecimal.valueOf(0.00);
|
||||||
|
}
|
||||||
|
return dividend
|
||||||
|
.multiply(new BigDecimal("100"))
|
||||||
|
.divide(divisor, 2, RoundingMode.HALF_UP);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package org.dromara.system.api.utils;
|
||||||
|
|
||||||
|
import org.apache.poi.util.Units;
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFRun;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.DirectoryStream;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.util.zip.ZipEntry;
|
||||||
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/4/17 14:53
|
||||||
|
*/
|
||||||
|
public class DocumentUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 在给定的 run 里插入图片,并按原始大小(或缩放后大小)设置宽高。
|
||||||
|
*
|
||||||
|
* @param run 要插入图片的 XWPFRun
|
||||||
|
* @param imagePath 本地图片路径或 URL(这里示例用本地文件)
|
||||||
|
* @param document 当前文档对象
|
||||||
|
* @param maxWidthPx 最大允许宽度(像素),如果原图更宽就按比例缩放;设置为 <=0 则不缩放
|
||||||
|
*/
|
||||||
|
public static void insertImageDynamic(XWPFRun run,
|
||||||
|
String imagePath,
|
||||||
|
XWPFDocument document,
|
||||||
|
int maxWidthPx) throws Exception {
|
||||||
|
// 1. 先把图片读到 byte[]
|
||||||
|
byte[] imgBytes = Files.readAllBytes(Paths.get(imagePath));
|
||||||
|
// 2. 用 ImageIO 读出宽高(像素)
|
||||||
|
BufferedImage img = ImageIO.read(new ByteArrayInputStream(imgBytes));
|
||||||
|
int widthPx = img.getWidth();
|
||||||
|
int heightPx = img.getHeight();
|
||||||
|
// 3. 如果指定了最大宽度,而且原图更宽,则按比例缩放
|
||||||
|
if (maxWidthPx > 0 && widthPx > maxWidthPx) {
|
||||||
|
double ratio = (double) maxWidthPx / widthPx;
|
||||||
|
widthPx = maxWidthPx;
|
||||||
|
heightPx = (int) (heightPx * ratio);
|
||||||
|
}
|
||||||
|
// 4. 把像素转换成 EMU
|
||||||
|
int widthEmu = Units.pixelToEMU(widthPx);
|
||||||
|
int heightEmu = Units.pixelToEMU(heightPx);
|
||||||
|
// 5. 插入图片
|
||||||
|
String lower = imagePath.toLowerCase();
|
||||||
|
int format = lower.endsWith(".png") ? XWPFDocument.PICTURE_TYPE_PNG
|
||||||
|
: lower.endsWith(".gif") ? XWPFDocument.PICTURE_TYPE_GIF
|
||||||
|
: lower.endsWith(".jpeg") ? XWPFDocument.PICTURE_TYPE_JPEG
|
||||||
|
: lower.endsWith(".jpg") ? XWPFDocument.PICTURE_TYPE_JPEG
|
||||||
|
: XWPFDocument.PICTURE_TYPE_PNG; // 默认当 PNG
|
||||||
|
try (InputStream picIn = new ByteArrayInputStream(imgBytes)) {
|
||||||
|
run.addPicture(picIn, format, imagePath, widthEmu, heightEmu);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归将 sourceDir 中的所有文件和子目录,按照相对于 rootDir 的路径写入 ZipOutputStream。
|
||||||
|
*
|
||||||
|
* @param rootDir 源目录的根,用来计算相对路径
|
||||||
|
* @param sourceDir 当前递归到的目录
|
||||||
|
* @param zos ZIP 输出流
|
||||||
|
*/
|
||||||
|
public static void zipDirectory(Path rootDir, Path sourceDir, ZipOutputStream zos) throws IOException {
|
||||||
|
// 遍历当前目录下的所有文件和文件夹
|
||||||
|
try (DirectoryStream<Path> stream = Files.newDirectoryStream(sourceDir)) {
|
||||||
|
for (Path entry : stream) {
|
||||||
|
if (Files.isDirectory(entry)) {
|
||||||
|
// 如果是目录,递归
|
||||||
|
zipDirectory(rootDir, entry, zos);
|
||||||
|
} else {
|
||||||
|
// 如果是文件,创建一个 ZipEntry,路径以 '/' 分隔
|
||||||
|
Path relativePath = rootDir.relativize(entry);
|
||||||
|
String zipEntryName = relativePath.toString().replace(File.separatorChar, '/');
|
||||||
|
ZipEntry zipEntry = new ZipEntry(zipEntryName);
|
||||||
|
zos.putNextEntry(zipEntry);
|
||||||
|
// 把文件内容写入 ZIP
|
||||||
|
try (InputStream is = Files.newInputStream(entry)) {
|
||||||
|
byte[] buffer = new byte[4096];
|
||||||
|
int len;
|
||||||
|
while ((len = is.read(buffer)) != -1) {
|
||||||
|
zos.write(buffer, 0, len);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
zos.closeEntry();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,97 @@
|
|||||||
|
package org.dromara.system.api.utils;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/4/23 10:42
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class Dxf2JsonUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* dxf转json
|
||||||
|
*
|
||||||
|
* @param exePath dxf2json.exe路径
|
||||||
|
* @param inputDXFPath 输入dxf文件路径
|
||||||
|
* @param outputJSONPath 输出json文件路径
|
||||||
|
* @param sourceEPSG 源坐标系
|
||||||
|
* @param targetEPSG 目标坐标系
|
||||||
|
*/
|
||||||
|
public static void dxf2json(String exePath, String inputDXFPath, String outputJSONPath, String sourceEPSG, String targetEPSG) {
|
||||||
|
// 判断对应文件是否存在
|
||||||
|
File exeFile = new File(exePath);
|
||||||
|
if (!exeFile.exists()) {
|
||||||
|
throw new ServiceException("转换程序不存在!");
|
||||||
|
}
|
||||||
|
File inputDXFFile = new File(inputDXFPath);
|
||||||
|
if (!inputDXFFile.exists()) {
|
||||||
|
throw new ServiceException("待转换 dxf 文件不存在!");
|
||||||
|
}
|
||||||
|
// 构造命令行参数
|
||||||
|
List<String> parameters = buildParameter(exePath, inputDXFPath, outputJSONPath, sourceEPSG, targetEPSG);
|
||||||
|
// 执行命令行
|
||||||
|
ProcessBuilder builder = new ProcessBuilder(parameters);
|
||||||
|
// 合并标准错误和输出
|
||||||
|
builder.redirectErrorStream(true);
|
||||||
|
try {
|
||||||
|
Process process = builder.start();
|
||||||
|
// 读取输出
|
||||||
|
BufferedReader reader = new BufferedReader(
|
||||||
|
new InputStreamReader(process.getInputStream(), "GBK")
|
||||||
|
);
|
||||||
|
String line;
|
||||||
|
log.info("dxf 转 json 程序开始执行,程序路径:{},输入 dxf 路径:{},输出 json 文件路径:{},源坐标系:{},模板坐标系:{}",
|
||||||
|
exePath, inputDXFPath, outputJSONPath, sourceEPSG, targetEPSG);
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
log.info("dxf 转 json 程序执行中:{}", line);
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(line);
|
||||||
|
Integer code = jsonObject.get("code", Integer.class);
|
||||||
|
if (code != 0 && code != 200) {
|
||||||
|
throw new ServiceException("dxf 转 json 程序执行出错!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int exitCode = process.waitFor();
|
||||||
|
log.info("dxf 转 json 程序执行完毕,程序退出码:{}", exitCode);
|
||||||
|
reader.close();
|
||||||
|
} catch (IOException | InterruptedException e) {
|
||||||
|
log.error("执行 dxf 转 json 命令行时出错", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构造命令行参数
|
||||||
|
*
|
||||||
|
* @param exePath dxf2json.exe路径
|
||||||
|
* @param inputDXFPath 输入dxf文件路径
|
||||||
|
* @param outputJSONPath 输出json文件路径
|
||||||
|
* @param sourceEPSG 源坐标系
|
||||||
|
* @param targetEPSG 目标坐标系
|
||||||
|
* @return 命令行参数
|
||||||
|
*/
|
||||||
|
public static List<String> buildParameter(String exePath,
|
||||||
|
String inputDXFPath,
|
||||||
|
String outputJSONPath,
|
||||||
|
String sourceEPSG,
|
||||||
|
String targetEPSG) {
|
||||||
|
// 构造命令行
|
||||||
|
return Arrays.asList(
|
||||||
|
exePath,
|
||||||
|
inputDXFPath,
|
||||||
|
outputJSONPath,
|
||||||
|
sourceEPSG,
|
||||||
|
targetEPSG
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.system.api.utils;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import java.net.http.HttpClient;
|
||||||
|
import java.time.Duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 铁憨憨
|
||||||
|
* @Date 2025/7/18 10:16
|
||||||
|
* @Version 1.0
|
||||||
|
*
|
||||||
|
* HttpClient 设计为可重用、线程安全的组件,其内部维护了连接池等资源,适合在多个接口调用中共享使用,所以交给Spring Bean 管理
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class HttpClientConfig {
|
||||||
|
@Bean
|
||||||
|
public HttpClient httpClient() {
|
||||||
|
return HttpClient.newBuilder()
|
||||||
|
.connectTimeout(Duration.ofSeconds(10))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package org.dromara.system.api.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.HexUtil;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.crypto.SecureUtil;
|
||||||
|
import cn.hutool.crypto.symmetric.AES;
|
||||||
|
import jakarta.annotation.PostConstruct;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/6/25 10:57
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class IdCardEncryptorUtil {
|
||||||
|
|
||||||
|
@Value("${id-card.encrypt-key}")
|
||||||
|
private String encryptKeyHex;
|
||||||
|
|
||||||
|
private AES aes;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
byte[] keyBytes = HexUtil.decodeHex(encryptKeyHex);
|
||||||
|
this.aes = SecureUtil.aes(keyBytes);
|
||||||
|
log.info("身份证 AES 加解密工具初始化成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加密
|
||||||
|
*
|
||||||
|
* @param idCard 身份证号码
|
||||||
|
* @return 加密后的身份证号码
|
||||||
|
*/
|
||||||
|
public String encrypt(String idCard) {
|
||||||
|
return aes.encryptBase64(idCard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解密
|
||||||
|
*
|
||||||
|
* @param encrypted 密文
|
||||||
|
* @return 解密后的身份证号码
|
||||||
|
*/
|
||||||
|
public String decrypt(String encrypted) {
|
||||||
|
if (encrypted == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return aes.decryptStr(encrypted);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,316 @@
|
|||||||
|
//package org.dromara.system.api.utils;
|
||||||
|
//
|
||||||
|
//import cn.hutool.json.JSONUtil;
|
||||||
|
//import org.dromara.common.constant.GeoJsonConstant;
|
||||||
|
//import org.dromara.common.core.constant.HttpStatus;
|
||||||
|
//import org.dromara.common.core.exception.ServiceException;
|
||||||
|
//import org.dromara.common.domain.GeoPoint;
|
||||||
|
//import org.dromara.facility.domain.dto.geojson.FacFeatureByPlane;
|
||||||
|
//import org.dromara.facility.domain.dto.geojson.FacFeatureByPoint;
|
||||||
|
//import org.dromara.facility.domain.dto.geojson.FacGeometry;
|
||||||
|
//import org.dromara.facility.domain.dto.geojson.FacGeometryByPoint;
|
||||||
|
//import org.locationtech.jts.geom.*;
|
||||||
|
//import org.locationtech.jts.index.strtree.STRtree;
|
||||||
|
//
|
||||||
|
//import java.util.HashMap;
|
||||||
|
//import java.util.List;
|
||||||
|
//import java.util.Map;
|
||||||
|
//import java.util.stream.Collectors;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @author lilemy
|
||||||
|
// * @date 2025/4/24 11:48
|
||||||
|
// */
|
||||||
|
//public class JSTUtil {
|
||||||
|
//
|
||||||
|
// private static final GeometryFactory geometryFactory = new GeometryFactory();
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 获取最近点的名称
|
||||||
|
// *
|
||||||
|
// * @param target 目标点
|
||||||
|
// * @param nameGeoJson 点对象列表
|
||||||
|
// * @return 最近点的名称
|
||||||
|
// */
|
||||||
|
// public static String findNearestText(List<Double> target, List<FacFeatureByPoint> nameGeoJson) {
|
||||||
|
// Point targetPoint = geometryFactory.createPoint(new Coordinate(target.get(0), target.get(1)));
|
||||||
|
// FacFeatureByPoint nearestFeature = null;
|
||||||
|
// double minDistance = Double.MAX_VALUE;
|
||||||
|
// for (FacFeatureByPoint feature : nameGeoJson) {
|
||||||
|
// FacGeometryByPoint geometry = feature.getGeometry();
|
||||||
|
// List<Double> coords = geometry.getCoordinates();
|
||||||
|
// if (coords != null && coords.size() == 2) {
|
||||||
|
// Point currentPoint = geometryFactory.createPoint(new Coordinate(coords.get(0), coords.get(1)));
|
||||||
|
// double distance = targetPoint.distance(currentPoint);
|
||||||
|
// if (distance < minDistance) {
|
||||||
|
// minDistance = distance;
|
||||||
|
// nearestFeature = feature;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (nearestFeature != null && nearestFeature.getProperties() != null) {
|
||||||
|
// return nearestFeature.getProperties().getText();
|
||||||
|
// }
|
||||||
|
// return null; // 如果没找到合适的点
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 点是否在平面内
|
||||||
|
// *
|
||||||
|
// * @param planeLists 平面坐标
|
||||||
|
// * @param pointList 点坐标
|
||||||
|
// * @return 点是否在平面内
|
||||||
|
// */
|
||||||
|
// public static Boolean pointIsWithInPlane(List<List<Double>> planeLists, List<Double> pointList) {
|
||||||
|
// // 构建平面
|
||||||
|
// Coordinate[] coordinates = getPlaneCoordinate(planeLists);
|
||||||
|
// Polygon polygon = geometryFactory.createPolygon(coordinates);
|
||||||
|
// // 构建待判断点
|
||||||
|
// Point point = geometryFactory.createPoint(new Coordinate(pointList.get(0), pointList.get(1)));
|
||||||
|
// // 判断是否在多边形内
|
||||||
|
// return polygon.contains(point);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 获取平面内点列表集合
|
||||||
|
// *
|
||||||
|
// * @param planeLists 平面坐标列表
|
||||||
|
// * @param pointLists 点坐标列表集合
|
||||||
|
// * @return 平面内点坐标列表集合
|
||||||
|
// */
|
||||||
|
// public static List<List<Double>> getPointInPlaneList(List<List<Double>> planeLists, List<List<Double>> pointLists) {
|
||||||
|
// // 构建平面
|
||||||
|
// Coordinate[] coordinates = getPlaneCoordinate(planeLists);
|
||||||
|
// LinearRing shell = geometryFactory.createLinearRing(coordinates);
|
||||||
|
// Polygon polygon = geometryFactory.createPolygon(shell);
|
||||||
|
// // 获取平面内点结合
|
||||||
|
// return pointLists.stream().filter(pointList -> {
|
||||||
|
// // 构建待判断点
|
||||||
|
// Point point = geometryFactory.createPoint(new Coordinate(pointList.get(0), pointList.get(1)));
|
||||||
|
// // 判断是否在多边形内
|
||||||
|
// return polygon.contains(point);
|
||||||
|
// }).toList();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 平面是否在平面内
|
||||||
|
// *
|
||||||
|
// * @param referencePlane 参考平面
|
||||||
|
// * @param comparePlane 比较平面
|
||||||
|
// * @return 平面是否在平面内
|
||||||
|
// */
|
||||||
|
// public static Boolean planeIsWithInPlane(List<List<Double>> referencePlane, List<List<Double>> comparePlane) {
|
||||||
|
// // 构建参考平面
|
||||||
|
// Coordinate[] referenceCoordinates = getPlaneCoordinate(referencePlane);
|
||||||
|
// Polygon referencePolygon = geometryFactory.createPolygon(referenceCoordinates);
|
||||||
|
// // 构建比较平面
|
||||||
|
// Coordinate[] compareCoordinates = getPlaneCoordinate(comparePlane);
|
||||||
|
// Polygon comparePolygon = geometryFactory.createPolygon(compareCoordinates);
|
||||||
|
// // 判断是否在多边形内
|
||||||
|
// return referencePolygon.contains(comparePolygon);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 判断两个平面是否相交
|
||||||
|
// *
|
||||||
|
// * @param referencePlane 参考平面
|
||||||
|
// * @param comparePlane 待比较平面
|
||||||
|
// * @return 平面是否相交
|
||||||
|
// */
|
||||||
|
// public static Boolean arePolygonsIntersecting(List<List<Double>> referencePlane, List<List<Double>> comparePlane) {
|
||||||
|
// // 构建 Polygon A(参考面)
|
||||||
|
// Coordinate[] coordsA = referencePlane.stream()
|
||||||
|
// .map(p -> new Coordinate(p.getFirst(), p.get(1)))
|
||||||
|
// .toArray(Coordinate[]::new);
|
||||||
|
// Polygon polygonA = geometryFactory.createPolygon(coordsA);
|
||||||
|
// // 构建 Polygon B(比较面)
|
||||||
|
// Coordinate[] coordsB = comparePlane.stream()
|
||||||
|
// .map(p -> new Coordinate(p.getFirst(), p.get(1)))
|
||||||
|
// .toArray(Coordinate[]::new);
|
||||||
|
// Polygon polygonB = geometryFactory.createPolygon(coordsB);
|
||||||
|
// // 使用 JTS 判断是否相交
|
||||||
|
// return polygonA.intersects(polygonB);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 获取平面坐标数组
|
||||||
|
// *
|
||||||
|
// * @param planeLists 平面坐标列表
|
||||||
|
// * @return 平面坐标数组
|
||||||
|
// */
|
||||||
|
// public static Coordinate[] getPlaneCoordinate(List<List<Double>> planeLists) {
|
||||||
|
// return planeLists.stream().map(planeList ->
|
||||||
|
// new Coordinate(planeList.getFirst(), planeList.get(1)))
|
||||||
|
// .toList().toArray(new Coordinate[0]);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 获取二维坐标
|
||||||
|
// *
|
||||||
|
// * @param geometry 几何对象
|
||||||
|
// * @return 二维坐标
|
||||||
|
// */
|
||||||
|
// public static List<List<Double>> getTwoDimensionalCoordinates(FacGeometry geometry) {
|
||||||
|
// String type = geometry.getType();
|
||||||
|
// List<Object> coordinates = geometry.getCoordinates();
|
||||||
|
// return switch (type) {
|
||||||
|
// case GeoJsonConstant.POINT -> throw new ServiceException("点位无法创建方阵", HttpStatus.BAD_REQUEST);
|
||||||
|
// case GeoJsonConstant.LINE -> coordinates.stream()
|
||||||
|
// .filter(obj -> obj instanceof List<?>)
|
||||||
|
// .map(obj -> ((List<?>) obj).stream()
|
||||||
|
// .filter(num -> num instanceof Number)
|
||||||
|
// .map(num -> ((Number) num).doubleValue())
|
||||||
|
// .collect(Collectors.toList()))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// case GeoJsonConstant.POLYGON -> coordinates.stream()
|
||||||
|
// .filter(obj -> obj instanceof List<?>)
|
||||||
|
// .flatMap(obj -> ((List<?>) obj).stream())
|
||||||
|
// .filter(pointObj -> pointObj instanceof List<?>)
|
||||||
|
// .map(pointObj -> ((List<?>) pointObj).stream()
|
||||||
|
// .filter(num -> num instanceof Number)
|
||||||
|
// .map(num -> ((Number) num).doubleValue())
|
||||||
|
// .collect(Collectors.toList()))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// default -> throw new ServiceException("暂不支持该类型", HttpStatus.BAD_REQUEST);
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 匹配最近的点,获取该点的名称
|
||||||
|
// *
|
||||||
|
// * @param polygon 平面
|
||||||
|
// * @param points 点列表集合
|
||||||
|
// * @return 最近点的名称
|
||||||
|
// */
|
||||||
|
// public static String findNearestPointText(List<List<Double>> polygon, List<FacFeatureByPoint> points) {
|
||||||
|
// if (polygon == null || polygon.size() < 3 || points == null || points.isEmpty()) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// // 1. 构建 Polygon
|
||||||
|
// Coordinate[] polygonCoords = polygon.stream()
|
||||||
|
// .map(coord -> new Coordinate(coord.getFirst(), coord.get(1)))
|
||||||
|
// .toArray(Coordinate[]::new);
|
||||||
|
// Polygon jtsPolygon = geometryFactory.createPolygon(polygonCoords);
|
||||||
|
// // 2. 构建空间索引(JTS STRtree)
|
||||||
|
// STRtree spatialIndex = new STRtree();
|
||||||
|
// Map<Coordinate, FacFeatureByPoint> coordToFeatureMap = new HashMap<>();
|
||||||
|
// for (FacFeatureByPoint feature : points) {
|
||||||
|
// List<Double> coords = feature.getGeometry().getCoordinates();
|
||||||
|
// if (coords == null || coords.size() != 2) continue;
|
||||||
|
// Coordinate coord = new Coordinate(coords.get(0), coords.get(1));
|
||||||
|
// Point point = geometryFactory.createPoint(coord);
|
||||||
|
// // 用点的 Envelope 加入索引
|
||||||
|
// spatialIndex.insert(point.getEnvelopeInternal(), point);
|
||||||
|
// coordToFeatureMap.put(coord, feature);
|
||||||
|
// }
|
||||||
|
// // 3. 查询距离 polygon 最近的点
|
||||||
|
// // 用 polygon 中心点附近构造 Envelope(扩大一些范围)
|
||||||
|
// Envelope searchEnv = jtsPolygon.getEnvelopeInternal();
|
||||||
|
// searchEnv.expandBy(10); // 扩大搜索半径
|
||||||
|
// @SuppressWarnings("unchecked")
|
||||||
|
// List<Point> candidatePoints = spatialIndex.query(searchEnv);
|
||||||
|
// double minDistance = Double.MAX_VALUE;
|
||||||
|
// Coordinate nearestCoord = null;
|
||||||
|
// for (Point point : candidatePoints) {
|
||||||
|
// double distance = point.distance(jtsPolygon);
|
||||||
|
// if (distance < minDistance) {
|
||||||
|
// minDistance = distance;
|
||||||
|
// nearestCoord = point.getCoordinate();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (nearestCoord != null) {
|
||||||
|
// FacFeatureByPoint nearestFeature = coordToFeatureMap.get(nearestCoord);
|
||||||
|
// if (nearestFeature != null && nearestFeature.getProperties() != null) {
|
||||||
|
// return nearestFeature.getProperties().getText();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 匹配最近的面,获取该面的信息
|
||||||
|
// *
|
||||||
|
// * @param pointFeature 点位
|
||||||
|
// * @param polygons 平面列表
|
||||||
|
// * @return 最近面的信息
|
||||||
|
// */
|
||||||
|
// public static FacFeatureByPlane findNearestOrContainingPolygon(
|
||||||
|
// FacFeatureByPoint pointFeature,
|
||||||
|
// List<FacFeatureByPlane> polygons
|
||||||
|
// ) {
|
||||||
|
// if (pointFeature == null || polygons == null || polygons.isEmpty()) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// List<Double> coords = pointFeature.getGeometry().getCoordinates();
|
||||||
|
// if (coords == null || coords.size() != 2) return null;
|
||||||
|
// Coordinate pointCoord = new Coordinate(coords.get(0), coords.get(1));
|
||||||
|
// Point point = geometryFactory.createPoint(pointCoord);
|
||||||
|
// FacFeatureByPlane nearestPolygon = null;
|
||||||
|
// double minDistance = Double.MAX_VALUE;
|
||||||
|
// for (FacFeatureByPlane polygonFeature : polygons) {
|
||||||
|
// if (polygonFeature == null || polygonFeature.getGeometry() == null) {
|
||||||
|
// continue; // 跳过空对象
|
||||||
|
// }
|
||||||
|
// List<List<Double>> polyCoords = polygonFeature.getGeometry().getCoordinates().getFirst();
|
||||||
|
// Coordinate[] polygonCoords = polyCoords.stream()
|
||||||
|
// .map(c -> new Coordinate(c.getFirst(), c.get(1)))
|
||||||
|
// .toArray(Coordinate[]::new);
|
||||||
|
// Polygon polygon = geometryFactory.createPolygon(polygonCoords);
|
||||||
|
// // 优先使用包含点的 polygon
|
||||||
|
// if (polygon.contains(point)) {
|
||||||
|
// return polygonFeature;
|
||||||
|
// }
|
||||||
|
// double distance = polygon.distance(point);
|
||||||
|
// if (distance < minDistance) {
|
||||||
|
// minDistance = distance;
|
||||||
|
// nearestPolygon = polygonFeature;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return nearestPolygon;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 判断一个点是否在多个区域中,返回第一个匹配区域的点集合(否则 null)
|
||||||
|
// *
|
||||||
|
// * @param lat 纬度
|
||||||
|
// * @param lng 经度
|
||||||
|
// * @param rangeListJson 多边形列表,每个为 JSON 数组(多边形的点数组)
|
||||||
|
// * @return 匹配区域的 List<Point>,否则 null
|
||||||
|
// */
|
||||||
|
// public static List<GeoPoint> findMatchingRange(String lat, String lng, List<String> rangeListJson) {
|
||||||
|
// double latitude = Double.parseDouble(lat);
|
||||||
|
// double longitude = Double.parseDouble(lng);
|
||||||
|
// Point point = geometryFactory.createPoint(new Coordinate(longitude, latitude));
|
||||||
|
// for (String rangeJson : rangeListJson) {
|
||||||
|
// List<GeoPoint> polygonPoints = JSONUtil.toList(rangeJson, GeoPoint.class);
|
||||||
|
// if (polygonPoints.size() < 3) continue; // 不是有效多边形
|
||||||
|
//
|
||||||
|
// Polygon polygon = buildPolygon(polygonPoints);
|
||||||
|
// if (polygon.contains(point)) {
|
||||||
|
// return polygonPoints; // 找到匹配范围
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 将点集合转换为 JTS 多边形
|
||||||
|
// */
|
||||||
|
// private static Polygon buildPolygon(List<GeoPoint> points) {
|
||||||
|
// Coordinate[] coordinates = points.stream()
|
||||||
|
// .map(p -> new Coordinate(p.getLng(), p.getLat()))
|
||||||
|
// .toArray(Coordinate[]::new);
|
||||||
|
//
|
||||||
|
// // 需要闭合坐标环(首尾相连)
|
||||||
|
// if (!coordinates[0].equals2D(coordinates[coordinates.length - 1])) {
|
||||||
|
// Coordinate[] closed = new Coordinate[coordinates.length + 1];
|
||||||
|
// System.arraycopy(coordinates, 0, closed, 0, coordinates.length);
|
||||||
|
// closed[closed.length - 1] = coordinates[0];
|
||||||
|
// coordinates = closed;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// LinearRing shell = geometryFactory.createLinearRing(coordinates);
|
||||||
|
// return geometryFactory.createPolygon(shell);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package org.dromara.system.api.utils;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lilemy
|
||||||
|
* @date 2025/5/30 14:55
|
||||||
|
*/
|
||||||
|
public class JsonDimensionUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断 JSONArray 的嵌套维度
|
||||||
|
*
|
||||||
|
* @param array 需要判断的 JSONArray
|
||||||
|
* @return 返回维度层级:1 表示一维,2 表示二维,3 表示三维 ...
|
||||||
|
*/
|
||||||
|
public static int getJsonArrayDepth(Object array) {
|
||||||
|
if (array instanceof JSONArray jsonArray && !jsonArray.isEmpty()) {
|
||||||
|
return 1 + getJsonArrayDepth(jsonArray.getFirst());
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
//package org.dromara.system.api.utils;
|
||||||
|
//
|
||||||
|
//import cn.hutool.core.collection.CollUtil;
|
||||||
|
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
//
|
||||||
|
//import java.util.Collections;
|
||||||
|
//import java.util.List;
|
||||||
|
//import java.util.function.Function;
|
||||||
|
//
|
||||||
|
///**
|
||||||
|
// * @author lilemy
|
||||||
|
// * @date 2025/5/28 11:25
|
||||||
|
// */
|
||||||
|
//public class PageConvertUtil {
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 将 Page<T> 转换为 Page<V>
|
||||||
|
// *
|
||||||
|
// * @param source 原始分页数据
|
||||||
|
// * @param mapper 实体 -> VO 的转换函数
|
||||||
|
// * @return Page<V>
|
||||||
|
// */
|
||||||
|
// public static <T, V> Page<V> convert(Page<T> source, Function<T, V> mapper) {
|
||||||
|
// Page<V> target = new Page<>(source.getCurrent(), source.getSize(), source.getTotal());
|
||||||
|
// if (CollUtil.isEmpty(source.getRecords())) {
|
||||||
|
// target.setRecords(Collections.emptyList());
|
||||||
|
// } else {
|
||||||
|
// List<V> voList = source.getRecords().stream().map(mapper).toList();
|
||||||
|
// target.setRecords(voList);
|
||||||
|
// }
|
||||||
|
// return target;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
#FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
||||||
#FROM findepi/graalvm:java17-native
|
#FROM findepi/graalvm:java17-native
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
LABEL maintainer="Lion Li"
|
||||||
@ -11,7 +11,7 @@ RUN mkdir -p /ruoyi/auth/logs \
|
|||||||
|
|
||||||
WORKDIR /ruoyi/auth
|
WORKDIR /ruoyi/auth
|
||||||
|
|
||||||
ENV SERVER_PORT=9210 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
ENV SERVER_PORT=19210 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||||
|
|
||||||
EXPOSE ${SERVER_PORT}
|
EXPOSE ${SERVER_PORT}
|
||||||
|
|
||||||
|
|||||||
@ -93,10 +93,10 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 自定义负载均衡(多团队开发使用) -->
|
<!-- 自定义负载均衡(多团队开发使用) -->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.dromara</groupId>-->
|
<groupId>org.dromara</groupId>
|
||||||
<!-- <artifactId>ruoyi-common-loadbalancer</artifactId>-->
|
<artifactId>ruoyi-common-loadbalancer</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!-- ELK 日志收集 -->
|
<!-- ELK 日志收集 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|||||||
@ -58,18 +58,19 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-core</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.8.38</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.hutool</groupId>
|
<!-- <groupId>cn.hutool</groupId>-->
|
||||||
<artifactId>hutool-http</artifactId>
|
<!-- <artifactId>hutool-http</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.hutool</groupId>
|
<!-- <groupId>cn.hutool</groupId>-->
|
||||||
<artifactId>hutool-extra</artifactId>
|
<!-- <artifactId>hutool-extra</artifactId>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
|
|||||||
@ -30,4 +30,5 @@ mybatis-plus:
|
|||||||
logicNotDeleteValue: 0
|
logicNotDeleteValue: 0
|
||||||
insertStrategy: NOT_NULL
|
insertStrategy: NOT_NULL
|
||||||
updateStrategy: NOT_NULL
|
updateStrategy: NOT_NULL
|
||||||
|
# updateStrategy: ALWAYS
|
||||||
whereStrategy: NOT_NULL
|
whereStrategy: NOT_NULL
|
||||||
|
|||||||
@ -89,10 +89,10 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 自定义负载均衡(多团队开发使用) -->
|
<!-- 自定义负载均衡(多团队开发使用) -->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.dromara</groupId>-->
|
<groupId>org.dromara</groupId>
|
||||||
<!-- <artifactId>ruoyi-common-loadbalancer</artifactId>-->
|
<artifactId>ruoyi-common-loadbalancer</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!-- ELK 日志收集 -->
|
<!-- ELK 日志收集 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|||||||
@ -15,6 +15,7 @@
|
|||||||
<module>ruoyi-resource</module>
|
<module>ruoyi-resource</module>
|
||||||
<module>ruoyi-workflow</module>
|
<module>ruoyi-workflow</module>
|
||||||
<module>ruoyi-synjinlangyun</module>
|
<module>ruoyi-synjinlangyun</module>
|
||||||
|
<module>xny-ops</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>ruoyi-modules</artifactId>
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
@ -26,10 +27,10 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- 自定义负载均衡(多团队开发使用) -->
|
<!-- 自定义负载均衡(多团队开发使用) -->
|
||||||
<!-- <dependency>-->
|
<dependency>
|
||||||
<!-- <groupId>org.dromara</groupId>-->
|
<groupId>org.dromara</groupId>
|
||||||
<!-- <artifactId>ruoyi-common-loadbalancer</artifactId>-->
|
<artifactId>ruoyi-common-loadbalancer</artifactId>
|
||||||
<!-- </dependency>-->
|
</dependency>
|
||||||
|
|
||||||
<!-- ELK 日志收集 -->
|
<!-- ELK 日志收集 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
|||||||
@ -195,7 +195,7 @@ public class GenController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
private void genCode(HttpServletResponse response, byte[] data) throws IOException {
|
private void genCode(HttpServletResponse response, byte[] data) throws IOException {
|
||||||
response.reset();
|
response.reset();
|
||||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
// response.addHeader("Access-Control-Allow-Origin", "*");
|
||||||
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||||
response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
|
response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
|
||||||
response.addHeader("Content-Length", "" + data.length);
|
response.addHeader("Content-Length", "" + data.length);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
#FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
||||||
#FROM findepi/graalvm:java17-native
|
#FROM findepi/graalvm:java17-native
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
LABEL maintainer="Lion Li"
|
||||||
|
|||||||
@ -18,6 +18,7 @@ import org.dromara.resource.service.ISysOssService;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,4 +87,22 @@ public class RemoteFileServiceImpl implements RemoteFileService {
|
|||||||
List<SysOssVo> sysOssVos = sysOssService.listByIds(StringUtils.splitTo(ossIds, Convert::toLong));
|
List<SysOssVo> sysOssVos = sysOssService.listByIds(StringUtils.splitTo(ossIds, Convert::toLong));
|
||||||
return MapstructUtils.convert(sysOssVos, RemoteFile.class);
|
return MapstructUtils.convert(sysOssVos, RemoteFile.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteFile(Collection<String> urls){
|
||||||
|
OssClient storage = OssFactory.instance();
|
||||||
|
for (String url : urls) {
|
||||||
|
storage.delete(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ossId列表删除
|
||||||
|
* @param ossIds
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteFileByIds(Collection<Long> ossIds) {
|
||||||
|
sysOssService.deleteWithValidByIds(ossIds,false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
#FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
||||||
#FROM findepi/graalvm:java17-native
|
#FROM findepi/graalvm:java17-native
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
LABEL maintainer="Lion Li"
|
||||||
@ -11,7 +11,7 @@ RUN mkdir -p /ruoyi/synjinlangyun/logs \
|
|||||||
|
|
||||||
WORKDIR /ruoyi/synjinlangyun
|
WORKDIR /ruoyi/synjinlangyun
|
||||||
|
|
||||||
ENV SERVER_PORT=9201 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
ENV SERVER_PORT=9202 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||||
|
|
||||||
EXPOSE ${SERVER_PORT}
|
EXPOSE ${SERVER_PORT}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
#FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
||||||
#FROM findepi/graalvm:java17-native
|
#FROM findepi/graalvm:java17-native
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
LABEL maintainer="Lion Li"
|
||||||
|
|||||||
@ -1,11 +1,23 @@
|
|||||||
package org.dromara.system.dubbo;
|
package org.dromara.system.dubbo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.dubbo.config.annotation.DubboService;
|
import org.apache.dubbo.config.annotation.DubboService;
|
||||||
|
import org.dromara.common.core.constant.HttpStatus;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.system.api.RemoteProjectService;
|
import org.dromara.system.api.RemoteProjectService;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteProjectVo;
|
||||||
|
import org.dromara.system.domain.BusProject;
|
||||||
|
import org.dromara.system.domain.BusUserProjectRelevancy;
|
||||||
import org.dromara.system.service.IBusProjectService;
|
import org.dromara.system.service.IBusProjectService;
|
||||||
|
import org.dromara.system.service.IBusUserProjectRelevancyService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lilemy
|
* @author lilemy
|
||||||
* @date 2025-09-11 18:33
|
* @date 2025-09-11 18:33
|
||||||
@ -27,4 +39,22 @@ public class RemoteProjectServiceImpl implements RemoteProjectService {
|
|||||||
public String selectProjectNameById(Long projectId) {
|
public String selectProjectNameById(Long projectId) {
|
||||||
return projectService.getProjectNameById(projectId);
|
return projectService.getProjectNameById(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void validAuth(Long projectId, Long userId) {
|
||||||
|
projectService.validAuth(projectId, userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteProjectVo getById(Long projectId) {
|
||||||
|
BusProject byId = projectService.getById(projectId);
|
||||||
|
RemoteProjectVo remoteProjectVo = new RemoteProjectVo();
|
||||||
|
BeanUtils.copyProperties(byId, remoteProjectVo);
|
||||||
|
return remoteProjectVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void validAuth(List<Long> projectIdList, Long userId) {
|
||||||
|
projectService.validAuth(projectIdList, userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -488,4 +488,15 @@ public class RemoteUserServiceImpl implements RemoteUserService {
|
|||||||
.collect(Collectors.toMap(SysPost::getPostId, SysPost::getPostName));
|
.collect(Collectors.toMap(SysPost::getPostId, SysPost::getPostName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RemoteUserVo selectUserByPhonenumber(String phone) {
|
||||||
|
SysUserVo sysUserVo = userMapper.selectVoOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getPhonenumber, phone));
|
||||||
|
return BeanUtil.copyProperties(sysUserVo, RemoteUserVo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getPostNameByUserId(Long userId) {
|
||||||
|
return postService.selectPostNameByUserId(userId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package org.dromara.system.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.dromara.common.mybatis.annotation.DataColumn;
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
||||||
import org.dromara.common.mybatis.annotation.DataPermission;
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
@ -33,4 +34,10 @@ public interface SysPostMapper extends BaseMapperPlus<SysPost, SysPostVo> {
|
|||||||
*/
|
*/
|
||||||
List<SysPostVo> selectPostsByUserId(Long userId);
|
List<SysPostVo> selectPostsByUserId(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取岗位名称
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String selectPostNameByUserId(@Param("userId") Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,4 +127,11 @@ public interface ISysPostService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int updatePost(SysPostBo bo);
|
int updatePost(SysPostBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取岗位名
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String selectPostNameByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -249,4 +249,14 @@ public class SysPostServiceImpl implements ISysPostService {
|
|||||||
SysPost post = MapstructUtils.convert(bo, SysPost.class);
|
SysPost post = MapstructUtils.convert(bo, SysPost.class);
|
||||||
return baseMapper.updateById(post);
|
return baseMapper.updateById(post);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户id获取岗位名
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String selectPostNameByUserId(Long userId) {
|
||||||
|
return baseMapper.selectPostNameByUserId(userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,5 +14,12 @@
|
|||||||
left join sys_user u on u.user_id = up.user_id
|
left join sys_user u on u.user_id = up.user_id
|
||||||
where u.user_id = #{userId}
|
where u.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectPostNameByUserId" resultType="java.lang.String">
|
||||||
|
select p.post_name
|
||||||
|
from sys_post p
|
||||||
|
left join sys_user_post up on up.post_id = p.post_id
|
||||||
|
left join sys_user u on u.user_id = up.user_id
|
||||||
|
where u.user_id = #{userId}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||||
FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
#FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
||||||
#FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
||||||
#FROM findepi/graalvm:java17-native
|
#FROM findepi/graalvm:java17-native
|
||||||
|
|
||||||
LABEL maintainer="Lion Li"
|
LABEL maintainer="Lion Li"
|
||||||
@ -11,7 +11,7 @@ RUN mkdir -p /ruoyi/workflow/logs \
|
|||||||
|
|
||||||
WORKDIR /ruoyi/workflow
|
WORKDIR /ruoyi/workflow
|
||||||
|
|
||||||
ENV SERVER_PORT=9205 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
ENV SERVER_PORT=19205 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||||
|
|
||||||
EXPOSE ${SERVER_PORT}
|
EXPOSE ${SERVER_PORT}
|
||||||
|
|
||||||
|
|||||||
27
ruoyi-modules/xny-ops/Dockerfile
Normal file
27
ruoyi-modules/xny-ops/Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
|
||||||
|
#FROM bellsoft/liberica-openjdk-rocky:17.0.15-cds
|
||||||
|
FROM bellsoft/liberica-openjdk-rocky:21.0.7-cds
|
||||||
|
#FROM findepi/graalvm:java17-native
|
||||||
|
|
||||||
|
LABEL maintainer="Lion Li"
|
||||||
|
|
||||||
|
RUN mkdir -p /xny/ops/logs \
|
||||||
|
/xny/ops/temp \
|
||||||
|
/ruoyi/skywalking/agent
|
||||||
|
|
||||||
|
WORKDIR /xny/ops
|
||||||
|
|
||||||
|
ENV SERVER_PORT=9203 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS=""
|
||||||
|
|
||||||
|
EXPOSE ${SERVER_PORT}
|
||||||
|
|
||||||
|
ADD ./target/xny-ops.jar ./app.jar
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dserver.port=${SERVER_PORT} \
|
||||||
|
#-Dskywalking.agent.service_name=xny-ops \
|
||||||
|
#-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar \
|
||||||
|
-XX:+HeapDumpOnOutOfMemoryError -XX:+UseZGC ${JAVA_OPTS} \
|
||||||
|
-jar app.jar
|
||||||
|
|
||||||
122
ruoyi-modules/xny-ops/pom.xml
Normal file
122
ruoyi-modules/xny-ops/pom.xml
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-modules</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>xny-ops</artifactId>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
xny-ops模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-nacos</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-sentinel</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- RuoYi Common Log -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-service-impl</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-doc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-dubbo</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-seata</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-idempotent</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-tenant</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-translation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-sensitive</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.dromara</groupId>
|
||||||
|
<artifactId>ruoyi-common-encrypt</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>org.dromara</groupId>-->
|
||||||
|
<!-- <artifactId>ruoyi-workflow</artifactId>-->
|
||||||
|
<!-- <version>2.4.1</version>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>${spring-boot.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package org.dromara;
|
||||||
|
|
||||||
|
|
||||||
|
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维模块
|
||||||
|
*/
|
||||||
|
@EnableDubbo
|
||||||
|
@SpringBootApplication
|
||||||
|
public class OpsApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication application = new SpringApplication(OpsApplication.class);
|
||||||
|
application.setApplicationStartup(new BufferingApplicationStartup(2048));
|
||||||
|
application.run(args);
|
||||||
|
System.out.println("(♥◠‿◠)ノ゙ 运维模块启动成功 ლ(´ڡ`ლ)゙ ");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package org.dromara.daping.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.daping.domain.bo.GinlongBo;
|
||||||
|
import org.dromara.daping.service.IGinlongApiService;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ginlong/api")
|
||||||
|
public class GinlongApiController extends BaseController {
|
||||||
|
|
||||||
|
private final IGinlongApiService ginlongApiService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询手续办理清单模板列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("formalities:listOfFormalities:list")
|
||||||
|
@GetMapping("/getPowerStationOverview")
|
||||||
|
public R<HashMap<String,Object>> getPowerStationOverview() {
|
||||||
|
HashMap<String, Object> map = ginlongApiService.getPowerStationOverview();
|
||||||
|
return R.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询手续办理清单模板列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("formalities:listOfFormalities:list")
|
||||||
|
@GetMapping("/getInverterListOverview")
|
||||||
|
public R<HashMap<String,Object>> getInverterListOverview(GinlongBo bo) {
|
||||||
|
HashMap<String, Object> map = ginlongApiService.getInverterListOverview(bo);
|
||||||
|
return R.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 能源收益分析
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("formalities:listOfFormalities:list")
|
||||||
|
@GetMapping("/getStationMonthOverview")
|
||||||
|
public R<HashMap<String,Object>> getStationMonthOverview(GinlongBo bo) {
|
||||||
|
HashMap<String, Object> map = ginlongApiService.getStationMonthOverview(bo);
|
||||||
|
return R.ok(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 告警信息
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("formalities:listOfFormalities:list")
|
||||||
|
@GetMapping("/getAlarmListOverview")
|
||||||
|
public R<List<HashMap<String,Object>>> getAlarmListOverview() {
|
||||||
|
return R.ok(ginlongApiService.getAlarmListOverview());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package org.dromara.daping.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Component // 注册为Spring Bean
|
||||||
|
@ConfigurationProperties(prefix = "ginlong.api") // 绑定配置文件中前缀为"ginlong.api"的属性
|
||||||
|
public class GinlongApiEntity {
|
||||||
|
private String url;
|
||||||
|
private String key;
|
||||||
|
private String secret;
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
package org.dromara.daping.domain.bo;
|
||||||
|
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试单表业务对象 test_demo
|
||||||
|
*
|
||||||
|
* @author Lion Li
|
||||||
|
* @date 2021-07-26
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
//@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class GinlongBo implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年月日
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String date;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package org.dromara.daping.service;
|
||||||
|
|
||||||
|
import org.dromara.daping.domain.bo.GinlongBo;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IGinlongApiService {
|
||||||
|
|
||||||
|
String test();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电站数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
HashMap<String, Object> getPowerStationOverview();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询逆变器数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
HashMap<String, Object> getInverterListOverview(GinlongBo bo);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询能源收益分析
|
||||||
|
* @param bo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
HashMap<String, Object> getStationMonthOverview(GinlongBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部设备报警信息
|
||||||
|
*/
|
||||||
|
List<HashMap<String, Object>> getAlarmListOverview();
|
||||||
|
}
|
||||||
@ -0,0 +1,834 @@
|
|||||||
|
package org.dromara.daping.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONArray;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import lombok.val;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
|
import org.dromara.common.redis.utils.RedisUtils;
|
||||||
|
import org.dromara.daping.domain.GinlongApiEntity;
|
||||||
|
import org.dromara.daping.domain.bo.GinlongBo;
|
||||||
|
import org.dromara.daping.service.IGinlongApiService;
|
||||||
|
import org.dromara.daping.utils.GinlongApiClient;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.YearMonth;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class GinlongApiServiceImpl implements IGinlongApiService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private GinlongApiClient apiClient;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StringRedisTemplate stringRedisTemplate;
|
||||||
|
|
||||||
|
public GinlongApiEntity getGinlongApiEntity(){
|
||||||
|
|
||||||
|
|
||||||
|
GinlongApiEntity apiEntity = new GinlongApiEntity();
|
||||||
|
apiEntity.setUrl("https://api.ginlong.com:13333");
|
||||||
|
apiEntity.setKey("1300386381676987116");
|
||||||
|
apiEntity.setSecret("511045d99416484cb93acc2f16a5c149");
|
||||||
|
|
||||||
|
return apiEntity;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String test() {
|
||||||
|
// AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(GinlongApiTest.class);
|
||||||
|
|
||||||
|
// 验证GinlongApiEntity是否正确加载
|
||||||
|
GinlongApiEntity apiEntity = new GinlongApiEntity();
|
||||||
|
// GinlongApiEntity apiEntity = context.getBean(GinlongApiEntity.class);
|
||||||
|
// System.out.println("加载的配置信息:"+apiEntity.toString());
|
||||||
|
// System.out.println("url: " + apiEntity.getUrl());
|
||||||
|
// System.out.println("key: " + apiEntity.getKey());
|
||||||
|
// System.out.println("secret: " + apiEntity.getSecret()); // 重点检查是否为null
|
||||||
|
|
||||||
|
// apiEntity.setUrl("https://api.ginlong.com:13333");
|
||||||
|
// apiEntity.setKey("1300386381676987116");
|
||||||
|
// apiEntity.setSecret("511045d99416484cb93acc2f16a5c149");
|
||||||
|
|
||||||
|
if (apiEntity.getSecret() == null) {
|
||||||
|
System.err.println("错误:secret未加载,请检查配置文件!");
|
||||||
|
// context.close();
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用API(原有逻辑)
|
||||||
|
// GinlongApiClient apiClient = context.getBean(GinlongApiClient.class);
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("pageNo", 1);
|
||||||
|
params.put("pageSize", 100);
|
||||||
|
params.put("nmiCode",null);
|
||||||
|
params.put("idList",new ArrayList<>());
|
||||||
|
String s = apiClient.callApi("/v1/api/userStationList", params,apiEntity);
|
||||||
|
System.out.println("!!!! " +s);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
// context.close();
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账号下电站列表
|
||||||
|
* @param apiEntity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String userStationList(GinlongApiEntity apiEntity){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("pageNo", 1);
|
||||||
|
params.put("pageSize", 100);
|
||||||
|
params.put("nmiCode",null);
|
||||||
|
params.put("idList",new ArrayList<>());
|
||||||
|
return apiClient.callApi("/v1/api/userStationList", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取多个电站详情
|
||||||
|
*/
|
||||||
|
public String stationDetailList(GinlongApiEntity apiEntity, List<Long> idList){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("pageNo", 1);
|
||||||
|
params.put("pageSize", 100);
|
||||||
|
params.put("idList",idList);
|
||||||
|
return apiClient.callApi("/v1/api/stationDetailList", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有逆变器详情
|
||||||
|
*/
|
||||||
|
public String inverterList(GinlongApiEntity apiEntity){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("pageNo", 1);
|
||||||
|
params.put("pageSize", 100);
|
||||||
|
return apiClient.callApi("/v1/api/inverterList", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取账号下设备报警列表
|
||||||
|
*/
|
||||||
|
public String alarmList(GinlongApiEntity apiEntity){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("pageNo", 1);
|
||||||
|
params.put("pageSize", 100);
|
||||||
|
return apiClient.callApi("/v1/api/alarmList", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单台逆变器某月的日数据
|
||||||
|
*/
|
||||||
|
public String inverterMonth(GinlongApiEntity apiEntity, Long id, String date){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
params.put("money", "元");
|
||||||
|
params.put("month", date);
|
||||||
|
|
||||||
|
return apiClient.callApi("/v1/api/inverterMonth", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取单台逆变器某年的月数据
|
||||||
|
*/
|
||||||
|
public String inverterYear(GinlongApiEntity apiEntity, Long id, String date){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
params.put("money", "元");
|
||||||
|
params.put("year", date);
|
||||||
|
|
||||||
|
return apiClient.callApi("/v1/api/inverterYear", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单台逆变器某日的实时数据
|
||||||
|
*/
|
||||||
|
public String inverterDay(GinlongApiEntity apiEntity, Long id, String date){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
params.put("money", "元");
|
||||||
|
params.put("time", date);
|
||||||
|
params.put("timeZone", 8);
|
||||||
|
|
||||||
|
return apiClient.callApi("/v1/api/inverterDay", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单个电站某日的实时数据
|
||||||
|
*/
|
||||||
|
public String stationDay(GinlongApiEntity apiEntity, Long id, String date){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
params.put("money", "CNY");
|
||||||
|
params.put("time", date);
|
||||||
|
return apiClient.callApi("/v1/api/stationDay", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单个电站某月的日数据
|
||||||
|
*/
|
||||||
|
public String stationMonth(GinlongApiEntity apiEntity, Long id, String date){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
params.put("money", "CNY");
|
||||||
|
params.put("month", date);
|
||||||
|
return apiClient.callApi("/v1/api/stationMonth", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取单个电站某年的月数据
|
||||||
|
*/
|
||||||
|
public String stationYear(GinlongApiEntity apiEntity, Long id, String date){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
params.put("money", "CNY");
|
||||||
|
params.put("year", date);
|
||||||
|
return apiClient.callApi("/v1/api/stationYear", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// /**
|
||||||
|
// * 获取多个电站某日的实时数据
|
||||||
|
// */
|
||||||
|
// public String stationDayEnergyList(GinlongApiEntity apiEntity, List<Long> idList, String date){
|
||||||
|
// try {
|
||||||
|
// Map<String, Object> params = new HashMap<>();
|
||||||
|
// params.put("idList", idList);
|
||||||
|
// params.put("time", date);
|
||||||
|
// return apiClient.callApi("/v1/api/stationDayEnergyList", params,apiEntity);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// throw new ServiceException(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// /**
|
||||||
|
// * 获取多个电站的月数据
|
||||||
|
// */
|
||||||
|
// public String stationMonthEnergyList(GinlongApiEntity apiEntity, List<Long> idList, String date){
|
||||||
|
// try {
|
||||||
|
// Map<String, Object> params = new HashMap<>();
|
||||||
|
// params.put("idList", idList);
|
||||||
|
// params.put("time", date);
|
||||||
|
// return apiClient.callApi("/v1/api/stationMonthEnergyList", params,apiEntity);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// throw new ServiceException(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// /**
|
||||||
|
// * 获取多个电站的年数据
|
||||||
|
// */
|
||||||
|
// public String stationYearEnergyList(GinlongApiEntity apiEntity, List<Long> idList, String date){
|
||||||
|
// try {
|
||||||
|
// Map<String, Object> params = new HashMap<>();
|
||||||
|
// params.put("idList", idList);
|
||||||
|
// params.put("time", date);
|
||||||
|
// return apiClient.callApi("/v1/api/stationYearEnergyList", params,apiEntity);
|
||||||
|
// } catch (Exception e) {
|
||||||
|
// throw new ServiceException(e.getMessage());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单个电站详情
|
||||||
|
*/
|
||||||
|
public String stationDetail(GinlongApiEntity apiEntity, Long id){
|
||||||
|
try {
|
||||||
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
params.put("id", id);
|
||||||
|
return apiClient.callApi("/v1/api/stationDetail", params,apiEntity);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电站总览数据信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Object> getPowerStationOverview() {
|
||||||
|
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
GinlongApiEntity apiEntity = getGinlongApiEntity();
|
||||||
|
|
||||||
|
double dayEnergy = 0.0; //今日总发电量
|
||||||
|
|
||||||
|
List<Long> idList = new ArrayList<>();
|
||||||
|
//使用获取账号下电站列表接口获取数据
|
||||||
|
String s = userStationList(apiEntity);
|
||||||
|
String s2 = inverterList(apiEntity);
|
||||||
|
getInverterList(s2, map);
|
||||||
|
getUserStationList(s, idList, map);
|
||||||
|
|
||||||
|
//使用获取多个电站详情接口获取数据
|
||||||
|
String s1 = stationDetailList(apiEntity, idList);
|
||||||
|
// System.out.println(s1);
|
||||||
|
getStationDetailList(s1, dayEnergy, map);
|
||||||
|
|
||||||
|
|
||||||
|
System.out.println(map);
|
||||||
|
|
||||||
|
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getInverterList(String s2, HashMap<String, Object> map) {
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s2);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONObject inverterStatusVo = data.getJSONObject("inverterStatusVo");
|
||||||
|
// Object obj = RedisUtils.getCacheObject("health");
|
||||||
|
// RedisUtils.getCacheObject()
|
||||||
|
// String username = redisTemplate.get("username");
|
||||||
|
// Double healthOld = redisTemplate.opsForValue().get("health");
|
||||||
|
String healthOld = stringRedisTemplate.opsForValue().get("health");
|
||||||
|
map.put("healthOld", healthOld != null ? Double.parseDouble(healthOld) : 0.0);
|
||||||
|
// if (obj != null) {
|
||||||
|
// double healthOld = Double.parseDouble(String.valueOf(obj));
|
||||||
|
// // 使用 value
|
||||||
|
// map.put("healthOld",healthOld );
|
||||||
|
// }else {
|
||||||
|
// map.put("healthOld",0.0 );
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
if (inverterStatusVo.getInt("all") >0){
|
||||||
|
double health = (double) (inverterStatusVo.getInt("all") - inverterStatusVo.getInt("fault")) /inverterStatusVo.getInt("all") * 100;//健康度
|
||||||
|
map.put("health", health);//健康度
|
||||||
|
}else {
|
||||||
|
map.put("health", 0);//健康度
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void getInverterList1(String s2) {
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s2);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONObject inverterStatusVo = data.getJSONObject("inverterStatusVo");
|
||||||
|
if (inverterStatusVo.getInt("all") >0){
|
||||||
|
double health = (double) (inverterStatusVo.getInt("all") - inverterStatusVo.getInt("fault")) /inverterStatusVo.getInt("all") * 100;//健康度
|
||||||
|
RedisUtils.setCacheObject("health",health);
|
||||||
|
}else {
|
||||||
|
RedisUtils.setCacheObject("health",0);
|
||||||
|
}
|
||||||
|
RedisUtils.expire("health",86400);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取逆电器数据
|
||||||
|
* @param bo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Object> getInverterListOverview(GinlongBo bo) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
GinlongApiEntity apiEntity = getGinlongApiEntity();
|
||||||
|
String s = inverterList(apiEntity);
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONObject inverterStatusVo = data.getJSONObject("inverterStatusVo");
|
||||||
|
map.put("all",inverterStatusVo.getInt("all"));//全部
|
||||||
|
map.put("normal",inverterStatusVo.getInt("normal"));//正常
|
||||||
|
map.put("offline",inverterStatusVo.getInt("offline"));//离线
|
||||||
|
map.put("fault",inverterStatusVo.getInt("fault"));//异常
|
||||||
|
JSONObject page = data.getJSONObject("page");
|
||||||
|
JSONArray records = page.getJSONArray("records");
|
||||||
|
List<Long> ids = new ArrayList<>();
|
||||||
|
if (!records.isEmpty()) {
|
||||||
|
for (Object record : records) {
|
||||||
|
JSONObject object = JSONUtil.parseObj(record);
|
||||||
|
ids.add(object.getLong("id"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<HashMap<String, Object>> hashMaps = new ArrayList<>();
|
||||||
|
switch (bo.getType()) {
|
||||||
|
case 1:
|
||||||
|
String s1 = inverterDay(apiEntity, ids.getFirst(), bo.getDate());
|
||||||
|
JSONObject jsonObject1 = JSONUtil.parseObj(s1);
|
||||||
|
JSONArray data1 = jsonObject1.getJSONArray("data");
|
||||||
|
int a = 0;
|
||||||
|
for (int i = 0; i < 12; i++) {
|
||||||
|
double count = 0.0;
|
||||||
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
String time = i*2+2<10?"0"+i*2+2:(i*2+2)+"";
|
||||||
|
map1.put("time", i*2<10?"0"+i*2+":00":i*2+":00");
|
||||||
|
if (data1 != null && !data1.isEmpty()){
|
||||||
|
for (int x = a; x < data1.size(); x++) {
|
||||||
|
Object obj = data1.get(x); // 通过索引获取元素
|
||||||
|
JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
if (object.getStr("time").substring(0, 2).compareTo(time) >0){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
count += object.getDouble("pac");
|
||||||
|
a++;
|
||||||
|
}
|
||||||
|
map1.put("content", count);
|
||||||
|
hashMaps.add(map1);
|
||||||
|
continue;
|
||||||
|
}else {
|
||||||
|
map1.put("content", 0);
|
||||||
|
}
|
||||||
|
hashMaps.add(map1);
|
||||||
|
}
|
||||||
|
System.out.println(hashMaps);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
String s2 = inverterMonth(apiEntity, ids.getFirst(), bo.getDate());
|
||||||
|
JSONObject jsonObject2 = JSONUtil.parseObj(s2);
|
||||||
|
JSONArray data2 = jsonObject2.getJSONArray("data");
|
||||||
|
if (data2 != null && !data2.isEmpty()){
|
||||||
|
for (Object obj : data2) {
|
||||||
|
HashMap<String, Object> map2 = new HashMap<>();
|
||||||
|
JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
map2.put("time", object.getStr("dateStr"));
|
||||||
|
map2.put("content", object.get("energy"));
|
||||||
|
hashMaps.add(map2);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||||
|
YearMonth yearMonth = YearMonth.parse(bo.getDate(), formatter);
|
||||||
|
|
||||||
|
int year = yearMonth.getYear(); // 2025
|
||||||
|
int monthValue = yearMonth.getMonthValue();
|
||||||
|
int day = LocalDate.of(year, monthValue, 1).lengthOfMonth();
|
||||||
|
String month = monthValue<10?"0"+monthValue:monthValue+"";
|
||||||
|
for (int i = 1; i <= day; i++){
|
||||||
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
map1.put("time", i<10?month+"-0"+i:month+"-"+i);
|
||||||
|
map1.put("content", 0);
|
||||||
|
hashMaps.add(map1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
String s3 = inverterYear(apiEntity, ids.getFirst(), bo.getDate());
|
||||||
|
JSONObject jsonObject3 = JSONUtil.parseObj(s3);
|
||||||
|
JSONArray data3 = jsonObject3.getJSONArray("data");
|
||||||
|
System.out.println(data3);
|
||||||
|
if (data3 != null && !data3.isEmpty()) {
|
||||||
|
for (Object obj : data3) {
|
||||||
|
HashMap<String, Object> map3 = new HashMap<>();
|
||||||
|
JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
map3.put("time", object.getStr("dateStr"));
|
||||||
|
map3.put("content", object.get("energy"));
|
||||||
|
hashMaps.add(map3);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
for (int i = 1; i <= 12; i++){
|
||||||
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
map1.put("time", i<10?bo.getDate()+"-0"+i:bo.getDate()+"-"+i);
|
||||||
|
map1.put("content", 0);
|
||||||
|
hashMaps.add(map1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
map.put("data",hashMaps);
|
||||||
|
System.out.println(map);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 能源收益分析
|
||||||
|
* @param bo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public HashMap<String, Object> getStationMonthOverview(GinlongBo bo) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
GinlongApiEntity apiEntity = getGinlongApiEntity();
|
||||||
|
List<Long> idList = new ArrayList<>();
|
||||||
|
//使用获取账号下电站列表接口获取数据
|
||||||
|
String s = userStationList(apiEntity);
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONObject page = data.getJSONObject("page");
|
||||||
|
JSONArray records = page.getJSONArray("records");
|
||||||
|
if (!records.isEmpty()){
|
||||||
|
for (Object record : records) {
|
||||||
|
JSONObject object = JSONUtil.parseObj(record);
|
||||||
|
idList.add(object.getLong("id"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<HashMap<String, Object>> hashMaps = new ArrayList<>();
|
||||||
|
switch (bo.getType()){
|
||||||
|
case 1:
|
||||||
|
// String s1 = stationDay(apiEntity, idList.getFirst(), bo.getDate());
|
||||||
|
// System.out.println(s1);
|
||||||
|
// JSONObject jsonObject1 = JSONUtil.parseObj(s1);
|
||||||
|
// JSONArray data1 = jsonObject1.getJSONArray("data");
|
||||||
|
// int a = 0;
|
||||||
|
// for (int i = 0; i < 12; i++) {
|
||||||
|
// double count = 0.0;
|
||||||
|
// HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
// String time = i * 2 + 2 < 10 ? "0" + i * 2 + 2 : (i * 2 + 2) + "";
|
||||||
|
// map1.put("time", i * 2 < 10 ? "0" + i * 2 + ":00" : i * 2 + ":00");
|
||||||
|
// if (data1 != null && !data1.isEmpty()) {
|
||||||
|
// for (int x = a; x < data1.size(); x++) {
|
||||||
|
// Object obj = data1.get(x); // 通过索引获取元素
|
||||||
|
// JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
// if (object.getStr("timeStr").substring(0, 2).compareTo(time) > 0) {
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// count += object.getDouble("power");
|
||||||
|
// a++;
|
||||||
|
// }
|
||||||
|
// map1.put("content", count);
|
||||||
|
//
|
||||||
|
// hashMaps.add(map1);
|
||||||
|
// continue;
|
||||||
|
// } else {
|
||||||
|
// map1.put("content", 0);
|
||||||
|
// }
|
||||||
|
// hashMaps.add(map1);
|
||||||
|
// }
|
||||||
|
// int y = 0;
|
||||||
|
// for (Long id : idList) {
|
||||||
|
// String s1 = stationDay(apiEntity, id, bo.getDate());
|
||||||
|
// System.out.println(s1);
|
||||||
|
// JSONObject jsonObject1 = JSONUtil.parseObj(s1);
|
||||||
|
// JSONArray data1 = jsonObject1.getJSONArray("data");
|
||||||
|
// int a = 0;
|
||||||
|
// for (int i = 0; i < 12; i++) {
|
||||||
|
// double count = 0.0;
|
||||||
|
// HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
// String time = i*2+2<10?"0"+i*2+2:(i*2+2)+"";
|
||||||
|
// if (y == 0){
|
||||||
|
// map1.put("time", i*2<10?"0"+i*2+":00":i*2+":00");
|
||||||
|
// }
|
||||||
|
// if (data1 != null && !data1.isEmpty()){
|
||||||
|
// for (int x = a; x < data1.size(); x++) {
|
||||||
|
// Object obj = data1.get(x); // 通过索引获取元素
|
||||||
|
// JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
// if (object.getStr("timeStr").substring(0, 2).compareTo(time) >0){
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// count += object.getDouble("power");
|
||||||
|
// a++;
|
||||||
|
// }
|
||||||
|
// map1.put("content", y == 0 ? count: (hashMaps.get(y).get(time) == null) ? 0.0 : (Double) hashMaps.get(y).get(time) + count);
|
||||||
|
//
|
||||||
|
// hashMaps.add(map1);
|
||||||
|
// continue;
|
||||||
|
// }else {
|
||||||
|
// map1.put("content", y == 0 ? 0: (hashMaps.get(y).get(time) == null) ? 0.0 : (Double) hashMaps.get(y).get(time) + 0);
|
||||||
|
// }
|
||||||
|
// hashMaps.add(map1);
|
||||||
|
// }
|
||||||
|
// y++;
|
||||||
|
// }
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
String s2 = stationMonth(apiEntity, idList.getFirst(), bo.getDate());
|
||||||
|
JSONObject jsonObject2 = JSONUtil.parseObj(s2);
|
||||||
|
JSONArray data2 = jsonObject2.getJSONArray("data");
|
||||||
|
|
||||||
|
if (data2 != null && !data2.isEmpty()){
|
||||||
|
for (Object obj : data2) {
|
||||||
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
map1.put("time", object.getStr("dateStr"));
|
||||||
|
map1.put("content", object.get("money"));
|
||||||
|
hashMaps.add(map1);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM");
|
||||||
|
YearMonth yearMonth = YearMonth.parse(bo.getDate(), formatter);
|
||||||
|
|
||||||
|
int year = yearMonth.getYear(); // 2025
|
||||||
|
int monthValue = yearMonth.getMonthValue();
|
||||||
|
int day = LocalDate.of(year, monthValue, 1).lengthOfMonth();
|
||||||
|
String month = monthValue<10?"0"+monthValue:monthValue+"";
|
||||||
|
for (int i = 1; i <= day; i++){
|
||||||
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
map1.put("time", i<10?month+"-0"+i:month+"-"+i);
|
||||||
|
map1.put("content", 0);
|
||||||
|
hashMaps.add(map1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
String s3 = stationYear(apiEntity, idList.getFirst(), bo.getDate());
|
||||||
|
JSONObject jsonObject3 = JSONUtil.parseObj(s3);
|
||||||
|
JSONArray data3 = jsonObject3.getJSONArray("data");
|
||||||
|
System.out.println(data3);
|
||||||
|
if (data3 != null && !data3.isEmpty()) {
|
||||||
|
for (Object obj : data3) {
|
||||||
|
HashMap<String, Object> map3 = new HashMap<>();
|
||||||
|
JSONObject object = JSONUtil.parseObj(obj);
|
||||||
|
map3.put("time", object.getStr("dateStr").substring(0, 7));
|
||||||
|
map3.put("content", object.get("money"));
|
||||||
|
hashMaps.add(map3);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
for (int i = 1; i <= 12; i++){
|
||||||
|
HashMap<String, Object> map1 = new HashMap<>();
|
||||||
|
map1.put("time", i<10?bo.getDate()+"-0"+i:bo.getDate()+"-"+i);
|
||||||
|
map1.put("content", 0);
|
||||||
|
hashMaps.add(map1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
map.put("data",hashMaps);
|
||||||
|
|
||||||
|
String s2 = stationDetail(apiEntity, idList.getFirst());
|
||||||
|
JSONObject jsonObject2 = JSONUtil.parseObj(s2);
|
||||||
|
JSONObject data2 = jsonObject2.getJSONObject("data");
|
||||||
|
map.put("allInCome",data2.get("allInCome"));//累计收益
|
||||||
|
map.put("monthInCome",data2.get("monthInCome"));//本月收益
|
||||||
|
map.put("yearInCome",data2.get("yearInCome"));//本年收益
|
||||||
|
map.put("price",data2.get("price"));//每度电收益
|
||||||
|
|
||||||
|
System.out.println(map);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询全部设备报警信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HashMap<String, Object>> getAlarmListOverview() {
|
||||||
|
List<HashMap<String, Object>> list = new ArrayList<>();
|
||||||
|
GinlongApiEntity apiEntity = getGinlongApiEntity();
|
||||||
|
String s = alarmList(apiEntity);
|
||||||
|
System.out.println(s);
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONArray records = data.getJSONArray("records");
|
||||||
|
for (Object record : records) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
JSONObject obj = JSONUtil.parseObj(record);
|
||||||
|
map.put("stationName", obj.get("stationName"));//电站名称
|
||||||
|
map.put("alarmLevel", obj.get("alarmLevel")); // 报警等级:1 = 提示,2 = 一般,3 = 紧急
|
||||||
|
map.put("alarmBeginTime", obj.get("alarmBeginTime")); //报警开始时间
|
||||||
|
map.put("alarmMsg", obj.get("alarmMsg")); //报警内容
|
||||||
|
map.put("advice", obj.get("advice")); //报警处理建议
|
||||||
|
map.put("state", obj.get("state")); //报警状态:0 = 未处理,1 = 已处理,2 = 已恢复
|
||||||
|
if ("1".equals(obj.getStr("state")) || "2".equals(obj.getStr("state"))){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
// return list.stream().filter(map -> {
|
||||||
|
// Object statusObj = map.get("state");
|
||||||
|
// if (statusObj instanceof Integer) {
|
||||||
|
// int status = (Integer) statusObj;
|
||||||
|
// return status == 1 || status == 2;
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// }).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getStationDetailList(String s1, double dayEnergy, HashMap<String, Object> map) {
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s1);
|
||||||
|
String dayEnergyOld = stringRedisTemplate.opsForValue().get("dayEnergy");
|
||||||
|
map.put("dayEnergyOld", dayEnergyOld != null ? Double.parseDouble(dayEnergyOld) : 0.0);
|
||||||
|
String powerStationAvoidedCo2Old = stringRedisTemplate.opsForValue().get("powerStationAvoidedCo2");
|
||||||
|
map.put("powerStationAvoidedCo2Old", powerStationAvoidedCo2Old != null ? Double.parseDouble(powerStationAvoidedCo2Old) : 0.0);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONArray records = data.getJSONArray("records");
|
||||||
|
double powerStationAvoidedCo2 = 0.0;
|
||||||
|
for (Object record : records) {
|
||||||
|
JSONObject object = JSONUtil.parseObj(record);
|
||||||
|
dayEnergy += object.getDouble("dayEnergy");
|
||||||
|
powerStationAvoidedCo2 += object.getDouble("powerStationAvoidedCo2");
|
||||||
|
}
|
||||||
|
map.put("dayEnergy", dayEnergy);//今日总发电量
|
||||||
|
map.put("powerStationAvoidedCo2", powerStationAvoidedCo2);//碳排放量
|
||||||
|
}
|
||||||
|
private static void getStationDetailList1(String s1, double dayEnergy) {
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s1);
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONArray records = data.getJSONArray("records");
|
||||||
|
double powerStationAvoidedCo2 = 0.0;
|
||||||
|
for (Object record : records) {
|
||||||
|
JSONObject object = JSONUtil.parseObj(record);
|
||||||
|
dayEnergy += object.getDouble("dayEnergy");
|
||||||
|
powerStationAvoidedCo2 += object.getDouble("powerStationAvoidedCo2");
|
||||||
|
}
|
||||||
|
RedisUtils.setCacheObject("dayEnergy",dayEnergy);//今日总发电量
|
||||||
|
RedisUtils.setCacheObject("powerStationAvoidedCo2",powerStationAvoidedCo2);//碳排放量
|
||||||
|
|
||||||
|
RedisUtils.expire("dayEnergy",86400);
|
||||||
|
RedisUtils.expire("powerStationAvoidedCo2",86400);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getUserStationList(String s, List<Long> idList, HashMap<String, Object> map) {
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s);
|
||||||
|
double capacity = 0.0; // 总装机容量
|
||||||
|
int module = 0;//光伏板数量
|
||||||
|
double generateElectricity = 0.0;//发电效率
|
||||||
|
double batteryTodayDischargeEnergy = 0.0;//放电效率
|
||||||
|
double batteryTodayChargeEnergy = 0.0;//充电效率
|
||||||
|
String capacityOld = stringRedisTemplate.opsForValue().get("capacity");
|
||||||
|
map.put("capacityOld", capacityOld != null ? Double.parseDouble(capacityOld) : 0.0);
|
||||||
|
String moduleOld = stringRedisTemplate.opsForValue().get("module");
|
||||||
|
map.put("moduleOld", moduleOld != null ? Double.parseDouble(moduleOld) : 0.0);
|
||||||
|
String generateElectricityOld = stringRedisTemplate.opsForValue().get("generateElectricity");
|
||||||
|
map.put("generateElectricityOld", generateElectricityOld != null ? Double.parseDouble(generateElectricityOld) : 0.0);
|
||||||
|
String operatingRateOld = stringRedisTemplate.opsForValue().get("operatingRate");
|
||||||
|
map.put("operatingRateOld", operatingRateOld != null ? Double.parseDouble(operatingRateOld) : 0.0);
|
||||||
|
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONObject stationStatusVo = data.getJSONObject("stationStatusVo");
|
||||||
|
if (stationStatusVo.getInt("all") >0){
|
||||||
|
JSONObject page = data.getJSONObject("page");
|
||||||
|
JSONArray records = page.getJSONArray("records");
|
||||||
|
int all = stationStatusVo.getInt("all");//全部电站
|
||||||
|
if (!records.isEmpty()){
|
||||||
|
for (Object record : records) {
|
||||||
|
JSONObject object = JSONUtil.parseObj(record);
|
||||||
|
capacity += object.getDouble("capacity");
|
||||||
|
batteryTodayDischargeEnergy += object.getDouble("batteryTodayDischargeEnergy");
|
||||||
|
batteryTodayChargeEnergy += object.getDouble("batteryTodayChargeEnergy");
|
||||||
|
module += object.getInt("module");
|
||||||
|
idList.add(object.getLong("id"));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (batteryTodayDischargeEnergy >0){
|
||||||
|
generateElectricity = (1-(batteryTodayChargeEnergy/batteryTodayDischargeEnergy))*100;
|
||||||
|
}else {
|
||||||
|
generateElectricity = 0;
|
||||||
|
}
|
||||||
|
map.put("operatingRate", all);//电站总数
|
||||||
|
}else {
|
||||||
|
map.put("operatingRate", 0.0);//运行率
|
||||||
|
}
|
||||||
|
map.put("capacity", capacity);//总装机容量
|
||||||
|
map.put("module", module);//光伏板数量
|
||||||
|
map.put("generateElectricity", generateElectricity);//发电效率
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void getUserStationList1(String s, List<Long> idList) {
|
||||||
|
JSONObject jsonObject = JSONUtil.parseObj(s);
|
||||||
|
double capacity = 0.0; // 总装机容量
|
||||||
|
int module = 0;//光伏板数量
|
||||||
|
double generateElectricity = 0.0;//发电效率
|
||||||
|
double batteryTodayDischargeEnergy = 0.0;//放电效率
|
||||||
|
double batteryTodayChargeEnergy = 0.0;//充电效率
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
|
JSONObject stationStatusVo = data.getJSONObject("stationStatusVo");
|
||||||
|
if (stationStatusVo.getInt("all") >0){
|
||||||
|
JSONObject page = data.getJSONObject("page");
|
||||||
|
JSONArray records = page.getJSONArray("records");
|
||||||
|
int all = stationStatusVo.getInt("all");//全部电站
|
||||||
|
int normal = stationStatusVo.getInt("normal");//正常电站
|
||||||
|
|
||||||
|
if (!records.isEmpty()){
|
||||||
|
for (Object record : records) {
|
||||||
|
JSONObject object = JSONUtil.parseObj(record);
|
||||||
|
capacity += object.getDouble("capacity");
|
||||||
|
batteryTodayDischargeEnergy += object.getDouble("batteryTodayDischargeEnergy");
|
||||||
|
batteryTodayChargeEnergy += object.getDouble("batteryTodayChargeEnergy");
|
||||||
|
module += object.getInt("module");
|
||||||
|
idList.add(object.getLong("id"));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (batteryTodayDischargeEnergy >0){
|
||||||
|
generateElectricity = (1-(batteryTodayChargeEnergy/batteryTodayDischargeEnergy))*100;
|
||||||
|
}else {
|
||||||
|
generateElectricity = 0;
|
||||||
|
}
|
||||||
|
RedisUtils.setCacheObject("operatingRate",all);
|
||||||
|
}else {
|
||||||
|
RedisUtils.setCacheObject("operatingRate",0);
|
||||||
|
}
|
||||||
|
RedisUtils.setCacheObject("capacity",capacity);//总装机容量
|
||||||
|
RedisUtils.setCacheObject("module",module);//光伏板数量
|
||||||
|
RedisUtils.setCacheObject("generateElectricity",generateElectricity);//发电效率
|
||||||
|
RedisUtils.expire("capacity",86400);
|
||||||
|
RedisUtils.expire("module",86400);
|
||||||
|
RedisUtils.expire("generateElectricity",86400);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Scheduled(cron = "0 59 23 * * ?")
|
||||||
|
@Scheduled(initialDelay = 5000)
|
||||||
|
public void redisSetData(){
|
||||||
|
GinlongApiEntity apiEntity = getGinlongApiEntity();
|
||||||
|
|
||||||
|
double dayEnergy = 0.0; //今日总发电量
|
||||||
|
|
||||||
|
List<Long> idList = new ArrayList<>();
|
||||||
|
String s = userStationList(apiEntity);
|
||||||
|
String s2 = inverterList(apiEntity);
|
||||||
|
getInverterList1(s2);
|
||||||
|
getUserStationList1(s, idList);
|
||||||
|
|
||||||
|
//使用获取多个电站详情接口获取数据
|
||||||
|
String s1 = stationDetailList(apiEntity, idList);
|
||||||
|
// System.out.println(s1);
|
||||||
|
getStationDetailList1(s1, dayEnergy);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.daping.utils;
|
||||||
|
|
||||||
|
import cn.hutool.crypto.digest.HMac;
|
||||||
|
import cn.hutool.crypto.digest.HmacAlgorithm;
|
||||||
|
import cn.hutool.http.HttpRequest;
|
||||||
|
import cn.hutool.http.HttpResponse;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import org.dromara.daping.domain.GinlongApiEntity;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class GinlongApiClient {
|
||||||
|
|
||||||
|
private static final String CONTENT_TYPE = "application/json";
|
||||||
|
|
||||||
|
// 直接注入从配置文件绑定的实体类
|
||||||
|
@Autowired
|
||||||
|
private GinlongApiEntity apiEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通用API调用方法
|
||||||
|
*
|
||||||
|
* @param path 接口路径(如:/v1/api/userStationList)
|
||||||
|
* @param params 请求参数(无参数时传null)
|
||||||
|
* @param apiEntity
|
||||||
|
* @return 接口返回的JSON字符串
|
||||||
|
* @throws Exception 可能的异常(签名失败、网络错误等)
|
||||||
|
*/
|
||||||
|
public String callApi(String path, Map<String, Object> params, GinlongApiEntity apiEntity) throws Exception {
|
||||||
|
// 1. 处理请求体(转为JSON字符串)
|
||||||
|
String body = (params != null) ? JSONUtil.toJsonStr(params) : "{}";
|
||||||
|
// 2. 计算Content-MD5
|
||||||
|
String contentMd5 = calcContentMD5(body);
|
||||||
|
// 3. 获取GMT时间(需在当前时间±15分钟内)
|
||||||
|
String gmtDate = getGMTDate();
|
||||||
|
// 4. 计算签名
|
||||||
|
String signature = buildSignature(path, contentMd5, gmtDate,apiEntity);
|
||||||
|
// 5. 构建完整请求URL
|
||||||
|
String url = apiEntity.getUrl() + path;
|
||||||
|
|
||||||
|
// 6. 发送POST请求并返回结果
|
||||||
|
HttpResponse response = HttpRequest.post(url)
|
||||||
|
.header("Content-Type", CONTENT_TYPE)
|
||||||
|
.header("Content-MD5", contentMd5)
|
||||||
|
.header("Date", gmtDate)
|
||||||
|
.header("Authorization", "API " + apiEntity.getKey() + ":" + signature) // 使用实体类的key
|
||||||
|
.body(body)
|
||||||
|
.execute();
|
||||||
|
|
||||||
|
return response.body();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算Content-MD5(按文档规范)
|
||||||
|
*/
|
||||||
|
private String calcContentMD5(String body) {
|
||||||
|
try {
|
||||||
|
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||||
|
md.update(body.getBytes(StandardCharsets.UTF_8));
|
||||||
|
byte[] digest = md.digest();
|
||||||
|
return Base64.getEncoder().encodeToString(digest);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("计算Content-MD5失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取符合格式的GMT时间
|
||||||
|
*/
|
||||||
|
private String getGMTDate() {
|
||||||
|
//1、获取GMT时区下的当前时间;
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
//2、将当前时间按以下格式转换为字符串。 格式:EEE, d MMM yyyy HH:mm:ss 'GMT'注意:Date 时间不能超出当前时间的正负15分钟,否则会出现调用失败。
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(
|
||||||
|
"EEE, d MMM yyyy HH:mm:ss 'GMT'",
|
||||||
|
Locale.US
|
||||||
|
);
|
||||||
|
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||||
|
return sdf.format(calendar.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建签名(按文档规范)
|
||||||
|
*/
|
||||||
|
private String buildSignature(String path, String contentMd5, String gmtDate, GinlongApiEntity apiEntity) {
|
||||||
|
// 拼接签名原文
|
||||||
|
String signatureText = "POST" + "\n"
|
||||||
|
+ contentMd5 + "\n"
|
||||||
|
+ CONTENT_TYPE + "\n"
|
||||||
|
+ gmtDate + "\n"
|
||||||
|
+ path;
|
||||||
|
// 计算HmacSHA1并Base64编码
|
||||||
|
HMac hmac = new HMac(
|
||||||
|
HmacAlgorithm.HmacSHA1,
|
||||||
|
apiEntity.getSecret().getBytes(StandardCharsets.UTF_8)); // 使用实体类的secret
|
||||||
|
return hmac.digestBase64(signatureText, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionItemVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionItemBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionItemService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-自定义巡检项
|
||||||
|
* 前端访问路由地址为:/inspection/item
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/item")
|
||||||
|
public class OpsInspectionItemController extends BaseController {
|
||||||
|
|
||||||
|
private final IOpsInspectionItemService opsInspectionItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-自定义巡检项列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:item:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionItemVo> list(OpsInspectionItemBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionItemService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-自定义巡检项列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:item:export")
|
||||||
|
@Log(title = "运维-巡检-自定义巡检项", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionItemBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionItemVo> list = opsInspectionItemService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-自定义巡检项", OpsInspectionItemVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-自定义巡检项详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:item:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionItemService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-自定义巡检项
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:item:add")
|
||||||
|
@Log(title = "运维-巡检-自定义巡检项", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionItemBo bo) {
|
||||||
|
return toAjax(opsInspectionItemService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-自定义巡检项
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:item:edit")
|
||||||
|
@Log(title = "运维-巡检-自定义巡检项", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionItemBo bo) {
|
||||||
|
return toAjax(opsInspectionItemService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-自定义巡检项
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:item:remove")
|
||||||
|
@Log(title = "运维-巡检-自定义巡检项", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionItemService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionMatterVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionMatterBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionMatterService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-待办
|
||||||
|
* 前端访问路由地址为:/inspection/matter
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/matter")
|
||||||
|
public class OpsInspectionMatterController extends BaseController {
|
||||||
|
|
||||||
|
private final IOpsInspectionMatterService opsInspectionMatterService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-待办列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:matter:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionMatterVo> list(OpsInspectionMatterBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionMatterService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-待办列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:matter:export")
|
||||||
|
@Log(title = "运维-巡检-待办", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionMatterBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionMatterVo> list = opsInspectionMatterService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-待办", OpsInspectionMatterVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-待办详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:matter:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionMatterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionMatterService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-待办
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:matter:add")
|
||||||
|
@Log(title = "运维-巡检-待办", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionMatterBo bo) {
|
||||||
|
return toAjax(opsInspectionMatterService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-待办
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:matter:edit")
|
||||||
|
@Log(title = "运维-巡检-待办", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionMatterBo bo) {
|
||||||
|
return toAjax(opsInspectionMatterService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-待办
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:matter:remove")
|
||||||
|
@Log(title = "运维-巡检-待办", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionMatterService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionNodeVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionNodeBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionNodeService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-通用节点
|
||||||
|
* 前端访问路由地址为:/inspection/node
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/node")
|
||||||
|
public class OpsInspectionNodeController extends BaseController {
|
||||||
|
|
||||||
|
private final IOpsInspectionNodeService opsInspectionNodeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-通用节点列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:node:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionNodeVo> list(OpsInspectionNodeBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionNodeService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-通用节点列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:node:export")
|
||||||
|
@Log(title = "运维-巡检-通用节点", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionNodeBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionNodeVo> list = opsInspectionNodeService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-通用节点", OpsInspectionNodeVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-通用节点详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:node:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionNodeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionNodeService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-通用节点
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:node:add")
|
||||||
|
@Log(title = "运维-巡检-通用节点", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
@Transactional
|
||||||
|
public R<String> add(@Validated(AddGroup.class) @RequestBody List<OpsInspectionNodeBo> bo) {
|
||||||
|
return opsInspectionNodeService.insertByBo(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-通用节点
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:node:edit")
|
||||||
|
@Log(title = "运维-巡检-通用节点", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody List<OpsInspectionNodeBo> bo) {
|
||||||
|
return toAjax(opsInspectionNodeService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-通用节点
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:node:remove")
|
||||||
|
@Log(title = "运维-巡检-通用节点", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionNodeService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.inspection.domain.vo.OrderRecordVo;
|
||||||
|
import org.dromara.inspection.service.impl.OpsInspectionOrderServiceImpl;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionOrderVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionOrderBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionOrderService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-工单
|
||||||
|
* 前端访问路由地址为:/inspection/order
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/order")
|
||||||
|
public class OpsInspectionOrderController extends BaseController {
|
||||||
|
|
||||||
|
private final OpsInspectionOrderServiceImpl opsInspectionOrderService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-工单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionOrderVo> list(OpsInspectionOrderBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionOrderService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-工单列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:export")
|
||||||
|
@Log(title = "运维-巡检-工单", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionOrderBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionOrderVo> list = opsInspectionOrderService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-工单", OpsInspectionOrderVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-工单详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionOrderService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-工单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:add")
|
||||||
|
@Log(title = "运维-巡检-工单", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionOrderBo bo) {
|
||||||
|
return toAjax(opsInspectionOrderService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-工单
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:edit")
|
||||||
|
@Log(title = "运维-巡检-工单", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionOrderBo bo) {
|
||||||
|
return toAjax(opsInspectionOrderService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-工单
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:remove")
|
||||||
|
@Log(title = "运维-巡检-工单", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionOrderService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取纪录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:order:record")
|
||||||
|
@GetMapping("/record")
|
||||||
|
public R<OrderRecordVo> record(Long projectId) {
|
||||||
|
return opsInspectionOrderService.record(projectId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionPlanVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionPlanBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionPlanService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-计划
|
||||||
|
* 前端访问路由地址为:/inspection/plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/plan")
|
||||||
|
public class OpsInspectionPlanController extends BaseController {
|
||||||
|
|
||||||
|
private final IOpsInspectionPlanService opsInspectionPlanService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:plan:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionPlanVo> list(OpsInspectionPlanBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionPlanService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:plan:export")
|
||||||
|
@Log(title = "运维-巡检-计划", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionPlanBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionPlanVo> list = opsInspectionPlanService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-计划", OpsInspectionPlanVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-计划详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:plan:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionPlanService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:plan:add")
|
||||||
|
@Log(title = "运维-巡检-计划", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionPlanBo bo) {
|
||||||
|
return toAjax(opsInspectionPlanService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:plan:edit")
|
||||||
|
@Log(title = "运维-巡检-计划", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionPlanBo bo) {
|
||||||
|
return toAjax(opsInspectionPlanService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-计划
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:plan:remove")
|
||||||
|
@Log(title = "运维-巡检-计划", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionPlanService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionReportRecordVo;
|
||||||
|
import org.dromara.inspection.service.impl.OpsInspectionRepairServiceImpl;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionRepairVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionRepairBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionRepairService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-抢修
|
||||||
|
* 前端访问路由地址为:/inspection/repair
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/repair")
|
||||||
|
public class OpsInspectionRepairController extends BaseController {
|
||||||
|
|
||||||
|
private final OpsInspectionRepairServiceImpl opsInspectionRepairService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-抢修列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionRepairVo> list(OpsInspectionRepairBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionRepairService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-抢修列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:export")
|
||||||
|
@Log(title = "运维-巡检-抢修", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionRepairBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionRepairVo> list = opsInspectionRepairService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-抢修", OpsInspectionRepairVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-抢修详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionRepairVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionRepairService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-抢修
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:add")
|
||||||
|
@Log(title = "运维-巡检-抢修", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionRepairBo bo) {
|
||||||
|
return toAjax(opsInspectionRepairService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-抢修
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:edit")
|
||||||
|
@Log(title = "运维-巡检-抢修", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionRepairBo bo) {
|
||||||
|
return toAjax(opsInspectionRepairService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-抢修
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:remove")
|
||||||
|
@Log(title = "运维-巡检-抢修", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionRepairService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成纪录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:repair:record")
|
||||||
|
@GetMapping("/record")
|
||||||
|
public R<OpsInspectionReportRecordVo> record(@RequestParam Long projectId){
|
||||||
|
|
||||||
|
return opsInspectionRepairService.record(projectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,120 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionReportRecordVo;
|
||||||
|
import org.dromara.inspection.service.impl.OpsInspectionReportServiceImpl;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionReportVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionReportBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionReportService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-报修
|
||||||
|
* 前端访问路由地址为:/inspection/report
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/report")
|
||||||
|
public class OpsInspectionReportController extends BaseController {
|
||||||
|
|
||||||
|
private final OpsInspectionReportServiceImpl opsInspectionReportService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-报修列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionReportVo> list(OpsInspectionReportBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionReportService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-报修列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:export")
|
||||||
|
@Log(title = "运维-巡检-报修", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionReportBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionReportVo> list = opsInspectionReportService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-报修", OpsInspectionReportVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-报修详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionReportVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionReportService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-报修
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:add")
|
||||||
|
@Log(title = "运维-巡检-报修", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionReportBo bo) {
|
||||||
|
return toAjax(opsInspectionReportService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-报修
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:edit")
|
||||||
|
@Log(title = "运维-巡检-报修", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionReportBo bo) {
|
||||||
|
return toAjax(opsInspectionReportService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-报修
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:remove")
|
||||||
|
@Log(title = "运维-巡检-报修", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionReportService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成纪录
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:report:record")
|
||||||
|
@GetMapping("/record")
|
||||||
|
public R<OpsInspectionReportRecordVo> record(@RequestParam Long projectId){
|
||||||
|
|
||||||
|
return opsInspectionReportService.record(projectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,117 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionRecordVo;
|
||||||
|
import org.dromara.inspection.service.impl.OpsInspectionTaskServiceImpl;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTaskVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionTaskBo;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检计划-任务
|
||||||
|
* 前端访问路由地址为:/inspection/task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/task")
|
||||||
|
public class OpsInspectionTaskController extends BaseController {
|
||||||
|
|
||||||
|
private final OpsInspectionTaskServiceImpl opsInspectionTaskService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检计划-任务列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionTaskVo> list(OpsInspectionTaskBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionTaskService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检计划-任务列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:export")
|
||||||
|
@Log(title = "运维-巡检计划-任务", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionTaskBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionTaskVo> list = opsInspectionTaskService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检计划-任务", OpsInspectionTaskVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检计划-任务详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionTaskVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionTaskService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检计划-任务
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:add")
|
||||||
|
@Log(title = "运维-巡检计划-任务", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionTaskBo bo) {
|
||||||
|
return toAjax(opsInspectionTaskService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检计划-任务
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:edit")
|
||||||
|
@Log(title = "运维-巡检计划-任务", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionTaskBo bo) {
|
||||||
|
return opsInspectionTaskService.updateByBo(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检计划-任务
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:remove")
|
||||||
|
@Log(title = "运维-巡检计划-任务", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionTaskService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检记录统计
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:task:record")
|
||||||
|
@GetMapping("/record")
|
||||||
|
public R<OpsInspectionRecordVo> record(@RequestParam String type,@RequestParam Long projectId) {
|
||||||
|
return opsInspectionTaskService.record(type,projectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTaskProblemVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionTaskProblemBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionTaskProblemService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-任务-问题
|
||||||
|
* 前端访问路由地址为:/inspection/problem
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-26
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/problem")
|
||||||
|
public class OpsInspectionTaskProblemController extends BaseController {
|
||||||
|
|
||||||
|
private final IOpsInspectionTaskProblemService opsInspectionTaskProblemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-任务-问题列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:problem:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionTaskProblemVo> list(OpsInspectionTaskProblemBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionTaskProblemService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-任务-问题列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:problem:export")
|
||||||
|
@Log(title = "运维-巡检-任务-问题", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionTaskProblemBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionTaskProblemVo> list = opsInspectionTaskProblemService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-任务-问题", OpsInspectionTaskProblemVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-任务-问题详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:problem:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionTaskProblemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionTaskProblemService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-任务-问题
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:problem:add")
|
||||||
|
@Log(title = "运维-巡检-任务-问题", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionTaskProblemBo bo) {
|
||||||
|
return toAjax(opsInspectionTaskProblemService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-任务-问题
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:problem:edit")
|
||||||
|
@Log(title = "运维-巡检-任务-问题", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionTaskProblemBo bo) {
|
||||||
|
return toAjax(opsInspectionTaskProblemService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-任务-问题
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:problem:remove")
|
||||||
|
@Log(title = "运维-巡检-任务-问题", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionTaskProblemService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTestPlanVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionTestPlanBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionTestPlanService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验计划
|
||||||
|
* 前端访问路由地址为:/inspection/testPlan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/testPlan")
|
||||||
|
public class OpsInspectionTestPlanController extends BaseController {
|
||||||
|
|
||||||
|
private final IOpsInspectionTestPlanService opsInspectionTestPlanService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-试验计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testPlan:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionTestPlanVo> list(OpsInspectionTestPlanBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionTestPlanService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-试验计划列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testPlan:export")
|
||||||
|
@Log(title = "运维-巡检-试验计划", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionTestPlanBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionTestPlanVo> list = opsInspectionTestPlanService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-试验计划", OpsInspectionTestPlanVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-试验计划详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testPlan:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionTestPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionTestPlanService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-试验计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testPlan:add")
|
||||||
|
@Log(title = "运维-巡检-试验计划", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionTestPlanBo bo) {
|
||||||
|
return toAjax(opsInspectionTestPlanService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-试验计划
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testPlan:edit")
|
||||||
|
@Log(title = "运维-巡检-试验计划", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionTestPlanBo bo) {
|
||||||
|
return toAjax(opsInspectionTestPlanService.updateByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-试验计划
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testPlan:remove")
|
||||||
|
@Log(title = "运维-巡检-试验计划", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionTestPlanService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
package org.dromara.inspection.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.inspection.service.impl.OpsInspectionTestTaskServiceImpl;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
|
import org.dromara.common.log.annotation.Log;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.common.log.enums.BusinessType;
|
||||||
|
import org.dromara.common.excel.utils.ExcelUtil;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTestTaskVo;
|
||||||
|
import org.dromara.inspection.domain.bo.OpsInspectionTestTaskBo;
|
||||||
|
import org.dromara.inspection.service.IOpsInspectionTestTaskService;
|
||||||
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验任务
|
||||||
|
* 前端访问路由地址为:/inspection/testTask
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/testTask")
|
||||||
|
public class OpsInspectionTestTaskController extends BaseController {
|
||||||
|
|
||||||
|
private final OpsInspectionTestTaskServiceImpl opsInspectionTestTaskService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运维-巡检-试验任务列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<OpsInspectionTestTaskVo> list(OpsInspectionTestTaskBo bo, PageQuery pageQuery) {
|
||||||
|
return opsInspectionTestTaskService.queryPageList(bo, pageQuery);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出运维-巡检-试验任务列表
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:export")
|
||||||
|
@Log(title = "运维-巡检-试验任务", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(OpsInspectionTestTaskBo bo, HttpServletResponse response) {
|
||||||
|
List<OpsInspectionTestTaskVo> list = opsInspectionTestTaskService.queryList(bo);
|
||||||
|
ExcelUtil.exportExcel(list, "运维-巡检-试验任务", OpsInspectionTestTaskVo.class, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-试验任务详细信息
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:query")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public R<OpsInspectionTestTaskVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return R.ok(opsInspectionTestTaskService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增运维-巡检-试验任务
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:add")
|
||||||
|
@Log(title = "运维-巡检-试验任务", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping()
|
||||||
|
public R<Void> add(@Validated(AddGroup.class) @RequestBody OpsInspectionTestTaskBo bo) {
|
||||||
|
return toAjax(opsInspectionTestTaskService.insertByBo(bo));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改运维-巡检-试验任务
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:edit")
|
||||||
|
@Log(title = "运维-巡检-试验任务", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PutMapping()
|
||||||
|
public R<Void> edit(@Validated(EditGroup.class) @RequestBody OpsInspectionTestTaskBo bo) {
|
||||||
|
return opsInspectionTestTaskService.updateByBo(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除运维-巡检-试验任务
|
||||||
|
*
|
||||||
|
* @param ids 主键串
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:remove")
|
||||||
|
@Log(title = "运维-巡检-试验任务", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable("ids") Long[] ids) {
|
||||||
|
return toAjax(opsInspectionTestTaskService.deleteWithValidByIds(List.of(ids), true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取运维-巡检-试验任务记录
|
||||||
|
*
|
||||||
|
* @param projectId 项目ID
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("inspection:testTask:record")
|
||||||
|
@GetMapping("/record")
|
||||||
|
public R<Object> record(@RequestParam Long projectId){
|
||||||
|
return opsInspectionTestTaskService.record(projectId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-自定义巡检项对象 ops_inspection_item
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_item")
|
||||||
|
public class OpsInspectionItem extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义巡检项名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务id,巡检计划1
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-待办对象 ops_inspection_matter
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_matter")
|
||||||
|
public class OpsInspectionMatter extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (任务)电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务描述
|
||||||
|
*/
|
||||||
|
private String describeValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务开始时间
|
||||||
|
*/
|
||||||
|
private Date taskBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务结束时间
|
||||||
|
*/
|
||||||
|
private Date taskEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
private String taskTimeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级,常规,重要,紧急
|
||||||
|
*/
|
||||||
|
private String taskLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
private String taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-通用节点对象 ops_inspection_node
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_node")
|
||||||
|
public class OpsInspectionNode extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所用模块1工单2巡检任务3试验任务
|
||||||
|
*/
|
||||||
|
private String module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单ID
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序编号
|
||||||
|
*/
|
||||||
|
private Long code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期目的
|
||||||
|
*/
|
||||||
|
private String intendedPurpose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期完成时间
|
||||||
|
*/
|
||||||
|
private Date intendedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际完成时间
|
||||||
|
*/
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态1完成2未完成3失败
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,137 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-工单对象 ops_inspection_order
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_order")
|
||||||
|
public class OpsInspectionOrder extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主要id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目(电站)id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型1维护保养2检查检测3安装调试4升级改造
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单优先级1低2中3高
|
||||||
|
*/
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 截止时间
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单描述
|
||||||
|
*/
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行地点
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关设备/系统
|
||||||
|
*/
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ids
|
||||||
|
*/
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期成果
|
||||||
|
*/
|
||||||
|
private String results;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要执行人,1是2否(取消使用)
|
||||||
|
*/
|
||||||
|
private String executor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人ids(取消使用)
|
||||||
|
*/
|
||||||
|
private String executorIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态1待派单2已派单3执行中4已完成
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派单时间
|
||||||
|
*/
|
||||||
|
private Date sendOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单时间
|
||||||
|
*/
|
||||||
|
private Date getOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单人
|
||||||
|
*/
|
||||||
|
private Long getOrderPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date finishiOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收结果1通过2需整改
|
||||||
|
*/
|
||||||
|
private String orderResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否重点跟踪1是2否
|
||||||
|
*/
|
||||||
|
private String point;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-计划对象 ops_inspection_plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_plan")
|
||||||
|
public class OpsInspectionPlan extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划类型,1每日巡检2每周巡检3每月巡检4每季度巡检
|
||||||
|
*/
|
||||||
|
private String planType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检对象,1服务器2网络设备3应用系统4基础设施
|
||||||
|
*/
|
||||||
|
private String objectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检频率
|
||||||
|
*/
|
||||||
|
private String inspectionFrequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划开始时间
|
||||||
|
*/
|
||||||
|
private String planBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间(分钟)
|
||||||
|
*/
|
||||||
|
private Long duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人ID
|
||||||
|
*/
|
||||||
|
private Long person;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检项IDS
|
||||||
|
*/
|
||||||
|
private String inspectionItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1启用2停用
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,112 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-抢修对象 ops_inspection_repair
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_repair")
|
||||||
|
public class OpsInspectionRepair extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1常规2紧急3致命
|
||||||
|
*/
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1待处理2处理中3已完成
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抢修类型1电力2设备3供水4网络5设施
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人
|
||||||
|
*/
|
||||||
|
private Long sendPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
private String reportInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障位置
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件IDS
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人姓名
|
||||||
|
*/
|
||||||
|
private String reportName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人联系电话
|
||||||
|
*/
|
||||||
|
private String reportPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修结果
|
||||||
|
*/
|
||||||
|
// private String reportFinal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计完成时间
|
||||||
|
*/
|
||||||
|
private String expectedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date reportFinishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支援,1需要2不需要
|
||||||
|
*/
|
||||||
|
private String support;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-报修对象 ops_inspection_report
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_report")
|
||||||
|
public class OpsInspectionReport extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID(电站ID)
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1低优先2中优先3高优先
|
||||||
|
*/
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1待处理2处理中3已完成
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修类型1硬件2软件
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人
|
||||||
|
*/
|
||||||
|
private Long sendPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
private String reportInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障位置
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID 多个用逗号分隔
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人姓名
|
||||||
|
*/
|
||||||
|
private String reportName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人联系电话
|
||||||
|
*/
|
||||||
|
private String reportPhone;
|
||||||
|
|
||||||
|
private String reportFinal;
|
||||||
|
|
||||||
|
private Date reportFinishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检计划-任务对象 ops_inspection_task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_task")
|
||||||
|
public class OpsInspectionTask extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名
|
||||||
|
*/
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检对象
|
||||||
|
*/
|
||||||
|
private String inspectionObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
private String timeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划ID
|
||||||
|
*/
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人ID
|
||||||
|
*/
|
||||||
|
private Long personId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ids
|
||||||
|
*/
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 1待执行2已延期3执行中4已完成
|
||||||
|
*/
|
||||||
|
private String taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现问题种类,1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
|
||||||
|
*/
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-任务-问题对象 ops_inspection_task_problem
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_task_problem")
|
||||||
|
public class OpsInspectionTaskProblem extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检任务ID
|
||||||
|
*/
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现问题类型1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题详细信息
|
||||||
|
*/
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现日期
|
||||||
|
*/
|
||||||
|
private Date findTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否解决1解决2未解决
|
||||||
|
*/
|
||||||
|
private String finish;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解决日期
|
||||||
|
*/
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,109 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验计划对象 ops_inspection_test_plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_test_plan")
|
||||||
|
public class OpsInspectionTestPlan extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站ID
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编号
|
||||||
|
*/
|
||||||
|
private String planCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验对象类型,1安全试验2网络实验3性能试验4
|
||||||
|
*/
|
||||||
|
private String testObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验目的与预期结果
|
||||||
|
*/
|
||||||
|
private String testInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验环境
|
||||||
|
*/
|
||||||
|
private String testSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人ID
|
||||||
|
*/
|
||||||
|
private Long personCharge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与人员IDS
|
||||||
|
*/
|
||||||
|
private String personIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义检查项
|
||||||
|
*/
|
||||||
|
private String inspectionItems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验步骤
|
||||||
|
*/
|
||||||
|
private String testStep;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所需资源与设备
|
||||||
|
*/
|
||||||
|
private String testDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风险评估与应对措施
|
||||||
|
*/
|
||||||
|
private String testSolutions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请状态 1已批准2进行中3已完成4草稿5未通过
|
||||||
|
*/
|
||||||
|
private String testStatus;
|
||||||
|
|
||||||
|
//1启动2停止
|
||||||
|
private String testPlanType;
|
||||||
|
}
|
||||||
@ -0,0 +1,157 @@
|
|||||||
|
package org.dromara.inspection.domain;
|
||||||
|
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验任务对象 ops_inspection_test_task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@TableName("ops_inspection_test_task")
|
||||||
|
public class OpsInspectionTestTask extends BaseEntity {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID(电站ID)
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试对象
|
||||||
|
*/
|
||||||
|
private String testObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private String timeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员
|
||||||
|
*/
|
||||||
|
private Long person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点IDS
|
||||||
|
*/
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态,1待执行2暂停3失败4执行中5已完成
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已分析1未分析2已分析
|
||||||
|
*/
|
||||||
|
private String unPack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联测试计划ID
|
||||||
|
*/
|
||||||
|
private Long testPlanId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验环境
|
||||||
|
*/
|
||||||
|
private String testSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date planBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度
|
||||||
|
*/
|
||||||
|
// private Long progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败原因
|
||||||
|
*/
|
||||||
|
private String failReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败时间
|
||||||
|
*/
|
||||||
|
private Date failTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败阶段
|
||||||
|
*/
|
||||||
|
private Long failPhase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败原因分析
|
||||||
|
*/
|
||||||
|
private String faileAnalyze;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 改进建议
|
||||||
|
*/
|
||||||
|
private String faileTips;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验时长(分钟)
|
||||||
|
*/
|
||||||
|
private Long testLongTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果
|
||||||
|
*/
|
||||||
|
private String testFinal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果详情
|
||||||
|
*/
|
||||||
|
private String finalInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停原因
|
||||||
|
*/
|
||||||
|
private String pauseFor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停时间
|
||||||
|
*/
|
||||||
|
private Date pauseTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private Date planFinishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionItem;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-自定义巡检项业务对象 ops_inspection_item
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionItem.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionItemBo extends BaseEntity {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义巡检项名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "自定义巡检项名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务id,巡检计划1
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "业务id,巡检计划1不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionMatter;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-待办业务对象 ops_inspection_matter
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionMatter.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionMatterBo extends BaseEntity {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (任务)电站id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "(任务)电站id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "任务名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务描述
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "任务描述不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String describeValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务开始时间
|
||||||
|
*/
|
||||||
|
@NotNull(message = "任务开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date taskBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务结束时间
|
||||||
|
*/
|
||||||
|
@NotNull(message = "任务结束时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date taskEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "时间段不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskTimeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级,1常规,2重要,3紧急
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "等级,1常规,2重要,3紧急不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "任务类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionNode;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-通用节点业务对象 ops_inspection_node
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionNode.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionNodeBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所用模块1工单2巡检任务3试验任务
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "所用模块1工单2巡检任务3试验任务不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "工单ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序编号
|
||||||
|
*/
|
||||||
|
@NotNull(message = "顺序编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "节点名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期目的
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "预期目的不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String intendedPurpose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期完成时间
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "预期完成时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date intendedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际完成时间
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "实际完成时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态1完成2未完成3失败
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "状态1完成2未完成不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,153 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionOrder;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-工单业务对象 ops_inspection_order
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionOrder.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionOrderBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主要id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目(电站)id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目(电站)id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单标题
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单标题不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型1维护保养2检查检测3安装调试4升级改造
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单类型1维护保养2检查检测3安装调试4升级改造不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单优先级1低2中3高
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单优先级1低2中3高不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 截止时间
|
||||||
|
*/
|
||||||
|
@NotNull(message = "截止时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单描述
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单描述不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行地点
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "执行地点不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关设备/系统
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "相关设备/系统不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ids
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "节点ids不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期成果
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "预期成果不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String results;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要执行人,1是2否(取消使用)
|
||||||
|
*/
|
||||||
|
private String executor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人ids(取消使用)
|
||||||
|
*/
|
||||||
|
private String executorIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态1待派单2已派单3执行中4已完成
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "工单状态1待派单2已派单3执行中4已完成不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派单时间
|
||||||
|
*/
|
||||||
|
private Date sendOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单时间
|
||||||
|
*/
|
||||||
|
private Date getOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单人
|
||||||
|
*/
|
||||||
|
private Long getOrderPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单人信息
|
||||||
|
*/
|
||||||
|
private RemoteUserVo getOrderPersonVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date finishiOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收结果1通过2需整改
|
||||||
|
*/
|
||||||
|
private String orderResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否重点跟踪1是2否
|
||||||
|
*/
|
||||||
|
private String point;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,108 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionPlan;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-计划业务对象 ops_inspection_plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionPlan.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionPlanBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@NotNull(message = "计划名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划类型,1每日巡检2每周巡检3每月巡检4每季度巡检
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计划类型,1每日巡检2每周巡检3每月巡检4每季度巡检不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String planType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检对象,1服务器2网络设备3应用系统4基础设施
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "巡检对象,1服务器2网络设备3应用系统4基础设施不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String objectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检频率
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "巡检频率不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String inspectionFrequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划开始时间
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计划开始时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String planBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间(分钟)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "持续时间(分钟)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "负责人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检项IDS
|
||||||
|
*/
|
||||||
|
private String inspectionItemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1启用2停用
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "1启用2停用不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,124 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionRepair;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-抢修业务对象 ops_inspection_repair
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionRepair.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionRepairBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1常规2紧急3致命
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "1常规2紧急3致命不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1待处理2处理中3已完成
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "1待处理2处理中3已完成不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抢修类型1电力2设备3供水4网络5设施
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "抢修类型1电力2设备3供水4网络5设施不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "报修名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "指派维修人不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long sendPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "详细信息不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String reportInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障位置
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "故障位置不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件IDS
|
||||||
|
*/
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人姓名
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "报修人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String reportName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人联系电话
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "报修人联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String reportPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修结果
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "维修结果不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
// private String reportFinal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计完成时间
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "预计完成时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String expectedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "完成时间不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date reportFinishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支援,1需要2不需要
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "支援,1需要2不需要不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String support;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionReport;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-报修业务对象 ops_inspection_report
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionReport.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionReportBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID(电站ID)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID(电站ID)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1低优先2中优先3高优先
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "优先级不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1待处理2处理中3已完成
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修类型1硬件2软件
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "报修类型不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "报修名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人
|
||||||
|
*/
|
||||||
|
// @NotNull(message = "指派维修人不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long sendPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "详细信息不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String reportInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障位置
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "故障位置不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "文件不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人姓名
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "姓名不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String reportName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人联系电话
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "电话不能为空", groups = {AddGroup.class, EditGroup.class})
|
||||||
|
private String reportPhone;
|
||||||
|
|
||||||
|
private String reportFinal;
|
||||||
|
|
||||||
|
private Date reportFinishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,103 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTask;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检计划-任务业务对象 ops_inspection_task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionTask.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionTaskBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "任务名不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检对象
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "巡检对象不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String inspectionObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "时间段不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String timeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "计划ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "执行人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long personId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ids
|
||||||
|
*/
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 1待执行2已延期3执行中4已完成
|
||||||
|
*/
|
||||||
|
@NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现问题种类,1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
|
||||||
|
*/
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTaskProblem;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-任务-问题业务对象 ops_inspection_task_problem
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionTaskProblem.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionTaskProblemBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检任务ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "巡检任务ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
@NotNull(message = "电站ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现问题类型1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "发现问题类型1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题详细信息
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "问题详细信息不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现日期
|
||||||
|
*/
|
||||||
|
@NotNull(message = "发现日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date findTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否解决1解决2未解决
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "是否解决1解决2未解决不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String finish;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解决日期
|
||||||
|
*/
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTestPlan;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验计划业务对象 ops_inspection_test_plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionTestPlan.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionTestPlanBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "电站ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计划名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "计划编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String planCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验对象类型,1安全试验2网络实验3性能试验4
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "实验对象类型,1安全试验2网络实验3性能试验4不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String testObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验目的与预期结果
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "试验目的与预期结果不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String testInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验环境
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "实验环境不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String testSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "负责人ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long personCharge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与人员IDS
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "参与人员IDS不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String personIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义检查项
|
||||||
|
*/
|
||||||
|
// @NotBlank(message = "自定义检查项不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String inspectionItems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验步骤
|
||||||
|
*/
|
||||||
|
private String testStep;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所需资源与设备
|
||||||
|
*/
|
||||||
|
private String testDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风险评估与应对措施
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "风险评估与应对措施不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String testSolutions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请状态 1已批准2进行中3已完成4草稿5未通过
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String testStatus;
|
||||||
|
|
||||||
|
//1启动2停止
|
||||||
|
private String testPlanType;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,165 @@
|
|||||||
|
package org.dromara.inspection.domain.bo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTestTask;
|
||||||
|
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验任务业务对象 ops_inspection_test_task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@AutoMapper(target = OpsInspectionTestTask.class, reverseConvertGenerate = false)
|
||||||
|
public class OpsInspectionTestTaskBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID(电站ID)
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID(电站ID)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "任务名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试对象
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "测试对象不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String testObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String timeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员
|
||||||
|
*/
|
||||||
|
@NotNull(message = "执行人员不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点IDS
|
||||||
|
*/
|
||||||
|
@NotNull(message = "节点不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态,1待执行2暂停3失败4执行中5已完成
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "状态,1待执行2暂停3失败4执行中5已完成不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已分析1未分析2已分析
|
||||||
|
*/
|
||||||
|
private String unPack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联测试计划ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "关联测试计划ID不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||||
|
private Long testPlanId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验环境
|
||||||
|
*/
|
||||||
|
private String testSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date planBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度
|
||||||
|
*/
|
||||||
|
// private Long progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败原因
|
||||||
|
*/
|
||||||
|
private String failReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败时间
|
||||||
|
*/
|
||||||
|
private Date failTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败阶段
|
||||||
|
*/
|
||||||
|
private Long failPhase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败原因分析
|
||||||
|
*/
|
||||||
|
private String faileAnalyze;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 改进建议
|
||||||
|
*/
|
||||||
|
private String faileTips;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验时长(分钟)
|
||||||
|
*/
|
||||||
|
private Long testLongTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果
|
||||||
|
*/
|
||||||
|
private String testFinal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果详情
|
||||||
|
*/
|
||||||
|
private String finalInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停原因
|
||||||
|
*/
|
||||||
|
private String pauseFor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停时间
|
||||||
|
*/
|
||||||
|
private Date pauseTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private Date planFinishTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionItem;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-自定义巡检项视图对象 ops_inspection_item
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionItem.class)
|
||||||
|
public class OpsInspectionItemVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义巡检项名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "自定义巡检项名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务id,巡检计划1
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "业务id,巡检计划1")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionMatter;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-待办视图对象 ops_inspection_matter
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionMatter.class)
|
||||||
|
public class OpsInspectionMatterVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (任务)电站id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "(任务)电站id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务名称")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务描述
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务描述")
|
||||||
|
private String describeValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务开始时间")
|
||||||
|
private Date taskBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务结束时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务结束时间")
|
||||||
|
private Date taskEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "时间段")
|
||||||
|
private String taskTimeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 等级,1常规,2重要,3紧急
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "等级,1常规,2重要,3紧急")
|
||||||
|
private String taskLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务类型
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务类型")
|
||||||
|
private String taskType;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "状态")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionNode;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-通用节点视图对象 ops_inspection_node
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionNode.class)
|
||||||
|
public class OpsInspectionNodeVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "节点ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所用模块1工单2巡检任务3试验任务
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所用模块1工单2巡检任务3试验任务")
|
||||||
|
private String module;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "工单ID")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序编号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "顺序编号")
|
||||||
|
private Long code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "节点名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期目的
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预期目的")
|
||||||
|
private String intendedPurpose;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期完成时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预期完成时间")
|
||||||
|
private Date intendedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际完成时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实际完成时间")
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态1完成2未完成3失败
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态1完成2未完成")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,179 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionOrder;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.personnel.domain.vo.OpsUserVo;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-工单视图对象 ops_inspection_order
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionOrder.class)
|
||||||
|
public class OpsInspectionOrderVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主要id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "主要id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目(电站)id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目(电站)id")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单标题
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "工单标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单类型1维护保养2检查检测3安装调试4升级改造
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "工单类型1维护保养2检查检测3安装调试4升级改造")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单优先级1低2中3高
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "工单优先级1低2中3高")
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 截止时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "截止时间")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单描述
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "工单描述")
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行地点
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行地点")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相关设备/系统
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "相关设备/系统")
|
||||||
|
private String device;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件ID")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件路径")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ids
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "节点ids")
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单进度
|
||||||
|
*/
|
||||||
|
private BigDecimal progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单节点
|
||||||
|
*/
|
||||||
|
private List<OpsInspectionNodeVo> nodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预期成果
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预期成果")
|
||||||
|
private String results;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否需要执行人,1是2否(取消使用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否需要执行人,1是2否(取消使用)")
|
||||||
|
private String executor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人ids(取消使用)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行人ids(取消使用)")
|
||||||
|
private String executorIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工单状态1待派单2已派单3执行中4已完成
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "工单状态1待派单2已派单3执行中4已完成")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 派单时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "派单时间")
|
||||||
|
private Date sendOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接单时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "接单时间")
|
||||||
|
private Date getOrderTime;
|
||||||
|
|
||||||
|
private Long getOrderPerson;
|
||||||
|
|
||||||
|
private RemoteUserVo getOrderPersonVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "完成时间")
|
||||||
|
private Date finishiOrderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收结果1通过2需整改
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "验收结果1通过2需整改")
|
||||||
|
private String orderResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否重点跟踪1是2否
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否重点跟踪1是2否")
|
||||||
|
private String point;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
private RemoteUserVo sendOrderPersonVo;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,123 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionPlan;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-计划视图对象 ops_inspection_plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionPlan.class)
|
||||||
|
public class OpsInspectionPlanVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划名称")
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划类型,1每日巡检2每周巡检3每月巡检4每季度巡检
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划类型,1每日巡检2每周巡检3每月巡检4每季度巡检")
|
||||||
|
private String planType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检对象,1服务器2网络设备3应用系统4基础设施
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "巡检对象,1服务器2网络设备3应用系统4基础设施")
|
||||||
|
private String objectType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开始日期")
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结束日期")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检频率
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "巡检频率")
|
||||||
|
private String inspectionFrequency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划开始时间")
|
||||||
|
private String planBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持续时间(分钟)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "持续时间(分钟)")
|
||||||
|
private Long duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "负责人ID")
|
||||||
|
private Long person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人姓名
|
||||||
|
*/
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人头像
|
||||||
|
*/
|
||||||
|
private String avatar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检项IDS
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "巡检项ID")
|
||||||
|
private String inspectionItemId;
|
||||||
|
|
||||||
|
private List<OpsInspectionItemVo> itemVoList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1启用2停用
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "1启用2停用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检记录
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OpsInspectionRecordVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型 1月 2周 3日
|
||||||
|
*/
|
||||||
|
// private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成巡检数量
|
||||||
|
*/
|
||||||
|
private Long finishInspectionCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题数量
|
||||||
|
*/
|
||||||
|
private Long problemCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已解决问题数量
|
||||||
|
*/
|
||||||
|
private Long solvedProblemCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均完成时间
|
||||||
|
*/
|
||||||
|
private Long averageCompletionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检完成率
|
||||||
|
*/
|
||||||
|
private String xjwcl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已解决率
|
||||||
|
*/
|
||||||
|
// private String yjjl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解决效率
|
||||||
|
*/
|
||||||
|
private BigDecimal jjxl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 磁盘使用率类型问题数量
|
||||||
|
*/
|
||||||
|
private Long cpsyl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内存使用率类型问题数量
|
||||||
|
*/
|
||||||
|
private Long ncsyl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务状态类型问题数量
|
||||||
|
*/
|
||||||
|
private Long fwzt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应时间类型问题数量
|
||||||
|
*/
|
||||||
|
private Long xysj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备运行状态类型问题数量
|
||||||
|
*/
|
||||||
|
private Long sbyxzt;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,143 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionRepair;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.personnel.domain.vo.OpsUserVo;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-抢修视图对象 ops_inspection_repair
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionRepair.class)
|
||||||
|
public class OpsInspectionRepairVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1常规2紧急3致命
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "1常规2紧急3致命")
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1待处理2处理中3已完成
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "1待处理2处理中3已完成")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抢修类型1电力2设备3供水4网络5设施
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "抢修类型1电力2设备3供水4网络5设施")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "指派维修人")
|
||||||
|
private Long sendPerson;
|
||||||
|
|
||||||
|
private RemoteUserVo sendPersonVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "详细信息")
|
||||||
|
private String reportInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障位置
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "故障位置")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件IDS
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件IDS")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件路径")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修人姓名")
|
||||||
|
private String reportName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人联系电话
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修人联系电话")
|
||||||
|
private String reportPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修结果
|
||||||
|
*/
|
||||||
|
// @ExcelProperty(value = "维修结果")
|
||||||
|
// private String reportFinal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计完成时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "预计完成时间")
|
||||||
|
private String expectedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "完成时间")
|
||||||
|
private Date reportFinishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支援,1需要2不需要
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "支援,1需要2不需要")
|
||||||
|
private String support;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分钟数
|
||||||
|
*/
|
||||||
|
private String minute;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Long createBy;
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OpsInspectionReportRecordVo {
|
||||||
|
|
||||||
|
//本月总报修数
|
||||||
|
private String byzbxs;
|
||||||
|
|
||||||
|
//报修数较上周增长率
|
||||||
|
private String bxsjszzzl;
|
||||||
|
|
||||||
|
//平均处理时长
|
||||||
|
private String pjclsc;
|
||||||
|
|
||||||
|
//处理时长较上周增长率
|
||||||
|
private String clscjszzzl;
|
||||||
|
|
||||||
|
//待处理报修
|
||||||
|
private String dclbx;
|
||||||
|
|
||||||
|
//完成率
|
||||||
|
private String wcl;
|
||||||
|
|
||||||
|
//完成率较上周增长率
|
||||||
|
private String wcljszzzl;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,122 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionReport;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.personnel.domain.vo.OpsUserVo;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-报修视图对象 ops_inspection_report
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionReport.class)
|
||||||
|
public class OpsInspectionReportVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID(电站ID)
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1低优先2中优先3高优先
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "1低优先2中优先3高优先")
|
||||||
|
private String level;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1待处理2处理中3已完成
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "1待处理2处理中3已完成")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修类型1硬件2软件
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修类型1硬件2软件")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "指派维修人")
|
||||||
|
private Long sendPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指派维修人
|
||||||
|
*/
|
||||||
|
private RemoteUserVo sendPersonVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细信息
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "详细信息")
|
||||||
|
private String reportInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 故障位置
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "故障位置")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件ID")
|
||||||
|
private String fileId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件路径
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "文件路径")
|
||||||
|
private String fileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人姓名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修人姓名")
|
||||||
|
private String reportName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报修人联系电话
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "报修人联系电话")
|
||||||
|
private String reportPhone;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "维修结果")
|
||||||
|
private String reportFinal;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "完成时间")
|
||||||
|
private Date reportFinishTime;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Long createBy;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,88 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import org.dromara.common.core.validate.AddGroup;
|
||||||
|
import org.dromara.common.core.validate.EditGroup;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTaskProblem;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-任务-问题视图对象 ops_inspection_task_problem
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-26
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionTaskProblem.class)
|
||||||
|
public class OpsInspectionTaskProblemVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检任务ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "巡检任务ID")
|
||||||
|
private Long taskId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现问题类型1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "发现问题类型1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题详细信息
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "问题详细信息")
|
||||||
|
private String info;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "发现日期")
|
||||||
|
private Date findTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否解决1解决2未解决
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "是否解决1解决2未解决")
|
||||||
|
private String finish;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解决日期
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "解决日期")
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,128 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTask;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.personnel.domain.vo.OpsUserVo;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检计划-任务视图对象 ops_inspection_task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionTask.class)
|
||||||
|
public class OpsInspectionTaskVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务名")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 巡检对象
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "巡检对象")
|
||||||
|
private String inspectionObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "时间段")
|
||||||
|
private String timeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划ID")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
private OpsInspectionPlanVo plan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行人ID")
|
||||||
|
private Long personId;
|
||||||
|
|
||||||
|
private RemoteUserVo person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度
|
||||||
|
*/
|
||||||
|
private BigDecimal taskProgress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点ids
|
||||||
|
*/
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
private List<OpsInspectionNodeVo> nodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 问题列表
|
||||||
|
*/
|
||||||
|
private List<OpsInspectionTaskProblemVo> problems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 1待执行2已延期3执行中4已完成
|
||||||
|
*/
|
||||||
|
private String taskType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发现问题种类,1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
|
||||||
|
*/
|
||||||
|
private String problemType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
private Date finishTime;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,142 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionItem;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTestPlan;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.personnel.domain.OpsUser;
|
||||||
|
import org.dromara.personnel.domain.vo.OpsUserVo;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验计划视图对象 ops_inspection_test_plan
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionTestPlan.class)
|
||||||
|
public class OpsInspectionTestPlanVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "电站ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划名称")
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划编号
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "计划编号")
|
||||||
|
private String planCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验对象类型,1安全试验2网络实验3性能试验4
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实验对象类型,1安全试验2网络实验3性能试验4")
|
||||||
|
private String testObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验目的与预期结果
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "试验目的与预期结果")
|
||||||
|
private String testInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验环境
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实验环境")
|
||||||
|
private String testSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "负责人ID")
|
||||||
|
private Long personCharge;
|
||||||
|
|
||||||
|
private RemoteUserVo person;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参与人员IDS
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "参与人员IDS")
|
||||||
|
private String personIds;
|
||||||
|
|
||||||
|
private List<RemoteUserVo> persons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义检查项
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "自定义检查项")
|
||||||
|
private String inspectionItems;
|
||||||
|
|
||||||
|
private List<OpsInspectionItem> inspectionItemList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实验步骤
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "实验步骤")
|
||||||
|
private String testStep;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所需资源与设备
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "所需资源与设备")
|
||||||
|
private String testDevice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 风险评估与应对措施
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "风险评估与应对措施")
|
||||||
|
private String testSolutions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请状态 1已批准2进行中3已完成4草稿5未通过
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态")
|
||||||
|
private String testStatus;
|
||||||
|
|
||||||
|
//1启动2停止
|
||||||
|
private String testPlanType;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OpsInspectionTestTaskRecord {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本月完成数
|
||||||
|
*/
|
||||||
|
private String finishCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上月增加数
|
||||||
|
*/
|
||||||
|
private String finishCountAdd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本月通过率
|
||||||
|
*/
|
||||||
|
private String passValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过增长率
|
||||||
|
*/
|
||||||
|
private String passValueAdd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待分析数
|
||||||
|
*/
|
||||||
|
private String failCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均测试时间
|
||||||
|
*/
|
||||||
|
private String averageTestTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均测试时间数增长率
|
||||||
|
*/
|
||||||
|
private String averageTestTimeAdd;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,203 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTestTask;
|
||||||
|
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import cn.idev.excel.annotation.ExcelProperty;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
import io.github.linpeilie.annotations.AutoMapper;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.personnel.domain.vo.OpsUserVo;
|
||||||
|
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验任务视图对象 ops_inspection_test_task
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
@AutoMapper(target = OpsInspectionTestTask.class)
|
||||||
|
public class OpsInspectionTestTaskVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID(电站ID)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目ID(电站ID)")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务名称
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "任务名称")
|
||||||
|
private String taskName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试对象
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "测试对象")
|
||||||
|
private String testObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开始时间")
|
||||||
|
private Date beginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结束时间")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "时间段")
|
||||||
|
private String timeInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行人员
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "执行人员")
|
||||||
|
private Long person;
|
||||||
|
|
||||||
|
private RemoteUserVo personInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点IDS
|
||||||
|
*/
|
||||||
|
private String nodeIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 节点列表
|
||||||
|
*/
|
||||||
|
private List<OpsInspectionNodeVo> nodes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态,1待执行2暂停3失败4执行中5已完成
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "状态,1待执行2暂停3失败4执行中5已完成")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否已分析1未分析2已分析
|
||||||
|
*/
|
||||||
|
private String unPack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联测试计划ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联测试计划ID")
|
||||||
|
private Long testPlanId;
|
||||||
|
|
||||||
|
private OpsInspectionTestPlanVo testPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验环境
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "试验环境")
|
||||||
|
private String testSetting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "开始时间")
|
||||||
|
private Date planBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 进度
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "进度")
|
||||||
|
private BigDecimal progress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败原因
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "失败原因")
|
||||||
|
private String failReason;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "失败时间")
|
||||||
|
private Date failTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败阶段
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "失败阶段")
|
||||||
|
private Long failPhase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 失败原因分析
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "失败原因分析")
|
||||||
|
private String faileAnalyze;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 改进建议
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "改进建议")
|
||||||
|
private String faileTips;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试验时长(分钟)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "试验时长(分钟)")
|
||||||
|
private Long testLongTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结果")
|
||||||
|
private String testFinal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结果详情
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "结果详情")
|
||||||
|
private String finalInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停原因
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "暂停原因")
|
||||||
|
private String pauseFor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂停时间
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "暂停时间")
|
||||||
|
private Date pauseTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划完成时间
|
||||||
|
*/
|
||||||
|
private Date planFinishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建 时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package org.dromara.inspection.domain.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class OrderRecordVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本月派单数
|
||||||
|
*/
|
||||||
|
private String bypds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拍单数增长率
|
||||||
|
*/
|
||||||
|
private String pdzzl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均响应时间
|
||||||
|
*/
|
||||||
|
private String pjxysj;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应时间增长率
|
||||||
|
*/
|
||||||
|
private String xysjzzl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待接收工单
|
||||||
|
*/
|
||||||
|
private String djsgd;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按时完成率
|
||||||
|
*/
|
||||||
|
private String aswcl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成增长率
|
||||||
|
*/
|
||||||
|
private String wczzl;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionItem;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionItemVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-自定义巡检项Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionItemMapper extends BaseMapperPlus<OpsInspectionItem, OpsInspectionItemVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionMatter;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionMatterVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-待办Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionMatterMapper extends BaseMapperPlus<OpsInspectionMatter, OpsInspectionMatterVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionNode;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionNodeVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-通用节点Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionNodeMapper extends BaseMapperPlus<OpsInspectionNode, OpsInspectionNodeVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionOrder;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionOrderVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-工单Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-23
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionOrderMapper extends BaseMapperPlus<OpsInspectionOrder, OpsInspectionOrderVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionPlan;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionPlanVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-计划Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-19
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionPlanMapper extends BaseMapperPlus<OpsInspectionPlan, OpsInspectionPlanVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionRepair;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionRepairVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-抢修Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionRepairMapper extends BaseMapperPlus<OpsInspectionRepair, OpsInspectionRepairVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionReport;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionReportVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-报修Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-22
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionReportMapper extends BaseMapperPlus<OpsInspectionReport, OpsInspectionReportVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTask;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTaskVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检计划-任务Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionTaskMapper extends BaseMapperPlus<OpsInspectionTask, OpsInspectionTaskVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTaskProblem;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTaskProblemVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-任务-问题Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-26
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionTaskProblemMapper extends BaseMapperPlus<OpsInspectionTaskProblem, OpsInspectionTaskProblemVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTestPlan;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTestPlanVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验计划Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionTestPlanMapper extends BaseMapperPlus<OpsInspectionTestPlan, OpsInspectionTestPlanVo> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package org.dromara.inspection.mapper;
|
||||||
|
|
||||||
|
import org.dromara.inspection.domain.OpsInspectionTestTask;
|
||||||
|
import org.dromara.inspection.domain.vo.OpsInspectionTestTaskVo;
|
||||||
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运维-巡检-试验任务Mapper接口
|
||||||
|
*
|
||||||
|
* @author LionLi
|
||||||
|
* @date 2025-09-20
|
||||||
|
*/
|
||||||
|
public interface OpsInspectionTestTaskMapper extends BaseMapperPlus<OpsInspectionTestTask, OpsInspectionTestTaskVo> {
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user