package cn.com.countrygarden.bi.main.service.wcx;


import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.dto.wcx.WcxInnovationDto;
import cn.com.countrygarden.bi.main.dto.wcx.WcxWeeklyStatisticsDTO;
import cn.com.countrygarden.bi.main.model.PageData;
import cn.com.countrygarden.bi.main.model.sys.UserRoles;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * 创新项目
 */
public interface WcxInnovationService {

    PageData selectPageList(WcxInnovationDto dto) throws UnsupportedEncodingException;

    /**
     * 查询创意
     * @param condition
     * @return
     */
    WcxInnovationDto selectWcxInnovationDto(WcxInnovationDto condition);

    /**
     * 查询创意
     * @param innoId
     * @return
     */
    WcxInnovationDto selectWcxInnovationDto(String innoId);

    void delete(String innovationId);

    /**
     * 模糊查询标题,获取对应得创意列表
     * @param innovationTitle
     * @return
     */
    List<WcxInnovationDto> selectSimplePageData(String innovationTitle);

    /**
     * 通过id查询对应得创意
     * @param innovationId
     * @return
     */
    WcxInnovationDto select(String innovationId);

    /**
     * 获取用户可操作的对应基线
     * @param userRoles
     * @return 管理员权限 返回null;
     *         区域权限 返回 0
     *         部分权限 返回对应基线码(1,2,3....)
     */
    String getBaseline(List<UserRoles> userRoles);

    /**
     * 查询列表
     * (目前用于导入)
     * @param param
     * @return
     */
    List<WcxInnovationDto> selectInnoList(WcxInnovationDto param);
    /**
     * @Methods examine
     * @Author chenhaowei
     * @Date 2020/7/16 18:56
     * @Param [innovationId] 审核接口
     * @return int
     **/
    int examine(WcxInnovationDto wcxInnovationDto);
    int examineStatus(String innovationId);
    int addExamine(String innovationId,String baseline);

    /**
     * 添加权限条件
     * @param innovationId
     * @param baseline
     * @return
     */
    void updateBaseLineById(String innovationId,String baseline);

    /**
     * 分页查询审核页面的数据
     * @param dto
     * @return
     */
    PageData selectPageListForAudit(WcxInnovationDto dto);

    List<Map<String, String>> getErpOrgList();

    Result addTop(String innovationId, Integer isTop,String sysUserCode);

    Result addRecomm(String innovationId, Integer isRecomm, String sysUserCode);

    Result addExcellent(String innovationId, Integer isExcellent, String sysUserCode);

    WcxInnovationDto getInnovationShenhe(WcxInnovationDto condition);

    void tongjizhou() throws ParseException, IOException;

    void tongjiyue() throws IOException;

    void tongjiri() throws ParseException, IOException;

    PageData getWcxWeekly(WcxWeeklyStatisticsDTO weeklyStatisticsDTO, HttpServletRequest request);

    /*  *//**
     * 分页查询举报的创意
     * @param dto
     * @return
     *//*
    PageData selectPageList(WcxInnovationOtherDto dto);

   *//**
     * 撤回举报的创意
     * @param innoOtherId
     *//*
    void cancelReport(String innoOtherId);

    *//**
     * 屏蔽举报的创意
     * @param wcxinnovOtherId
     *//*
    void hideReport(String wcxinnovOtherId, String sysUserCode, String sysUserName);
*/
}