package com.mortals.xhx.module.feedback.service;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.model.Result;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.feedback.model.FeedbackEntity;
import com.mortals.xhx.module.feedback.dao.FeedbackDao;
import com.mortals.xhx.module.feedback.model.vo.FeedbackStaffInfoVo;
import com.mortals.xhx.module.feedback.model.vo.OptionSummaryVo;
import com.mortals.xhx.module.feedback.model.vo.QuestionAnswerVo;

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

/**
* FeedbackService
*
* 绩效反馈记录信息 service接口
*
* @author zxfei
* @date 2023-07-05
*/
public interface FeedbackService extends ICRUDService<FeedbackEntity,Long>{

    FeedbackDao getDao();

    /***
     * 问卷反馈人员列表
     * @param query
     * @return
     */
    Result<FeedbackStaffInfoVo> getFeedbackStaffList(FeedbackEntity query,PageInfo pageInfo) throws AppException;

    /**
     * 问卷单选多选反馈统计
     * @param feedbackId
     * @return
     */
    List<OptionSummaryVo> getOptionSummaryList(Long feedbackId) throws AppException;

    /**
     * 问卷问题反馈详情
     * @param questionId
     * @param pageInfo
     * @return
     */
    Result<QuestionAnswerVo> getQuestionAnswerList(Long questionId, PageInfo pageInfo) throws AppException;

    /**
     * 问卷反馈统计
     * @return
     * @throws AppException
     */
    Map<String,Integer> summaryFeedback() throws AppException;
}