java.lang.Object
overit.geocallapp.wfm.core.ux.bundler.search.detail.OnSiteProgress

public class OnSiteProgress extends Object
Utility class to determine the on-site progress of a work order operation starting from the related intervention accounting. The on-site progress follows the same logic present in the FSM mobile app and provides a standardized way to calculate the current status of field operations based on intervention accounting status and timestamps. The status progression follows this hierarchy:
  • To Do - Initial state, no action taken yet
  • In charge - Resource has taken charge of the intervention
  • Arrival on site - Resource has arrived at the intervention's location
  • Running - Work has started
  • Done - Work completed or customer absent
  • Cancelled - Operation cancelled
  • Empty string - The relation with the bundle is cancelled or closed
Note: This status is intended for display purposes only and should not be used as a substitute for the official work order operation status. No business logic is or should depend on these values.
Since:
20.1
  • Method Details

    • getProgress

      public static String getProgress(BundleEntitiesAggregate aggregate, Long currentWorkOrderOperationId, Long currentBundleOperationId, boolean excludeCancelledOperations)
      Determines the on-site progress based on the agenda resource state.
      Parameters:
      aggregate - the bundle entities aggregate
      currentWorkOrderOperationId - the ID of the current work order operation
      excludeCancelledOperations - whether to exclude cancelled operations from the calculation
      Returns:
      the progress status as a string
    • getProgress

      public static String getProgress(DailyPlanBundleCache cache, Long currentWorkOrderOperationId, Long interventionId)
      Determines the on-site progress based on the daily plan bundle cache.
      Parameters:
      cache - the daily plan bundle cache
      currentWorkOrderOperationId - the ID of the current work order operation
      interventionId - the ID of the intervention to retrieve from the cache
      Returns:
      the progress status as a string