From 201f7bd3a7e7b686faf18289c0c8db919ec9d9e8 Mon Sep 17 00:00:00 2001 From: dfdg <2710245601@qq.com> Date: Mon, 13 Oct 2025 11:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E5=B8=BD=E8=A1=A8=E5=90=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/org/dromara/gps/domain/Device.java | 2 +- .../src/main/java/org/dromara/gps/domain/Location.java | 2 +- .../main/java/org/dromara/gps/mapper/DeviceMapper.java | 2 +- .../main/java/org/dromara/gps/mapper/LocationMapper.java | 4 ++-- .../org/dromara/gps/service/impl/DeviceServiceImpl.java | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Device.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Device.java index 87a6dd15..99a1f446 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Device.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Device.java @@ -15,7 +15,7 @@ import java.io.Serial; */ @Data @EqualsAndHashCode(callSuper = true) -@TableName("device") +@TableName("anqm_device") public class Device extends BaseEntity { @Serial diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Location.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Location.java index 5ac034f3..e208d49b 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Location.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/domain/Location.java @@ -15,7 +15,7 @@ import java.io.Serial; */ @Data @EqualsAndHashCode(callSuper = true) -@TableName("location") +@TableName("anqm_location") public class Location extends BaseEntity { @Serial diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/DeviceMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/DeviceMapper.java index 20ba7e7d..585c73ba 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/DeviceMapper.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/DeviceMapper.java @@ -24,7 +24,7 @@ public interface DeviceMapper extends BaseMapperPlus { " gm.project_id AS projectId,\n" + " bp.project_name AS projectName \n" + "FROM\n" + - " location gm\n" + + " anqm_location gm\n" + " LEFT JOIN sys_user su ON gm.user_id = su.user_id \n" + "LEFT JOIN bus_project bp ON gm.project_id = bp.id \n" + "WHERE\n" + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/LocationMapper.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/LocationMapper.java index cff05bf3..e312a555 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/LocationMapper.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/mapper/LocationMapper.java @@ -23,7 +23,7 @@ public interface LocationMapper extends BaseMapperPlus { "ROW_NUMBER() OVER(" + "PARTITION BY user_id " + "ORDER BY create_time DESC, id DESC) AS rn " + - "FROM location WHERE project_id = #{projectId})" + + "FROM anqm_location WHERE project_id = #{projectId})" + "SELECT user_id AS userId," + "latitude AS latitude, " + "longitude AS longitude " + @@ -37,7 +37,7 @@ public interface LocationMapper extends BaseMapperPlus { " *,\n" + " ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY create_time DESC) AS rn\n" + " FROM\n" + - " location \n " + + " anqm_location \n " + "WHERE \n" + "project_id = #{projectId}\n " + // "AND create_time BETWEEN #{startTime} AND #{endTime} \n" + diff --git a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/DeviceServiceImpl.java b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/DeviceServiceImpl.java index 961c1441..052e064d 100644 --- a/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/DeviceServiceImpl.java +++ b/xinnengyuan/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/gps/service/impl/DeviceServiceImpl.java @@ -87,13 +87,13 @@ public class DeviceServiceImpl extends ServiceImpl impleme list.forEach(item -> { if (item.getUserId() != null){ item.setType(1); + SysUserVo sysUserVo = userService.queryById(item.getUserId()); + if (sysUserVo != null) { + item.setUserName(sysUserVo.getNickName()); + } }else{ item.setType(2); } - SysUserVo sysUserVo = userService.queryById(item.getUserId()); - if (sysUserVo != null) { - item.setUserName(sysUserVo.getUserName()); - } BusProjectVo busProjectVo = projectService.selectById(item.getProjectId()); if (busProjectVo != null) { item.setProjectName(busProjectVo.getProjectName());