package com.zy.common.model.enums.model.enums; import com.core.exception.CoolException; /** * 工作号排序规则 */ public enum WorkNoType { PAKIN(0), PICK(1), PAKOUT(2), OTHER(3), ; public Integer type; WorkNoType(Integer type) { this.type = type; } public static Integer getWorkNoType(Integer ioType) { switch (ioType) { case 1: return PAKIN.type; case 10: return PAKIN.type; case 11: return PICK.type; case 53: case 54: case 57: return PICK.type; case 101: return PAKOUT.type; case 103: case 104: case 107: return PICK.type; case 110: return PAKOUT.type; default: break; } throw new CoolException(ioType + "的任务类型无法生成工作号"); } }