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.RyGzdwExcel;
import org.springblade.swzdr.mapper.RyGzdwMapper;
import org.springblade.swzdr.pojo.entity.RyGzdwEntity;
import org.springblade.swzdr.pojo.vo.RyGzdwVO;
import org.springblade.swzdr.service.IRyGzdwService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员_工作单位信息 服务实现类
 *
 * @author BladeX
 * @since 2024-09-12
 */
@Service
public class RyGzdwServiceImpl extends BaseServiceImpl<RyGzdwMapper, RyGzdwEntity> implements IRyGzdwService {

	@Override
	public IPage<RyGzdwVO> selectRyGzdwPage(IPage<RyGzdwVO> page, RyGzdwVO ryGzdw) {
		return page.setRecords(baseMapper.selectRyGzdwPage(page, ryGzdw));
	}

	@Override
	public List<RyGzdwExcel> exportRyGzdw(Wrapper<RyGzdwEntity> queryWrapper) {
		List<RyGzdwExcel> ryGzdwList = baseMapper.exportRyGzdw(queryWrapper);
		//ryGzdwList.forEach(ryGzdw -> {
		//	ryGzdw.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyGzdw.getType()));
		//});
		return ryGzdwList;
	}

}
