liusuyi
2025-09-29 b27c25fe7907f21956cc34919dfece66aeb3d9f7
优化 增加航线模块
1 files added
5 files modified
72 ■■■■■ changed files
ard-admin/src/main/java/com/ard/web/controller/system/SysUserController.java 5 ●●●●● patch | view | raw | blame | history
ard-route/pom.xml 33 ●●●●● patch | view | raw | blame | history
ard-sample/src/main/java/com/ard/sample/wayline/model/dto/WaylineJobDTO.java 2 ●●●●● patch | view | raw | blame | history
ard-sample/src/main/java/com/ard/sample/wayline/service/impl/WaylineJobServiceImpl.java 5 ●●●●● patch | view | raw | blame | history
ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java 17 ●●●●● patch | view | raw | blame | history
pom.xml 10 ●●●●● patch | view | raw | blame | history
ard-admin/src/main/java/com/ard/web/controller/system/SysUserController.java
@@ -3,6 +3,9 @@
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -37,6 +40,7 @@
 * 
 * @author ruoyi
 */
@Api(tags = "用户信息")
@RestController
@RequestMapping("/system/user")
public class SysUserController extends BaseController
@@ -56,6 +60,7 @@
    /**
     * 获取用户列表
     */
    @ApiOperation("获取用户列表")
    @PreAuthorize("@ss.hasPermi('system:user:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysUser user)
ard-route/pom.xml
New file
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>ard</artifactId>
        <groupId>com.ard</groupId>
        <version>3.8.8</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>ard-route</artifactId>
    <description>
        航线模块
    </description>
    <dependencies>
        <!-- 通用工具-->
        <dependency>
            <groupId>com.ard</groupId>
            <artifactId>ard-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
ard-sample/src/main/java/com/ard/sample/wayline/model/dto/WaylineJobDTO.java
@@ -30,8 +30,6 @@
    private String dockName;
    private String workspaceId;
    private Integer waylineType;
    private Integer taskType;
ard-sample/src/main/java/com/ard/sample/wayline/service/impl/WaylineJobServiceImpl.java
@@ -176,7 +176,6 @@
        if (ResponseResult.CODE_SUCCESS != serviceReply.getResult()) {
            log.info("Prepare task ====> Error code: {}", serviceReply.getResult());
            this.updateJob(WaylineJobDTO.builder()
                    .workspaceId(waylineJob.getWorkspaceId())
                    .jobId(waylineJob.getJobId())
                    .executeTime(LocalDateTime.now())
                    .status(WaylineJobStatusEnum.FAILED.getVal())
@@ -194,7 +193,7 @@
        if (WaylineTaskTypeEnum.TIMED.getVal() == waylineJob.getTaskType()) {
            boolean isAdd = RedisOpsUtils.zAdd(RedisConst.WAYLINE_JOB_TIMED_EXECUTE,
                    waylineJob.getWorkspaceId() + RedisConst.DELIMITER + waylineJob.getDockSn() + RedisConst.DELIMITER + waylineJob.getJobId(),
                     waylineJob.getDockSn() + RedisConst.DELIMITER + waylineJob.getJobId(),
                    waylineJob.getBeginTime().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
            if (!isAdd) {
                return ResponseResult.error("Failed to create scheduled job.");
@@ -454,7 +453,6 @@
                .jobId(dto.getJobId())
                .fileId(dto.getFileId())
                .dockSn(dto.getDockSn())
                .workspaceId(dto.getWorkspaceId())
                .taskType(dto.getTaskType())
                .waylineType(dto.getWaylineType())
                .username(dto.getUsername())
@@ -479,7 +477,6 @@
                .dockName(deviceService.getDeviceBySn(entity.getDockSn())
                        .orElse(DeviceDTO.builder().build()).getNickname())
                .username(entity.getUsername())
                .workspaceId(entity.getWorkspaceId())
                .status(WaylineJobStatusEnum.IN_PROGRESS.getVal() == entity.getStatus() &&
                        RedisOpsUtils.checkExist(RedisConst.WAYLINE_JOB_PAUSED_PREFIX + entity.getJobId()) ?
                        WaylineJobStatusEnum.PAUSED.getVal() : entity.getStatus())
ard-system/src/main/java/com/ard/authorize/service/AuthorizeServiceImpl.java
@@ -12,6 +12,7 @@
import org.apache.commons.compress.utils.IOUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.io.BufferedReader;
@@ -102,7 +103,7 @@
    public JSONObject verifyAuthorization() {
        try {
            JSONObject data = new JSONObject();
            String savedDir = System.getProperty("user.dir") + "\\ardLicense";
            String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
            File dir = new File(savedDir);
            if (!dir.exists()) { //如果不存在
                boolean dr = dir.mkdirs(); //创建目录
@@ -118,7 +119,7 @@
                    return data;
                }
            }
            File LicenseFile = new File(savedDir + "/license.cpy");//获取授权文件
            File LicenseFile = new File(savedDir + File.separator + "license.cpy");//获取授权文件
            if (LicenseFile.exists()) {
                AuthorizeInfo info = parseFiles(LicenseFile);//解析授权文件
                if (info != null) {
@@ -157,7 +158,7 @@
    public JSONObject getAuthorizationInfo() {
        try {
            JSONObject data = new JSONObject();
            String savedDir = System.getProperty("user.dir") + "\\ardLicense";
            String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
            File dir = new File(savedDir);
            if (!dir.exists()) { //如果不存在
                boolean dr = dir.mkdirs(); //创建目录
@@ -173,7 +174,7 @@
                    return data;
                }
            }
            File LicenseFile = new File(savedDir + "/license.cpy");//获取授权文件
            File LicenseFile = new File(savedDir + File.separator + "license.cpy");//获取授权文件
            if (LicenseFile.exists()) {
                AuthorizeInfo info = parseFiles(LicenseFile);//解析授权文件
                if (info != null) {
@@ -212,8 +213,8 @@
     */
    @Override
    public JSONObject makeTempLicense() {
        String savedDir = System.getProperty("user.dir") + "\\ardLicense";
        String tempLicenseDate = AuthorizeUtil.makeTempLicense(savedDir + "\\license.cpy");
        String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
        String tempLicenseDate = AuthorizeUtil.makeTempLicense(savedDir + File.separator + "license.cpy");
        JSONObject data = new JSONObject();
        data.put("Type", "makeTempLicense");
        data.put("Message", tempLicenseDate);
@@ -250,7 +251,7 @@
    public JSONObject uploadLicense(MultipartFile file) {
        try {
            String fileRealName = file.getOriginalFilename(); //获得原始文件名;
            String savedDir = System.getProperty("user.dir") + "\\ardLicense";
            String savedDir = System.getProperty("user.dir") + File.separator + "ardLicense";
            File dir = new File(savedDir);
            if (!dir.exists()) { //如果不存在
                boolean dr = dir.mkdirs(); //创建目录
@@ -263,7 +264,7 @@
            }
            JSONObject data = new JSONObject();
            data.put("Type", "uploadLicenseFile");
            data.put("Message", "Dir:" + savedDir);
            data.put("Message", savedDir);
            return data;
        } catch (Exception ex) {
            log.error("获取机器码异常:" + ex.getMessage());
pom.xml
@@ -7,7 +7,7 @@
    <groupId>com.ard</groupId>
    <artifactId>ard</artifactId>
    <version>3.8.8</version>
    <packaging>pom</packaging>
    <name>ard</name>
    <url>http://www.ard.vip</url>
    <description>无人机后台管理系统</description>
@@ -190,6 +190,12 @@
                <artifactId>ard-vtdu</artifactId>
                <version>${ard.version}</version>
            </dependency>
            <!-- 航线模块-->
            <dependency>
                <groupId>com.ard</groupId>
                <artifactId>ard-route</artifactId>
                <version>${ard.version}</version>
            </dependency>
            <!-- 通用工具-->
            <dependency>
                <groupId>com.ard</groupId>
@@ -229,8 +235,8 @@
        <module>ard-work</module>
        <module>ard-sample</module>
        <module>ard-vtdu</module>
        <module>ard-route</module>
    </modules>
    <packaging>pom</packaging>
    <build>
        <plugins>