package com.huiju.estateagents.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huiju.estateagents.base.ResponseBean;
import com.huiju.estateagents.entity.TaActivityDynamicEnlist;
import com.huiju.estateagents.entity.TaBuildingDynamic;
import com.huiju.estateagents.entity.TaPerson;
import com.huiju.estateagents.entity.TaPersonBuilding;
import com.huiju.estateagents.excel.HelpInitiateRecordSucceed;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 项目动态表 服务类
 * </p>
 *
 * @author jobob
 * @since 2019-03-21
 */
public interface ITaBuildingDynamicService extends IService<TaBuildingDynamic> {

    /**
     * 项目动态管理列表
     * @return
     */
    ResponseBean iBuildingDynamicList(Integer pageNum, Integer pageSize, String name, String buildingId,Integer cityId,String isEnlist, LocalDateTime time,String title,Integer orgId,String activityStatus,List<TaPersonBuilding> personBuildingList);

    /**
     * 项目详情
     * @param id
     * @return
     */
    ResponseBean iBuildingDynamicSelectId(String id);

    /**
     * 微信小程序 项目动态管理列表
     * @return
     */
    ResponseBean getWxBuildingDynamiceList(Integer pageNum, Integer pageSize,String buildingId,String openid,Integer cityId,Integer orgId);

    /**
     * 微信小程序 项目详情
     * @param dynamicId
     * @return
     */
    ResponseBean getWxBuildingDynamiceInfo(String dynamicId,String buildingId,String openid, Integer orgId);

    /**
     * 动态管理添加
     * @param map
     * @return
     */
    ResponseBean buildingDynamicAdd(HashMap map);

    /**
     * 动态删除
     * @param id
     * @return
     */
    ResponseBean buildingDynamicDelete(String id);

    /**
     * 动态修改
     * @param map
     * @return
     */
    ResponseBean buildingDynamicUpdate(HashMap<Object, Object> map);

    /**
     * 报名活动
     * @return
     */
    ResponseBean taActivityDynamicEnlistAdd(TaActivityDynamicEnlist taActivityDynamicEnlist, Integer orgId);

    /**
     * 报名列表
     * @param page
     * @return
     */
    ResponseBean signList(Page<TaActivityDynamicEnlist> page,String dynamicId, Integer orgId,String isCheckin,String name,String phone);

    IPage<TaBuildingDynamic> getJoinedActivity(int pageNumber, int pageSize, String building, TaPerson person,Integer orgId);

    void setExtendInfo(TaBuildingDynamic taBuildingDynamic, TaPerson taPerson);

    /**
     * 判断活动是否开始
     */
    Integer updateActivityToUnStart(String time);

    /**
     * 开始未进行的活动
     */
    Integer updateUnStartActivity(String time);

    /**
     * 结束过期的活动
     */
    void updateProcessingActivity();

    /**
     * 报名记录导出当前总数
     * @param dynamicId
     * @param isCheckin
     * @param name
     * @param phone
     * @return
     */
    Integer getTaActivityDynamicEnlist(String dynamicId, String isCheckin, String name, String phone);

    /**
     * 报名记录导出
     * @param i
     * @param pageSize
     * @param dynamicId
     * @param isCheckin
     * @param name
     * @param phone
     * @return
     */
    List<HelpInitiateRecordSucceed> getTaActivityDynamicEnlistExport(int i, Integer pageSize, String dynamicId, String isCheckin, String name, String phone,Integer orgId);

    /**
     * 下拉选框数据
     * @param pageNum
     * @param pageSize
     * @param name
     * @param buildingId
     * @param cityId
     * @param isEnlist
     * @param time
     * @param title
     * @param orgId
     * @param activityStatus
     * @return
     */
    ResponseBean iBuildingDynamicSelectedList(Integer pageNum, Integer pageSize, String name, String buildingId, Integer cityId, String isEnlist, LocalDateTime time, String title, Integer orgId, String activityStatus,List<TaPersonBuilding> personBuildingList);
}
