package com.casic.missiles.modular.alarm.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.casic.missiles.core.datascope.DataScope;
import com.casic.missiles.modular.system.model.AlarmJob;

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

/**
 * <p>
 * 报警工单表 服务类
 * </p>
 *
 * @author casic123
 * @since 2019-05-17
 */
public interface IAlarmJobService extends IService<AlarmJob> {
    List<AlarmJob> jobList( Page<AlarmJob> page, String keywords, String beginTime,  String endTime,  String jobStatus, String alarmType,String alarmContent, DataScope dataScope);
    List<AlarmJob> jobListApp( Page<AlarmJob> page, String keywords, String beginTime,  String endTime,  String jobStatus, String alarmType,String alarmContent,long deptId,long userId,long leaderId, DataScope dataScope);
    List<AlarmJob> jobListExport( Page<AlarmJob> page, String keywords, String beginTime,  String endTime,  String jobStatus, String alarmType,String alarmContent, DataScope dataScope);
    List<AlarmJob> jobInfo(int id, DataScope dataScope);
    boolean getJob(int id, long personId);
    boolean confirmJob(int id,long personId,String firstState, String firstStatePhotos, String needHandle);
    boolean transferJob(int id, long transferPerson,String flowRec);
    boolean saveJob( int id,String handleMessage, String handlePhotos);
    boolean overJob( int id,long personId, String handleMessage, String handlePhotos);
    void overJobByDevCode(String devCdoe,String handleMessage, String handlePhotos);
    boolean overAlarm( int id);
    boolean handleJob(int id,long personId);
    void postUri(String sUri,Object devCode,String auth);
    void httptUri(String sUri,String devCode,String handleMessage, String handlePhotos);

    Map<String,Object> countByJobStatus(long deptId,int spanDays);
    Map<String,Object> countMyJob(long userId,long deptId,int spanDays,String deptIds);
    List<String> batchCancel(String ids,long userId,String handleMessage);

    // 根据dataScope 查工单列表
    List<AlarmJob> jobListScope( Page<AlarmJob> page, String keywords, String beginTime,  String endTime,  String jobStatus, String alarmType,String alarmContent,DataScope dataScope);
    // 根据分组 查工单列表
    List<AlarmJob> jobListGroup( Page<AlarmJob> page, String keywords, String beginTime,  String endTime,  String jobStatus, String alarmType,String alarmContent,Long userId);

}
