|
|
@@ -11,6 +11,8 @@ import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthRepo
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.qhse.report.vo.QhseMonthReportSaveReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.dal.dataobject.qhse.report.QhseMonthReportDO;
|
|
|
import cn.iocoder.yudao.module.pms.service.qhse.report.QhseMonthReportService;
|
|
|
+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.user.AdminUserApi;
|
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
@@ -43,6 +45,8 @@ public class QhseMonthReportController {
|
|
|
private QhseMonthReportService qhseMonthReportService;
|
|
|
@Autowired
|
|
|
private AdminUserApi adminUserApi;
|
|
|
+ @Autowired
|
|
|
+ private DeptApi deptApi;
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建资料")
|
|
|
@@ -90,6 +94,12 @@ public class QhseMonthReportController {
|
|
|
if (Objects.nonNull(user)){
|
|
|
qhseMonthReportRespVO.setPersonName(user.getNickname());
|
|
|
}
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(qhseMonthReportRespVO.getDeptId())){
|
|
|
+ DeptRespDTO dept = deptApi.getDept(qhseMonthReportRespVO.getDeptId());
|
|
|
+ if (Objects.nonNull(dept)){
|
|
|
+ qhseMonthReportRespVO.setDeptName(dept.getName());
|
|
|
+ }
|
|
|
}
|
|
|
return qhseMonthReportRespVO;
|
|
|
}).collect(Collectors.toList());
|