提交
This commit is contained in:
+1
-7
@@ -18,8 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import java.util.Set;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Service
|
||||
@@ -448,11 +446,7 @@ public class WarehouseResourceService {
|
||||
}
|
||||
|
||||
private static String generatedPalletCode(String warehouseCode, long palletId) {
|
||||
String compactWarehouseCode = warehouseCode.replaceAll("[^A-Za-z0-9]", "").toUpperCase(java.util.Locale.ROOT);
|
||||
if (compactWarehouseCode.length() > 9) compactWarehouseCode = compactWarehouseCode.substring(0, 9);
|
||||
return "PLT-" + compactWarehouseCode + "-"
|
||||
+ LocalDate.now().format(DateTimeFormatter.ofPattern("yyMMdd")) + "-"
|
||||
+ Long.toUnsignedString(palletId, 36).toUpperCase(java.util.Locale.ROOT);
|
||||
return "TP-" + Long.toUnsignedString(palletId, 36).toUpperCase(java.util.Locale.ROOT);
|
||||
}
|
||||
|
||||
private static String defaultLocationCode(String warehouseCode) {
|
||||
|
||||
Reference in New Issue
Block a user