fix(wms): 修复库位编码生成逻辑
- 调整行列号拼接顺序,先列后行 - 行号补零格式化,确保编码规范统一 - 移除旧的列号补零逻辑,避免重复处理
This commit is contained in:
@@ -74,9 +74,8 @@ public class WmsActualWarehouseServiceImpl implements IWmsActualWarehouseService
|
|||||||
int rowsForLayer = (l == 2) ? Math.max(rows - 1, 1) : rows;
|
int rowsForLayer = (l == 2) ? Math.max(rows - 1, 1) : rows;
|
||||||
for (int c = 1; c <= cols; c++) {
|
for (int c = 1; c <= cols; c++) {
|
||||||
for (int r = 1; r <= rowsForLayer; r++) {
|
for (int r = 1; r <= rowsForLayer; r++) {
|
||||||
// 列号补两位(01/02...)
|
String rStr = r < 10 ? ("0" + r) : String.valueOf(r);
|
||||||
String cStr = c < 10 ? ("0" + c) : String.valueOf(c);
|
String code = prefix + c + '-' + rStr + '-' + l;
|
||||||
String code = prefix + r + '-' + cStr + '-' + l;
|
|
||||||
codes.add(code);
|
codes.add(code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user