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.RyCgspExcel;
import org.springblade.swzdr.mapper.RyCgspMapper;
import org.springblade.swzdr.pojo.entity.RyCgspEntity;
import org.springblade.swzdr.pojo.vo.RyCgspVO;
import org.springblade.swzdr.service.IRyCgspService;
import org.springframework.stereotype.Service;

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

/**
 * 人员_撤管记录 服务实现类
 *
 * @author BladeX
 * @since 2024-09-27
 */
@Service
public class RyCgspServiceImpl extends BaseServiceImpl<RyCgspMapper, RyCgspEntity> implements IRyCgspService {

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

	@Override
	public List<RyCgspExcel> exportRyCgsp(Wrapper<RyCgspEntity> queryWrapper) {
		List<RyCgspExcel> ryCgspList = baseMapper.exportRyCgsp(queryWrapper);
		//ryCgspList.forEach(ryCgsp -> {
		//	ryCgsp.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyCgsp.getType()));
		//});
		return ryCgspList;
	}

	@Override
	public List<RyCgspVO> getListByRyId(Long ryId) {
		return baseMapper.getListByRyId(ryId);
	}

}
