| | |
| | | |
| | | public class BarcodeUtils { |
| | | |
| | | public static final ArrayList<Integer> staNos1 = new ArrayList<Integer>() {{ |
| | | add(1001);add(1002);add(1003);add(1004);add(1005);add(1006);add(1007); |
| | | add(1008);add(1009);add(1010);add(1011);add(1012);add(1013);add(1014);add(1015); |
| | | add(1016);add(1017);add(1018);add(1019);add(1020);add(1021);add(1022);add(1023); |
| | | }}; |
| | | |
| | | public static final ArrayList<Integer> staNos2 = new ArrayList<Integer>() {{ |
| | | add(1001);add(1002);add(1003);add(1004);add(1005);add(1006);add(1007); |
| | | add(1008);add(1009);add(1010);add(1011);add(1012);add(1013);add(1014);add(1015); |
| | | add(1016);add(1017);add(1018);add(1019);add(1020);add(1021);add(1022);add(1023); |
| | | }}; |
| | | |
| | | public static Integer getStaNo(Integer staNo) { |
| | | switch (staNo){ |
| | | case 1021: |
| | | return 1020; |
| | | case 1012: |
| | | return 1014; |
| | | case 1005: |
| | | return 1004; |
| | | default: |
| | | return staNo; |
| | | } |
| | | } |
| | | public static Integer getStartStaNo(String staNo) { |
| | | switch (staNo){ |
| | | case "1021": |
| | | return 1020; |
| | | case "1012": |
| | | return 1014; |
| | | case "1005": |
| | | return 1004; |
| | | default: |
| | | return Integer.getInteger(staNo); |
| | | } |
| | | } |
| | | // public static Integer getStaNo(Integer staNo) { |
| | | // switch (staNo) { |
| | | // case 1021: |
| | | // return 1020; |
| | | // case 1012: |
| | | // return 1014; |
| | | // case 1005: |
| | | // return 1004; |
| | | // default: |
| | | // return staNo; |
| | | // } |
| | | // } |
| | | public static Integer getOutStaNo(String staNo) { |
| | | switch (staNo){ |
| | | case "1021": |
| | | return 1020; |
| | | case "1012": |
| | | return 1009; |
| | | case "1005": |
| | | return 1004; |
| | | case "101": |
| | | case "105": |
| | | case "109": |
| | | case "115": |
| | | case "201": |
| | | case "205": |
| | | case "209": |
| | | case "215": |
| | | return Integer.parseInt(staNo)+1; |
| | | case "119": |
| | | case "122": |
| | | case "125": |
| | | case "219": |
| | | case "222": |
| | | case "225": |
| | | return Integer.parseInt(staNo)-2; |
| | | default: |
| | | return Integer.parseInt(staNo); |
| | | } |