package cn.iocoder.yudao.module.bpm.enums;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * Bpm 错误码枚举类
 * <p>
 * bpm 系统，使用 1-009-000-000 段
 */
public interface ErrorCodeConstants {

    // ==========  通用流程处理 模块 1-009-000-000 ==========
    ErrorCode HIGHLIGHT_IMG_ERROR = new ErrorCode(1_009_000_002, "获取高亮流程图异常");

    // ========== OA 流程模块 1-009-001-000 ==========
    ErrorCode OA_LEAVE_NOT_EXISTS = new ErrorCode(1_009_001_001, "请假申请不存在");
    ErrorCode OA_PM_POST_NOT_EXISTS = new ErrorCode(1_009_001_002, "项目经理岗位未设置");
    ErrorCode OA_DEPART_PM_POST_NOT_EXISTS = new ErrorCode(1_009_001_009, "部门的项目经理不存在");
    ErrorCode OA_BM_POST_NOT_EXISTS = new ErrorCode(1_009_001_004, "部门经理岗位未设置");
    ErrorCode OA_DEPART_BM_POST_NOT_EXISTS = new ErrorCode(1_009_001_005, "部门的部门经理不存在");
    ErrorCode OA_HR_POST_NOT_EXISTS = new ErrorCode(1_009_001_006, "HR岗位未设置");
    ErrorCode OA_DAY_LEAVE_ERROR = new ErrorCode(1_009_001_007, "请假天数必须>=1");
    ErrorCode FAILED_TO_APPLY_FOR_LEAVE = new ErrorCode(1_009_001_008, "请假失败");
    ErrorCode WRONG_TIME_FORMAT = new ErrorCode(1_009_001_009, "时间格式错误");
    ErrorCode THERE_IS_ALREADY_A_RECORD_OF_REQUESTING_LEAVE_DURING_THIS_TIME_PERIOD = new ErrorCode(1_009_001_010, "该时间段内已有请假记录,请调整");
    ErrorCode GET_USER_HOLIDAY_EXCEPTION = new ErrorCode(1_009_001_011, "获取用户假期异常");
    ErrorCode THE_USER_ATTENDANCE_INFORMATION_IS_ABNORMAL = new ErrorCode(1_009_001_012, "获取用户考勤信息异常");
    ErrorCode INSUFFICIENT_LEAVE_BALANCE = new ErrorCode(1_009_001_013, "假期余额不足");
    ErrorCode NO_NEED_TO_APPLY_FOR_OVERTIME_IF_NOT_IN_THE_ATTENDANCE_GROUP = new ErrorCode(1_009_001_014, "不在考勤组内无需申请加班");
    ErrorCode EXCEPTION_OCCURRED_WHILE_OBTAINING_OVERTIME_SETTINGS = new ErrorCode(1_009_001_015, "获取加班设置出现异常");
    ErrorCode ABNORMAL_ACCESS_TO_ATTENDANCE_RECORDS = new ErrorCode(1_009_001_016, "获取考勤记录异常");
    ErrorCode OVERTIME_REQUESTS_ALREADY_EXIST_FOR_THE_SAME_TIME_PERIOD = new ErrorCode(1_009_001_018, "已存在相同时间段的加班申请");
    ErrorCode THE_CURRENT_USERS_ATTENDANCE_GROUP_HAS_NOT_SET_OVERTIME_RULES = new ErrorCode(1_009_001_019, "当前用户所在考勤组未设置加班规则");
    ErrorCode THE_LEAVE_PROCESS_CANNOT_BE_USED_WITHOUT_SIGNING_THE_CONTRACT = new ErrorCode(1_009_001_020, "合同未签约不可使用请假流程,请悉知");

    ErrorCode OA_REIMBURSEMENT_NOT_EXISTS = new ErrorCode(1_009_001_100, "报销申请不存在");
    ErrorCode OA_EVECTION_NOT_EXISTS = new ErrorCode(1_009_001_101, "出差申请不存在");
    ErrorCode OA_SEAL_NOT_EXISTS = new ErrorCode(1_009_001_102, "用章申请不存在");
    ErrorCode OA_CONTRACT_NOT_EXISTS = new ErrorCode(1_009_001_103, "合同审批不存在");
    ErrorCode OA_CASH_NOT_EXISTS = new ErrorCode(1_009_001_104, "现金支出申请不存在");
    ErrorCode OA_OVERTIME_NOT_EXISTS = new ErrorCode(1_009_001_105, "加班申请不存在");
    ErrorCode OA_REGULAR_NOT_EXISTS = new ErrorCode(1_009_001_106, "转正申请不存在");
    ErrorCode OA_SHIFTJOBS_NOT_EXISTS = new ErrorCode(1_009_001_107, "调岗申请不存在");
    ErrorCode OA_SECOND_NOT_EXISTS = new ErrorCode(1_009_001_108, "借调申请不存在");
    ErrorCode OA_IMPREST_NOT_EXISTS = new ErrorCode(1_009_001_109, "备用金申请不存在");
    ErrorCode OA_INCENTIVE_NOT_EXISTS = new ErrorCode(1_009_001_110, "奖惩申请不存在");
    ErrorCode OA_WORK_TASK_NOT_EXISTS = new ErrorCode(1_009_001_110, "工作任务不存在");
    ErrorCode OA_ENTRY_NOT_EXISTS = new ErrorCode(1_009_001_111, "入职申请不存在");
    ErrorCode OA_GOOut_NOT_EXISTS = new ErrorCode(1_009_001_112, "外出申请不存在");
    ErrorCode OA_SALARY_NOT_EXISTS = new ErrorCode(1_009_001_113, "薪资付款申请不存在");
    ErrorCode OA_ASSET_NOT_EXISTS = new ErrorCode(1_009_001_114, "资产申领不存在");
    ErrorCode OA_PETITION_NOT_EXISTS = new ErrorCode(1_009_001_115, "签呈申请不存在");
    ErrorCode OA_BUSINESS_CARD_NOT_EXISTS = new ErrorCode(1_009_001_116, "名片定制申请不存在");
    ErrorCode OA_HIRE_NOT_EXISTS = new ErrorCode(1_009_001_117, "招聘申请不存在");
    ErrorCode OA_BUSINESS_HOSPITALITY_NOT_EXISTS = new ErrorCode(1_009_001_118, "商务招待申请不存在");
    ErrorCode OA_FINANCE_NOT_EXISTS = new ErrorCode(1_009_001_119, "活动经费申请不存在");
    ErrorCode OA_EVECTION_IS_EXISTS = new ErrorCode(1_009_001_120, "该时间段您正在出差！请重新选择正确出差时间。");
    ErrorCode OA_INVOICE_NOT_EXISTS = new ErrorCode(1_009_001_121, "开票申请不存在");
    ErrorCode OA_REPLACEMENT_CARD_NOT_EXISTS = new ErrorCode(1_009_001_122, "补卡申请不存在");
    ErrorCode OA_REFUND_NOT_EXISTS = new ErrorCode(1_009_001_123, "退款申请不存在");
    ErrorCode OA_PROJECT_NOT_EXISTS = new ErrorCode(1_009_001_124, "项目申请不存在");
    ErrorCode OA_CONTRACT_INVOICE_AMOUNT_LACK = new ErrorCode(1_009_001_125, "该合同的开票余额不足！");
    ErrorCode OA_PAYMENT_NOT_EXISTS = new ErrorCode(1_009_001_126, "付款申请不存在");
    ErrorCode OA_RECEIPT_NOT_EXISTS = new ErrorCode(1_009_001_127, "回款申请不存在");
    ErrorCode OA_PAYMENT_FILES_NOT_NULL = new ErrorCode(1_009_001_128, "后补发票不能为空！");
    ErrorCode OA_EXPENSES_NOT_EXISTS = new ErrorCode(1_009_001_129, "开支日报申请不存在");
    ErrorCode OA_LOAN_NOT_EXISTS = new ErrorCode(1_009_001_130, "借支申请不存在");
    ErrorCode OA_LOAN_NOT_CREATE = new ErrorCode(1_009_001_131, "厂区员工信息不存在");

    // ========== 流程模型 1-009-002-000 ==========
    ErrorCode MODEL_KEY_EXISTS = new ErrorCode(1_009_002_000, "已经存在流程标识为【{}】的流程");
    ErrorCode MODEL_NOT_EXISTS = new ErrorCode(1_009_002_001, "流程模型不存在");
    ErrorCode MODEL_KEY_VALID = new ErrorCode(1_009_002_002, "流程标识格式不正确，需要以字母或下划线开头，后接任意字母、数字、中划线、下划线、句点！");
    ErrorCode MODEL_DEPLOY_FAIL_FORM_NOT_CONFIG = new ErrorCode(1_009_002_003, "部署流程失败，原因：流程表单未配置，请点击【修改流程】按钮进行配置");
    ErrorCode MODEL_DEPLOY_FAIL_TASK_ASSIGN_RULE_NOT_CONFIG = new ErrorCode(1_009_002_004, "部署流程失败，" +
            "原因：用户任务({})未配置分配规则，请点击【修改流程】按钮进行配置");
    ErrorCode MODEL_DEPLOY_FAIL_TASK_INFO_EQUALS = new ErrorCode(1_009_003_005, "流程定义部署失败，原因：信息未发生变化");
    ErrorCode PROCESS_CC_NOT_EXISTS = new ErrorCode(1_009_003_006, "BPM 流程抄送配置不存在");

    // ========== 流程定义 1-009-003-000 ==========
    ErrorCode PROCESS_DEFINITION_KEY_NOT_MATCH = new ErrorCode(1_009_003_000, "流程定义的标识期望是({})，当前是({})，请修改 BPMN 流程图");
    ErrorCode PROCESS_DEFINITION_NAME_NOT_MATCH = new ErrorCode(1_009_003_001, "流程定义的名字期望是({})，当前是({})，请修改 BPMN 流程图");
    ErrorCode PROCESS_DEFINITION_NOT_EXISTS = new ErrorCode(1_009_003_002, "流程定义不存在");
    ErrorCode PROCESS_DEFINITION_IS_SUSPENDED = new ErrorCode(1_009_003_003, "流程定义处于挂起状态");
    ErrorCode PROCESS_DEFINITION_BPMN_MODEL_NOT_EXISTS = new ErrorCode(1_009_003_004, "流程定义的模型不存在");

    // ========== 流程实例 1-009-004-000 ==========
    ErrorCode PROCESS_INSTANCE_NOT_EXISTS = new ErrorCode(1_009_004_000, "流程实例不存在");
    ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_EXISTS = new ErrorCode(1_009_004_001, "流程取消失败，流程不处于运行中");
    ErrorCode PROCESS_INSTANCE_CANCEL_FAIL_NOT_SELF = new ErrorCode(1_009_004_002, "流程取消失败，该流程不是你发起的");

    // ========== 流程任务 1-009-005-000 ==========
    ErrorCode TASK_OPERATE_FAIL_ASSIGN_NOT_SELF = new ErrorCode(1_009_005_001, "操作失败，原因：该任务的审批人不是你");
    ErrorCode TASK_NOT_EXISTS = new ErrorCode(1_009_005_002, "流程任务不存在");
    ErrorCode TASK_IS_PENDING = new ErrorCode(1_009_005_003, "当前任务处于挂起状态，不能操作");
    ErrorCode TASK_TARGET_NODE_NOT_EXISTS = new ErrorCode(1_009_005_004, " 目标节点不存在");
    ErrorCode TASK_RETURN_FAIL_SOURCE_TARGET_ERROR = new ErrorCode(1_009_005_006, "回退任务失败，目标节点是在并行网关上或非同一路线上，不可跳转");
    ErrorCode TASK_DELEGATE_FAIL_USER_REPEAT = new ErrorCode(1_009_005_007, "任务委派失败，委派人和当前审批人为同一人");
    ErrorCode TASK_DELEGATE_FAIL_USER_NOT_EXISTS = new ErrorCode(1_009_005_008, "任务委派失败，被委派人不存在");
    ErrorCode TASK_ADD_SIGN_USER_NOT_EXIST = new ErrorCode(1_009_005_009, "任务加签：选择的用户不存在");
    ErrorCode TASK_ADD_SIGN_TYPE_ERROR = new ErrorCode(1_009_005_010, "任务加签：当前任务已经{}，不能{}");
    ErrorCode TASK_ADD_SIGN_USER_REPEAT = new ErrorCode(1_009_005_011, "任务加签失败，加签人与现有审批人[{}]重复");
    ErrorCode TASK_SUB_SIGN_NO_PARENT = new ErrorCode(1_009_005_012, "任务减签失败，被减签的任务必须是通过加签生成的任务");
    ErrorCode TASK_OPERATE_FAIL_USER_NO_POST = new ErrorCode(1_009_005_014, "操作失败，原因：您未配置岗位，请联系管理员操作");
    ErrorCode TASK_OPERATE_FAIL_USER_NO_DEPT = new ErrorCode(1_009_005_015, "操作失败，原因：您未配置部门，请联系管理员操作");

    // ========== 流程任务分配规则 1-009-006-000 ==========
    ErrorCode TASK_ASSIGN_RULE_EXISTS = new ErrorCode(1_009_006_000, "流程({}) 的任务({}) 已经存在分配规则");
    ErrorCode TASK_ASSIGN_RULE_NOT_EXISTS = new ErrorCode(1_009_006_001, "流程任务分配规则不存在");
    ErrorCode TASK_UPDATE_FAIL_NOT_MODEL = new ErrorCode(1_009_006_002, "只有流程模型的任务分配规则，才允许被修改");
    ErrorCode TASK_CREATE_FAIL_NO_CANDIDATE_USER = new ErrorCode(1_009_006_003, "操作失败，原因：找不到任务的审批人！");
    ErrorCode TASK_ASSIGN_SCRIPT_NOT_EXISTS = new ErrorCode(1_009_006_004, "操作失败，原因：任务分配脚本({}) 不存在");

    // ========== 动态表单模块 1-009-010-000 ==========
    ErrorCode FORM_NOT_EXISTS = new ErrorCode(1_009_010_000, "动态表单不存在");
    ErrorCode FORM_FIELD_REPEAT = new ErrorCode(1_009_010_001, "表单项({}) 和 ({}) 使用了相同的字段名({})");

    // ========== 用户组模块 1-009-011-000 ==========
    ErrorCode USER_GROUP_NOT_EXISTS = new ErrorCode(1_009_011_000, "用户组不存在");
    ErrorCode USER_GROUP_IS_DISABLE = new ErrorCode(1_009_011_001, "名字为【{}】的用户组已被禁用");
    // ========== 业绩申请模块 1-009-012-000 ==========
    ErrorCode CAN_ONLY_APPLY_FOR_CURRENT_MONTH_PERFORMANCE_TARGET = new ErrorCode(1_009_012_001, "只能申请当月业绩目标");
    ErrorCode THE_PROCESS_IS_BEING_APPROVED_OR_HAS_PASSED_THE_CURRENT_MONTH_AND_THE_APPLICATION_CANNOT_BE_REPEATED
            = new ErrorCode(1_009_012_002, "流程审批中或已通过当月不可重复申请");


    ErrorCode THE_WORK_ORDER_RULE_TYPE_ALREADY_EXISTS_PLEASE_DO_NOT_ADD_IT_REPEATEDLY
            = new ErrorCode(1_009_013_001, "工单规则类型已存在，请勿重复添加");


    ErrorCode BPM_SYSTEM_BUG = new ErrorCode(1_009_012_001, "系统问题，请联系管理员");

    // ========== 流程映射配置模块 1-009-014-000 ==========
    ErrorCode PROCESS_MAPPING_CONFIG_NOT_EXISTS = new ErrorCode(1_009_014_001, "流程映射配置不存在");
    ErrorCode PROCESS_MAPPING_CONFIG_CODE_DUPLICATE = new ErrorCode(1_009_014_002, "流程代码已存在，不允许重复");
}
