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

import cn.com.countrygarden.bi.main.core.Mapper;
import cn.com.countrygarden.bi.main.model.common.Comm;
import cn.com.countrygarden.bi.main.model.common.CommData;
import cn.com.countrygarden.bi.main.model.project.CommVO;
import cn.com.countrygarden.bi.main.service.project.impl.vo.OneProject;

import com.github.pagehelper.PageRowBounds;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;


import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface CommMapper extends Mapper<Comm> {
    List<CommData> searchByListCondition(Map<String,Object> map, PageRowBounds pageRowBounds);
    List<Comm> searchByCommNums(@Param("commNums") List<String> commNums);
    List<OneProject> selectByOne(Comm comm, PageRowBounds pageRowBounds);
    List<OneProject> selectByOne(Comm comm);
    BigDecimal sumCurrentContactArea();
    BigDecimal sumContractRegional();
    BigDecimal sumContractProject();
    BigDecimal sumCurrentChargeArea();
    BigDecimal sumChargeRegional();
    BigDecimal sumChargeProject();
    BigDecimal sumRegularFormatCharge();
    BigDecimal sumSpecialFormatCharge();
    Integer  selectByOneCount(Comm comm);
    List<Map<String, Object>> getCommByCount(Map<String, String> map);
    BigDecimal sumContractAreaByTime(@Param("startDate")Date startDate, @Param("endDate")Date endDate);
    Integer sumContractProjectByTime(@Param("startDate")Date startDate, @Param("endDate")Date endDate);
    OneProject selectByOneId(@Param("id") Integer id);
    List<CommVO> getProject(Map<String,Object> map, PageRowBounds pageRowBounds);
    List<Map<String, Object>> getJointPlan(); 
    List<String> getlist(@Param("commCode") String commCode);
    String findOrganRegion(@Param("organId") String commCode);
    int findMaxCode();
    int updateErpOrgan(Map<String,String> map);
    int updateCommUser(Map<String,String> map);
    List<String> getUserCode();
    List<String> getRegion();
    

}