| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | |
| | | |
| | | @Override |
| | | public Boolean isOutMost(String locNo, Boolean pakin) { |
| | | return Integer.parseInt(locNo.substring(0, 2)) == Utils.getOutLayerRow(locNo, pakin); |
| | | int row = Utils.getRow(locNo); |
| | | int bay = Utils.getBay(locNo); |
| | | ArrayList<Integer> list = new ArrayList<Integer>(){{ |
| | | add(1);add(3);add(4);add(6); |
| | | add(8);add(10);add(11); |
| | | }}; |
| | | |
| | | if (list.contains(row)) { |
| | | return true;//最外侧库位 |
| | | } |
| | | |
| | | if (row == 13 && (bay >= 59 && bay <= 61)) { |
| | | return true;//最外侧库位 |
| | | } |
| | | |
| | | if (bay < 59) { |
| | | if (row == 13 || row == 14 || row == 16) { |
| | | return true;//最外侧库位 |
| | | } |
| | | } |
| | | |
| | | return false;//不是最外侧库位 |
| | | } |
| | | |
| | | public static void main(String[] args) { |