package com.repair.services;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.repair.model.pojo.RepairRecord;
import com.repair.model.result.PageUtils;
import com.repair.model.vo.*;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author ceshi
 * @since 2023-07-24
 */
public interface RepairRecordService extends IService<RepairRecord> {
    int insertRepairRecord(RepairRecord rns);

    int updateRepairRecord(RepairRecord rns);

    PageUtils<RepairRecord> queryPageRepairRecords(int currentPage, int pageCount, String name);

    int deleteRepairRecordById(int id);

    RepairRecord getRepairById(int id);

    List<RepairRecord> getRepairs();

    RepairRecordCountVo getRepairRecordCount(Integer userId);

    PageUtils<MyRepairRecordVo> queryMyRepairRecordList(int currentPage, int pageCount, Integer state, Integer userId);

    MaintenanceTechnicianVo queryRepairTechnicianCount(Integer userId, String dateNow, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryPendingOrderList(int currentPage, int pageCount, Integer userId, String dateNow, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryRepairOrderList(int currentPage, int pageCount, Integer userId, String dateNow, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryTimeoutOrderList(int currentPage, int pageCount, Integer userId, String dateNow, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryExamineOrderList(int currentPage, int pageCount, Integer userId, Integer schoolId);

    RepairManageCountVo queryManageCount(Integer schoolId, String keyWord, String startTime, String endTime, String maintenanceName);

    PageUtils<RepairRecordPageVo> queryNotTimeout(int currentPage, int pageCount, String stateStr, String keyWord, String startTime, String endTime, Integer schoolId, String maintenanceName);

    PageUtils<RepairRecordTimeoutPageVo> queryTimeout(int currentPage, int pageCount, String keyWord, String startTime, String endTime, Integer schoolId, String maintenanceName);

    PageUtils<pendingOrderVo> queryPendingOrder(int currentPage, int pageCount, int schoolId);

    TeamWorkCountVo queryTeamWorkCount(Integer schoolId, String dateNow);

    PageUtils<RepairTechnicianVo> queryTeamWorkExamine(int currentPage, int pageCount, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryTeamWorkPending(int currentPage, int pageCount, Integer schoolId, String dateNow);

    PageUtils<RepairTechnicianVo> queryTeamWorkMaintenance(int currentPage, int pageCount, Integer schoolId, String dateNow);

    PageUtils<RepairTechnicianVo> queryTeamWorkFinished(int currentPage, int pageCount, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryTeamWorkLogistics(int currentPage, int pageCount, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryTeamWorkTimeout(int currentPage, int pageCount, Integer schoolId, String dateNow);

    PageUtils<RepairTechnicianVo> queryTeamWorkClosed(int currentPage, int pageCount, Integer schoolId);

    PageUtils<RepairTechnicianVo> queryTeamWorkOffline(int currentPage, int pageCount, Integer schoolId);

    List<ReportExportVo> queryNotTimeoutReportExport(String stateStr, String keyWord, String startTime, String endTime, Integer schoolId);

    RepairRecord queryRepairByRecordno(String recordNo);

    List<ReportExportVo> queryTimeoutReportExport(String keyWord, String startTime, String endTime, Integer schoolId);

    MasterHomepageVo queryMasterHomeCount(Integer userId, Integer schoolId);

    MasterHomepageVo queryLogisticHomeCount(Integer schoolId);

    List<RepairCampusRecordVo> repairCampusTotal();

    List<RepairCampusRecordVo> repairCampus(String startTime, String endTime);

    IPage<RepairAreaVo> repairAreaTotal(int currentPage, int pageCount);

    IPage<RepairAreaVo> repairArea(String startTime, String endTime, int currentPage, int pageCount);

    IPage<MaintenanceGoodsVo> maintenanceGoodsTotal(int currentPage, int pageCount);

    IPage<MaintenanceGoodsVo> maintenanceGoods(String startTime, String endTime, int currentPage, int pageCount);

    List<RepairAreaVo> repairAreaExport(String startTime, String endTime);

    List<MaintenanceGoodsVo> maintenanceGoodsExport(String startTime, String endTime);

    RepairAnalysisVo repairAnalysis(String startTime, String endTime);

    Integer queryTimeOut(String startTime, String endTime);

    RepairSummarizingVo repairSummarizing(String startTime, String endTime);

    DetailsVo queryDetailData(Integer recordId);

    RepairTotalDataVo repairTotalData();

    int queryRepairRepeat (Integer userId,Integer buildId,Integer articleId,String dateStr);

    PrintVo queryPrintData(Integer recordId);
}
