package org.springblade.modules.rhzf.fwInfo.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.common.controller.vo.webService.YwxxVO;
import org.springblade.modules.rhzf.fwInfo.entity.FwInfoEntity;
import org.springblade.modules.rhzf.fwInfo.entity.Fwccjgb;
import org.springblade.modules.rhzf.fwInfo.excel.FwInfoExcel;
import org.springblade.modules.rhzf.fwInfo.vo.*;
import org.springblade.modules.rhzf.fwRy.vo.FwRyVO;

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

/**
 * 入户走访_房屋_基本信息 Mapper 接口
 *
 * @author BladeX
 * @since 2023-11-14
 */
public interface FwInfoMapper extends BaseMapper<FwInfoEntity> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param fwInfo
	 * @return
	 */
	List<FwInfoVO> selectFwInfoPage(IPage page, FwInfoVO fwInfo);
	String getFwxzByRkDzxx(String dzbm);

	/**
	 * 获取导出数据
	 *
	 * @return
	 */
	List<FwInfoExcel> exportFwInfo(@Param("fwInfo") FwInfoVO fwInfo);

	List<LdBzdzVO> getLdList(IPage<LdBzdzVO> page, @Param("params") Map<String, Object> params);

	List<DyVO> getDyList(@Param("params") Map<String, Object> params);

	List<LcVO> getLcList(@Param("params") Map<String, Object> params);

	List<FjVO> getFjList(@Param("params") Map<String, Object> params);

	RhzfSaveVO getFjDetail(@Param("params") Map<String, Object> params);
	RhzfSaveVO getFjDetailByFwIdAndDzbm(@Param("params") Map<String, Object> params);

	List<FwRyVO> getRyList(@Param("params") Map<String, Object> params);

	SyjzryVO getCzrk(@Param("params") Map<String, Object> params);

	SyjzryVO getJwrk(@Param("params") Map<String, Object> params);

	SyjzryVO getJzrk(@Param("params") Map<String, Object> params);

	SyjzryVO getWlrk(@Param("params") Map<String, Object> params);

	SyjzryVO getZzrk(@Param("params") Map<String, Object> params);

	FwInfoEntity getFwIsExist(FwInfoEntity fwInfo);
	FwInfoEntity getFwByFwidAndDzbm(Map<String, Object> params);

	List<FwInfoVO> getFwByRysfzh(String sfzh);

    int getFjNum(FwInfoEntity fwInfo);

    YwxxVO getYwxxParams(Long userId);

	Integer getTimes(String dzbm);

    List<LdBzdzVO> getJzwList(@Param("params") Map<String, Object> params);

	List<LdBzdzVO> getDzList(@Param("params") Map<String, Object> params);

	List<LdBzdzVO> getFjJzwList(@Param("params") Map<String, Object> params);

    int getRhzfCs(Long userId);

	List<FwInfoExcel> getFwRyAll(Long fwid);

	List<LdBzdzVO> getCsLdList(List<Long> ldphxlhList);

	int getFwSl(Long userId);

    RkxxVO getRyxxBySfzh(@Param("params") Map<String, String> params);

	List<Fwccjgb> getJcdList(String pc);

	int getKfsl(Long userId);

	String getTarget(String userAccount);

	List<FwInfoVO> getMphxlhByLdphxlh(String ldphxlh);

	FwInfoVO selectFwInfo(@Param("fwInfo") FwInfoVO fwInfo, String dzbm);

    String getTargetDm(String gajgdm);

	@DS("jl")
	List<LdBzdzVO> getLdByJg(List<String> jgIdList);

	void gxUpdateTime(Long fwId);

    int countByType(@Param("type") int type, @Param("params") Map<String, Object> params);

    void updateMdId(@Param("fwId") Long fwId, @Param("mdId") Long mdId);

	List<RhzfHistoryVO> history(IPage page, @Param("params") Map<String, Object> params);
}
