Class OnSiteProgress
java.lang.Object
overit.geocallapp.wfm.core.ux.bundler.search.detail.OnSiteProgress
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
- Since:
- 20.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetProgress(BundleEntitiesAggregate aggregate, Long currentWorkOrderOperationId, Long currentBundleOperationId, boolean excludeCancelledOperations) Determines the on-site progress based on the agenda resource state.static StringgetProgress(DailyPlanBundleCache cache, Long currentWorkOrderOperationId, Long interventionId) Determines the on-site progress based on the daily plan bundle cache.
-
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 aggregatecurrentWorkOrderOperationId- the ID of the current work order operationexcludeCancelledOperations- 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 cachecurrentWorkOrderOperationId- the ID of the current work order operationinterventionId- the ID of the intervention to retrieve from the cache- Returns:
- the progress status as a string
-