package com.ho.flow.constant;

/**
 * @author fancl
 * @desc: 工作流常量
 * @date 2022/10/14
 */
public interface WorkOrderConstant {

    //工单名称
    String create = "创建工单";

    //新增工单按钮
    String ADD_WORK_ORDER = "sys:workorder:add";

    //流程定义的类别为 workOrder,以便和其他类别做区分,这个在流程定义时就确定好了
    String categoryWorkOrder = "workOrder";

    //可分配工单的 assignee,是个伪标识
    String canDistributeOrder = "canDistributeOrder";

    //可以验收工单的 assignee,是个伪标识
    String canCheckOrder = "canCheckOrder";

    //发送者
    String sender = "sender";


    //工单状态
    interface WorkOrderStatus {
        //待分配1, 即 新建的工单，手工转的工单，或者被退回的工单
        Integer toBeAllocate = 1;
        //已分配2；分配后的工单，此时可以接受和退回
        Integer allocated = 2;
        // 处理中3；接受后的工单,如果驳回,工单状态重新变为 toBeAllocate
        Integer working = 3;
        //待验收 4,工单完成后的状态
        Integer toCheck = 4;
        // 已完成4 ->5, 验证完成后的状态
        Integer finished = 5;

        String notProcessed = "未处理";
        String processed = "已处理";
        String processing = "处理中";
        String completed = "已完成";

        //工单跟踪的状态
        // 同意
        Integer agree = 1;
        //拒绝
        Integer refuse = 0;
    }

    //工单类型
    interface WorkOrderType {
        //故障自动关联1
        Integer autoRelate = 1;
        //定时巡检2
        Integer scheduleInspect = 2;
        //人工派单3 手工创建的
        Integer dispatcher = 3;
        //手动转工单4 告警数据手动转的
        Integer manual = 4;
    }



    //工单动作
    interface WorkOrderAction {
        //工单创建1
        Integer workOrderCreate = 1;
        //工单分配2
        Integer workOrderApply = 2;
        //工单接受3
        Integer workOrderDo = 3;
        //工单退回4
        Integer workOrderReject = 4;
        //工单做完待验收 5原来是 工单关闭
        Integer workOrderBeCheck = 5;
        //验收通过,工单完成
        Integer workOrderCheckComplete = 6;
        //验收不通过
        Integer workOrderCheckNoPass = 7;
    }

    //代办节点候选人
    interface CandidateUser {
        //第1节点候选人,一般为集合
        String nodeOneUsers = "nodeOneUsers";
        //第2节点候选人
        String nodeTwoUsers = "nodeTwoUsers";
        //第3节点候选人
        String nodeThreeUsers = "nodeThreeUsers";
    }

    //工单类型
    interface OrderType {
        //1 故障检修单
        Integer troubleCheck = 1;
        //2 电站巡检单
        Integer stationInspect = 2;
        //3 电站清洗单
        Integer stationClean = 3;
        //电站抄表单
        Integer stationMeter = 4;
        //设备巡检单
        Integer deviceInspection = 5;
        //单站其他单
        Integer stationOthers = 6;
    }

    //任务节点名称
    interface TaskNodeName {

        //表示作废的节点
        String deleted = "deleted";
        //第一节点
        String node1 = "d1";
        String node2 = "d2";
        String node3 = "d3";
        String node4 = "d4";
        //已完成节点
        String end = "end";
    }

    //工单类型
    String orderType = "orderType";
    //电站Id
    String stationId = "stationId";

    //工单发起人
    String startUser = "startUser";
    //操作步骤
    String completeKey = "complete";
    String suggestion = "suggestion";
    //完成标识 complete ==0 代表完成
    Integer complete = 0;
    Integer nullifyComplete = 1;

    //以下几个表示退回到的处理节点 序号
    Integer rejectToNode1 = 1;
    Integer rejectToNode2 = 2;
    Integer rejectToNode3 = 3;

    //工单自增id类型
    String IdTypeWorkOrder = "workOrder";


    //告警自动转工单的发起人
    String autoTransferOrderId = "admin";

}
