package com.yuchen.saas.park.service.service.property;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yuchen.saas.park.api.dto.property.PropertyCustomerArchivesDto;
import com.yuchen.saas.park.api.dto.property.PropertyCustomerArchivesDupNameListQueryDto;
import com.yuchen.saas.park.api.dto.property.PropertyCustomerArchivesMergeDto;
import com.yuchen.saas.park.api.dto.property.PropertyCustomerArchivesQueryDto;
import com.yuchen.saas.park.api.entity.property.PropertyCustomerArchives;
import com.yuchen.saas.park.api.vo.property.*;
import org.nest.springwrap.core.mp.support.NestPage;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author 蔡文强
 * @Date 2023/11/28 10:56
 * @Description 客户档案表 服务类
 */
public interface IPropertyCustomerArchivesService extends IService<PropertyCustomerArchives> {
    Boolean saveCustomerArchives(PropertyCustomerArchivesDto customerArchivesDto);
    Boolean updateCustomerArchives(PropertyCustomerArchivesDto customerArchivesDto);
    Boolean mergeCustomerArchives(List<PropertyCustomerArchivesMergeDto> mergeDtoList);
    Boolean deleteCustomerArchives(Long id);
    PropertyCustomerArchivesVo getCustomerArchivesById(Long id);
    NestPage<PropertyCustomerArchivesListVo> getCustomerArchivesPageList(PropertyCustomerArchivesQueryDto queryDto);
    List<PropertyCustomerArchivesVo> getCustomerArchivesList(PropertyCustomerArchivesQueryDto queryDto);
    List<PropertyCustomerArchivesDupNameListVo> getDupNameList(PropertyCustomerArchivesDupNameListQueryDto queryDto);
    PropertyCustomerArchivesImportResVo importCustomerArchives(Integer type, MultipartFile file);
    void exportCustomerArchives(PropertyCustomerArchivesQueryDto queryDto, HttpServletResponse response);
    List<PropertyCustomerArchivesVo> getCustomerArchivesByIdList(List<Long> idList);
    List<PropertyHousesVo> getBindHousesByCustomerArchivesId(Long id);
    PropertyCustomerArchivesVo getCustomerInfoByHouseId(Long houseId);
    List<PropertyCustomerArchivesVo> getCustomerListByHouseId(Long houseId);

    /**
     * 根据手机号查找个人类型客户id
     * @param phone
     * @return
     */
    Long getPersonalCustomerArchivesId(String phone);

    /**
     * 根据组织id查询机构客户id
     * @param deptId
     * @return
     */
    Long getOrgCustomerArchivesId(long deptId);
}
