package org.springblade.swzdr.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.swzdr.excel.RyCarExcel;
import org.springblade.swzdr.mapper.RyCarMapper;
import org.springblade.swzdr.pojo.entity.RyCarEntity;
import org.springblade.swzdr.pojo.vo.RyCarVO;
import org.springblade.swzdr.service.IRyCarService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员_车辆信息 服务实现类
 *
 * @author BladeX
 * @since 2024-09-12
 */
@Service
public class RyCarServiceImpl extends BaseServiceImpl<RyCarMapper, RyCarEntity> implements IRyCarService {

	@Override
	public IPage<RyCarVO> selectRyCarPage(IPage<RyCarVO> page, RyCarVO ryCar) {
		return page.setRecords(baseMapper.selectRyCarPage(page, ryCar));
	}

	@Override
	public List<RyCarExcel> exportRyCar(Wrapper<RyCarEntity> queryWrapper) {
		List<RyCarExcel> ryCarList = baseMapper.exportRyCar(queryWrapper);
		//ryCarList.forEach(ryCar -> {
		//	ryCar.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyCar.getType()));
		//});
		return ryCarList;
	}

}
