package org.springblade.modules.sqjw.pcsInfo.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.sqjw.pcsInfo.entity.PcsInfoEntity;
import org.springblade.modules.sqjw.pcsInfo.excel.PcsInfoExcel;
import org.springblade.modules.sqjw.pcsInfo.mapper.PcsInfoMapper;
import org.springblade.modules.sqjw.pcsInfo.service.IPcsInfoService;
import org.springblade.modules.sqjw.pcsInfo.vo.DzxxVO;
import org.springblade.modules.sqjw.pcsInfo.vo.PcsInfoVO;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.vo.ZdVO;
import org.springframework.stereotype.Service;

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

/**
 * 派出所信息表 服务实现类
 *
 * @author BladeX
 * @since 2024-01-08
 */
@Service
public class PcsInfoServiceImpl extends BaseServiceImpl<PcsInfoMapper, PcsInfoEntity> implements IPcsInfoService {

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

	@Override
	public List<PcsInfoExcel> exportPcsInfo(Map<String, Object> params) {
		List<PcsInfoExcel> pcsInfoList = baseMapper.exportPcsInfo(params);
		//pcsInfoList.forEach(pcsInfo -> {
		//	pcsInfo.setTypeName(DictCache.getValue(DictEnum.YES_NO, PcsInfo.getType()));
		//});
		return pcsInfoList;
	}

	@Override
	public PcsInfoVO getDetail(Long deptId) {
		return baseMapper.getDetail(deptId);
	}

	@Override
	public List<ZdVO> getDictList(String code) {
		return baseMapper.getDictList(code);
	}

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

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

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

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

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

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

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