package com.bonus.material.repair.service;


import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.material.repair.domain.RepairApplyRecord;
import com.bonus.material.repair.domain.RepairInputDetails;
import com.bonus.material.repair.domain.RepairTask;
import com.bonus.material.repair.domain.RepairTaskDetails;
import com.bonus.material.repair.domain.vo.RepairDeviceSummaryVo;
import com.bonus.material.repair.domain.vo.RepairDeviceVO;
import com.bonus.material.repair.domain.vo.RepairInputDetailsVo;
import com.bonus.system.api.domain.SysUser;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

/**
 * @author syruan
 */
public interface RepairService {

    /**
     * 获取维修任务列表
     * @param bean
     * @return
     */
    List<RepairTask> getRepairTaskList(RepairTask bean);

    /**
     * 获取维修详细列表
     */
//    List<RepairDeviceListVo> getRepairMaTypeList(RepairTaskDetails bean, boolean isGroup);


    List<RepairDeviceSummaryVo> getRepairDeviceSummary(RepairTaskDetails bean);


//    default List<RepairDeviceListVo> getRepairMaTypeList(RepairTaskDetails bean) {
//        return getRepairMaTypeList(bean, true);
//    }

    /**
     * 查询维修单
     */
    AjaxResult getRepairDocumentInfo(Long taskId);

    /**
     * 提交维修记录
     */
    AjaxResult submitRepairApply(@NotNull(message = "参数不能为空") RepairApplyRecord bean);

    /**
     * 快捷维修记录
     */
    AjaxResult fastRepairApply(List<RepairTaskDetails> list);

    AjaxResult batchRepairApply(@NotNull List<RepairDeviceVO> repairDeviceVOList);

    /**
     * 维修明细--批量合格--更新明细status，以及repairedNum
     */
    int batchQualified(ArrayList<Long> ids);

    /**
     * 查询维修人员列表
     */
    List<SysUser> selectUserList();

    /**
     * 提交审核
     * @param taskList 任务信息集合
     */
    AjaxResult endRepairTask(@NotNull List<RepairTask> taskList);

    AjaxResult rejectRepair(@NotNull List<Long> taskList);


    /**
     * 导出维修列表
     */
    List<RepairTask> exportRepairTaskList(RepairTask bean);

    List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);

    List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto);
}
