Release 1.1.0: QR-Reportimport, Regal-Auswahlmodal, Einlagern/Auslagern-Verknuepfungen aus Reifenlager, Stabilitaetsfixes

This commit is contained in:
spaethf committed 2026-09-26 23:24:14 +02:00
1 parent cba9414e92
commit 3404fb9875
25 files changed
+5106 -744

No files matched your search

@@ -290,24 +290,25 @@ public class StorageLocationService : IStorageLocationService
var toLocation = await GetByCodeAsync(toCode)
?? throw new LocationNotFoundException(toCode);
if (!fromLocation.IsOccupied)
if (!fromLocation.IsOccupied || fromLocation.TireStackId == null)
throw new InvalidOperationException($"Lagerplatz {fromCode} ist nicht belegt.");
if (toLocation.IsOccupied)
throw new LocationOccupiedException(toCode, toLocation.TireStackId!.Value);
throw toLocation.TireStackId.HasValue
? new LocationOccupiedException(toCode, toLocation.TireStackId.Value)
: new LocationOccupiedException(toCode);
if (!toLocation.IsAvailable)
throw new InvalidOperationException($"Lagerplatz {toCode} ist gesperrt.");
var tireStackId = fromLocation.TireStackId!.Value;
var tireStackId = fromLocation.TireStackId.Value;
// Update the tire stack's storage location reference
var tireStack = await _context.TireStacks.FindAsync(tireStackId);
if (tireStack != null)
{
tireStack.StorageLocationId = toLocation.Id;
tireStack.UpdatedAt = DateTime.UtcNow;
}
var tireStack = await _context.TireStacks.FindAsync(tireStackId)
?? throw new InvalidOperationException($"Reifenstapel auf Lagerplatz {fromCode} wurde nicht gefunden.");
tireStack.StorageLocationId = toLocation.Id;
tireStack.UpdatedAt = DateTime.UtcNow;
// Clear source and assign to destination
fromLocation.ClearLocation();