|
@@ -17,6 +17,7 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.Parameter;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import liquibase.pro.packaged.R;
|
|
|
import org.springdoc.api.annotations.ParameterObject;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -128,9 +129,23 @@ public class OaMeetingRoomController {
|
|
|
HttpServletResponse response) throws IOException {
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
List<OaMeetingRoomDO> list = oaMeetingRoomService.getOaMeetingRoomPage(pageReqVO).getList();
|
|
|
+ List<OaMeetingRoomRespVO> respVOList = BeanUtils.toBean(list, OaMeetingRoomRespVO.class);
|
|
|
+ if (CollUtil.isNotEmpty(respVOList)) {
|
|
|
+ List<Long> managerIdList = respVOList.stream().map(OaMeetingRoomRespVO::getManagerId).collect(Collectors.toList());
|
|
|
+ Map<Long, EmployeeRespDTO> employeeManagerMap = employeeApi.getEmployeeListByIds(managerIdList)
|
|
|
+ .stream()
|
|
|
+ .collect(Collectors.toMap(EmployeeRespDTO::getId, Function.identity()));
|
|
|
+ for (OaMeetingRoomRespVO oaMeetingRoomRespVO : respVOList) {
|
|
|
+ EmployeeRespDTO employeeRespDTO = employeeManagerMap.get(oaMeetingRoomRespVO.getManagerId());
|
|
|
+ if (employeeRespDTO != null) {
|
|
|
+ oaMeetingRoomRespVO.setManagerName(employeeRespDTO.getName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
// 导出 Excel
|
|
|
ExcelUtils.write(response, "会议室信息管理.xls", "数据", OaMeetingRoomRespVO.class,
|
|
|
- BeanUtils.toBean(list, OaMeetingRoomRespVO.class));
|
|
|
+ respVOList);
|
|
|
}
|
|
|
|
|
|
}
|