xuhy
2025-04-27 2a83dac503b6a21015ce945a179d98e2ab9ef371
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ScreenController.java
@@ -158,8 +158,7 @@
                .eq(!"0".equals(businessDeptId),THouse::getBusinessDeptId, businessDeptId)
        );
        // 建议在循环外批量查询以下数据:
// 1. 提前获取所有房屋对应的最新有效合同(按房屋ID分组)
        // 1. 提前获取所有房屋对应的最新有效合同(按房屋ID分组)
        Set<String> houseIds = houses.stream().map(THouse::getId).collect(Collectors.toSet());
        Map<String, TContract> contractMap = contractService.list(new LambdaQueryWrapper<TContract>()
                        .eq(!"0".equals(businessDeptId), TContract::getBusinessDeptId, businessDeptId)