| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.mapper.TCompanyMapper; |
| | | import com.ruoyi.system.model.TCompany; |
| | | import com.ruoyi.system.model.TOrderTransfer; |
| | | import com.ruoyi.system.mapper.TOrderTransferMapper; |
| | | import com.ruoyi.system.query.OrderTransferQuery; |
| | | import com.ruoyi.system.service.TOrderTransferService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.vo.TOrderTransferVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOrderTransferServiceImpl extends ServiceImpl<TOrderTransferMapper, TOrderTransfer> implements TOrderTransferService { |
| | | |
| | | @Resource |
| | | private TCompanyMapper tCompanyMapper; |
| | | |
| | | @Override |
| | | public List<TOrderTransferVo> pageList(Page<TOrderTransferVo> tOrderTransferPage, OrderTransferQuery query) { |
| | | List<TOrderTransferVo> tOrderTransferVos = this.baseMapper.pageList(tOrderTransferPage, query); |
| | | for (TOrderTransferVo tOrderTransferVo : tOrderTransferVos) { |
| | | Integer newCompanyId = tOrderTransferVo.getNewCompanyId(); |
| | | if(newCompanyId!=null){ |
| | | TCompany tCompany = tCompanyMapper.selectById(newCompanyId); |
| | | tOrderTransferVo.setNewCompany(tCompany.getName()); |
| | | } |
| | | Integer oldCompanyId = tOrderTransferVo.getOldCompanyId(); |
| | | if(oldCompanyId!=null){ |
| | | TCompany tCompany = tCompanyMapper.selectById(oldCompanyId); |
| | | tOrderTransferVo.setOldCompany(tCompany.getName()); |
| | | } |
| | | } |
| | | return tOrderTransferVos; |
| | | } |
| | | } |