@@ -133,6 +133,13 @@ | |||
<groupId>org.springframework.security</groupId> | |||
<artifactId>spring-security-core</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>net.coobird</groupId> | |||
<artifactId>thumbnailator</artifactId> | |||
<version>0.4.8</version> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -0,0 +1,40 @@ | |||
package com.tuoheng.common.core.config; | |||
import lombok.Data; | |||
import org.springframework.beans.factory.annotation.Value; | |||
import org.springframework.context.annotation.Configuration; | |||
/** | |||
* 文件上传配置 | |||
*/ | |||
@Configuration | |||
@Data | |||
public class UploadFileConfig { | |||
/** | |||
* 上传目录 | |||
*/ | |||
public static String uploadFolder; | |||
/** | |||
* 访问路径 | |||
*/ | |||
public static String staticAccessPath; | |||
/** | |||
* 上传服务器的映射文件夹 | |||
*/ | |||
public static String accessPath; | |||
@Value("${file.uploadFolder}") | |||
public void setUploadFolder(String path) { | |||
uploadFolder = path; | |||
} | |||
@Value("${file.staticAccessPath}") | |||
public void setStaticAccessPath(String path) { | |||
staticAccessPath = path; | |||
} | |||
@Value("${file.accessPath}") | |||
public void setAccessPath(String path) { | |||
accessPath = path; | |||
} | |||
} |
@@ -38,6 +38,11 @@ public class CommonConfig { | |||
*/ | |||
public static String pilotURL; | |||
/** | |||
* oidc地址 | |||
*/ | |||
public static String oidcUrl; | |||
/** | |||
* 图片域名赋值 | |||
* | |||
@@ -97,4 +102,13 @@ public class CommonConfig { | |||
pilotURL = url; | |||
} | |||
/** | |||
* OICD平台 | |||
* @param url 不同环境对应不同的url | |||
*/ | |||
@Value("${tuoheng.oidc-url}") | |||
public void setOidcUrlL(String url) { | |||
oidcUrl = url; | |||
} | |||
} |
@@ -0,0 +1,108 @@ | |||
package com.tuoheng.common.core.constant; | |||
/** | |||
* 系统公共常量 | |||
*/ | |||
public class CommonConstants { | |||
/** | |||
* UTF-8 字符集 | |||
*/ | |||
public static final String UTF8 = "UTF-8"; | |||
/** | |||
* GBK 字符集 | |||
*/ | |||
public static final String GBK = "GBK"; | |||
/** | |||
* http请求 | |||
*/ | |||
public static final String HTTP = "http://"; | |||
/** | |||
* https请求 | |||
*/ | |||
public static final String HTTPS = "https://"; | |||
/** | |||
* 成功标记 | |||
*/ | |||
public static final Integer SUCCESS = 200; | |||
/** | |||
* 失败标记 | |||
*/ | |||
public static final Integer FAIL = 500; | |||
/** | |||
* 登录成功 | |||
*/ | |||
public static final String LOGIN_SUCCESS = "Success"; | |||
/** | |||
* 注销 | |||
*/ | |||
public static final String LOGOUT = "Logout"; | |||
/** | |||
* 注册 | |||
*/ | |||
public static final String REGISTER = "Register"; | |||
/** | |||
* 登录失败 | |||
*/ | |||
public static final String LOGIN_FAIL = "Error"; | |||
/** | |||
* 当前记录起始索引 | |||
*/ | |||
public static final String PAGE_NUM = "pageNum"; | |||
/** | |||
* 每页显示记录数 | |||
*/ | |||
public static final String PAGE_SIZE = "pageSize"; | |||
/** | |||
* 排序列 | |||
*/ | |||
public static final String ORDER_BY_COLUMN = "orderByColumn"; | |||
/** | |||
* 排序的方向 "desc" 或者 "asc". | |||
*/ | |||
public static final String IS_ASC = "isAsc"; | |||
/** | |||
* 验证码 redis key | |||
*/ | |||
public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; | |||
/** | |||
* 验证码有效期(分钟) | |||
*/ | |||
public static final Integer CAPTCHA_EXPIRATION = 2; | |||
/** | |||
* 参数管理 cache key | |||
*/ | |||
public static final String SYS_CONFIG_KEY = "sys_config:"; | |||
/** | |||
* 字典管理 cache key | |||
*/ | |||
public static final String SYS_DICT_KEY = "sys_dict:"; | |||
/** | |||
* 资源映射路径 前缀 | |||
*/ | |||
public static final String RESOURCE_PREFIX = "/profile"; | |||
/** | |||
* 类型:1巡检任务 | |||
*/ | |||
public static final int INSPECTION_TASK_TYPE = 1; | |||
} |
@@ -0,0 +1,27 @@ | |||
package com.tuoheng.common.core.enums; | |||
import lombok.Getter; | |||
/** | |||
* 请求状态 | |||
* | |||
* @author chenyukun | |||
* @date 2022/06/14 | |||
*/ | |||
public enum HttpStatusEnum { | |||
NO_RESOURCES(600,"暂无可用的服务资源, 请稍后再试!"), | |||
; | |||
HttpStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,230 @@ | |||
package com.tuoheng.common.core.utils; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import org.springframework.web.multipart.MultipartFile; | |||
import javax.servlet.http.HttpServletRequest; | |||
import java.io.*; | |||
import java.net.HttpURLConnection; | |||
import java.net.URL; | |||
import java.net.URLConnection; | |||
import java.net.URLEncoder; | |||
/** | |||
* 文件处理工具类 | |||
*/ | |||
public class FileUtils { | |||
public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; | |||
/** | |||
* 验证文件名是否含有特殊字符 | |||
* | |||
* @param filename | |||
* @return | |||
*/ | |||
public static boolean isValidFilename(String filename) { | |||
return filename.matches(FILENAME_PATTERN); | |||
} | |||
/** | |||
* 下载文件并重新编码 | |||
* | |||
* @param request 网络请求 | |||
* @param fileName 文件名 | |||
* @return | |||
* @throws UnsupportedEncodingException | |||
*/ | |||
public static String setFileDownloadHeader(HttpServletRequest request, String fileName) | |||
throws UnsupportedEncodingException { | |||
final String agent = request.getHeader("USER-AGENT"); | |||
String filename = fileName; | |||
if (agent.contains("MSIE")) { | |||
// IE浏览器 | |||
filename = URLEncoder.encode(filename, "utf-8"); | |||
filename = filename.replace("+", " "); | |||
} else if (agent.contains("Firefox")) { | |||
// 火狐浏览器 | |||
filename = new String(fileName.getBytes(), "ISO8859-1"); | |||
} else if (agent.contains("Chrome")) { | |||
// google浏览器 | |||
filename = URLEncoder.encode(filename, "utf-8"); | |||
} else { | |||
// 其它浏览器 | |||
filename = URLEncoder.encode(filename, "utf-8"); | |||
} | |||
return filename; | |||
} | |||
/** | |||
* 输出指定文件的Byte数组 | |||
* | |||
* @param filePath | |||
* @param os | |||
* @throws IOException | |||
*/ | |||
public static void writeBytes(String filePath, OutputStream os) throws IOException { | |||
FileInputStream fis = null; | |||
try { | |||
File file = new File(filePath); | |||
if (!file.exists()) { | |||
throw new FileNotFoundException(filePath); | |||
} | |||
fis = new FileInputStream(file); | |||
byte[] b = new byte[1024]; | |||
int length; | |||
while ((length = fis.read(b)) > 0) { | |||
os.write(b, 0, length); | |||
} | |||
} catch (IOException e) { | |||
throw e; | |||
} finally { | |||
if (os != null) { | |||
try { | |||
os.close(); | |||
} catch (IOException e1) { | |||
e1.printStackTrace(); | |||
} | |||
} | |||
if (fis != null) { | |||
try { | |||
fis.close(); | |||
} catch (IOException e1) { | |||
e1.printStackTrace(); | |||
} | |||
} | |||
} | |||
} | |||
/** | |||
* 删除文件 | |||
* | |||
* @param filePath 文件路径 | |||
* @return | |||
*/ | |||
public static boolean deleteFile(String filePath) { | |||
boolean flag = false; | |||
File file = new File(filePath); | |||
// 路径为文件且不为空则进行删除 | |||
if (file.isFile() && file.exists()) { | |||
file.delete(); | |||
flag = true; | |||
} | |||
return flag; | |||
} | |||
/** | |||
* MultipartFile 转 File | |||
* | |||
* @param mFile | |||
* @param filePathName | |||
*/ | |||
public static File multipartFileToFile(MultipartFile mFile, String filePathName) { | |||
File file = null; | |||
if (ObjectUtil.isNull(mFile)) { | |||
throw new RuntimeException("图片不能为空!"); | |||
} else { | |||
InputStream ins = null; | |||
try { | |||
ins = mFile.getInputStream(); | |||
file = new File(filePathName); | |||
inputStreamToFile(ins, file); | |||
ins.close(); | |||
} catch (IOException e) { | |||
e.printStackTrace(); | |||
} | |||
ThumbnailUtil.cenerateCompression(filePathName,filePathName,300,0.8); | |||
return file; | |||
} | |||
} | |||
/** | |||
* File 转 MultipartFile | |||
* | |||
* @param file | |||
* @throws Exception | |||
*/ | |||
public static void fileToMultipartFile(File file) throws Exception { | |||
// FileInputStream fileInput = new FileInputStream(file); | |||
// MultipartFile toMultipartFile = new MockMultipartFile("file", file.getName(), "text/plain", getBytesByFile(fileInput)); | |||
// toMultipartFile.getInputStream(); | |||
} | |||
public static String txtToString(String fileUrl) throws Exception { | |||
StringBuilder sb = new StringBuilder(); | |||
int HttpResult; // 服务器返回的状态 | |||
try { | |||
URL url =new URL(fileUrl); // 创建URL | |||
URLConnection urlconn = url.openConnection(); // 试图连接并取得返回状态码 | |||
urlconn.connect(); | |||
HttpURLConnection httpconn =(HttpURLConnection)urlconn; | |||
HttpResult = httpconn.getResponseCode(); | |||
if(HttpResult != HttpURLConnection.HTTP_OK) { | |||
throw new RuntimeException("无法连接"); | |||
} else { | |||
InputStreamReader isReader = new InputStreamReader(urlconn.getInputStream(),"UTF-8"); | |||
BufferedReader reader = new BufferedReader(isReader); | |||
String line; // 用来保存每行读取的内容 | |||
line = reader.readLine(); // 读取第一行 | |||
while (line != null) { // 如果 line 为空说明读完了 | |||
sb.append(line); // 将读到的内容添加到 buffer 中 | |||
sb.append(" "); // 添加换行符 | |||
line = reader.readLine(); // 读取下一行 | |||
} | |||
} | |||
} | |||
catch (FileNotFoundException e) { | |||
e.printStackTrace(); | |||
} | |||
catch (IOException e) { | |||
e.printStackTrace(); | |||
} | |||
return sb.toString(); | |||
} | |||
public static void inputStreamToFile(InputStream ins, File file) { | |||
try { | |||
OutputStream os = new FileOutputStream(file); | |||
int bytesRead = 0; | |||
byte[] buffer = new byte[8192]; | |||
while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) { | |||
os.write(buffer, 0, bytesRead); | |||
} | |||
os.close(); | |||
ins.close(); | |||
} catch (Exception e) { | |||
e.printStackTrace(); | |||
} | |||
} | |||
/** | |||
* 将 File 转换成 Byte数组 | |||
* | |||
* @param fis | |||
* @return | |||
*/ | |||
public static byte[] getBytesByFile(FileInputStream fis) { | |||
try { | |||
ByteArrayOutputStream bos = new ByteArrayOutputStream(); | |||
byte[] b = new byte[1024 * 1024 * 10]; | |||
int n; | |||
while ((n = fis.read(b)) != -1) { | |||
bos.write(b, 0, n); | |||
} | |||
fis.close(); | |||
byte[] data = bos.toByteArray(); | |||
bos.close(); | |||
return data; | |||
} catch (Exception e) { | |||
e.printStackTrace(); | |||
} | |||
return null; | |||
} | |||
} |
@@ -108,7 +108,7 @@ public class HttpUtils { | |||
return result.toString(); | |||
} catch (Exception e) { | |||
log.error("post请求失败,{}",e.getMessage()); | |||
return "post请求失败!"; | |||
return ""; | |||
} | |||
} | |||
@@ -208,6 +208,33 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { | |||
return str.substring(start, end); | |||
} | |||
/** | |||
* 截取字符串str中指定字符 strStart、strEnd之间的字符串 | |||
* | |||
* @param str | |||
* @param strStart | |||
* @param strEnd | |||
* @return | |||
*/ | |||
public static String subString(String str, String strStart, String strEnd) { | |||
/* 找出指定的2个字符在 该字符串里面的 位置 */ | |||
int strStartIndex = str.indexOf(strStart); | |||
int strEndIndex = str.indexOf(strEnd); | |||
/* index 为负数 即表示该字符串中 没有该字符 */ | |||
if (strStartIndex < 0) { | |||
return "字符串 :---->" + str + "<---- 中不存在 " + strStart + ", 无法截取目标字符串"; | |||
} | |||
if (strEndIndex < 0) { | |||
return "字符串 :---->" + str + "<---- 中不存在 " + strEnd + ", 无法截取目标字符串"; | |||
} | |||
/* 开始截取 */ | |||
String result = str.substring(strStartIndex, strEndIndex).substring(strStart.length()); | |||
return result; | |||
} | |||
/** | |||
* 字符串转set | |||
* |
@@ -0,0 +1,113 @@ | |||
package com.tuoheng.common.core.utils; | |||
import net.coobird.thumbnailator.Thumbnails; | |||
import javax.imageio.ImageIO; | |||
import java.awt.image.BufferedImage; | |||
import java.io.*; | |||
import java.math.BigDecimal; | |||
public class ThumbnailUtil { | |||
/** | |||
* 生成压缩图 | |||
* @param url 原图地址 | |||
* @param desFileSize 指定图片大小,单位kb | |||
* @param accuracy 精度,递归压缩的比率,建议小于0.9 | |||
* @return | |||
*/ | |||
public static String cenerateCompression(String url,String urlThumbnail,long desFileSize , double accuracy){ | |||
//String urlThumbnail= UploadFileConfig.uploadFolder +"Thumbnail"+ imgUrl; | |||
String root= urlThumbnail.substring(0,urlThumbnail.lastIndexOf("/")); | |||
//如果指定的文件夹不存在 则创建 | |||
File filedir=new File(root); | |||
if (!filedir.exists()) { | |||
filedir.mkdirs();//创建文件夹 | |||
} | |||
//图片文件 | |||
File fileThumbnail = new File(urlThumbnail); | |||
if (fileThumbnail.exists()&&fileThumbnail.length() <= desFileSize * 1024) { | |||
System.out.println("已存在压缩文件!"); | |||
return urlThumbnail; | |||
} | |||
//原图 | |||
File file = new File(url); | |||
if (!file.exists() || !file.isFile()) { | |||
System.out.println("文件不存在"); | |||
} | |||
try { | |||
if(!fileThumbnail.exists()) { | |||
copyFileUsingFileStreams(file, new File(urlThumbnail)); | |||
} | |||
}catch (IOException e){ | |||
e.printStackTrace(); | |||
} | |||
urlThumbnail = commpressPicForScale(url, urlThumbnail, desFileSize, accuracy); | |||
return urlThumbnail; | |||
} | |||
/** | |||
* | |||
* @param srcPath 原图片地址 | |||
* @param desPath 目标图片地址 | |||
* @param desFileSize 指定图片大小,单位kb | |||
* @param accuracy 精度,递归压缩的比率,建议小于0.9 | |||
* @return | |||
*/ | |||
public static String commpressPicForScale(String srcPath,String desPath, | |||
long desFileSize , double accuracy){ | |||
try { | |||
File srcFile = new File(srcPath); | |||
long srcFilesize = srcFile.length(); | |||
System.out.println("原图片:"+srcPath + ",大小:" + srcFilesize/1024 + "kb"); | |||
//递归压缩,直到目标文件大小小于desFileSize | |||
commpressPicCycle(desPath, desFileSize, accuracy); | |||
File desFile = new File(desPath); | |||
System.out.println("目标图片:" + desPath + ",大小" + desFile.length()/1024 + "kb"); | |||
System.out.println("图片压缩完成!"); | |||
} catch (Exception e) { | |||
e.printStackTrace(); | |||
} | |||
return desPath; | |||
} | |||
public static void commpressPicCycle(String desPath , long desFileSize, | |||
double accuracy) throws IOException{ | |||
File imgFile = new File(desPath); | |||
long fileSize = imgFile.length(); | |||
//判断大小,如果小于desFileSizek,不压缩,如果大于等于desFileSizek,压缩 | |||
if(fileSize <= desFileSize * 1024){ | |||
return; | |||
} | |||
//计算宽高 | |||
BufferedImage bim = ImageIO.read(imgFile); | |||
int imgWidth = bim.getWidth(); | |||
int imgHeight = bim.getHeight(); | |||
int desWidth = new BigDecimal(imgWidth).multiply( | |||
new BigDecimal(accuracy)).intValue(); | |||
int desHeight = new BigDecimal(imgHeight).multiply( | |||
new BigDecimal(accuracy)).intValue(); | |||
Thumbnails.of(desPath).size(desWidth, desHeight).outputQuality(accuracy).toFile(desPath); | |||
//如果不满足要求,递归直至满足小于1M的要求 | |||
commpressPicCycle(desPath, desFileSize, accuracy); | |||
} | |||
private static void copyFileUsingFileStreams(File source, File dest) | |||
throws IOException { | |||
InputStream input = null; | |||
OutputStream output = null; | |||
try { | |||
input = new FileInputStream(source); | |||
output = new FileOutputStream(dest); | |||
byte[] buf = new byte[1024]; | |||
int bytesRead; | |||
while ((bytesRead = input.read(buf)) > 0) { | |||
output.write(buf, 0, bytesRead); | |||
} | |||
} finally { | |||
input.close(); | |||
output.close(); | |||
} | |||
} | |||
} |
@@ -142,6 +142,19 @@ | |||
<artifactId>mapstruct-processor</artifactId> | |||
<version>1.5.3.Final</version> | |||
</dependency> | |||
<!-- 处理word --> | |||
<dependency> | |||
<groupId>com.lowagie</groupId> | |||
<artifactId>itext</artifactId> | |||
<version>2.1.7</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.lowagie</groupId> | |||
<artifactId>itext-rtf</artifactId> | |||
<version>2.1.7</version> | |||
</dependency> | |||
</dependencies> | |||
<!-- 环境变量配置 --> |
@@ -2,25 +2,29 @@ package com.tuoheng.admin.constant; | |||
/** | |||
* oidc认证平台常量url | |||
* | |||
* @Author xiaoying | |||
* @Date 2022/10/18 10:52 | |||
*/ | |||
public class OidcUrlConstant { | |||
public interface OidcUrlConstant { | |||
/** | |||
* 判断username是否已存在 | |||
*/ | |||
public static String USER_JUDGE = "/oidc/admin/user/judge/create/{username}"; | |||
String USER_JUDGE = "/oidc/admin/user/judge/create/{username}"; | |||
/** | |||
* 判断username是否已存在 | |||
*/ | |||
public static String USER_CREATE = "/oidc/admin/user/create"; | |||
String USER_CREATE = "/oidc/admin/user/create"; | |||
/** | |||
* 判断username是否已存在 | |||
*/ | |||
public static String USER_UPDATEPASS = "/oidc/admin/user/updatePass"; | |||
String USER_UPDATEPASS = "/oidc/admin/user/updatePass"; | |||
/** | |||
* 修改用户角色 | |||
*/ | |||
public static String USER_UPDATEROLE = "/oidc/admin/user/updateRole"; | |||
String USER_UPDATEROLE = "/oidc/admin/user/updateRole"; | |||
} |
@@ -7,6 +7,8 @@ public interface SystemConstant { | |||
*/ | |||
String ROOT_DEPT_PID = "0"; | |||
String INIT_PASSWORD = "123456"; | |||
/** | |||
* 高德url地址 | |||
*/ | |||
@@ -27,6 +29,11 @@ public interface SystemConstant { | |||
*/ | |||
String API_AIRPORT_EXECUTE_TASK = "/api/airportInterface/executeTask"; | |||
/** | |||
* 机场平台:获取天气 | |||
*/ | |||
String API_AIRPORT_GET_WEATHER = "/api/airportInterface/getWeather"; | |||
// 飞手平台不同接口url | |||
/** | |||
* 新增任务接口 |
@@ -1,8 +1,8 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.aliyuncs.sts.model.v20150401.AssumeRoleResponse; | |||
import com.tuoheng.admin.service.IAliyunOssService; | |||
import com.tuoheng.admin.service.impl.AliyunOssServiceImpl; | |||
import com.tuoheng.admin.service.aliyun.IAliyunOssService; | |||
import com.tuoheng.admin.service.aliyun.AliyunOssServiceImpl; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; |
@@ -1,6 +1,6 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.service.IAliyuncsVodService; | |||
import com.tuoheng.admin.service.aliyun.IAliyuncsVodService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; |
@@ -0,0 +1,99 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.Menu; | |||
import com.tuoheng.admin.query.MenuQuery; | |||
import com.tuoheng.admin.service.menu.IMenuService; | |||
import com.tuoheng.common.core.annotation.Log; | |||
import com.tuoheng.common.core.enums.LogType; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import java.util.List; | |||
/** | |||
* 小程序菜单表 前端控制器 | |||
* | |||
* @Author ChengWang | |||
* @Date 2022/12/23 | |||
*/ | |||
@RestController | |||
@RequestMapping("/apiMenu") | |||
public class ApiMenuController { | |||
@Autowired | |||
private IMenuService menuService; | |||
/** | |||
* 获取菜单列表 | |||
* @param menuQuery | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public JsonResult index(MenuQuery menuQuery){ | |||
return menuService.getList(menuQuery); | |||
} | |||
/** | |||
* 获取菜单详情 | |||
* @param menuId | |||
* @return | |||
*/ | |||
@GetMapping("/info/{menuId}") | |||
public JsonResult info(@PathVariable("menuId") Integer menuId) { | |||
return menuService.info(menuId); | |||
} | |||
/** | |||
* 添加菜单 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@Log(title = "菜单管理", logType = LogType.INSERT) | |||
@PostMapping("/add") | |||
public JsonResult add(@RequestBody Menu entity) { | |||
return menuService.edit(entity); | |||
} | |||
/** | |||
* 编辑菜单 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@Log(title = "菜单管理", logType = LogType.UPDATE) | |||
// @RequiresPermissions("sys:menu:edit") | |||
@PutMapping("/edit") | |||
public JsonResult edit(@RequestBody Menu entity) { | |||
return menuService.edit(entity); | |||
} | |||
/** | |||
* 删除菜单 | |||
* | |||
* @param menuId 菜单ID | |||
* @return | |||
*/ | |||
@Log(title = "菜单管理", logType = LogType.DELETE) | |||
// @RequiresPermissions("sys:menu:delete") | |||
@DeleteMapping("/delete/{menuId}") | |||
public JsonResult delete(@PathVariable("menuId") Integer menuId) { | |||
return menuService.deleteById(menuId); | |||
} | |||
/** | |||
* 获取所有菜单列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/getMenuAll") | |||
public JsonResult getMenuAll() { | |||
List<Menu> menuList = menuService.getMenuAll(); | |||
return JsonResult.success(menuList); | |||
} | |||
} |
@@ -3,8 +3,7 @@ package com.tuoheng.admin.controller; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.tuoheng.admin.entity.FlightData; | |||
import com.tuoheng.admin.query.FlightDataQuery; | |||
import com.tuoheng.admin.service.IFlightDataService; | |||
import com.tuoheng.common.core.common.OperationEnum; | |||
import com.tuoheng.admin.service.flightdata.IFlightDataService; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
@@ -30,17 +29,4 @@ public class FlightDataController { | |||
return flightDataService.getFlightDataList(flightDataQuery); | |||
} | |||
/** | |||
* 飞行遥测数据入库 | |||
* @param entity | |||
* @return | |||
*/ | |||
@PostMapping("/addCallback") | |||
public OperationEnum addCallback(@RequestBody FlightData entity){ | |||
flightDataService.addCallback(entity); | |||
return OperationEnum.OPERATION_SUCCESS; | |||
} | |||
} |
@@ -1,9 +1,7 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.dto.InspectionDto; | |||
import com.tuoheng.admin.entity.FlightData; | |||
import com.tuoheng.admin.query.InspectionFileQuery; | |||
import com.tuoheng.admin.request.inspection.AddInspectionRequest; | |||
import com.tuoheng.admin.request.inspection.EditInspectionRequest; | |||
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest; | |||
@@ -84,42 +82,46 @@ public class InspectionController { | |||
/** | |||
* 根据机场id查询任务 | |||
* | |||
* @param dto | |||
* @return | |||
*/ | |||
@GetMapping("/listByAirportId") | |||
public JsonResult getListByAirportId(InspectionDto dto){ | |||
public JsonResult getListByAirportId(InspectionDto dto) { | |||
return iInspectionService.getListByAirportId(dto); | |||
} | |||
/** | |||
* 根据id获取任务视频回放和直播 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@GetMapping("/videoById/{id}") | |||
public JsonResult videoById(@PathVariable("id") String id){ | |||
public JsonResult videoById(@PathVariable("id") String id) { | |||
return iInspectionService.getVideoById(id); | |||
} | |||
/** | |||
* 获取飞行轨迹 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@GetMapping("/findFlightData/{id}") | |||
public JsonResult finFlightData(@PathVariable("id") String id){ | |||
public JsonResult finFlightData(@PathVariable("id") String id) { | |||
return iInspectionService.findFlightData(id); | |||
} | |||
/** | |||
* 根据巡检id查询最新一条遥测数据 | |||
* | |||
* @param inspectionId | |||
* @return | |||
*/ | |||
@GetMapping("/getFlightDataByInspectionId") | |||
public FlightData getFlightDataByInspectionId(@RequestParam("inspectionId") String inspectionId){ | |||
public FlightData getFlightDataByInspectionId(@RequestParam("inspectionId") String inspectionId) { | |||
return iInspectionService.getFlightDataByInspectionId(inspectionId); | |||
} | |||
@@ -134,6 +136,7 @@ public class InspectionController { | |||
/** | |||
* 立即执行 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@@ -145,11 +148,12 @@ public class InspectionController { | |||
/** | |||
* 根据用户id获取最新的五条任务信息 | |||
* | |||
* @param | |||
* @return | |||
*/ | |||
@GetMapping("/getNewInspectionList") | |||
public JsonResult getNewInspectionList(){ | |||
public JsonResult getNewInspectionList() { | |||
return iInspectionService.getNewInspectionList(); | |||
} | |||
@@ -5,8 +5,9 @@ import com.tuoheng.admin.request.inspectionfile.QueryInspectionFileDistributionL | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListByInspectionIdRequest; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFileWorkOrderPageListRequest; | |||
import com.tuoheng.admin.service.IInspectionFileService; | |||
import com.tuoheng.admin.service.inspectionfile.IInspectionFileService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
@@ -16,6 +17,7 @@ import java.util.List; | |||
* @Author ChengWang | |||
* @Date 2022/11/29 | |||
*/ | |||
@Slf4j | |||
@RestController | |||
@RequestMapping("/inspectionFile") | |||
public class InspectionFileController { | |||
@@ -63,7 +65,7 @@ public class InspectionFileController { | |||
} | |||
/** | |||
* 任务问题忽略 | |||
* 任务问题确认 | |||
* | |||
* @return | |||
*/ | |||
@@ -113,4 +115,13 @@ public class InspectionFileController { | |||
public JsonResult getListByWorkOrderId(QueryInspectionFileWorkOrderPageListRequest request){ | |||
return iInspectionFileService.getPageListByWorkOrderId(request); | |||
} | |||
/** | |||
* 修改巡检任务问题类型 | |||
*/ | |||
@PutMapping("/edit/question/{id}/{questionName}") | |||
public JsonResult editQuestionTyppe(@PathVariable("id") String id, @PathVariable("questionName") Integer questionName) { | |||
log.info("进入修改问题类型接口, id={}, questionName={}", id, questionName); | |||
return iInspectionFileService.editQuestionTyppe(id, questionName); | |||
} | |||
} |
@@ -1,7 +1,7 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.request.inspectionfile.InspectionFileProcessingRresultRequest; | |||
import com.tuoheng.admin.service.IInspectionFileService; | |||
import com.tuoheng.admin.service.inspectionfile.IInspectionFileService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.PostMapping; |
@@ -0,0 +1,102 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.Menu; | |||
import com.tuoheng.admin.query.MenuQuery; | |||
import com.tuoheng.admin.service.menu.IMenuService; | |||
import com.tuoheng.common.core.annotation.Log; | |||
import com.tuoheng.common.core.common.BaseController; | |||
import com.tuoheng.common.core.enums.LogType; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import java.util.List; | |||
/** | |||
* 系统菜单表 前端控制器 | |||
* | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
@RestController | |||
@RequestMapping("/menu") | |||
public class MenuController extends BaseController { | |||
@Autowired | |||
private IMenuService menuService; | |||
/** | |||
* 获取菜单列表 | |||
* | |||
* @param menuQuery 查询条件 | |||
* @return | |||
*/ | |||
// @RequiresPermissions("sys:menu:index") | |||
@GetMapping("/index") | |||
public JsonResult index(MenuQuery menuQuery) { | |||
return menuService.getList(menuQuery); | |||
} | |||
/** | |||
* 获取菜单详情 | |||
* | |||
* @param menuId 菜单ID | |||
* @return | |||
*/ | |||
@GetMapping("/info/{menuId}") | |||
public JsonResult info(@PathVariable("menuId") Integer menuId) { | |||
return menuService.info(menuId); | |||
} | |||
/** | |||
* 添加菜单 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@Log(title = "菜单管理", logType = LogType.INSERT) | |||
// @RequiresPermissions("sys:menu:add") | |||
@PostMapping("/add") | |||
public JsonResult add(@RequestBody Menu entity) { | |||
return menuService.edit(entity); | |||
} | |||
/** | |||
* 编辑菜单 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@Log(title = "菜单管理", logType = LogType.UPDATE) | |||
// @RequiresPermissions("sys:menu:edit") | |||
@PutMapping("/edit") | |||
public JsonResult edit(@RequestBody Menu entity) { | |||
return menuService.edit(entity); | |||
} | |||
/** | |||
* 删除菜单 | |||
* | |||
* @param menuId 菜单ID | |||
* @return | |||
*/ | |||
@Log(title = "菜单管理", logType = LogType.DELETE) | |||
// @RequiresPermissions("sys:menu:delete") | |||
@DeleteMapping("/delete/{menuId}") | |||
public JsonResult delete(@PathVariable("menuId") Integer menuId) { | |||
return menuService.deleteById(menuId); | |||
} | |||
/** | |||
* 获取所有菜单列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/getMenuAll") | |||
public JsonResult getMenuAll() { | |||
List<Menu> menuList = menuService.getMenuAll(); | |||
return JsonResult.success(menuList); | |||
} | |||
} |
@@ -0,0 +1,82 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.dto.GetPermissionRoleIdListByApiUrlDto; | |||
import com.tuoheng.admin.entity.OpPermissions; | |||
import com.tuoheng.admin.query.RoleClientQuery; | |||
import com.tuoheng.admin.service.permissions.OpPermissionsService; | |||
import com.tuoheng.common.core.common.BaseController; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
@RestController | |||
@RequestMapping("/permission") | |||
public class PermissionController{ | |||
@Autowired | |||
private OpPermissionsService permissionService; | |||
/** | |||
* 根据 RoleId 获取用户权限 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/getRolePermission") | |||
public JsonResult getMenuAndPermissionByRoleId(RoleClientQuery query) { | |||
return permissionService.getRolePermissionByRoleId(query); | |||
} | |||
/** | |||
* 根据ApiUrl获取角色集合 | |||
* | |||
* @return | |||
*/ | |||
@PostMapping("/getRoleIdList") | |||
public JsonResult getRoleIdListByApiUrl(@RequestBody GetPermissionRoleIdListByApiUrlDto getPermissionRoleIdListByApiUrlDto) { | |||
return permissionService.getRoleIdListByApiUrl(getPermissionRoleIdListByApiUrlDto.getApiUrl()); | |||
} | |||
/** | |||
* 添加权限(按钮) | |||
* | |||
* @param opPermissions | |||
* @return | |||
*/ | |||
@PostMapping("/add") | |||
public JsonResult add(@RequestBody OpPermissions opPermissions) { | |||
return permissionService.edit(opPermissions); | |||
} | |||
/** | |||
* 编辑权限(按钮) | |||
* | |||
* @param opPermissions | |||
* @return | |||
*/ | |||
@PutMapping("/edit") | |||
public JsonResult edit(@RequestBody OpPermissions opPermissions) { | |||
return permissionService.edit(opPermissions); | |||
} | |||
/** | |||
* 删除权限按钮(更新) | |||
* @param id | |||
* @return | |||
*/ | |||
@DeleteMapping("/delete/{id}") | |||
public JsonResult delete(@PathVariable("id") Integer id) { | |||
boolean flag = permissionService.update().eq("id",id).set("mark", 0).update(); | |||
if (flag) { | |||
return JsonResult.success(); | |||
} else { | |||
return JsonResult.error(); | |||
} | |||
} | |||
} |
@@ -0,0 +1,85 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.request.report.QueryReportPageListRequest; | |||
import com.tuoheng.admin.service.report.IReportService; | |||
import com.tuoheng.admin.service.report.query.QueryInspectionReportService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
/** | |||
* @desc: 巡检报告 | |||
* @team: tuoheng | |||
* @author: wanjing | |||
* @date: 2022-12-09 | |||
*/ | |||
@Slf4j | |||
@RestController | |||
@RequestMapping("/report") | |||
public class ReportController { | |||
@Autowired | |||
private IReportService reportService; | |||
@Autowired | |||
private QueryInspectionReportService queryInspectionReportService; | |||
/** | |||
* 生成巡检报告 | |||
*/ | |||
@PostMapping("/generate/{id}") | |||
public JsonResult generate(@PathVariable("id") String id) { | |||
log.info("进入生成报告接口"); | |||
return reportService.generate(id); | |||
} | |||
/** | |||
* 查看巡检报告分页列表 | |||
*/ | |||
@GetMapping("/page/list") | |||
public JsonResult getPageList(QueryReportPageListRequest request) { | |||
log.info("进入查询报告分页列表接口"); | |||
return reportService.getPageList(request); | |||
} | |||
/** | |||
* 查看巡检报告 | |||
*/ | |||
@GetMapping("/inspection/{id}") | |||
public JsonResult getInspectionReport(@PathVariable("id") String id) { | |||
log.info("进入查看巡检报告接口"); | |||
return reportService.getInspectionReport(id); | |||
} | |||
/** | |||
* 导出巡检报告 | |||
*/ | |||
@GetMapping("/export/inspection/{id}") | |||
public void exportInspectionReport(@PathVariable("id")String id, HttpServletRequest request, HttpServletResponse response) { | |||
log.info("进入导出巡检报告接口"); | |||
reportService.exportInspectionReport(request, response, id); | |||
} | |||
/** | |||
* 查看处理报告 | |||
*/ | |||
@GetMapping("/inspection/handle/{id}") | |||
public JsonResult getHandleReport(@PathVariable("id") String id) { | |||
log.info("进入查看处理报告接口"); | |||
return reportService.getInspectionHandleReport(id); | |||
} | |||
/** | |||
* 导出处理报告 | |||
*/ | |||
@GetMapping("/export/inspection/handle/{id}") | |||
public void exportHandleReport(@PathVariable("id")String id, HttpServletRequest request, HttpServletResponse response) { | |||
log.info("进入导出处理报告接口"); | |||
reportService.exportInspectionHandleReport(request, response, id); | |||
} | |||
} |
@@ -2,7 +2,7 @@ package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.RoadInformation; | |||
import com.tuoheng.admin.query.RoadInformationQuery; | |||
import com.tuoheng.admin.service.RoadInformationService; | |||
import com.tuoheng.admin.service.road.RoadInformationService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; |
@@ -0,0 +1,123 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.dto.RoleMenuDto; | |||
import com.tuoheng.admin.entity.Role; | |||
import com.tuoheng.admin.query.RoleClientQuery; | |||
import com.tuoheng.admin.query.RoleQuery; | |||
import com.tuoheng.admin.service.role.IRoleService; | |||
import com.tuoheng.common.core.annotation.Log; | |||
import com.tuoheng.common.core.enums.LogType; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
@RestController | |||
@RequestMapping("role") | |||
public class RoleController { | |||
@Autowired | |||
private IRoleService roleService; | |||
/** | |||
* 获取角色列表 | |||
* @param roleQuery | |||
* @return | |||
*/ | |||
@GetMapping("/index") | |||
public JsonResult index(RoleQuery roleQuery){ | |||
return roleService.getRoleList(roleQuery); | |||
} | |||
/** | |||
* 添加角色 | |||
* @param entity | |||
* @return | |||
*/ | |||
@PostMapping("/add") | |||
public JsonResult add(@RequestBody Role entity){ | |||
return roleService.editRole(entity); | |||
} | |||
/** | |||
* 编辑角色 | |||
* @param entity | |||
* @return | |||
*/ | |||
@PutMapping("/edit") | |||
public JsonResult edit(@RequestBody Role entity){ | |||
return roleService.editRole(entity); | |||
} | |||
/** | |||
* 删除角色 | |||
* | |||
* @param roleIds 角色ID | |||
* @return | |||
*/ | |||
@Log(title = "角色管理", logType = LogType.DELETE) | |||
// @RequiresPermissions("sys:role:delete") | |||
@DeleteMapping("/delete/{roleIds}") | |||
public JsonResult delete(@PathVariable("roleIds") Integer[] roleIds) { | |||
return roleService.deleteByList(roleIds); | |||
} | |||
/** | |||
* 获取角色列表 | |||
* | |||
* @return | |||
*/ | |||
@GetMapping("/getRoleList") | |||
public JsonResult getRoleList() { | |||
return roleService.getRoleLists(); | |||
} | |||
/** | |||
* 获取角色菜单列表 | |||
* | |||
* @param query | |||
* @return | |||
*/ | |||
@GetMapping("/getMenuList") | |||
public JsonResult getMenuList(RoleClientQuery query) { | |||
return roleService.getMenuList(query); | |||
} | |||
/** | |||
* 更新角色状态 | |||
* @param entity | |||
* @return | |||
*/ | |||
@PutMapping("/status") | |||
public JsonResult updateStatus(@RequestBody Role entity){ | |||
return roleService.updateStatus(entity); | |||
} | |||
/** | |||
* 保存角色权限数据 | |||
* | |||
* @param roleMenuDto 角色菜单Dto | |||
* @return | |||
*/ | |||
// @RequiresPermissions("sys:role:permission") | |||
@PostMapping("/savePermission") | |||
public JsonResult savePermission(@RequestBody RoleMenuDto roleMenuDto) { | |||
return roleService.savePermission(roleMenuDto); | |||
} | |||
/** | |||
* 初始化租户固定角色 | |||
* @param ids | |||
* @return | |||
*/ | |||
@GetMapping("/test/{ids}") | |||
public JsonResult test(@PathVariable("ids") Integer[] ids){ | |||
return roleService.roleToTenant(ids); | |||
} | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.common.core.common.BaseController; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
@RestController | |||
@RequestMapping("/role-menu") | |||
public class RoleMenuController extends BaseController { | |||
} |
@@ -2,7 +2,7 @@ package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.Section; | |||
import com.tuoheng.admin.query.SectionQuery; | |||
import com.tuoheng.admin.service.ISectionService; | |||
import com.tuoheng.admin.service.section.ISectionService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; |
@@ -2,7 +2,7 @@ package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.Structure; | |||
import com.tuoheng.admin.query.StructureQuery; | |||
import com.tuoheng.admin.service.IStructureService; | |||
import com.tuoheng.admin.service.structure.IStructureService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; |
@@ -1,13 +1,15 @@ | |||
package com.tuoheng.admin.controller; | |||
import com.tuoheng.admin.entity.User; | |||
import com.tuoheng.admin.request.user.QueryUserPageListRequest; | |||
import com.tuoheng.admin.request.user.UserResetPwdRequest; | |||
import com.tuoheng.admin.service.user.IUserService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import org.springframework.web.bind.annotation.*; | |||
import java.util.List; | |||
/** | |||
* 用户前端控制器 | |||
@@ -24,6 +26,85 @@ public class UserController { | |||
@Autowired | |||
private IUserService userService; | |||
/** | |||
* 获取用户分页列表 | |||
* | |||
* @param request 查询条件 | |||
* @return | |||
*/ | |||
@GetMapping("/page/list") | |||
public JsonResult getPageList(QueryUserPageListRequest request) { | |||
return userService.getPageList(request); | |||
} | |||
/** | |||
* 获取用户详情 | |||
* | |||
* @param id 用户ID | |||
* @return | |||
*/ | |||
@GetMapping("/info/{id}") | |||
public JsonResult getUserInfo(@PathVariable("id") String id) { | |||
return userService.getUserInfo(id); | |||
} | |||
/** | |||
* 添加用户 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@PostMapping("/add") | |||
public JsonResult add(@RequestBody User entity) { | |||
return userService.add(entity); | |||
} | |||
/** | |||
* 编辑用户 | |||
* | |||
* @param entity 实体对象 | |||
* @return | |||
*/ | |||
@PutMapping("/edit") | |||
public JsonResult edit(@RequestBody User entity) { | |||
return userService.edit(entity); | |||
} | |||
/** | |||
* 删除用户 | |||
* | |||
* @param idList 用户ID | |||
* @return | |||
*/ | |||
@DeleteMapping("/delete/{idList}") | |||
public JsonResult deleteByIdList(@PathVariable("idList") List<String> idList) { | |||
return userService.deleteByIdList(idList); | |||
} | |||
/** | |||
* 设置状态 | |||
* | |||
* @param id | |||
* @param status | |||
* | |||
* @return | |||
*/ | |||
@PutMapping("/edit/status/{id}/{status}") | |||
public JsonResult status(@PathVariable("id") String id, @PathVariable("status") Integer status) { | |||
return userService.updeateStatus(id, status); | |||
} | |||
/** | |||
* 重置密码 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@PutMapping("/resetPwd/{id}") | |||
public JsonResult resetPwd(@PathVariable("id") String id) { | |||
return userService.resetPassword(id); | |||
} | |||
/** | |||
* 根据部门id查询用户列表 | |||
*/ |
@@ -0,0 +1,51 @@ | |||
package com.tuoheng.admin.controller.callback; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.tuoheng.admin.request.inspection.InspectionRequest; | |||
import com.tuoheng.admin.request.inspection.MissionStatusRequest; | |||
import com.tuoheng.admin.service.airport.AirportService; | |||
import com.tuoheng.admin.service.inspection.IInspectionService; | |||
import com.tuoheng.common.core.common.OperationEnum; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.validation.Valid; | |||
/** | |||
* 机场平台回调前端控制器 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-23 | |||
*/ | |||
@Slf4j | |||
@RestController | |||
@RequestMapping("/airport/callback") | |||
public class AirPortCallbackController { | |||
@Autowired | |||
private IInspectionService iInspectionService; | |||
/** | |||
* 被硬件调用,存任务状态 | |||
*/ | |||
@PutMapping("/status") | |||
public JsonResult updateStatus(@RequestBody @Valid MissionStatusRequest missionStatusRequest) { | |||
log.info("被硬件调用,存任务状态:{}", JSONObject.toJSONString(missionStatusRequest)); | |||
return iInspectionService.updateStatus(missionStatusRequest); | |||
} | |||
/** | |||
* 被硬件调用,存飞行轨迹 | |||
*/ | |||
@PostMapping("/track") | |||
public OperationEnum track(@RequestBody @Valid InspectionRequest inspectionRequest) { | |||
log.info("被硬件调用,存飞行轨迹:{}", JSONObject.toJSONString(inspectionRequest)); | |||
return iInspectionService.track(inspectionRequest); | |||
} | |||
} |
@@ -0,0 +1,37 @@ | |||
package com.tuoheng.admin.controller.callback; | |||
import com.tuoheng.admin.entity.FlightData; | |||
import com.tuoheng.admin.service.flightdata.IFlightDataService; | |||
import com.tuoheng.common.core.common.OperationEnum; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* <p> | |||
* 云盒遥测数据表 前端控制器 | |||
* </p> | |||
* | |||
* @author 拓恒 | |||
* @since 2021-09-18 | |||
*/ | |||
@RestController | |||
@RequestMapping("/cloudbox/callback") | |||
public class CloudBoxCallbackoxController { | |||
@Autowired | |||
private IFlightDataService flightDataService; | |||
/** | |||
* 飞行遥测数据入库 | |||
* | |||
* @param entity | |||
* @return | |||
*/ | |||
public OperationEnum addCallback(@RequestBody FlightData entity) { | |||
flightDataService.addCallback(entity); | |||
return OperationEnum.OPERATION_SUCCESS; | |||
} | |||
} |
@@ -0,0 +1,39 @@ | |||
package com.tuoheng.admin.controller.callback; | |||
import com.tuoheng.admin.request.third.DspCallbackRequest; | |||
import com.tuoheng.admin.service.third.dsp.IDspCallbackService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.validation.Valid; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.Pattern; | |||
/** | |||
* DSP回调-控制器 | |||
* | |||
* @author 拓恒 | |||
* @since 2021-09-01 | |||
*/ | |||
@RestController | |||
@RequestMapping("/dsp/callback") | |||
public class DspCallbackController { | |||
@Autowired | |||
private IDspCallbackService dspCallbackService; | |||
/** | |||
* 视频地址、问题图片回调接口 | |||
* | |||
* @param dspCallbackRequest 回调请求体 | |||
* @return JsonResult | |||
*/ | |||
@PostMapping("/{requestId}") | |||
public JsonResult callback(@Valid @Pattern(regexp = "^[a-zA-Z0-9]{0,36}$") | |||
@NotBlank @PathVariable String requestId, | |||
@Valid @RequestBody DspCallbackRequest dspCallbackRequest) { | |||
return dspCallbackService.saveCallbackData(requestId, dspCallbackRequest); | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.controller.callback; | |||
import com.tuoheng.admin.request.inspection.UpdateTaskByCodeRequest; | |||
import com.tuoheng.admin.request.inspection.UploadFlightUrlRequest; | |||
import com.tuoheng.admin.service.inspection.IInspectionService; | |||
import com.tuoheng.common.core.utils.JsonResult; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
/** | |||
* 飞手平台回调 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-22 | |||
*/ | |||
@Slf4j | |||
@RestController | |||
@RequestMapping("/pilot/callback") | |||
public class PilotCallbackController { | |||
@Autowired | |||
private IInspectionService iInspectionService; | |||
/** | |||
* 上传离线视频 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
@PostMapping("/uploadFlightUrl") | |||
public JsonResult uploadFlightUrl(@RequestBody UploadFlightUrlRequest request) { | |||
return iInspectionService.uploadFlightUrl(request); | |||
} | |||
/** | |||
* 修改巡检任务 | |||
* | |||
* @param request | |||
* @return | |||
*/ | |||
@PostMapping("/updateTaskByCode") | |||
public JsonResult updateTaskByCode(@RequestBody UpdateTaskByCodeRequest request) { | |||
return iInspectionService.updateTaskByCode(request); | |||
} | |||
} |
@@ -1,8 +1,8 @@ | |||
package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.Dept; | |||
import com.tuoheng.admin.vo.DeptInfoVo; | |||
import com.tuoheng.admin.vo.DeptTreeVo; | |||
import com.tuoheng.admin.vo.dept.DeptInfoVo; | |||
import com.tuoheng.admin.vo.dept.DeptTreeVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
@@ -3,8 +3,8 @@ package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.request.inspection.AddInspectionRequest; | |||
import com.tuoheng.admin.request.inspection.EditInspectionRequest; | |||
import com.tuoheng.admin.vo.InspectionDetailsVo; | |||
import com.tuoheng.admin.vo.InspectionVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionDetailsVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
@@ -3,9 +3,10 @@ package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.InspectionFile; | |||
import com.tuoheng.admin.entity.InspectionFileDistribution; | |||
import com.tuoheng.admin.entity.InspectionFileExtend; | |||
import com.tuoheng.admin.vo.InspectionFileDistributionListVo; | |||
import com.tuoheng.admin.vo.InspectionFilePageListByInspectionIdVo; | |||
import com.tuoheng.admin.vo.InspectionFilePageListVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionFileDistributionListVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionFilePageListByInspectionIdVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionFilePageListVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionFileReportVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
@@ -21,4 +22,7 @@ public interface InspectionFileConverMapper { | |||
List<InspectionFilePageListVo> fromInspectionFileExtendListToInspectionFilePageListVoList(List<InspectionFileExtend> inspectionFileExtendList); | |||
List<InspectionFileDistributionListVo> fromInspectionFileDistributionListToInspectionFileDistributionListVoList(List<InspectionFileDistribution> inspectionFileDistributionList); | |||
List<InspectionFileReportVo> fromInspectionFileListToInspectionFileHandleVoList(List<InspectionFile> inspectionFileList); | |||
} |
@@ -1,7 +1,7 @@ | |||
package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.InspectionFileHandle; | |||
import com.tuoheng.admin.vo.InspectionFileHandleVo; | |||
import com.tuoheng.admin.vo.inspection.InspectionFileHandleVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
@@ -0,0 +1,23 @@ | |||
package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.Inspection; | |||
import com.tuoheng.admin.entity.Report; | |||
import com.tuoheng.admin.vo.inspection.InspectionReportVo; | |||
import com.tuoheng.admin.vo.ReportPageListVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
import java.util.List; | |||
@Mapper | |||
public interface ReportConverMapper { | |||
ReportConverMapper INSTANCE = Mappers.getMapper(ReportConverMapper.class); | |||
Report fromInspectionToReport(Inspection inspection); | |||
List<ReportPageListVo> fromReportListToReportPageListList(List<Report> reportList); | |||
InspectionReportVo fromReportToInspectionReportVo(Report report); | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.User; | |||
import com.tuoheng.admin.vo.user.UserInfoVo; | |||
import com.tuoheng.admin.vo.user.UserPageListVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
import java.util.List; | |||
@Mapper | |||
public interface UserConverMapper { | |||
UserConverMapper INSTANCE = Mappers.getMapper(UserConverMapper.class); | |||
UserInfoVo fromUserToUserInfoVo(User user); | |||
List<UserPageListVo> fromUserListToUserPageVoList(List<User> userList); | |||
} |
@@ -1,7 +1,7 @@ | |||
package com.tuoheng.admin.conver; | |||
import com.tuoheng.admin.entity.WorkOrder; | |||
import com.tuoheng.admin.vo.WorkOrderPageListVo; | |||
import com.tuoheng.admin.vo.workorder.WorkOrderPageListVo; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.factory.Mappers; | |||
@@ -0,0 +1,17 @@ | |||
package com.tuoheng.admin.dto; | |||
import lombok.Data; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/11/17 13:21 | |||
*/ | |||
@Data | |||
public class GetPermissionRoleIdListByApiUrlDto { | |||
private String apiUrl; | |||
private String method; | |||
} |
@@ -0,0 +1,17 @@ | |||
package com.tuoheng.admin.dto; | |||
import com.tuoheng.admin.entity.Menu; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2022/11/28 11:55 | |||
*/ | |||
@Data | |||
public class MenuVo extends Menu { | |||
/** | |||
* 标识id | |||
*/ | |||
private String identificationId; | |||
} |
@@ -0,0 +1,17 @@ | |||
package com.tuoheng.admin.dto; | |||
import com.tuoheng.admin.entity.OpPermissions; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2022/11/28 13:11 | |||
*/ | |||
@Data | |||
public class OpPermissionsVo extends OpPermissions { | |||
/** | |||
* 标识id | |||
*/ | |||
private String identificationId; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.tuoheng.admin.dto; | |||
import lombok.Data; | |||
/** | |||
* 角色菜单Dto | |||
*/ | |||
@Data | |||
public class RoleMenuDto { | |||
/** | |||
* 角色ID | |||
*/ | |||
private Integer roleId; | |||
/** | |||
* 菜单ID或者权限 | |||
*/ | |||
private String[] ids; | |||
} |
@@ -0,0 +1,26 @@ | |||
package com.tuoheng.admin.dto; | |||
import lombok.Data; | |||
import java.util.List; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2022/11/28 13:16 | |||
*/ | |||
@Data | |||
public class RoleMenuPermissionDto { | |||
/** | |||
* 角色id | |||
*/ | |||
private Integer roleId; | |||
/** | |||
*对应的菜单集合->及子菜单(按钮) | |||
*/ | |||
private List<MenuVo> opMenusList; | |||
/** | |||
* 对应的权限集合 | |||
*/ | |||
private List<OpPermissionsVo> permissionsList; | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.tuoheng.admin.dto; | |||
import com.tuoheng.admin.entity.Menu; | |||
import com.tuoheng.admin.entity.OpPermissions; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.experimental.Accessors; | |||
import java.util.List; | |||
/** | |||
* @author chenjiandong | |||
* @description: TODO | |||
* @date 2022/11/16 14:55 | |||
*/ | |||
@Data | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@Accessors(chain = true) | |||
public class RolePermissionDto { | |||
/** | |||
* 角色id | |||
*/ | |||
private Integer roleId; | |||
/** | |||
*对应的菜单集合->及子菜单(按钮) | |||
*/ | |||
private List<Menu> opMenusList; | |||
/** | |||
* 对应的权限集合 | |||
*/ | |||
private List<OpPermissions> permissionsList; | |||
} |
@@ -0,0 +1,68 @@ | |||
package com.tuoheng.admin.dto; | |||
import lombok.Data; | |||
/** | |||
* <p> | |||
* 通道Dto | |||
* </p> | |||
* | |||
* @author 拓恒 | |||
* @since 2021-12-16 | |||
*/ | |||
@Data | |||
public class StreamingDto { | |||
/** | |||
* 通道id | |||
*/ | |||
private Integer id; | |||
/** | |||
* 通道名称 | |||
*/ | |||
private String name; | |||
/** | |||
* 通道编号 | |||
*/ | |||
private String code; | |||
/** | |||
* 原视频推流地址 | |||
*/ | |||
private String pushUrl; | |||
/** | |||
* 原视频拉流地址 | |||
*/ | |||
private String pullUrl; | |||
/** | |||
* 原视频拉流地址M3U8 | |||
*/ | |||
private String pullM3u8; | |||
/** | |||
* 通道状态:5空闲 10使用中 15停用 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 通道状态描述 | |||
*/ | |||
private String statusName; | |||
/** | |||
* 描述 | |||
*/ | |||
private String note; | |||
public StreamingDto() { | |||
} | |||
public StreamingDto(String code) { | |||
this.code = code; | |||
} | |||
} |
@@ -0,0 +1,26 @@ | |||
package com.tuoheng.admin.dto; | |||
import lombok.Data; | |||
/** | |||
* @Author xiaoying | |||
* @Date 2022/11/24 19:08 | |||
*/ | |||
@Data | |||
public class UserRoleDto { | |||
/** | |||
* 租户id | |||
*/ | |||
private Integer tenantId; | |||
/** | |||
* 人员ID | |||
*/ | |||
private Integer userId; | |||
/** | |||
* 角色ID | |||
*/ | |||
private Integer roleId; | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.tuoheng.common.core.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_business") | |||
public class Business extends BaseEntity { | |||
/** | |||
* 消息id | |||
*/ | |||
private String msgId; | |||
/** | |||
* 类型:1巡检任务 | |||
*/ | |||
private Integer type; | |||
/** | |||
* 类型ID(type对应类型对应的业务ID) | |||
*/ | |||
private String typeId; | |||
/** | |||
* 租户id | |||
*/ | |||
private String tenantId; | |||
} |
@@ -210,7 +210,7 @@ public class Inspection extends BaseEntity { | |||
/** | |||
* ai任务分析进度 | |||
*/ | |||
private BigDecimal progressbar; | |||
private Double progressbar; | |||
/** | |||
* 备注 |
@@ -68,7 +68,7 @@ public class InspectionFile extends BaseEntity { | |||
/** | |||
* 文件大小 | |||
*/ | |||
private BigDecimal fileSize; | |||
private Double fileSize; | |||
/** | |||
* 纬度(原始图片纬度) |
@@ -0,0 +1,136 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* 系统菜单表 | |||
* </p> | |||
* | |||
* @author 拓恒 | |||
* @since 2020-10-30 | |||
*/ | |||
@Data | |||
@Accessors(chain = true) | |||
@TableName("op_menus") | |||
public class Menu { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 主键ID | |||
*/ | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 父级ID | |||
*/ | |||
private Integer parentId; | |||
/** | |||
* 菜单名称 | |||
*/ | |||
private String name; | |||
/** | |||
* 菜单所属client | |||
*/ | |||
private String clientId; | |||
/** | |||
* 页面跳转方式 | |||
*/ | |||
private String target; | |||
/** | |||
* 图标 | |||
*/ | |||
private String menuIcon; | |||
/** | |||
* 菜单路径 | |||
*/ | |||
private String path; | |||
/** | |||
* 菜单组件 | |||
*/ | |||
private String component; | |||
/** | |||
* 1正常 2禁用 | |||
*/ | |||
private Integer status; | |||
/** | |||
* 0:显示;1:隐藏 | |||
*/ | |||
private Integer isHidden; | |||
/** | |||
* 显示顺序 | |||
*/ | |||
private Integer sort; | |||
/** | |||
* 添加人 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标识 | |||
*/ | |||
private Integer mark; | |||
/** | |||
* 子级菜单 | |||
*/ | |||
@TableField(exist = false) | |||
private List<Menu> children; | |||
/** | |||
* 是否选中 | |||
*/ | |||
@TableField(exist = false) | |||
private boolean checked; | |||
/** | |||
* 是否打开 | |||
*/ | |||
@TableField(exist = false) | |||
private boolean open; | |||
/** | |||
* 权限节点参数 | |||
*/ | |||
@TableField(exist = false) | |||
private Integer[] checkedList; | |||
} |
@@ -0,0 +1,107 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
/** | |||
* 权限配置表 | |||
* @TableName op_permissions | |||
*/ | |||
@TableName(value ="op_permissions") | |||
@Data | |||
public class OpPermissions { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 主键ID | |||
*/ | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 所属client | |||
*/ | |||
private String clientId; | |||
/** | |||
* code标识 | |||
*/ | |||
private String code; | |||
/** | |||
* 展示name | |||
*/ | |||
private String name; | |||
/** | |||
* 备注信息 | |||
*/ | |||
private String remark; | |||
/** | |||
* 0:菜单项action-permissions; | |||
*/ | |||
private Integer type; | |||
/** | |||
* 关联菜单id | |||
*/ | |||
private Integer menuId; | |||
/** | |||
* 接口路径 | |||
*/ | |||
private String apiUrl; | |||
/** | |||
* 添加人 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标识 | |||
*/ | |||
private Integer mark; | |||
/** | |||
* 是否选中 | |||
*/ | |||
@TableField(exist = false) | |||
private boolean checked; | |||
/** | |||
* 是否打开 | |||
*/ | |||
@TableField(exist = false) | |||
private boolean open; | |||
} |
@@ -0,0 +1,68 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
/** | |||
* 角色可操作的permission | |||
* @TableName op_role_permission | |||
*/ | |||
@TableName(value ="op_role_permission") | |||
@Data | |||
public class OpRolePermission{ | |||
/** | |||
* 主键ID | |||
*/ | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 角色id | |||
*/ | |||
private Integer roleId; | |||
/** | |||
* 权限id | |||
*/ | |||
private Integer permissionId; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 添加人 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标识 | |||
*/ | |||
private Integer mark; | |||
} |
@@ -0,0 +1,288 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import com.tuoheng.common.core.common.BaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import java.math.BigDecimal; | |||
import java.util.Date; | |||
/** | |||
* 巡检报告对象 th_report | |||
* | |||
* @team tuoheng | |||
* @author wanjing | |||
* @date 2022-12-09 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_report") | |||
public class Report extends BaseEntity { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 租户ID | |||
*/ | |||
private String tenantId; | |||
/** | |||
* 部门ID | |||
*/ | |||
private String deptId; | |||
/** | |||
* 报告编号 | |||
*/ | |||
private String reportCode; | |||
/** | |||
* 巡检任务ID | |||
*/ | |||
private String inspectionId; | |||
/** | |||
* 巡检任务编码 | |||
*/ | |||
private String inspectionCode; | |||
/** | |||
* 巡检任务名称 | |||
*/ | |||
private String inspectionName; | |||
/** | |||
* 巡检任务类型 1 临时巡检 | |||
*/ | |||
private Integer type; | |||
/** | |||
* 公路ID | |||
*/ | |||
private String roadId; | |||
/** | |||
* 公路名称 | |||
*/ | |||
private String roadName; | |||
/** | |||
* 路段ID | |||
*/ | |||
private String sectionId; | |||
/** | |||
* 路段名称 | |||
*/ | |||
private String sectionName; | |||
/** | |||
* 巡检方式类型 1 无人机 2机场巡逻 3 飞手值飞 | |||
*/ | |||
private Long inspectionType; | |||
/** | |||
* 巡检机场id | |||
*/ | |||
private Long airportId; | |||
/** | |||
* 巡检机场名称 | |||
*/ | |||
private String airportName; | |||
/** | |||
* 巡检线路id | |||
*/ | |||
private Long inspectionLine; | |||
/** | |||
* 巡检线路名称 | |||
*/ | |||
private String inspectionLineName; | |||
/** | |||
* 飞行设备 | |||
*/ | |||
private String equipmentId; | |||
/** | |||
* 飞行设备名称 | |||
*/ | |||
private String equipmentName; | |||
/** | |||
* 挂载设备(多选逗号","分隔) | |||
*/ | |||
private String equipmentMountId; | |||
/** | |||
* 挂载设备名称(多选逗号","分隔) | |||
*/ | |||
private String equipmentMountName; | |||
/** | |||
* 5G云盒ID | |||
*/ | |||
private String cloudBoxId; | |||
/** | |||
* 云盒名称 | |||
*/ | |||
private String cloudBoxName; | |||
/** | |||
* 云盒SN号 | |||
*/ | |||
private String boxSn; | |||
/** | |||
* 飞手(多选逗号","分隔) | |||
*/ | |||
private String flightHand; | |||
/** | |||
* 飞手姓名(多选逗号","分隔) | |||
*/ | |||
private String flightHandName; | |||
/** | |||
* 计划巡检日期 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
private Date inspectionTime; | |||
/** | |||
* 执行开始时间 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
private Date executionStartTime; | |||
/** | |||
* 执行结束时间 | |||
*/ | |||
@JsonFormat(pattern = "yyyy-MM-dd") | |||
private Date executionEndTime; | |||
/** | |||
* 是否实时,1:实时 2:离线 默认:null | |||
*/ | |||
private Long isLive; | |||
/** | |||
* 是否正摄:1是 2否 | |||
*/ | |||
private String isTaken; | |||
/** | |||
* 是否倾斜摄影:1是 2否 | |||
*/ | |||
private String isTilt; | |||
/** | |||
* 原视频地址 | |||
*/ | |||
private String videoUrl; | |||
/** | |||
* AI识别后视频地址 | |||
*/ | |||
private String aiVideoUrl; | |||
/** | |||
* 报告地址 | |||
*/ | |||
private String reportUrl; | |||
/** | |||
* SRT文件地址 | |||
*/ | |||
private String srtUrl; | |||
/** | |||
* 任务状态 5任务待飞行 7飞行失败 10任务飞行中 15任务飞行完成 | |||
*/ | |||
private String status; | |||
/** | |||
* 算法处理状态:0默认 1待上传 2待分析 3分析中 4成功 5超时 6失败 | |||
*/ | |||
private Long analyseStatus; | |||
/** | |||
* ai任务分析进度 | |||
*/ | |||
private BigDecimal progressbar; | |||
/** | |||
* 备注 | |||
*/ | |||
private String note; | |||
/** | |||
* 巡检时天气情况 | |||
*/ | |||
private String weather; | |||
/** | |||
* 飞行高度 | |||
*/ | |||
private String flyHeight; | |||
/** | |||
* srt文件名称 */ | |||
private String srtName; | |||
/** | |||
* ai心跳更新时间 */ | |||
private Long heartbeatTime; | |||
/** | |||
* 定时任务的执行状态。1:未执行,2:已执行 */ | |||
private Long executionStatus; | |||
/** | |||
* 起点经度 | |||
*/ | |||
private String startLongitude; | |||
/** | |||
* 起点纬度 | |||
*/ | |||
private String startLatitude; | |||
/** | |||
* 终点经度 | |||
*/ | |||
private String endLongitude; | |||
/** | |||
* 终点纬度 | |||
*/ | |||
private String endLatitude; | |||
/** | |||
* 联系方式 | |||
*/ | |||
private String mobile; | |||
/** | |||
* 巡逻地点 | |||
*/ | |||
private String patrolLocation; | |||
/** | |||
* 问题总数 | |||
*/ | |||
private Integer problemTotalCount; | |||
/** | |||
* 问题处理数 | |||
*/ | |||
private Integer problemHandleCount; | |||
} |
@@ -1,10 +1,16 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.tuoheng.common.core.common.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
/** | |||
* <p> | |||
@@ -15,17 +21,27 @@ import lombok.experimental.Accessors; | |||
* @since 2020-10-31 | |||
*/ | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@Accessors(chain = true) | |||
@TableName("th_role") | |||
public class Role extends BaseEntity { | |||
@TableName("op_roles") | |||
public class Role { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 主键ID | |||
*/ | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 租户id | |||
*/ | |||
private String tenantId; | |||
/** | |||
* 角色名称 | |||
*/ | |||
private String name; | |||
private String roleName; | |||
/** | |||
* 角色标签 | |||
@@ -40,12 +56,34 @@ public class Role extends BaseEntity { | |||
/** | |||
* 备注 | |||
*/ | |||
private String note; | |||
private String remark; | |||
/** | |||
* 添加人 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 排序 | |||
* 创建时间 | |||
*/ | |||
private Integer sort; | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标识 | |||
*/ | |||
private Integer mark; | |||
} |
@@ -0,0 +1,75 @@ | |||
package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import java.util.Date; | |||
/** | |||
* <p> | |||
* 角色菜单关联表 | |||
* </p> | |||
* | |||
* @author 拓恒 | |||
* @since 2020-10-30 | |||
*/ | |||
@Data | |||
@Accessors(chain = true) | |||
@TableName("op_role_menu") | |||
public class RoleMenu { | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 主键ID | |||
*/ | |||
@TableId(value = "id", type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 角色ID | |||
*/ | |||
private Integer roleId; | |||
/** | |||
* 菜单ID | |||
*/ | |||
private Integer menuId; | |||
/** | |||
* 添加人 | |||
*/ | |||
private String createUser; | |||
/** | |||
* 创建时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private String updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") | |||
private Date updateTime; | |||
/** | |||
* 有效标识 | |||
*/ | |||
private Integer mark; | |||
} |
@@ -2,8 +2,7 @@ package com.tuoheng.admin.entity; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.*; | |||
import lombok.experimental.Accessors; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
@@ -19,6 +18,9 @@ import java.util.Date; | |||
* @since 2020-10-30 | |||
*/ | |||
@Data | |||
@Builder | |||
@AllArgsConstructor | |||
@NoArgsConstructor | |||
@EqualsAndHashCode(callSuper = false) | |||
@Accessors(chain = true) | |||
@TableName("th_oauth_user") | |||
@@ -122,11 +124,6 @@ public class User implements Serializable { | |||
*/ | |||
private String password; | |||
/** | |||
* 用户类型:1管理员 | |||
*/ | |||
private Integer type; | |||
/** | |||
* 驾照类型:1飞行执照 2飞行许可证 | |||
*/ | |||
@@ -220,4 +217,13 @@ public class User implements Serializable { | |||
@TableField(exist = false) | |||
private String[] city; | |||
/** | |||
* 角色id | |||
*/ | |||
private Integer roleId; | |||
/** | |||
* 标识id 小程序,pc | |||
*/ | |||
private String clientId; | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* Ai分析状态 | |||
*/ | |||
public enum AiAnalyseStatusEnum { | |||
UPLOADED(1,"uploaded"), | |||
WAITING(2,"waiting"), | |||
RUNNING(3,"running"), | |||
SUCCESS(4,"success"), | |||
SUCCESS_TIMEOUT(5,"success_timeout"), | |||
FAILED(6,"failed"), | |||
DEFAULT(0,"default"); | |||
AiAnalyseStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
public static AiAnalyseStatusEnum getByDesc(String description){ | |||
for (AiAnalyseStatusEnum analyseStatusEnum : values()) { | |||
if(analyseStatusEnum.getDescription().equals(description)){ | |||
return analyseStatusEnum; | |||
} | |||
} | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,26 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* Ai分析状态 | |||
* @author chenyukun | |||
*/ | |||
public enum AiAnalyseTypeEnum { | |||
ONLINE(1,"在线"), | |||
OFFLINE(2,"离线"), | |||
DEFAULT(0,"default"); | |||
AiAnalyseTypeEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,23 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 任务状态枚举 | |||
*/ | |||
public enum AirPortTaskStatusEnum { | |||
//任务状态1待执行 2执行中 | |||
WAIT(1,"待执行"), | |||
FLIGHT(2,"执行中"); | |||
AirPortTaskStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,27 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 通道状态 | |||
*/ | |||
public enum ChannelStatusEnum { | |||
IDLE(5,"空闲"), | |||
USING(10,"使用中"), | |||
DEACTIVATING(15,"停用"), | |||
; | |||
ChannelStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,44 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
/** | |||
* client 枚举类 | |||
* | |||
* @Author xiaoying | |||
* @Date 2022/11/25 16:51 | |||
*/ | |||
public enum ClientEnum { | |||
ADMIN(1, "tuoheng-freeway-admin"), | |||
API(2, "tuoheng-freeway-mp"); | |||
ClientEnum(int code, String description) { | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
private static Map<Integer, ClientEnum> data = new HashMap<>(); | |||
static { | |||
for (ClientEnum type : ClientEnum.values()) { | |||
data.put(type.code, type); | |||
} | |||
} | |||
public static ClientEnum parse(int code) { | |||
if (data.containsKey(code)) { | |||
return data.get(code); | |||
} | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 文件类型 | |||
*/ | |||
public enum FileTypeEnum { | |||
IMAGE(1, "图片"), | |||
VIDEO(2, "视频"); | |||
FileTypeEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 逻辑删除标记类型 | |||
* @author chenyukun | |||
*/ | |||
public enum MarkTypeEnum { | |||
VALID(1,"有效"), | |||
NOTVALID(0,"失效"); | |||
MarkTypeEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 问题处理状态 | |||
*/ | |||
public enum QuestionEnum { | |||
REVIEWED(1,"已审核"), | |||
NOTREVIEWED(0,"待审核"); | |||
QuestionEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,46 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
/** | |||
* 用户类型 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-11-25 | |||
*/ | |||
public enum RoleEnum { | |||
SUPER_ADMIN(1,"超级管理员"), | |||
ADMIN(2,"管理员"), | |||
ORDINARY_USER(3,"普通用户"); | |||
RoleEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
private static Map<Integer, RoleEnum> data = new HashMap<>(); | |||
static { | |||
for (RoleEnum type : RoleEnum.values()) { | |||
data.put(type.code, type); | |||
} | |||
} | |||
public static RoleEnum parse(int code) { | |||
if (data.containsKey(code)) { | |||
return data.get(code); | |||
} | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,45 @@ | |||
package com.tuoheng.admin.enums; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/21 | |||
*/ | |||
public enum SectionEnum { | |||
QUERY_IS_FAILED(1220300, "获取数据失败"), | |||
USER_IS_NOT_EXIST(1220301, "用户为空"), | |||
DEPT_IS_NOT_EXIST(1220302, "部门不存在"), | |||
SECTION_ID_IS_NULL(1220303, "路段id为空"), | |||
SECTION_LIST_IS_NULL(1220304, "路段列表为空"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
SectionEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,23 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 资源来源类型 | |||
*/ | |||
public enum SourceEnum { | |||
AI(1,"AI"), | |||
BACKSTAGE(2,"后台"), | |||
VIDEO(3,"视频"); | |||
SourceEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,47 @@ | |||
package com.tuoheng.admin.enums; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/21 | |||
*/ | |||
public enum StructureEnum { | |||
QUERY_IS_FAILED(1220500, "获取数据失败"), | |||
USER_IS_NOT_EXIST(1220501, "用户不存在"), | |||
USER_ID_IS_NULL(1220502, "用户id为空"), | |||
TENANT_ID_IS_NULL(1220503, "租户id为空"), | |||
DEPT_IS_NOT_EXIST(1220504, "部门不存在"), | |||
SECTION_ID_IS_NULL(1220505, "路段id为空"), | |||
SECTION_LIST_IS_NULL(1220506, "路段列表为空"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
StructureEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,31 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 任务状态枚举 | |||
*/ | |||
public enum TaskStatusEnum { | |||
NOTREVIEWED(1,"任务待审核"), | |||
TOFLY(5,"任务待飞行"), | |||
INFLIGHT(10,"任务飞行中"), | |||
FAIL(12,"任务执行失败"), | |||
COMPLETE(15,"任务飞行完成(图片待审核)"), | |||
AUDITFAILED(20,"审核未通过"), | |||
REVIEWED(25,"图片已审核(问题待分派)"), | |||
PENDING(30,"问题待处理"), | |||
PROCESSING(35,"问题处理中"), | |||
PROCESSED(40,"问题已处理(报告待生成)"), | |||
GENERATED(45,"报告已生成"); | |||
TaskStatusEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -1,29 +0,0 @@ | |||
package com.tuoheng.admin.enums; | |||
import lombok.Getter; | |||
/** | |||
* 用户类型 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-11-25 | |||
*/ | |||
public enum UserTypeEnum { | |||
SUPER_ADMIN(1,"超级管理员"), | |||
ADMIN(2,"管理员"), | |||
ORDINARY_USER(3,"普通用户"); | |||
UserTypeEnum(int code, String description){ | |||
this.code = code; | |||
this.description = description; | |||
} | |||
@Getter | |||
private int code; | |||
@Getter | |||
private String description; | |||
} |
@@ -0,0 +1,51 @@ | |||
package com.tuoheng.admin.enums.code.inspection; | |||
/** | |||
* 修改任务状态信息返回码 | |||
* 模块代码:23(任务管理) | |||
* 接口代码:09 (修改任务状态) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-22 | |||
*/ | |||
public enum EditInspectionStatusCodeEnum { | |||
EDIT_IS_FAILED(1230900, "修改任务失败"), | |||
INSPECTION_IS_NOT_EXIST(1230901, "巡检任务不存在,请先创建巡检任务!"), | |||
TASK_NOT_STATUS(1230902, "飞行状态出错!"), | |||
TASK_ANALYSIS_FAILED(1230903, "任务分析失败!"), | |||
GET_WEATHER_FAILED(1230904, "获取天气信息失败,请重试!"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
EditInspectionStatusCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,51 @@ | |||
package com.tuoheng.admin.enums.code.inspectionfile; | |||
/** | |||
* 修改巡检任务问题类型返回码 | |||
* 模块代码:24(问题管理) | |||
* 接口代码:08 (修改巡检任务问题类型) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum EditInspectionFileQuestionTypeCodeEnum { | |||
EDIT_IS_FAILED(1240800, "修改数据失败"), | |||
ID_IS_NULL(1240801, "任务问题id为空"), | |||
QUESTION_NAME_IS_NULL(1240802, "问题类型为空"), | |||
INSPECTION_FILE_IS_NOT_EXIST(1240803, "任务问题不存在"), | |||
QUESTION_TYPE_IS_NOT_EXIST(1240804, "问题类型不存在"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
EditInspectionFileQuestionTypeCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -11,7 +11,7 @@ package com.tuoheng.admin.enums.code.inspectionfilehandle; | |||
*/ | |||
public enum InspectionFileProcessingCodeEnum { | |||
PROCESSINGIS_FAILED(1250100, "处理失败"), | |||
PROCESSING_IS_FAILED(1250100, "处理失败"), | |||
WORK_ORDER_ID_IS_NULL(1250101, "工单id为空"), | |||
WORK_ORDER_IS_NOT_EXIST(1250102, "工单不存在"), | |||
INSPECTION_FILE_ID_IS_NULL(1250103, "任务问题id为空"), |
@@ -6,9 +6,11 @@ package com.tuoheng.admin.enums.code.questiontype; | |||
*/ | |||
public enum QuestionTypeEnum { | |||
PING_GROOVE_NAME(1, "坑槽"), | |||
PON_DING_NAME(2, "积水"), | |||
CRACK_NAME(3, "裂缝"); | |||
ABEAM_CRACK_NAME(1, "横向裂缝"), | |||
RETICULAR_CRACK_NAME(3, "网状裂纹"), | |||
PIT_GROOVE_NAME(4, "坑槽"), | |||
MASSIVE_CRACK_NAME(5, "块状裂纹"), | |||
PON_DING_NAME(6, "积水"); | |||
/** | |||
* 编号 | |||
@@ -16,7 +18,7 @@ public enum QuestionTypeEnum { | |||
private int code; | |||
/** | |||
* 类型名称 | |||
* 问题名称 | |||
*/ | |||
private String msg; | |||
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.report; | |||
/** | |||
* 导出巡检处理报告返回码 | |||
* 模块代码:27(报告管理) | |||
* 接口代码:05 (导出处理巡检) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-14 | |||
*/ | |||
public enum ExportInspectionHandleReportCodeEnum { | |||
EXPORT_IS_FAILED(1270500, "导出巡检处理报告失败"), | |||
REPORT_ID_IS_NULL(1270501, "报告id为空"), | |||
REPORT_IS_NOT_EXIST(1270502, "报告不存在"); | |||
/** | |||
* 编号 | |||
*/ | |||
private int code; | |||
/** | |||
* 类型名称 | |||
*/ | |||
private String msg; | |||
ExportInspectionHandleReportCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.report; | |||
/** | |||
* 导出巡检报告返回码 | |||
* 模块代码:27(报告管理) | |||
* 接口代码:04 (导出巡检) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-14 | |||
*/ | |||
public enum ExportInspectionReportReportCodeEnum { | |||
EXPORT_IS_FAILED(1270400, "导出巡检报告失败"), | |||
REPORT_ID_IS_NULL(1270401, "报告id为空"), | |||
REPORT_IS_NOT_EXIST(1270402, "报告不存在"); | |||
/** | |||
* 编号 | |||
*/ | |||
private int code; | |||
/** | |||
* 类型名称 | |||
*/ | |||
private String msg; | |||
ExportInspectionReportReportCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.report; | |||
/** | |||
* 生成报告返回码 | |||
* 模块代码:27(报告管理) | |||
* 接口代码:01 (生成报告) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-09 | |||
*/ | |||
public enum GenerateReportCodeEnum { | |||
GENERATE_IS_FAILED(1270100, "生成报告失败"), | |||
INSPECTION_ID_IS_NULL(1270101, "任务id为空"), | |||
INSPECTION_IS_NOT_EXIST(1270102, "任务不存在"); | |||
/** | |||
* 编号 | |||
*/ | |||
private int code; | |||
/** | |||
* 类型名称 | |||
*/ | |||
private String msg; | |||
GenerateReportCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.report; | |||
/** | |||
* 查看巡检处理报告返回码 | |||
* 模块代码:27(报告管理) | |||
* 接口代码:03 (查看巡检处理报告) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-12 | |||
*/ | |||
public enum QueryInspectionHandleReportCodeEnum { | |||
QUERY_IS_FAILED(1270300, "查看巡检处理报告失败"), | |||
REPORT_ID_IS_NULL(1270301, "报告id为空"), | |||
REPORT_IS_NOT_EXIST(1270302, "报告不存在"); | |||
/** | |||
* 编号 | |||
*/ | |||
private int code; | |||
/** | |||
* 类型名称 | |||
*/ | |||
private String msg; | |||
QueryInspectionHandleReportCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.report; | |||
/** | |||
* 查看巡检报告返回码 | |||
* 模块代码:27(报告管理) | |||
* 接口代码:02 (查看巡检报告) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-12 | |||
*/ | |||
public enum QueryInspectionReportCodeEnum { | |||
QUERY_IS_FAILED(1270200, "查看巡检报告失败"), | |||
REPORT_ID_IS_NULL(1270201, "报告id为空"), | |||
REPORT_IS_NOT_EXIST(1270202, "报告不存在"); | |||
/** | |||
* 编号 | |||
*/ | |||
private int code; | |||
/** | |||
* 类型名称 | |||
*/ | |||
private String msg; | |||
QueryInspectionReportCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.tuoheng.admin.enums.code.role; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/23 | |||
*/ | |||
public enum RoleDeleteEnum { | |||
QUERY_IS_FAILED(1210600, "获取数据失败"), | |||
ROLE_ID_IS_NULL(1210601, "角色id为空"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
RoleDeleteEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,58 @@ | |||
package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 新增用户返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:01 (新增用户) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum AddUserCodeEnum { | |||
ADD_IS_FAILED(1100100, "添加失败"), | |||
CODE_IS_NULL(1100101, "编号不能为空"), | |||
USERNAME_IS_NULL(1100102, "账号不能为空"), | |||
REALNAME_IS_NULL(1100103, "姓名不能为空"), | |||
ROLE_ID_IS_NULL(1100104, "角色不能为空"), | |||
DEPT_ID_IS_NULL(1100105, "部门不能为空"), | |||
CLIENT_ID_IS_NULL(1100106, "ClientID不能为空"), | |||
TYPE_ID_IS_NULL(1100107, "用户类型不能为空"), | |||
TYPE_ID_IS_NOT_EXISTS(1100108, "用户类型不存在"), | |||
PHONE_NOT_IMATCH(1100109, "手机号不匹配"), | |||
USERNAME_ALREADY_EXISTS(1100110, "系统中已经存在该用户名"), | |||
ROLE_IS_NOT_EXISTS(1100111, "该角色不存在"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
AddUserCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 删除用户返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:02 (删除用户) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum DeleteUserCodeEnum { | |||
DELETE_IS_FAILED(1100200, "删除失败"), | |||
USER_ID_IS_NULL(1100201, "用户ID为空"), | |||
USER_IS_NOT_EXIST(1100202, "用户不存在"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
DeleteUserCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,57 @@ | |||
package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 删除用户返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:03 (删除用户) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum EditUserCodeEnum { | |||
EDIT_IS_FAILED(1100300, "修改失败"), | |||
ID_IS_NULL(1100301, "用户ID为空"), | |||
CODE_IS_NULL(1100302, "编号不能为空"), | |||
REALNAME_IS_NULL(1100303, "姓名不能为空"), | |||
ROLE_ID_IS_NULL(1100304, "角色不能为空"), | |||
DEPT_ID_IS_NULL(1100305, "部门不能为空"), | |||
CLIENT_ID_IS_NULL(1100306, "ClientID不能为空"), | |||
PHONE_NOT_IMATCH(1100307, "手机号不匹配"), | |||
USER_IS_NOT_EXIST(1100308, "用户不存在"), | |||
USERNAME_ALREADY_EXISTS(1100309, "系统中已经存在该用户名"), | |||
ROLE_IS_NOT_EXISTS(1100310, "该角色不存在");; | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
EditUserCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,51 @@ | |||
package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 修改用户密码返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:04 (修改用户密码) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum EditUserPasswordCodeEnum { | |||
EDIT_IS_FAILED(1100400, "重置密码失败"), | |||
USER_ID_IS_NULL(1100401, "用户ID为空"), | |||
USER_IS_NOT_EXIST(1100402, "用户不存在"), | |||
NON_TENANT_USER(1100403, "当前用户非本租户用户"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
EditUserPasswordCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 修改用户状态返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:05 (修改用户状态) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum EditUserStatusCodeEnum { | |||
EDIT_IS_FAILED(1100500, "修改失败"), | |||
USER_ID_IS_NULL(1100501, "用户ID为空"), | |||
USER_IS_NOT_EXIST(1100502, "用户不存在"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
EditUserStatusCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -0,0 +1,50 @@ | |||
package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 根据ID查询用户信息返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:06 (根据ID查询用户信息) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-16 | |||
*/ | |||
public enum QueryUserInfoByIdCodeEnum { | |||
QUERY_ID_IS_NULL(1100600, "查询失败"), | |||
USER_ID_IS_NULL(1100601, "用户ID为空"), | |||
USER_IS_NOT_EXIST(1100602, "用户不存在"), | |||
NON_TENANT_USER(1100603, "当前用户非本租户用户"); | |||
/** | |||
* 错误码 | |||
*/ | |||
private int code; | |||
/** | |||
* 错误信息 | |||
*/ | |||
private String msg; | |||
QueryUserInfoByIdCodeEnum(int code, String msg){ | |||
this.code = code; | |||
this.msg = msg; | |||
} | |||
public int getCode() { | |||
return code; | |||
} | |||
public void setCode(int code) { | |||
this.code = code; | |||
} | |||
public String getMsg() { | |||
return msg; | |||
} | |||
public void setMsg(String msg) { | |||
this.msg = msg; | |||
} | |||
} |
@@ -3,7 +3,7 @@ package com.tuoheng.admin.enums.code.user; | |||
/** | |||
* 根据部门ID查询用户列表返回码 | |||
* 模块代码:10(部门管理) | |||
* 接口代码:01 (据部门ID查询用户列表) | |||
* 接口代码:07 (据部门ID查询用户列表) | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
@@ -11,8 +11,8 @@ package com.tuoheng.admin.enums.code.user; | |||
*/ | |||
public enum QueryUserListByDeptIdCodeEnum { | |||
DEPT_ID_IS_NULL(1100101, "部门ID为空"), | |||
DEPT_IS_NOT_EXIST(1100102, "部门不存在"); | |||
DEPT_ID_IS_NULL(1100701, "部门ID为空"), | |||
DEPT_IS_NOT_EXIST(1100702, "部门不存在"); | |||
/** | |||
* 错误码 |
@@ -0,0 +1,14 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.Business; | |||
/** | |||
* kafka对应发送消息消息与任务id绑定 | |||
* | |||
* @author 拓恒 | |||
* @since 2022-03-09 | |||
*/ | |||
public interface BusinessMapper extends BaseMapper<Business> { | |||
} |
@@ -25,6 +25,8 @@ import java.util.Map; | |||
*/ | |||
public interface InspectionFileMapper extends BaseMapper<InspectionFile> { | |||
int addBatch(@Param("list") List<InspectionFile> records); | |||
/** | |||
* | |||
* 逻辑删除巡检任务问题 |
@@ -49,6 +49,10 @@ public interface InspectionMapper extends BaseMapper<Inspection> { | |||
*/ | |||
int update(Inspection inspection); | |||
int updateByPrimaryKeySelective(Inspection request); | |||
int updateByPrimaryKey(Inspection inspection); | |||
/** | |||
* 删除巡检任务, 逻辑删除 | |||
* |
@@ -0,0 +1,18 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.Menu; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
public interface MenuMapper extends BaseMapper<Menu> { | |||
List<Menu> getOpMenusByRoleId(@Param("roleId") Integer roleId,@Param("clientId") String clientId); | |||
List<Menu> getChildrenMenuByPid(@Param("parentId") Integer id,@Param("clientId") String clientId); | |||
} |
@@ -0,0 +1,17 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.OpPermissions; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.List; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
public interface OpPermissionsMapper extends BaseMapper<OpPermissions> { | |||
List<OpPermissions> getOpPermissionsByRoleId(@Param("roleId") Integer roleId,@Param("clientId") String clientId); | |||
List<Integer> getRoleIdsByApiUrl(@Param("apiUrl") String apiUrl); | |||
} |
@@ -0,0 +1,19 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.OpRolePermission; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【op_role_permission(角色可操作的permission)】的数据库操作Mapper | |||
* @createDate 2022-11-21 15:24:21 | |||
* @Entity com.tuoheng.system.entity.OpRolePermission | |||
*/ | |||
public interface OpRolePermissionMapper extends BaseMapper<OpRolePermission> { | |||
} | |||
@@ -0,0 +1,27 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.Report; | |||
import com.tuoheng.admin.request.report.QueryReportPageListRequest; | |||
import org.apache.ibatis.annotations.Param; | |||
/** | |||
* 巡检报告Mapper接口 | |||
* | |||
* @author wanjing | |||
* @team tuoheng | |||
* @date 2022-12-09 | |||
*/ | |||
public interface ReportMapper extends BaseMapper<Report> { | |||
/** | |||
* 查询巡检任务分页列表 | |||
* | |||
* @param request 巡检任务查询实体 | |||
* @return 巡检任务集合 | |||
*/ | |||
Page<Report> selectPageList(@Param("page") IPage page, @Param("request") QueryReportPageListRequest request); | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.Role; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
public interface RoleMapper extends BaseMapper<Role> { | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.tuoheng.admin.entity.RoleMenu; | |||
/** | |||
* @Author ChengWang | |||
* @Date 2022/12/16 | |||
*/ | |||
public interface RoleMenuMapper extends BaseMapper<RoleMenu> { | |||
} |
@@ -14,4 +14,5 @@ import org.apache.ibatis.annotations.Param; | |||
public interface StructureMapper extends BaseMapper<Structure> { | |||
IPage<StructureInfoVo> queryPage(@Param("page") IPage page,@Param("request") StructureQuery query); | |||
IPage<StructureInfoVo> queryPageBySectionId(@Param("page") IPage<Structure> page,@Param("request") StructureQuery query); | |||
} |
@@ -1,7 +1,15 @@ | |||
package com.tuoheng.admin.mapper; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import com.tuoheng.admin.entity.InspectionFileExtend; | |||
import com.tuoheng.admin.entity.User; | |||
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest; | |||
import com.tuoheng.admin.request.user.QueryUserPageListRequest; | |||
import org.apache.ibatis.annotations.Param; | |||
import java.util.Map; | |||
/** | |||
* 后台用户管理表 Mapper 接口 | |||
@@ -12,4 +20,14 @@ import com.tuoheng.admin.entity.User; | |||
*/ | |||
public interface UserMapper extends BaseMapper<User> { | |||
Integer updateByIdList(Map<String, Object> map); | |||
/** | |||
* 查询任务问题分页列表 | |||
* | |||
* @param request 巡检任务查询实体 | |||
* @return 巡检任务集合 | |||
*/ | |||
Page<User> selectPageList(@Param("page") IPage page, @Param("request") QueryUserPageListRequest request); | |||
} |