微调
This commit is contained in:
@@ -64,13 +64,9 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
||||
private final CsEquipmentDeliveryMapper csEquipmentDeliveryMapper;
|
||||
private final ICsDataSetService csDataSetService;
|
||||
private final DictTreeFeignClient dictTreeFeignClient;
|
||||
private final EngineeringController engineeringController;
|
||||
private final CsDeviceUserPOMapper csDeviceUserPOMapper;
|
||||
private final CsCommTerminalServiceImpl csCommTerminalServiceImpl;
|
||||
private final PqSensitiveUserFeignClient pqSensitiveUserFeignClient;
|
||||
private final UserFeignClient userFeignClient;
|
||||
private final CsEquipmentDeliveryService csEquipmentDeliveryService;
|
||||
private final CsDeviceUserPOService csDeviceUserPOService;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -682,11 +678,13 @@ public class CsLedgerServiceImpl extends ServiceImpl<CsLedgerMapper, CsLedger> i
|
||||
UserVO userVO = userFeignClient.getUserById(userId).getData();
|
||||
List<String> devIds;
|
||||
if (userVO.getType().equals(UserType.SUPER_ADMINISTRATOR) || userVO.getType().equals(UserType.ADMINISTRATOR)) {
|
||||
devIds = csEquipmentDeliveryService.getAll().stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
||||
devIds = csEquipmentDeliveryMapper.selectList(null).stream().map(CsEquipmentDeliveryPO::getId).collect(Collectors.toList());
|
||||
} else {
|
||||
List<CsDeviceUserPO> devList = csDeviceUserPOService.lambdaQuery().select(CsDeviceUserPO::getDeviceId)
|
||||
LambdaQueryWrapper<CsDeviceUserPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.select(CsDeviceUserPO::getDeviceId)
|
||||
.and(w -> w.eq(CsDeviceUserPO::getPrimaryUserId, userId).or().eq(CsDeviceUserPO::getSubUserId, userId))
|
||||
.eq(CsDeviceUserPO::getStatus, DataStateEnum.ENABLE.getCode()).list();
|
||||
.eq(CsDeviceUserPO::getStatus, DataStateEnum.ENABLE.getCode());
|
||||
List<CsDeviceUserPO> devList = csDeviceUserPOMapper.selectList(lambdaQueryWrapper);
|
||||
devIds = devList.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList());
|
||||
}
|
||||
if (CollUtil.isEmpty(devIds)) {
|
||||
|
||||
Reference in New Issue
Block a user