Browse Source

Update to workOrder loading.

combat-2
MagicBot 6 months ago
parent
commit
7f1bc2a4b7
  1. 8
      src/engine/db/handlers/dbWarehouseHandler.java

8
src/engine/db/handlers/dbWarehouseHandler.java

@ -202,17 +202,13 @@ public class dbWarehouseHandler extends dbHandlerBase { @@ -202,17 +202,13 @@ public class dbWarehouseHandler extends dbHandlerBase {
Logger.error(e);
}
// Remove the old workOrder records
for (WorkOrder workOrder : submitList)
DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder);
// Submit the new workOrders to the ForgeManager
for (WorkOrder workOrder : submitList) {
DbManager.WarehouseQueries.DELETE_WORKORDER(workOrder);
workOrder.workOrderID = ForgeManager.workOrderCounter.incrementAndGet();
ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder);
DbManager.WarehouseQueries.WRITE_WORKORDER(workOrder);
ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder);
ForgeManager.forge.add(workOrder);
}

Loading…
Cancel
Save