Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -15,7 +15,7 @@ import java.io.Serial;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("device")
|
||||
@TableName("anqm_device")
|
||||
public class Device extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
|
||||
@ -15,7 +15,7 @@ import java.io.Serial;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("location")
|
||||
@TableName("anqm_location")
|
||||
public class Location extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
|
||||
@ -24,7 +24,7 @@ public interface DeviceMapper extends BaseMapperPlus<Device, DeviceVo> {
|
||||
" 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" +
|
||||
|
||||
@ -23,7 +23,7 @@ public interface LocationMapper extends BaseMapperPlus<Location, LocationVo> {
|
||||
"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<Location, LocationVo> {
|
||||
" *,\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" +
|
||||
|
||||
@ -87,13 +87,13 @@ public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> 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());
|
||||
|
||||
Reference in New Issue
Block a user