1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  | package com.zy.common.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 + "的任务类型无法生成工作号"); 
 |      } 
 |    
 |  } 
 |  
  |