Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
zt
2025-10-13 11:44:29 +08:00
5 changed files with 9 additions and 9 deletions

View File

@ -15,7 +15,7 @@ import java.io.Serial;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("device") @TableName("anqm_device")
public class Device extends BaseEntity { public class Device extends BaseEntity {
@Serial @Serial

View File

@ -15,7 +15,7 @@ import java.io.Serial;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@TableName("location") @TableName("anqm_location")
public class Location extends BaseEntity { public class Location extends BaseEntity {
@Serial @Serial

View File

@ -24,7 +24,7 @@ public interface DeviceMapper extends BaseMapperPlus<Device, DeviceVo> {
" gm.project_id AS projectId,\n" + " gm.project_id AS projectId,\n" +
" bp.project_name AS projectName \n" + " bp.project_name AS projectName \n" +
"FROM\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 sys_user su ON gm.user_id = su.user_id \n" +
"LEFT JOIN bus_project bp ON gm.project_id = bp.id \n" + "LEFT JOIN bus_project bp ON gm.project_id = bp.id \n" +
"WHERE\n" + "WHERE\n" +

View File

@ -23,7 +23,7 @@ public interface LocationMapper extends BaseMapperPlus<Location, LocationVo> {
"ROW_NUMBER() OVER(" + "ROW_NUMBER() OVER(" +
"PARTITION BY user_id " + "PARTITION BY user_id " +
"ORDER BY create_time DESC, id DESC) AS rn " + "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," + "SELECT user_id AS userId," +
"latitude AS latitude, " + "latitude AS latitude, " +
"longitude AS longitude " + "longitude AS longitude " +
@ -37,7 +37,7 @@ public interface LocationMapper extends BaseMapperPlus<Location, LocationVo> {
" *,\n" + " *,\n" +
" ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY create_time DESC) AS rn\n" + " ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY create_time DESC) AS rn\n" +
" FROM\n" + " FROM\n" +
" location \n " + " anqm_location \n " +
"WHERE \n" + "WHERE \n" +
"project_id = #{projectId}\n " + "project_id = #{projectId}\n " +
// "AND create_time BETWEEN #{startTime} AND #{endTime} \n" + // "AND create_time BETWEEN #{startTime} AND #{endTime} \n" +

View File

@ -87,13 +87,13 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> impleme
list.forEach(item -> { list.forEach(item -> {
if (item.getUserId() != null){ if (item.getUserId() != null){
item.setType(1); item.setType(1);
SysUserVo sysUserVo = userService.queryById(item.getUserId());
if (sysUserVo != null) {
item.setUserName(sysUserVo.getNickName());
}
}else{ }else{
item.setType(2); item.setType(2);
} }
SysUserVo sysUserVo = userService.queryById(item.getUserId());
if (sysUserVo != null) {
item.setUserName(sysUserVo.getUserName());
}
BusProjectVo busProjectVo = projectService.selectById(item.getProjectId()); BusProjectVo busProjectVo = projectService.selectById(item.getProjectId());
if (busProjectVo != null) { if (busProjectVo != null) {
item.setProjectName(busProjectVo.getProjectName()); item.setProjectName(busProjectVo.getProjectName());