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.RySpExcel;
import org.springblade.swzdr.mapper.RyDjspMapper;
import org.springblade.swzdr.pojo.entity.RyDjspEntity;
import org.springblade.swzdr.pojo.vo.RyDjspVO;
import org.springblade.swzdr.service.IRyDjspService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 人员_审批历史表 服务实现类
 *
 * @author BladeX
 * @since 2024-09-13
 */
@Service
public class RyDjspServiceImpl extends BaseServiceImpl<RyDjspMapper, RyDjspEntity> implements IRyDjspService {

	@Override
	public IPage<RyDjspVO> selectRySpPage(IPage<RyDjspVO> page, Map<String, String> params) {
		return page.setRecords(baseMapper.selectRySpPage(page, params));
	}

	@Override
	public List<RySpExcel> exportRySp(Wrapper<RyDjspEntity> queryWrapper) {
		List<RySpExcel> rySpList = baseMapper.exportRySp(queryWrapper);
		//rySpList.forEach(rySp -> {
		//	rySp.setTypeName(DictCache.getValue(DictEnum.YES_NO, RySp.getType()));
		//});
		return rySpList;
	}

}
