package cn.com.countrygarden.bi.main.dao.twerp.hm;

import cn.com.countrygarden.bi.main.dto.DevelopmentSubjectDTO;
import cn.com.countrygarden.bi.main.dto.HouseKeeperDTO;
import cn.com.countrygarden.bi.main.dto.HouseKeeperNameTreeDTO;
import cn.com.countrygarden.bi.main.dto.districtReport.*;
import cn.com.countrygarden.bi.main.dto.manager.CommunityInfo;
import cn.com.countrygarden.bi.main.dto.manager.TreeNode;
import cn.com.countrygarden.bi.main.dto.wcx.SelectTreeDTO;
import cn.com.countrygarden.bi.main.model.dup.DupComm;
import cn.com.countrygarden.bi.main.model.dup.DupOrgan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ManagerMapForErpMapper {

    /**
     * 根据项目查询管家的ERP信息
     * @param projects
     * @return
     */
    List<HouseKeeperDTO> selectHouseCountPageDataByErp(@Param("organName")String organName,
    		@Param("projectName")String projectName,
    		@Param("name")String name);
    
    /**
     * 根据项目查询管家项目的ERP信息
     * @param projects
     * @return
     */
    List<HouseKeeperDTO> selectCommByErp(@Param("organName")String organName,
    		@Param("commName")String commName);
    
    List<HouseKeeperNameTreeDTO> selectDevelopmentsubjectTree();
    
    List<DevelopmentSubjectDTO> selectDevelopmentsubjectData();
    
    List<DevelopmentSubjectDTO> selectCommByDevelopmentsubject(@Param("commNames")List<String> commNames);

    DevelopmentSubjectDTO selectCommByDevelopmentsubjectByOne(@Param("commName")String commName);

    List<DevelopmentSubjectDTO> selectDevelopmentsubjectByComm(@Param("commName")String commName);
    
    List<HouseKeeperNameTreeDTO> selectAllCommName();

    List<CommunityInfo> queryCommInfo(String commid);

    List<Integer> queryCommId(String userCode);

    List<DupOrgan> queryAllRegion();

    List<DupOrgan> queryAllRegionRdInfo(@Param("organCode") String organCode,@Param("organCodeString") List<String> organCodeString,@Param("principaString") List<String> principaString);

    List<DupOrgan> queryAllRegionRdDistrict(@Param("regionName") String regionName,@Param("organCode") String organCode,@Param("organCodeString") List<String> organCodeString);

    List<DupComm> queryAllComm(String organCode);

    List<DupComm> queryAllCommCase(@Param("organCode") String organCode,@Param("CommIdfenghuang") List<String> CommIdfenghuang);

    List<DupComm> queryAllCommCaseDistrict(@Param("organCode") String organCode,@Param("commid") String commid,@Param("commIdString") List<String> commIdString,@Param("NotIncommIdString") List<String> NotIncommIdString,@Param("NotIncommIdName") List<String> NotIncommIdName);

    List<DupComm> queryAllCommCaseDistrictCommName(@Param("commId") String commId,@Param("commName") String commName,@Param("commIdString") List<String> commIdString);

    List<String> queryRegionByUserCode(@Param("userCode") String userCode);

    List<HouseKeeperNameTreeDTO> queryCommByOrgan(@Param("organList") List<String> organList);

    List<TreeNode> queryCommByOrganAndUser(@Param("organ") String organ,
                                        @Param("userCode") String userCode);
    List<TreeNode> queryCommByOrganName(@Param("organ") String organ);

    List<String> queryAllRegionName();

    List<String> queryCommStringByOrganAndUser(@Param("organ") String organ,
                                           @Param("userCode") String userCode);

    String selectCommCodeByCommName(@Param("commName") String commName, @Param("regionCode") String regionCode);

    List<hasNotYetOpenedDTO> hasNotYetOpenedList(@Param("organCode") String organCode,@Param("commid") String commid);

    List<repossessedERP> repossessedERPList(@Param("organCode") String organCode, @Param("commid") String commid);

    List<RdprojectInformationSummaryDTO> rdprojectInformationSummaryList(@Param("rdClosedBuildingProjectDTO") RdClosedBuildingProjectDTO rdClosedBuildingProjectDTO,@Param("organCodeString") List<String> organCodeString,
                                                                         @Param("commIdString") List<String> commIdString,@Param("commId") List<String> commId);

    List<RdprojectInformationSummaryVO> evaluationrdprojectInformationSummary(@Param("rdClosedBuildingProjectDTO") RdClosedBuildingProjectDTO rdClosedBuildingProjectDTO,@Param("organCodeString") List<String> organCodeString,@Param("commIdString") List<String> commIdString,@Param("commId") List<String> commId);

    List<String> organCodeString(@Param("sysUserCode") String sysUserCode, @Param("commIdString") List<String> commIdString);

    List<String> commIdString(@Param("sysUserCode") String sysUserCode);

    List<String> commIdStringName(@Param("sysUserCode") String sysUserCode);

    List<SelectTreeDTO> selectOrganTree();

    String selectDevelopmentsubjectByCommCode(@Param("commCode") String commCode);

    Integer selectOrganCountByOrganCode(@Param("organCode") String organCode);

    String selectOrgNameByCode(String value);

    String queryCommNameByOrganCodeAndCommId(@Param("organCode")String organCode, @Param("commId")String commId);

    String selectOrganCodeByOrganName(@Param("organName") String organName);

    List<DupOrgan> queryAllRegionRdName();

    List<DupComm> queryAllCommName(@Param("organCode")String organCode);

    List<DupComm> queryAllCommCaseDistrictDTO(@Param("organCode") String organCode,@Param("commid") String commid,@Param("commIdString") List<String> commIdString,@Param("NotIncommIdString") List<String> NotIncommIdString,@Param("NotIncommIdName") List<String> NotIncommIdName);

}
