| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.project.domain.ServiceReimbursementEo; |
| | | import com.ruoyi.project.domain.ServiceReimbursementdetail; |
| | | import com.ruoyi.project.domain.ServiceRelativesconfirmation; |
| | | import com.ruoyi.common.utils.bean.DtoConversionUtils; |
| | | import com.ruoyi.project.domain.*; |
| | | import com.ruoyi.project.domain.dto.ServiceReimbursementDto; |
| | | import com.ruoyi.project.domain.vo.SpFinancialExpensesReimbursementOut; |
| | | import com.ruoyi.project.mapper.ServiceReimbursementdetailMapper; |
| | | import com.ruoyi.project.mapper.*; |
| | | import com.ruoyi.project.service.IServiceReimbursementSharedService; |
| | | import com.ruoyi.project.service.IServiceReimbursementdetailSharedService; |
| | | import com.ruoyi.project.service.IServiceReimbursementpayeeSharedService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.mapper.ServiceReimbursementMapper; |
| | | import com.ruoyi.project.domain.ServiceReimbursement; |
| | | import com.ruoyi.project.service.IServiceReimbursementService; |
| | | |
| | | /** |
| | |
| | | * @date 2022-01-24 |
| | | */ |
| | | @Service |
| | | public class ServiceReimbursementServiceImpl extends ServiceImpl<ServiceReimbursementMapper, ServiceReimbursement> implements IServiceReimbursementService |
| | | { |
| | | public class ServiceReimbursementServiceImpl extends ServiceImpl<ServiceReimbursementMapper, ServiceReimbursement> implements IServiceReimbursementService { |
| | | |
| | | @Autowired |
| | | ServiceReimbursementMapper serviceReimbursementMapper; |
| | | |
| | | @Autowired |
| | | ServiceReimbursementSharedMapper serviceReimbursementShareMapper; |
| | | |
| | | @Autowired |
| | | ServiceReimbursementdetailMapper serviceReimbursementdetailMapper; |
| | | |
| | | @Autowired |
| | | ServiceReimbursementdetailSharedMapper serviceReimbursementdetailSharedMapper; |
| | | |
| | | @Autowired |
| | | ServiceReimbursementpayeeMapper reimbursementpayeeMapper; |
| | | |
| | | @Autowired |
| | | ServiceReimbursementpayeeSharedMapper reimbursementpayeeSharedMapper; |
| | | |
| | | @Autowired |
| | | IServiceReimbursementdetailSharedService detailSharedService; |
| | | |
| | | @Autowired |
| | | IServiceReimbursementSharedService sharedService; |
| | | |
| | | @Autowired |
| | | IServiceReimbursementpayeeSharedService payeeSharedService; |
| | | |
| | | /** |
| | | * 查询报销申请列表 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean addSharedData(Long id) { |
| | | ServiceReimbursement serviceReimbursement = serviceReimbursementMapper.selectById(id); |
| | | Map<String, Object> columnMap = new HashMap<>(); |
| | | columnMap.put("rbid", id); |
| | | //获取详情数据 |
| | | List<ServiceReimbursementdetail> details = serviceReimbursementdetailMapper.selectByMap(columnMap); |
| | | //获取支付数据 |
| | | List<ServiceReimbursementpayee> serviceReimbursementpayees = reimbursementpayeeMapper.selectByMap(columnMap); |
| | | //数据组装 |
| | | ServiceReimbursementShared serviceReimbursementShared = DtoConversionUtils.sourceToTarget(serviceReimbursement, ServiceReimbursementShared.class); |
| | | List<ServiceReimbursementdetailShared> serviceReimbursementdetailShareds = DtoConversionUtils.sourceToTarget(details, ServiceReimbursementdetailShared.class); |
| | | List<ServiceReimbursementpayeeShared> serviceReimbursementpayeeShareds = DtoConversionUtils.sourceToTarget(serviceReimbursementpayees, ServiceReimbursementpayeeShared.class); |
| | | //将组装好的数据插入到分享表中 |
| | | sharedService.save(serviceReimbursementShared); |
| | | detailSharedService.saveBatch(serviceReimbursementdetailShareds); |
| | | payeeSharedService.saveBatch(serviceReimbursementpayeeShareds); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceReimbursement> selectSearchList(ServiceReimbursementDto serviceReimbursementdto) { |
| | | return serviceReimbursementMapper.selectSearchList(serviceReimbursementdto); |
| | | } |