| | |
| | | */ |
| | | package me.zhengjie.modules.business.service.impl; |
| | | |
| | | import me.zhengjie.modules.business.domain.BusinessExpense; |
| | | import me.zhengjie.modules.business.domain.BusinessExpenseReimbursement; |
| | | import me.zhengjie.modules.business.service.BusinessExpenseService; |
| | | import me.zhengjie.modules.business.service.dto.BusinessExpenseDto; |
| | | import me.zhengjie.modules.business.repository.BusinessExpenseRepository; |
| | | import me.zhengjie.utils.ValidationUtil; |
| | | import me.zhengjie.utils.FileUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | |
| | | private final BusinessExpenseReimbursementRepository businessExpenseReimbursementRepository; |
| | | private final BusinessExpenseReimbursementMapper businessExpenseReimbursementMapper; |
| | | private final BusinessExpenseService businessExpenseService; |
| | | private final BusinessExpenseRepository businessExpenseRepository; |
| | | |
| | | @Override |
| | | public Map<String,Object> queryAll(BusinessExpenseReimbursementQueryCriteria criteria, Pageable pageable){ |
| | |
| | | BusinessExpenseReimbursementDto businessExpenseReimbursementDto = businessExpenseReimbursementMapper.toDto(t); |
| | | |
| | | // 获取营业费用 |
| | | BusinessExpenseDto businessExpenseDto = businessExpenseService.findById(businessExpenseReimbursementDto.getBusinessExpenseId()); |
| | | businessExpenseReimbursementDto.setBusinessExpenseType(businessExpenseDto.getExpenseType()); |
| | | BusinessExpense businessExpense = businessExpenseRepository.findById(businessExpenseReimbursementDto.getBusinessExpenseId()).orElseGet(BusinessExpense::new); |
| | | businessExpenseReimbursementDto.setBusinessExpenseType(businessExpense.getExpenseType()); |
| | | |
| | | // 返回处理好的DTO |
| | | return businessExpenseReimbursementDto; |