|
@@ -1,5 +1,7 @@
|
|
package cn.iocoder.yudao.module.attendance.controller.admin.business;
|
|
package cn.iocoder.yudao.module.attendance.controller.admin.business;
|
|
|
|
|
|
|
|
+import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
|
|
|
+import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -12,6 +14,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
@@ -42,6 +45,8 @@ public class AttendanceBusinessController {
|
|
private AttendanceBusinessService businessService;
|
|
private AttendanceBusinessService businessService;
|
|
@Resource
|
|
@Resource
|
|
private DeptApi deptApi;
|
|
private DeptApi deptApi;
|
|
|
|
+ @Resource
|
|
|
|
+ private FileApi fileApi;
|
|
|
|
|
|
@PostMapping("/create")
|
|
@PostMapping("/create")
|
|
@Operation(summary = "创建出差信息")
|
|
@Operation(summary = "创建出差信息")
|
|
@@ -82,6 +87,11 @@ public class AttendanceBusinessController {
|
|
respVO.setDeptName(dept.getName());
|
|
respVO.setDeptName(dept.getName());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 附件列表
|
|
|
|
+ List<FileDTO> fileList = fileApi.getFileDTOListByBiz(respVO.getBusinessId());
|
|
|
|
+ respVO.setFileList(fileList);
|
|
|
|
+ List<Long> fileIdList = fileList.stream().map(FileDTO::getId).collect(Collectors.toList());
|
|
|
|
+ respVO.setFileIdList(fileIdList);
|
|
return success(respVO);
|
|
return success(respVO);
|
|
}
|
|
}
|
|
|
|
|