package com.cf.imes.module.executor.enums;

import com.cf.imes.framework.common.exception.ErrorCode;

/**
 * @author there
 * 生产执行服务错误码枚举 使用 1-003-000-000 段
 */
public class ErrorCodeConstants {

    // ========== 生产单开料排单
    public static final ErrorCode PLAN_NOT_EXISTS = new ErrorCode(1_003_107_000, "生产单开料排单不存在");

    public static final ErrorCode PLAN_NOT_ALLOW_DELETE = new ErrorCode(1_003_107_001, "排单号：{}，已开料不予许删除");

    public static final ErrorCode PLATE_ERROR = new ErrorCode(1_003_107_005, "当前新增的板材非同一类型的板材，禁止更改");
    public static final ErrorCode PLAN_PLATE_IS_ALL_CUT = new ErrorCode(1_003_107_006, "排单号：{} 的板材已全部开料，禁止删除！");
    public static final ErrorCode PLAN_NOT_DATA_EXISTS = new ErrorCode(1_003_107_007, "排单号：{} 不存在，无法进行操作，请检查排单数据");
    public static final ErrorCode PLAN_PLATE_IS_CUTTING = new ErrorCode(1_003_107_008, "当前排单已有板材开料，无法开启混单");
    public static final ErrorCode PLAN_IS_MIXED_ERROR = new ErrorCode(1_003_107_009, "当前排单为混单，无法开启混单配置");
    public static final ErrorCode CREATE_PLAN_ORDER_UPDATE_CONCURRENCY_ERROR = new ErrorCode(1_003_107_010, "创建排单失败：生产单号【{}】板件数量已发生改变，请刷新后重新创建单排");
    public static final ErrorCode CREATE_PLAN_GOODS_UPDATE_CONCURRENCY_ERROR = new ErrorCode(1_003_107_011, "创建排单失败：材质【{}】板件数量已发生改变，请刷新后重新创建单排");
    public static final ErrorCode ORDER_PLATE_UPDATE_CONCURRENCY_ERROR = new ErrorCode(1_003_107_012, "更新生产单状态失败：生产单号【{}】板件数量已发生改变，请刷新后重新操作");
    public static final ErrorCode GOODS_PLATE_UPDATE_CONCURRENCY_ERROR = new ErrorCode(1_003_107_013, "更新材质状态失败：材质【{}】板件数量已发生改变，请刷新后重新操作");


    // ========== 生产单商品 TODO 补充编号 ==========
    public static final ErrorCode GOODS_NOT_EXISTS = new ErrorCode(1_003_108_000, "生产单商品不存在");

    // ========== 生产单 TODO 补充编号 ==========
    public static final ErrorCode ORDER_NOT_EXISTS = new ErrorCode(1_003_109_000, "生产单不存在");
    public static final ErrorCode ORDER_NOT_CANCEL = new ErrorCode(1_003_109_001, "生产单以进入生产状态，无法作废");
    public static final ErrorCode PLATE_IS_PLAN = new ErrorCode(1_003_109_002, "删除对象中有已排单板件，请将该对象从排单中移除后再选择删除！");
    public static final ErrorCode ORDER_ERROR = new ErrorCode(1_003_109_003, "当前生产单柜体，房间已全部删除！");
    public static final ErrorCode ORDER_DATA_ERROR = new ErrorCode(1_003_109_004, "生产单/排单的数据已无法使用，请删除重新");
    public static final ErrorCode ORDER_PLAN_ID_NOT_NULL = new ErrorCode(1_003_109_005, "生产单或排单ID至少传入一个");
    public static final ErrorCode ORDER_PLAN_ID_IS_ONE = new ErrorCode(1_003_109_006, "生产单id与排单id与大板分类ID只能传一个");

    // ========== 生产单 TODO 补充编号 ==========
    public static final ErrorCode MODULE_NOT_EXISTS = new ErrorCode(1_003_110_000, "模块不存在");

    // ========== 生产单 TODO 补充编号 ==========
    public static final ErrorCode PLATE_NOT_EXISTS = new ErrorCode(1_003_113_000, "板材不存在");

    // ========== 生产单 TODO 补充编号 ==========
    public static final ErrorCode ORDER_PARTS_NOT_EXISTS = new ErrorCode(1_003_115_000, "生产单配件不存在");

    // ========== 生产单 TODO 补充编号 ==========
    public static final ErrorCode PHONE_NOT_LAWFUL = new ErrorCode(1_003_116_000, "手机号不合法");
    public static final ErrorCode CUSTOM_ORDER_EXISTS = new ErrorCode(1_003_117_000, "自定义生产单号存在");
    public static final ErrorCode ORDER_PROCESS_NOT_EXISTS = new ErrorCode(1_003_119_001, "工序组不存在");
    public static final ErrorCode ORDER_PROCESS_EXISTS = new ErrorCode(1_003_119_002, "该生产单工序组已经存在");
    public static final ErrorCode PROCESS_GROUP_NOT_EXISTS = new ErrorCode(1_003_029_003, "工序组不存在");
    public static final ErrorCode ORDER_BODY_NOT_EXISTS = new ErrorCode(1_003_029_004, "当前柜体不存在");
    public static final ErrorCode RAW_GOODS_NOT_EXISTS = new ErrorCode(1_003_029_005, "生产单中未用到此板材");
    public static final ErrorCode ORDER_NOT_FOUND = new ErrorCode(1_003_029_006, "生产单不存在");
    public static final ErrorCode APP_TOKEN_ERROR = new ErrorCode(1_003_029_007, "token获取失败");
    public static final ErrorCode PLATE_PLAN_DATA_ERROR = new ErrorCode(1_003_029_008, "接口数据获取，板件明细源数据缺少，请确定接口数据正确");
    public static final ErrorCode PLATE_GOOD_DATA_NULL = new ErrorCode(1_003_029_009, "接口数据获取，板材源数据缺少，请确定接口数据正确");
    public static final ErrorCode GOODS_DATA_ERROR = new ErrorCode(1_003_029_010, "存在小板情况下，缺少板材数据，请确认数据源是否完整");
    public static final ErrorCode PLATE_DATA_ERROR = new ErrorCode(1_003_029_011, "小板获取为空");
    public static final ErrorCode PLATE_PRODUCE_DATA_ERROR = new ErrorCode(1_003_029_012, "小板生产数据获取为空");
    public static final ErrorCode ORDER_STATUS_CONFLICT = new ErrorCode(1_003_029_013, "生产单状态冲突，禁止投入生产");
    public static final ErrorCode ORDER_READ_ERR = new ErrorCode(1_003_029_014, "订单列表获取失败，请刷新重试");
    public static final ErrorCode ORDER_DATE_ERR = new ErrorCode(1_003_029_015, "获取订单列表，时间超出范围，请在30天范围内选择");
    public static final ErrorCode ORDER_TIME_ERR = new ErrorCode(1_003_029_016, "获取订单列表，时间格式输入出错，请更换格式");
    public static final ErrorCode FILE_TYPE_ERR = new ErrorCode(1_003_029_017, "当前文件类型尚未开发，敬请期待");
    public static final ErrorCode ORDER_DETAIL_DATE_ERR = new ErrorCode(1_003_029_018, "板件生产数据缺失，请确认数据源中是否存在相关数据");

    public static final ErrorCode SOURCE_NOT_EXITS_ERROR = new ErrorCode(1_003_029_019, "源数据查询失败");
    public static final ErrorCode ORDER_DELETED_ERR = new ErrorCode(1_003_029_020, "生产单删除失败");
    public static final ErrorCode ORDER_RESTORE_ERR = new ErrorCode(1_003_029_021, "生产单还原失败");
    public static final ErrorCode API_MES_ERR = new ErrorCode(1_003_029_022, "MES接口数据出错：{}");
    public static final ErrorCode CHANGE_DETAILS_ITEM_ERROR = new ErrorCode(1_003_029_023, "明细转换失败");

    // ========== 自定义板编号生成 1_003_030_ ==========
    public static final ErrorCode CUSTOM_PLATENO_GENERATE_ORDERNO_RULE_NOT_SUPPORT_RESETMODE = new ErrorCode(1_003_030_001, "自定义版编号生产单序号规则中存在不支持的复位类型：{}");
    public static final ErrorCode CUSTOM_PLATENO_GENERATE_BODY_RULE_NOT_SUPPORT_RESETMODE = new ErrorCode(1_003_030_002, "自定义版编号柜体序号规则中存在不支持的复位类型：{}");
    public static final ErrorCode CUSTOM_PLATENO_GENERATE_PLATE_RULE_NOT_SUPPORT_RESETMODE = new ErrorCode(1_003_030_003, "自定义版编号板件序号规则中存在不支持的复位类型：{}");
    public static final ErrorCode CUSTOM_PLATENO_GENERATE_ORG_CUSTOM_PLATENO_SEQ_MODIFY_ERROR = new ErrorCode(1_003_030_004, "保存组织下自定义板编号序号配置失败，请联系客服处理");

    // ========== 生产单导入 1_003_031 ==========
    public static final ErrorCode ORDER_IMPORT_TYPE_NOT_SUPPORT = new ErrorCode(1_003_031_001, "不支持的生产单导入类型：{}");
    public static final ErrorCode ORDER_IMPORT_ORGAN_LOCK_ERROR = new ErrorCode(1_003_031_002, "组织下存在正在导入的生产单，请稍后再试");
    public static final ErrorCode ORDER_IMPORT_FILE_ANALYZE_ERROR = new ErrorCode(1_003_031_003, "生产单导入文件解析失败，请检查文件类型和格式");
    public static final ErrorCode ORDER_IMPORT_ORDER_FIELD_EMPTY = new ErrorCode(1_003_031_004, "生产单信息【{}】不能为空");
    public static final ErrorCode ORDER_IMPORT_ORDER_FIELD_LENGTH_ERROR = new ErrorCode(1_003_031_005, "生产单信息【{}】长度不能超过【{}】个字符");
    public static final ErrorCode ORDER_IMPORT_ORDER_FIELD_MOBILE_FORMAT_ERROR = new ErrorCode(1_003_031_006, "生产单信息【{}】手机号格式错误");
    public static final ErrorCode ORDER_IMPORT_ORDER_FIELD_DATE_FORMAT_ERROR = new ErrorCode(1_003_031_007, "生产单信息【{}】日期格式错误");
    public static final ErrorCode ORDER_IMPORT_ORDER_NOT_EXISTS = new ErrorCode(1_003_031_008, "生产单【{}】不存在");
    public static final ErrorCode ORDER_IMPORT_ORDER_CUSTOMERNO_EXISTS = new ErrorCode(1_003_031_009, "{}【{}】已存在");
    public static final ErrorCode ORDER_IMPORT_DETAIL_FIELD_EMPTY = new ErrorCode(1_003_031_010, "导入校验异常：第{}行，导入明细【{}】不能为空");
    public static final ErrorCode ORDER_IMPORT_DETAIL_FIELD_LENGTH_ERROR = new ErrorCode(1_003_031_011, "导入校验异常：第{}行，导入明细【{}】长度不能超过【{}】个字符");
    public static final ErrorCode ORDER_IMPORT_DETAIL_VALID_ERROR = new ErrorCode(1_003_031_012, "导入校验异常：{}");
    public static final ErrorCode ORDER_IMPORT_GROUPCODE_NOT_EXIST_VALID_ERROR = new ErrorCode(1_003_031_013, "导入校验异常：板件{}下加工组编码{}不存在于加工组编码列表中");
    public static final ErrorCode ORDER_IMPORT_ROOMCODE_NOT_EXIST_VALID_ERROR = new ErrorCode(1_003_031_014, "导入校验异常：板件{}下房间编码{}不存在于房间编码列表中");
    public static final ErrorCode ORDER_IMPORT_BODYCODE_NOT_EXIST_VALID_ERROR = new ErrorCode(1_003_031_015, "导入校验异常：板件{}下柜体编码{}不存在于柜体编码列表中");
    public static final ErrorCode ORDER_IMPORT_PLATEGOODS_NOT_EXIST_VALID_ERROR = new ErrorCode(1_003_031_016, "导入校验异常：第{}行的板材不存在，请确保板材管理中存在对应商品编号或商品（名称+材质+颜色+厚度+品牌）组合的板材后导入");

    // ========== manage板材/配件 1_003_001_000 ==========
    public static final ErrorCode PARTS_NOT_EXISTS = new ErrorCode(1_003_001_000, "配件不存在");
    public static final ErrorCode PARTS_GOOD_ID_EXISTS = new ErrorCode(1_003_001_001, "配件编号已存在");
    public static final ErrorCode PARTS_UNIT_NOT_NULL = new ErrorCode(1_003_001_002, "配件－组件或五金或封边条，单位禁止为空");
    public static final ErrorCode PARTS_EDGE_NOT_NULL = new ErrorCode(1_003_001_003, "配件－封边条颜色、宽厚禁止为空");
    public static final ErrorCode FILE_NULL = new ErrorCode(1_003_001_004, "上传文件为空");
    public static final ErrorCode FILE_FORMAT_ERROR = new ErrorCode(1_003_001_005, "导入文件格式有误");
    public static final ErrorCode FILE_EXCEED_SIZE = new ErrorCode(1_003_001_006, "文件大小超过 10M");
    public static final ErrorCode FILE_CONTENT_NULL = new ErrorCode(1_003_001_007, "文件大小为空");
    public static final ErrorCode PARTS_IMPORT_QUERY_INTERRUPT_ERROR = new ErrorCode(1_003_001_008, "配件导入查询异常中断，请稍后再试");
    public static final ErrorCode PARTS_IMPORT_INTERRUPT_ERROR = new ErrorCode(1_003_001_009, "配件导入异常中断，请稍后再试");

    // ========== manage板材 1_003_005_000 ==========
    public static final ErrorCode PLATE_IMPORT_QUERY_INTERRUPT_ERROR = new ErrorCode(1_003_005_000, "配件导入查询异常中断，请稍后再试");
    public static final ErrorCode PLATE_IMPORT_INTERRUPT_ERROR = new ErrorCode(1_003_005_001, "配件导入异常中断，请稍后再试");

    public static final ErrorCode PLATE_ATTRIBUTE_NOT_EXIST = new ErrorCode(1_003_005_002,"商品编码：{}，商品名称：{}，材质：{}，颜色：{}，厚度{} 的板材不存在，请在板材管理里创建对应板材再进行导入");
}
