Browse Source

[MODIFY] 定位分布功能增加权限控制

dev_wp
zhaozhenjing 3 months ago
parent
commit
241450ddf1
  1. 7
      src/2.services/ATS.NonCustodial.Application/Impl/Business/AppDeviceManagementService.cs

7
src/2.services/ATS.NonCustodial.Application/Impl/Business/AppDeviceManagementService.cs

@ -101,9 +101,14 @@ namespace ATS.NonCustodial.Application.Impl.Business
{ {
var express =await GetExpression(input, _appDeviceManagementRepository.AsQueryable(false, true)); var express =await GetExpression(input, _appDeviceManagementRepository.AsQueryable(false, true));
var rtn = await base.GetPageAsync<AppDeviceManagement, AppDeviceManagementGetPageInput, AppDeviceManagementListDto>(input, express); var rtn = await base.GetPageAsync<AppDeviceManagement, AppDeviceManagementGetPageInput, AppDeviceManagementListDto>(input, express);
var limits = User.limits;
var selectLimits = await _appCaseSupervisorRepository.AsQueryable(false, true)
.Where(w => limits.Contains(w.UnitId.ToString())).Select(s=>s.SupervisorId)
.ToListAsync();
var userList = await _userService.GetAllByConditionAsync(new BatchIdsInput() var userList = await _userService.GetAllByConditionAsync(new BatchIdsInput()
{ {
Ids = rtn.Data.Select(w => w.SupervisedPersonId).ToList() Ids = rtn.Data.Where(w=> selectLimits.Contains(w.SupervisedPersonId)).Select(w => w.SupervisedPersonId).ToList()
}); });
await rtn.Data.ForEachAsync(item => await rtn.Data.ForEachAsync(item =>

Loading…
Cancel
Save