package com.tuoheng.admin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.Question;
import com.tuoheng.admin.entity.request.*;
import com.tuoheng.admin.entity.vo.QuestionCountVO;
import com.tuoheng.admin.entity.vo.QuestionTypeCountVO;
import com.tuoheng.admin.entity.vo.QuestionVO;
import com.tuoheng.common.common.IBaseService;
import com.tuoheng.common.exception.ServiceException;
import com.tuoheng.common.utils.JsonResult;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * 巡检问题表 服务类
 *
 * @author qiujinyang
 * @since 2022-08-03
 */
public interface IQuestionService extends IBaseService<Question> {

    /**
     * 分页查询
     *
     * @param query
     * @return
     */
    IPage<QuestionVO> queryPage(QuestionQuery query) throws ParseException;

    List<Question> distributed(QuestionQuery query);

    JsonResult check(QuestionStatusRequest entity);

    JsonResult<List<QuestionCountVO>> analyze(Integer missionId);

    JsonResult<Map<String, Integer>> analyzeController(Integer missionId);

    JsonResult<List<QuestionTypeCountVO>> analyzeType(Integer missionId);

    JsonResult process(String requestId, CallbackRequest callbackRequest) throws ServiceException;

}
