diff --git a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsLedgerServiceImpl.java b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsLedgerServiceImpl.java index 7280d47..75a89ad 100644 --- a/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsLedgerServiceImpl.java +++ b/cs-device/cs-device-boot/src/main/java/com/njcn/csdevice/service/impl/CsLedgerServiceImpl.java @@ -64,13 +64,9 @@ public class CsLedgerServiceImpl extends ServiceImpl 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 i UserVO userVO = userFeignClient.getUserById(userId).getData(); List 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 devList = csDeviceUserPOService.lambdaQuery().select(CsDeviceUserPO::getDeviceId) + LambdaQueryWrapper 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 devList = csDeviceUserPOMapper.selectList(lambdaQueryWrapper); devIds = devList.stream().map(CsDeviceUserPO::getDeviceId).distinct().collect(Collectors.toList()); } if (CollUtil.isEmpty(devIds)) {