package org.springblade.modules.yjjl.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.modules.system.vo.DeptListVo;
import org.springblade.modules.yjjl.entity.YjjlEntity;
import org.springblade.modules.yjjl.excel.YjjlExcel;
import org.springblade.modules.yjjl.mapper.YjjlMapper;
import org.springblade.modules.yjjl.service.IYjjlService;
import org.springblade.modules.yjjl.vo.YjjlVO;
import org.springframework.stereotype.Service;

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

/**
 * 场所检查-移交记录 服务实现类
 *
 * @author BladeX
 * @since 2023-07-29
 */
@Service
public class YjjlServiceImpl extends BaseServiceImpl<YjjlMapper, YjjlEntity> implements IYjjlService {

	@Override
	public IPage<YjjlVO> selectYjjlPage(IPage<YjjlVO> page, YjjlVO yjjl) {
		return page.setRecords(baseMapper.selectYjjlPage(page, yjjl));
	}

	@Override
	public List<YjjlExcel> exportYjjl(Wrapper<YjjlEntity> queryWrapper) {
		List<YjjlExcel> yjjlList = baseMapper.exportYjjl(queryWrapper);
		//yjjlList.forEach(yjjl -> {
		//	yjjl.setTypeName(DictCache.getValue(DictEnum.YES_NO, Yjjl.getType()));
		//});
		return yjjlList;
	}

	@Override
	public DeptListVo getJdDept(Map<String, Object> params) {
		return baseMapper.getJdDept(params);
	}

	@Override
	public DeptListVo getHzXfDept(Map<String, Object> params) {
		return baseMapper.getHzXfDept(params);
	}

	@Override
	public IPage<YjjlVO> getYjjlPage(IPage<YjjlVO> page, Map<String, Object> params) {
		return baseMapper.getYjjlPage(page, params);
	}

	@Override
	public List<YjjlVO> getHistoryById(Map<String, Object> params) {
		return baseMapper.getHistoryById(params);
	}

	@Override
	public DeptListVo getFjDept(Map<String, Object> params) {
		return baseMapper.getFjDept(params);
	}

	@Override
	public DeptListVo getXqxjw(Map<String, Object> params) {
		return baseMapper.getXqxjw(params);
	}

	@Override
	public YjjlVO selectBgsy(YjjlVO yjjlVO) {
		return baseMapper.selectBgsy(yjjlVO);
	}

	@Override
	public DeptListVo getXfDept(Map<String, Object> params) {
		return baseMapper.getXfDept(params);
	}
}
