package com.ruoyi.worktecket.service;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.worktecket.domain.WorkTicketBasicData;
import com.ruoyi.worktecket.dto.*;
import com.ruoyi.worktecket.dto.res.WorkTicketBasicDataResultDTO;

import java.util.List;

/**
 * 作业票基础信息Service接口
 *
 * @author ruoyi
 * @date 2023-08-04
 */
public interface IWorkTicketBasicDataService {
    /**
     * 查询作业票基础信息
     *
     * @param id 作业票基础信息主键
     * @return 作业票基础信息
     */
    public WorkTicketBasicDataResultDTO selectWorkTicketBasicDataById(String id);
    /**
     * //废弃：从其他接口返回->获取作业票信息详细信息
     * 获取作业票签字项及签字人员范围
     * @param workTicketId 作业票ID
     * @return
     */
//    String getSignOptionList(String workTicketId);
    /**
     * 查询作业票基础信息列表
     * 注意：APP作业列表 和 PC作业列表都走这里
     *
     * @param workTicketBasicData 作业票基础信息
     * @return 作业票基础信息集合
     */
    public List<WorkTicketBasicDataResultDTO> selectWorkTicketBasicDataList(WorkTicketBasicDataDTO workTicketBasicData);

    /**
     * 新增作业票基础信息
     *
     * @param workTicketBasicData 作业票基础信息
     * @return 结果
     */
    public AjaxResult insertWorkTicketBasicData(WorkTicketBasicDataDTO workTicketBasicData, boolean isPc);

    /**
     * 修改作业票基础信息
     *
     * @param workTicketBasicData 作业票基础信息
     * @return 结果
     */
    public AjaxResult updateWorkTicketBasicData(WorkTicketBasicDataDTO workTicketBasicData, boolean isPc);

    /**
     * 批量删除作业票基础信息
     *
     * @param ids 需要删除的作业票基础信息主键集合
     * @return 结果
     */
    public int deleteWorkTicketBasicDataByIds(String[] ids);

    /**
     * 审核作业票
     *
     * @param type         审核类型：1驳回，2通过
     * @param workTicketId 作业票ID
     * @param remark       备注：驳回原因或审核通过备注
     * @return
     */
    public AjaxResult checkWorkTicket(int type, String workTicketId, String remark);

    /**
     * 设置作业票安全措施编制人
     *
     * @param checkWorkTicketMeasureDTO
     * @return
     */
    public AjaxResult checkMeasuresComplementUser(CheckWorkTicketMeasureDTO checkWorkTicketMeasureDTO);

    /**
     * 设置作业票安全措施确认
     *
     * @param checkWorkTicketMeasureDTO
     * @return
     */
    public AjaxResult checkWorkTicketMeasureV2(CheckWorkTicketMeasureDTO checkWorkTicketMeasureDTO);
    /**
     * 设置作业票安全措施确认
     *
     * @param checkWorkTicketMeasureDTO
     * @return
     */
    public AjaxResult checkWorkTicketMeasure(CheckWorkTicketMeasureDTO checkWorkTicketMeasureDTO);

    /**
     * 新增作业票气体分析数据
     *
     * @param workTicketGasAnalysisDTO
     * @return
     */
    public AjaxResult addWorkTicketGasAnalysis(WorkTicketGasAnalysisDTO workTicketGasAnalysisDTO);

    /**
     * 接受交底人签字
     *
     * 废弃参数-param type         签字类型：1安全交底人，2接受交底人
     * @param workTicketId
     * @param signImg      签字图片
     * @return
     */
//    public AjaxResult workTicketDisclose(Integer type, String workTicketId, String signImg);
    public AjaxResult workTicketDisclose( String workTicketId, String signImg);

    /**
     * 作业票会签
     *
     * @param workTicketId 作业票ID
     * @param signOptionId 签字项ID
     * @param signImg      签字图片
     * @return
     */
    public AjaxResult workSignOptionRun(String workTicketId, String signOptionId, String signImg);

    /**
     * 作业票流程查询
     *
     * @param workTicketId
     * @return
     */
    public AjaxResult getWorkTicketOperateRecord(String workTicketId);

    /**
     * 验收签字
     *
     * @param workTicketId
     * @param signImg
     * @return
     */
    public AjaxResult acceptance(String workTicketId, String signImg);


    /**
     * PC首页统计-作业票统计
     * @param companyCode
     * @return
     */
    List<WorkTicketStatisticsPCDTO> workTicketTypeStatistics(String companyCode);

    /**
     * PC首页查询作业票列表
     * @param workTicketBasicData
     * @return
     */
    List<WorkTicketBasicDataResultDTO> selectWorkTicketList(WorkTicketBasicDataDTO workTicketBasicData);

    /**
     * PC首页-企业信息-生产区域-统计区域下作业分布列表
     * @param companyCode
     * @return
     */
    List<WorkTicketAreaWorkStatisticsPCDTO> workTicketAreaWorkStatistics(String companyCode);

    /**
     * PC首页-企业信息-生产区域统计
     * @param companyCode
     * @return
     */
    Integer workTicketAreaWorkCountStatistics(String companyCode);
}
