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.RyXsExcel;
import org.springblade.swzdr.mapper.RyXsMapper;
import org.springblade.swzdr.pojo.entity.RyXsEntity;
import org.springblade.swzdr.pojo.vo.RyInfoVO;
import org.springblade.swzdr.pojo.vo.RyXsVO;
import org.springblade.swzdr.service.IRyXsService;
import org.springframework.stereotype.Service;

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

/**
 * 人员_写实记录 服务实现类
 *
 * @author BladeX
 * @since 2024-09-13
 */
@Service
public class RyXsServiceImpl extends BaseServiceImpl<RyXsMapper, RyXsEntity> implements IRyXsService {

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

	@Override
	public List<RyXsExcel> exportRyXs(Wrapper<RyXsEntity> queryWrapper) {
		List<RyXsExcel> ryXsList = baseMapper.exportRyXs(queryWrapper);
		//ryXsList.forEach(ryXs -> {
		//	ryXs.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyXs.getType()));
		//});
		return ryXsList;
	}

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

}
