Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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" +
|
||||||
|
|||||||
@ -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" +
|
||||||
|
|||||||
@ -87,12 +87,12 @@ 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);
|
||||||
}else{
|
|
||||||
item.setType(2);
|
|
||||||
}
|
|
||||||
SysUserVo sysUserVo = userService.queryById(item.getUserId());
|
SysUserVo sysUserVo = userService.queryById(item.getUserId());
|
||||||
if (sysUserVo != null) {
|
if (sysUserVo != null) {
|
||||||
item.setUserName(sysUserVo.getUserName());
|
item.setUserName(sysUserVo.getNickName());
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
item.setType(2);
|
||||||
}
|
}
|
||||||
BusProjectVo busProjectVo = projectService.selectById(item.getProjectId());
|
BusProjectVo busProjectVo = projectService.selectById(item.getProjectId());
|
||||||
if (busProjectVo != null) {
|
if (busProjectVo != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user