xuhy
2025-04-21 496fe07f60137f0296fef15d8b7eb4305891244e
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)