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.RyXspzExcel;
import org.springblade.swzdr.mapper.RyXspzMapper;
import org.springblade.swzdr.pojo.entity.RyXspzEntity;
import org.springblade.swzdr.pojo.vo.RyXspzVO;
import org.springblade.swzdr.service.IRyXspzService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 人员_写实时间配置 服务实现类
 *
 * @author BladeX
 * @since 2024-09-19
 */
@Service
public class RyXspzServiceImpl extends BaseServiceImpl<RyXspzMapper, RyXspzEntity> implements IRyXspzService {

	@Override
	public IPage<RyXspzVO> selectRyXspzPage(IPage<RyXspzVO> page, RyXspzVO ryXspz) {
		return page.setRecords(baseMapper.selectRyXspzPage(page, ryXspz));
	}

	@Override
	public List<RyXspzExcel> exportRyXspz(Wrapper<RyXspzEntity> queryWrapper) {
		List<RyXspzExcel> ryXspzList = baseMapper.exportRyXspz(queryWrapper);
		//ryXspzList.forEach(ryXspz -> {
		//	ryXspz.setTypeName(DictCache.getValue(DictEnum.YES_NO, RyXspz.getType()));
		//});
		return ryXspzList;
	}

	@Override
	public int isGbsj() {
		return baseMapper.isGbsj();
	}

}
