/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.zdb.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springblade.modules.system.vo.ZdbVo;
import org.springblade.modules.zdb.entity.ZdbEntity;
import org.springblade.modules.zdb.vo.XqVo;
import org.springblade.modules.zdb.vo.ZdbVO;
import org.springblade.modules.zdb.excel.ZdbExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;

/**
 * 字典表 服务类
 *
 * @author BladeX
 * @since 2023-12-28
 */
public interface IZdbService extends BaseService<ZdbEntity> {
	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param zdb
	 * @return
	 */
	IPage<ZdbVO> selectZdbPage(IPage<ZdbVO> page, ZdbVO zdb);


	/**
	 * 导出数据
	 *
	 * @param queryWrapper
	 * @return
	 */
	List<ZdbExcel> exportZdb(Wrapper<ZdbEntity> queryWrapper);


	/**
	 * 根据app传入的县区zddm获取县区下的街道集和街道对应的社区集
	 * @param zddm
	 * @return
	 */
	XqVo getChildrenByZddm(String zddm);


	/**
	 * 根据app传入的社区zddm获取器父类集
	 * @param zddm
	 * @return
	 */
	List<ZdbEntity> getParentsBySqbm(String zddm);
	ZdbEntity getDetailByZddm(String zddm);

	/**
	 * 根据字典代码获取部门
	 * @param zddm
	 * @return
	 */
	ZdbEntity getDeptByZddm(String zddm);

	void saveZdb(ZdbEntity zdbEntity);

	ZdbEntity selectZddm(String jdid);

	ZdbEntity selectParent(String jdid);
}
