|
|
@@ -16,7 +16,6 @@ import com.ydtech.modules.admin.model.SysGeographyPosition;
|
|
|
import com.ydtech.modules.admin.model.SysGeographyPositionRecord;
|
|
|
import com.ydtech.modules.admin.model.SysUser;
|
|
|
import com.ydtech.modules.admin.model.dto.*;
|
|
|
-import com.ydtech.modules.admin.model.po.SysPcAddress;
|
|
|
import com.ydtech.modules.admin.model.vo.*;
|
|
|
import com.ydtech.modules.admin.service.GeoService;
|
|
|
import com.ydtech.modules.admin.service.SysGeographyPositionRecordService;
|
|
|
@@ -517,7 +516,6 @@ public class SysGeographyPositionServiceImpl extends ServiceImpl<SysGeographyPos
|
|
|
if (sysDept == null) continue;
|
|
|
String deptName = getDeptName(sysUser.getDeptId());
|
|
|
sysGeographyPositionInfoVo.setDeptName(deptName);
|
|
|
-// sysGeographyPositionInfoVo.setDeptName(sysDept.getName());
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -525,10 +523,28 @@ public class SysGeographyPositionServiceImpl extends ServiceImpl<SysGeographyPos
|
|
|
sysGeographyPositionList);
|
|
|
}
|
|
|
|
|
|
+ private List<String> getcollectIds() {
|
|
|
+ String userId = BaseController.getUserId();
|
|
|
+ List<String> collectIds = new ArrayList<>();
|
|
|
+ if (!"admin".equals(userId)) {
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ List<SysUser> sysUsers = sysUserMapper.selectList(new LambdaQueryWrapper<SysUser>()
|
|
|
+ .eq(SysUser::getLeaderId, userId).ne(SysUser::getStatus, 0));
|
|
|
+ collectIds = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
|
|
+ if (collectIds.size() > 0) {
|
|
|
+ List<String> idList = queryList(collectIds, ids);
|
|
|
+ collectIds.addAll(idList);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return collectIds;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public BasePageResult<SysGeographyPositionInfoVo> queryGeographyRecord(PcAddressInfoDto addressInfoDto) {
|
|
|
Page page = new Page(addressInfoDto.getPageNum(), addressInfoDto.getPageSize());
|
|
|
- IPage<SysGeographyPositionInfoVo> sysGeographyPositionList =null;
|
|
|
+ IPage<SysGeographyPositionInfoVo> sysGeographyPositionList;
|
|
|
//登陆人的下属id
|
|
|
String userId = BaseController.getUserId();
|
|
|
List<String> collectIds =new ArrayList<>();
|
|
|
@@ -575,7 +591,6 @@ public class SysGeographyPositionServiceImpl extends ServiceImpl<SysGeographyPos
|
|
|
if (sysUser == null) continue;
|
|
|
sysGeographyPositionInfoVo.setLeaderName(sysUser.getLeaderName());
|
|
|
String deptName = getDeptName(sysUser.getDeptId());
|
|
|
-// sysGeographyPositionInfoVo.setDeptName(sysDept.getName());
|
|
|
sysGeographyPositionInfoVo.setDeptName(deptName);
|
|
|
}
|
|
|
|
|
|
@@ -613,7 +628,7 @@ public class SysGeographyPositionServiceImpl extends ServiceImpl<SysGeographyPos
|
|
|
.likeRight(StringUtils.isNotEmpty(startTime), "create_time", startTime)
|
|
|
.in("source", Arrays.asList(1, 2))
|
|
|
.in(CollectionUtil.isNotEmpty(collect), "user_id", collect)
|
|
|
- .eq(StringUtils.isNotEmpty(source),"source",source);;
|
|
|
+ .eq(StringUtils.isNotEmpty(source),"source",source);
|
|
|
Map<String, Object> result = sysGeographyPositionRecordService.getMap(queryWrapper);
|
|
|
Long total = (Long) result.get("total");
|
|
|
appGeographyHistoryInfoVo.setOnlineNum(total);
|
|
|
@@ -644,7 +659,7 @@ public class SysGeographyPositionServiceImpl extends ServiceImpl<SysGeographyPos
|
|
|
.between("create_time", startTime, endTime)
|
|
|
.in("source", Arrays.asList(1, 2))
|
|
|
.in(CollectionUtil.isNotEmpty(collect), "user_id", collect)
|
|
|
- .eq(StringUtils.isNotEmpty(source),"source",source);;
|
|
|
+ .eq(StringUtils.isNotEmpty(source),"source",source);
|
|
|
Map<String, Object> result = sysGeographyPositionRecordService.getMap(queryWrapper);
|
|
|
Long total = (Long) result.get("total");
|
|
|
appGeographyHistoryInfoVo.setOnlineNum(total);
|
|
|
@@ -668,8 +683,6 @@ public class SysGeographyPositionServiceImpl extends ServiceImpl<SysGeographyPos
|
|
|
SysUser sysUser = sysUserService.getById(sysGeographyPositionRecord.getUserId());
|
|
|
if (sysUser == null) continue;
|
|
|
sysGeographyPositionRecord.setLeaderName(sysUser.getLeaderName());
|
|
|
-// SysDept sysDept = sysDeptMapper.selectById(sysUser.getDeptId());
|
|
|
-// if (sysDept == null) continue;
|
|
|
String deptName = getDeptName(sysUser.getDeptId());
|
|
|
sysGeographyPositionRecord.setDeptName(deptName);
|
|
|
|