package base

// 单据状态常量
const (
	PlantNr = 100

	ProjectId    = "LF-Adient"
	A30PorjectId = "A30"
	PlantName    = "Adient"

	ORDER_STATUS_UNPLANED = 10 // 未计划
	ORDER_STATUS_PLANNED  = 20 // 已计划
	ORDER_STATUS_RELEASED = 26 // 已下达
	ORDER_STATUS_RUNNING  = 40 // 生产中
	ORDER_STATUS_CLOSED   = 80 // 已完成
	ORDER_STATUS_LOCKED   = 95 // 锁定
	ORDER_STATUS_CANCELED = 98 // 取消

	//包装状态
	PACK_STATUS_UNPLANED = 10 // 未计划
	PACK_STATUS_PLANNED  = 20 // 已计划
	PACK_STATUS_RELEASED = 26 // 已下达
	PACK_STATUS_RUNNING  = 40 // 生产中
	PACK_STATUS_CLOSED   = 80 // 已完成
	PACK_STATUS_LOCKED   = 95 // 锁定
	PACK_STATUS_CANCELED = 98 // 取消

	//校验状态
	CHECK_STATUS_RUNNING  = 40 // 没通过
	CHECK_STATUS_CLOSED   = 80 // 通过

	// 工单状态
	WO_STATUS_UNPLANNED  = 10 // 未计划
	WO_STATUS_PLANNED    = 20 // 已计划
	WO_STATUS_LOCKED     = 24 // 已锁定
	WO_STATUS_RELEASED   = 26 // 已下达，生成序列订单
	WO_STATUS_INTERRUPT  = 39 // 中断中
	WO_STATUS_RUNNING    = 40 // 生产中
	WO_STATUS_FINISHED   = 80 // 已完成
	WO_STATUS_DISPATCHED = 90 // 已发运
	WO_STATUS_FROZEN     = 95 // 冻结
	WO_STATUS_CANCELED   = 98 // 取消

	// 计划资源负载类型
	WorkLoadType_Monthly = "MONTHLY"
	WorkLoadType_Weekly  = "WEEKLY"
	WorkLoadType_Daily   = "DAILY"
	WorkLoadType_Shift   = "SHIFT"
	WorkLoadType_Hourly  = "HOURLY"

	// 时间类型
	TIME_UOM_WEEK   = "WEEK"
	TIME_UOM_DAY    = "DAY"
	TIME_UOM_HOUR   = "HOUR"
	TIME_UOM_MINUTE = "MINUTE"
	TIME_UOM_SECOND = "SECOND"

	// 任务类型
	TASK_TYPE_WORKORDER   = "WORKORDER"
	TASK_TYPE_SERIALORDER = "SERIALORDER"
	TASK_TYPE_MANUALORDER = "MANUALORDER"
	TASK_TYPE_REWORKORDER = "REWORKORDER"

	// 表时间字段更新模式
	MODIFY_MODE_CREATE = "CREATE"
	MODIFY_MODE_UPDATE = "UPDATE"
	MODIFY_MODE_DELETE = "DELETE"

	// 产线下达计划方式
	LINE_REL_BY_QTY      = "BY_QTY"
	LINE_REL_BY_DURATION = "BY_DURA"

	// 批次订单事件
	BATORD_EVENT_PLAN    = "BAT_PLAN"
	BATORD_EVENT_LOCK    = "BAT_LOCK"
	BATORD_EVENT_RELEASE = "BAT_REL"
	BATORD_EVENT_CLOSE   = "BAT_CLOSE"

	// 序列订单事件
	SEQORD_EVENT_PLAN    = "SER_PLAN"
	SEQORD_EVENT_LOCK    = "SER_LOCK"
	SERORD_EVENT_RELEASE = "SER_REL"
	SERORD_EVENT_CLOSE   = "SER_CLOSE"

	// 对外触发事件的处理状态
	OUTPUT_TRIGGER_UNHANDLED     = 20
	OUTPUT_TRIGGER_HANDLING      = 40
	OUTPUT_TRIGGER_HANDLED       = 80
	OUTPUT_TRIGGER_PENDING       = 95
	OUTPUT_TRIGGER_HANDLE_FAILED = 100

	// 对外触发订单事件
	OUTPUT_EVENT_WO_NEW    = "WO_NEW"
	OUTPUT_EVENT_WO_PLAN   = "WO_PLAN"
	OUTPUT_EVENT_WO_LOCK   = "WO_LOCK"
	OUTPUT_EVENT_WO_REL    = "WO_REL"
	OUTPUT_EVENT_WO_RUN    = "WO_RUN"
	OUTPUT_EVENT_WO_CLOSE  = "WO_CLOSE"
	OUTPUT_EVENT_WO_CANCEL = "WO_CANCEL"
	OUTPUT_EVENT_SER_NEW   = "SER_NEW"
	OUTPUT_EVENT_SER_REL   = "SER_REL"
	OUTPUT_EVENT_SER_RUN   = "SER_RUN"
	OUTPUT_EVENT_SER_CLOSE = "SER_CLOSE"

	ODER_TYPE_SEQ      = "SEQ"
	ODER_TYPE_INTERVAL = "INT"
	ODER_TYPE_REODER   = "REO"

	ART_TYPE_FINISHED = "FINISHED"
	ART_TYPE_SEMI_FINISHED = "SEMI_FINISHED"
	ART_TYPE_MATERIALS = "MATERIALS"
	ART_TYPE_VIRTUAL = "VIRTUAL"

	CONTROL_ACTION_PSET = "选择PSet"
	CONTROL_ACTION_JOB = "选择job"

)


const (
	MES_MATCH_ALL = "全选"


	STEP_CHECK_RULE = "扫码校验"
	STEP_OPC_RULE = "OPC通讯"
	STEP_TW_RULE = "开放协议"
	STEP_GUIDE_RULE = "指导操作"
	STEP_PRINT_RULE = "单据打印"

	OPC_DBBLOCK_VALUE_TYPE_MAP = "映射值"

	SCAN_RULE_TYPE_ARTICLE = "零件条码"
	SCAN_RULE_TYPE_OTHER = "自主条码"

	SCAN_RULE_SERIALORDER = "UNITSN"
	SCAN_RULE_CHECK = "校验"
	SCAN_RULE_CRWAL = "采集"

	TRIGGER_FROM_BARCODE = "自主条码"
	TRIGGER_DEPEND_ON_UNITSN = "UNITSN"
)