package com.jxy.windminer.service;


import com.jxy.common.core.web.Result.AjaxResult;
import com.jxy.windminer.vo.QueryVo;
import com.jxy.windminer.vo.ResponTicketVo;
import com.jxy.windminer.vo.ResubmitTicketVo;
import com.jxy.windminer.vo.TicketVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.sql.SQLException;


/**
 * @Description 追风工单系统服务类
 * @Date 2022/5/19 17:40
 * @Author 杜懿
 */
public interface TicketService {
    //
    ///**
    // * 获取问题类型下拉列表
    // * @return
    // */
    //public AjaxResult getTypeList();

    /**
     * 根据文件id下载文件 多个
     * @return
     */
    public void downloadByIds(String ids, HttpServletRequest request, HttpServletResponse response);


    /**
     * 单文件上传
     * @return
     */
    public AjaxResult uploadFile(MultipartFile file,String userName) throws SQLException;

    /**
     * 多文件上传
     * @return
     */
    public AjaxResult uploadFiles(MultipartFile[] file,String userName) throws SQLException;

    /**
     * 提交工单
     * @param vo
     * @return
     */
    public AjaxResult submitTicket(TicketVo vo);

    /**
     * 工单内容补充提交
     * @param vo
     * @return
     */
    public AjaxResult resubmitTicket(ResubmitTicketVo vo,String userName);

    /**
     * 已回复工单设为已读
     * @param id
     * @return
     */
    public AjaxResult readTicket(long id,String userName);

    /**
     * 结束工单
     * @param id
     * @return
     */
    public AjaxResult endTicket(long id,String userName);

    /**
     * 修改工单状态为撤回
     * @param id
     * @return
     */
    public AjaxResult retractTicket(long id,String userName);



    /**
     * 查看工单详情
     * @param id
     * @return
     */
    public AjaxResult getTicketDetails(long id);

    /**
     * 根据status获取个人工单列表
     * @param status
     * @return
     */
    public AjaxResult getPrivateTicketByStatus(int status,String userName);

    /**
     * 获取当前用户未读工单数
     * @return
     */
    public  AjaxResult getUnreadCount(String userName);

    /**
     * 根据status获取工单列表
     * @param status
     * @return
     */
    public AjaxResult getTicketList(int status);

    /**
     * 每日工单数详情
     * @param vo
     * @return
     */
    public AjaxResult getDailyCount(QueryVo vo);

    /**
     * 回复工单
     * @param vo
     * @return
     */
    public AjaxResult responTicket(ResponTicketVo vo,String userName);


}
