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

import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.core.Service;
import cn.com.countrygarden.bi.main.model.twerp.ErpCommunity;
import cn.com.countrygarden.bi.main.model.twerp.ErpNcData;
import cn.com.countrygarden.bi.main.model.twerp.hm.TbHsprCommunity;

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


public interface TbHsprCommunityService extends Service<TbHsprCommunity> {

    Map<String, Object> ccountThisMonthByUserCodeFromCache(String userCode);

    Map<String, Object> countAllByUserCodeFromCache(String userCode);

    TbHsprCommunity countThisMonthByUserCode(String userCode);

    TbHsprCommunity countAllByUserCode(String userCode);

    /**
     * 本月收费面积区域排行
     *
     * @param lastMonth 如果lastMonth不为空则查询上个月的收费面积区域排行，因为可能月初几天有些区域收费面积为空，所以才出此策略
     * @return
     */
    List<Map<String, Object>> chargeAreaRanking(String lastMonth);

    /**
     * 本年每月收费面积趋势
     *
     * @return
     */
    List<Map<String, Object>> monthOfYearArea();

    /**
     * 查询所有的纯案场或者案场常规混合的项目
     *
     * @param organCode
     * @return
     */
    List<Map<String, Object>> findCaseFieldCommByOrganCode(String organCode);

    ErpCommunity findBaseCommByCommId(String commId);
    /**
     * @Description: 获取项目账套编码信息
     * @Param: [userCode]
     * @return: java.util.List<cn.com.countrygarden.bi.main.model.twerp.ErpNcData>
     * @Author: SignV
     * @Date: 2018/8/7
     */
    List<ErpNcData> selectProjectByUserCode(String userCode);
    /**
     * @Description: 获取区域账套编码信息
     * @Param: [userCode]
     * @return: java.util.List<cn.com.countrygarden.bi.main.model.twerp.ErpNcData>
     * @Author: SignV
     * @Date: 2018/8/7
     */
    List<ErpNcData> selectRegionByUserCode(String userCode);

    List<ErpNcData> selectRegionByOrganCode(String organCode);
    /**
     * @Description: 获取所有organCode
     * @Param: []
     * @return: java.util.List<java.lang.String>
     * @Author: SignV
     * @Date: 2018/8/28
     */
    List<String> selectAllOrganCode();
}
