package cn.com.countrygarden.bi.main.dao.districtReport;

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.dto.districtReport.RdDistrictInfoDTO;
import cn.com.countrygarden.bi.main.dto.districtReport.RdDistrictInfoDelDTO;
import cn.com.countrygarden.bi.main.dto.districtReport.RdDistrictPrincipalDTO;
import cn.com.countrygarden.bi.main.model.districtReport.RdDistrictInfo;
import cn.com.countrygarden.bi.main.model.sys.UserRoles;
import com.github.pagehelper.PageRowBounds;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 片区信息-数据层
 *
 * @author 吕伟峰
 * @email www.justintoforest@gamail.com
 * @url 
 * @date 2019-08-14
 */
public interface RdDistrictInfoMapper extends Mapper<RdDistrictInfo>{

     List<RdDistrictInfoDTO> queryPageList(@Param("rdDistrictInfoDTO") RdDistrictInfoDTO rdDistrictInfoDTO, PageRowBounds pageRowBounds,
                                           @Param("organCodeString") List<String> organCodeString,@Param("principaString") List<String> principaString);

     List<RdDistrictInfoDTO> queryPrincipalList(@Param("rdDistrictInfoDTO") RdDistrictInfoDTO rdDistrictInfoDTO, PageRowBounds pageRowBounds,
                                                @Param("organCodeString") List<String> organCodeString,@Param("principaString") List<String> principaString);

     List<RdDistrictInfoDTO> queryById(@Param("id") Integer id);

     List<RdDistrictPrincipalDTO> addonePrincipale(@Param("id") Integer id);

     int deleteUpdate(@Param("id") Integer id,@Param("updateBy") String updateBy,@Param("updateName")String updateName);

     int delpingliangtag(@Param("rids") List<String> rids,@Param("updateBy") String updateBy,@Param("updateName")String updateName);

     int update(RdDistrictInfo rdDistrictInfo);

     List<RdDistrictInfoDelDTO> prCommId(@Param("commName") String commName);

     RdDistrictInfo countList(RdDistrictInfoDTO rdDistrictInfoDTO);

     List<RdDistrictInfo> rdDistrictInfoBown(@Param("regionCode") String regionCode,@Param("principaString")List<String> principaString);

     List<RdDistrictInfo> rdDistrictInfoBownName(@Param("regionName") String regionName,
                                                 @Param("districtName") String districtName,@Param("principaString")List<String> principaString);

     List<RdDistrictInfoDTO> rdDistrictProjectDTO(@Param("districtCode") String districtCode,@Param("principaString")List<String> principaString);

     List<RdDistrictInfoDelDTO> RdDistrictInfoDelCheck(@Param("districtCode") String districtCode);

     List<RdDistrictInfoDTO> rdDistrictInfoAddOne(@Param("regionCode") String regionCode,@Param("districtName") String districtName);

     List<UserRoles> selectuserRoles(@Param("userCode") String userCode);

     List<RdDistrictInfo> districtNameMp(@Param("districtName") String districtName);

     int deletePrincipal();

     int countProjectMp(@Param("districtCode") String districtCode,@Param("projectName") String projectName);
}