|
@@ -24,6 +24,8 @@ import cn.iocoder.yudao.module.bpm.enums.DictDataConstants;
|
|
|
import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
|
|
import cn.iocoder.yudao.module.bpm.enums.ErrorCodeConstants;
|
|
|
import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
|
|
import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmConstants;
|
|
|
import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
|
|
import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
|
|
|
|
|
+import cn.iocoder.yudao.module.expense.api.expensetype.ExpenseTypeApi;
|
|
|
|
|
+import cn.iocoder.yudao.module.expense.api.expensetype.dto.ExpenseTypeRespDTO;
|
|
|
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
|
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
|
|
import cn.iocoder.yudao.module.infra.api.file.dto.FileDTO;
|
|
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;
|
|
@@ -96,6 +98,9 @@ public class OaExpenseServiceImpl implements OaExpenseService {
|
|
|
@Resource
|
|
@Resource
|
|
|
private DeptApi deptApi;
|
|
private DeptApi deptApi;
|
|
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private ExpenseTypeApi expenseTypeApi;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public Long stagingOaExpense(OaExpenseSaveReqVO stagingReqVO) {
|
|
public Long stagingOaExpense(OaExpenseSaveReqVO stagingReqVO) {
|
|
@@ -661,26 +666,40 @@ public class OaExpenseServiceImpl implements OaExpenseService {
|
|
|
|
|
|
|
|
List<OaExpenseRespVO> oaExpenseRespVOList = oaExpenseRespVOPageResult.getList();
|
|
List<OaExpenseRespVO> oaExpenseRespVOList = oaExpenseRespVOPageResult.getList();
|
|
|
if (CollectionUtil.isNotEmpty(oaExpenseRespVOList)) {
|
|
if (CollectionUtil.isNotEmpty(oaExpenseRespVOList)) {
|
|
|
|
|
+ // 当前审核人名称
|
|
|
List<Long> employeeIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
|
|
List<Long> employeeIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getCurrentAuditEmployeeId).collect(Collectors.toList());
|
|
|
List<AdminUserRespDTO> employeeList = adminUserApi.getUserList(employeeIdList);
|
|
List<AdminUserRespDTO> employeeList = adminUserApi.getUserList(employeeIdList);
|
|
|
|
|
+
|
|
|
|
|
+ // 部门名称
|
|
|
|
|
+ List<Long> deptIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getDeptId).collect(Collectors.toList());
|
|
|
|
|
+ List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
|
|
|
|
|
+
|
|
|
|
|
+ // 报销类型名称
|
|
|
|
|
+ List<Long> expenseTypeIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getExpenseTypeId).collect(Collectors.toList());
|
|
|
|
|
+ List<ExpenseTypeRespDTO> expenseTypeList = expenseTypeApi.getExpenseTypeList(expenseTypeIdList);
|
|
|
|
|
+
|
|
|
for (OaExpenseRespVO respVO : oaExpenseRespVOList) {
|
|
for (OaExpenseRespVO respVO : oaExpenseRespVOList) {
|
|
|
|
|
+
|
|
|
for (AdminUserRespDTO employee : employeeList) {
|
|
for (AdminUserRespDTO employee : employeeList) {
|
|
|
if (employee.getId() != null && employee.getId().equals(respVO.getCurrentAuditEmployeeId())) {
|
|
if (employee.getId() != null && employee.getId().equals(respVO.getCurrentAuditEmployeeId())) {
|
|
|
respVO.setCurrentAuditEmployeeName(employee.getNickname());
|
|
respVO.setCurrentAuditEmployeeName(employee.getNickname());
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- List<Long> deptIdList = oaExpenseRespVOList.stream().map(OaExpenseRespVO::getDeptId).collect(Collectors.toList());
|
|
|
|
|
- List<DeptRespDTO> deptList = deptApi.getDeptList(deptIdList);
|
|
|
|
|
- for (OaExpenseRespVO respVO : oaExpenseRespVOList) {
|
|
|
|
|
for (DeptRespDTO dept : deptList) {
|
|
for (DeptRespDTO dept : deptList) {
|
|
|
if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
|
|
if (dept.getId() != null && dept.getId().equals(respVO.getDeptId())) {
|
|
|
respVO.setDeptName(dept.getName());
|
|
respVO.setDeptName(dept.getName());
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ for (ExpenseTypeRespDTO expenseType : expenseTypeList) {
|
|
|
|
|
+ if (expenseType.getId() != null && expenseType.getId().equals(respVO.getExpenseTypeId())) {
|
|
|
|
|
+ respVO.setExpenseTypeName(expenseType.getName());
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|