package org.springblade.modules.sqmy.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.sqmy.excel.ZatbInfoExcel;
import org.springblade.modules.sqmy.mapper.ZatbInfoMapper;
import org.springblade.modules.sqmy.pojo.entity.ZatbInfoEntity;
import org.springblade.modules.sqmy.pojo.vo.ZatbInfoVO;
import org.springblade.modules.sqmy.service.IZatbInfoService;
import org.springframework.stereotype.Service;

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

/**
 * 季度治安通报 服务实现类
 *
 * @author wth
 * @since 2024-11-12
 */
@Service
public class ZatbInfoServiceImpl extends BaseServiceImpl<ZatbInfoMapper, ZatbInfoEntity> implements IZatbInfoService {

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

	@Override
	public List<ZatbInfoExcel> exportZatbInfo(Wrapper<ZatbInfoEntity> queryWrapper) {
		List<ZatbInfoExcel> zatbInfoList = baseMapper.exportZatbInfo(queryWrapper);
		//zatbInfoList.forEach(zatbInfo -> {
		//	zatbInfo.setTypeName(DictCache.getValue(DictEnum.YES_NO, ZatbInfoEntity.getType()));
		//});
		return zatbInfoList;
	}

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

}
