package com.cpop.oam.business.service;

import com.cpop.oam.business.bo.*;
import com.cpop.oam.business.vo.*;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.cpop.oam.business.entity.TaskWorkOrder;

import java.time.LocalDate;
import java.util.List;

/**
 * 任务-工单表 服务层。
 *
 * @author DB
 * @since 2023-09-18
 */
public interface TaskWorkOrderService extends IService<TaskWorkOrder> {

    /**
     * 工单模块-工单提交-接收/处理/暂停中
     * @author DB
     * @since 2023/09/18 17:18
     * @return com.cpop.core.base.R<com.mybatisflex.core.paginate.Page<com.cpop.oam.business.vo.TaskWorkOrderPageVo>>
     */
    TaskWorkOrderReceiveDealPauseVo receiveDealPause();

    /**
     * 工单模块-工单提交-获取当天值班人员
     * @author DB
     * @since 2023-11-29 14:01:03
     */
    WorkOrderDutyVo getWorkOrderDutyStaff();

    /**
     * 工单模块-工单提交-已办结分页列表
     * @author DB
     * @since 2023-11-29 14:35:08
     */
    Page<TaskWorkOrderPageVo> finishWorkOrderPage();

    /**
     * 工单模块-工单提交-新增工单
     * @param bo 请求参数         
     * @author DB
     * @since 2023/5/30 16:53
     **/
    void insertWorkOrder(TaskWorkOrderBo bo);

    /**
     * 工单模块-工单提交-工单记录列表
     * @author DB
     * @param workOrderId 工单id
     * @since 2023-11-29 11:25:28
     */
    List<TaskWorkOrderRecordListVo> getWorkOrderRecordList(String workOrderId);

    /**
     * 工单模块-工单提交-新增工单记录
     * @author DB
     * @param bo 请求参数
     * @since 2023-11-29 11:33:35
     */
    void insertWorkOrderRecord(TaskWorkOrderRecordBo bo);

    /**
     * 工单模块-工单提交-工单提醒
     * @author DB
     * @param workOrderId 工单id
     * @since 2023-11-29 11:41:46
     */
    void workOrderRemind(String workOrderId);

    /**
     * 工单模块-工单提交-工单转需求
     * @author DB
     * @param workOrderId 工单id
     * @since 2023-11-29 12:30:21
     */
    void workOrderToDemand(String workOrderId);

    /**
     * 工单模块-工单提交-工单暂停
     * @author DB
     * @param bo 请求参数
     * @since 2023-11-29 16:00:18
     */
    void pauseWorkOrder(PauseWorkOrderBo bo);

    /**
     * 工单模块-工单提交-工单办结
     * @author DB
     * @param workOrderId 工单id
     * @since 2023-11-29 15:44:08
     */
    void workOrderFinish(String workOrderId);

    /**
     * 技术模块-技术-获取个人工单列表
     * @author DB
     * @since 2023-11-30 19:41:32
     */
    List<TaskWorkOrderPersonVo> getPersonWorkOrder();

    /**
     * 是否是第一个接收的技术员工
     * @param taskWorkOrderId 工单记录id
     * @author DB
     * @since 2023/12/04
     */
    void whetherReceive(String taskWorkOrderId);

    /**
     * 工单统计-获取工单统计分页
     * @author DB
     * @since 2024/1/31
     * @param staffId 员工id
     * @param startDate 开始日期
     * @param endDate 结束日期
     * @return R<Page<TaskWorkOrderPageVo>>
     */
    Page<TaskWorkOrderStatPageVo> getWorkOrderStatPage(String staffId,LocalDate startDate,LocalDate endDate);

    /**
     * 强制办结工单
     * @author DB
     * @since 2024/2/4
     * @param bo 请求参数
     */
    void enforceFinishWorkOrder(EnforceFinishWorkOrderBo bo);

    /**
     * 工单模块-工单提交-同意与拒绝强制办结
     * @author DB
     * @since 2024/2/21
     * @param bo 请求参数
     */
    void agreeOrRejectEnforceFinish(AgreeOrRejectEnforceFinishBo bo);
}
