| | |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.RowLastno; |
| | | import com.zy.asrs.service.RowLastnoService; |
| | | import com.zy.common.CodeBuilder; |
| | | import com.zy.common.model.LocDetlDto; |
| | | import com.zy.common.properties.SlaveProperties; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.system.service.UserService; |
| | | |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { |
| | | int row = getRow(deepLoc); |
| | | boolean deepLocLeft = isDeepLoc(slaveProperties, row);//判断是否为左深库位 |
| | | boolean deepLocLeft = isDeepLocLeft(slaveProperties, row);//判断是否为左深库位 |
| | | int shallowRow = deepLocLeft? (row + 1) : (row - 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); |
| | | } |
| | |
| | | int shallowRow = deepLocLeft? (row - 1) : (row + 1); |
| | | return zerofill(String.valueOf(shallowRow), 2) + shallowLoc.substring(2); |
| | | } |
| | | |
| | | /** |
| | | * 获取 浅库位对应的深库位号,如果没有深库位,则返回为空 |
| | | */ |
| | | public static String getDeepLoc2(SlaveProperties slaveProperties, String shallowLoc) { |
| | | int row = getRow(shallowLoc); |
| | | boolean deepLocLeft = isDeepLoc(slaveProperties, row);//判断是否为深库位 |
| | | if (!deepLocLeft) { |
| | | return null; |
| | | } |
| | | //4,7,11,15,19,23 |
| | | if (row == 4 || row == 7 || row == 11 || row == 15 || row == 19 || row == 23) { |
| | | return zerofill(String.valueOf(row + 1), 2) + shallowLoc.substring(2); |
| | | } else { |
| | | return zerofill(String.valueOf(row - 1), 2) + shallowLoc.substring(2); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取 深库位排对应的浅库位排 |
| | |
| | | |
| | | return necessaryParameters; |
| | | } |
| | | |
| | | //四向库(牛眼\光泰) |
| | | public static int[] LocNecessaryParametersDoubleExtension6(RowLastno rowLastno, Integer curRow, Integer crnNumber) { |
| | | int[] necessaryParameters = new int[]{0, 0, 0, 0}; |