API RF AFF_CHG_X

Version ACE : 1.4  

Package : Standard

Sous-programme Basic : gnc_rf_affect_miss_chg_egx

Fonctionnalité :SCE Mobile
Schémas d’entrée et de sortie : voir en fin de document.

Cette API permet d’affecter une mission de chargement à un agent (champ « operateur »).

API imbriquées : aucune.

Contraintes et limites de fonctionnement (hors périmètre)

RAS.

Paramétrage (PPE)

GESMIS -

Cas d'erreur

CODE PARAMÈTRE DESCRIPTION
3 / ELT_PASTRO lopr, typtie, sigtie, operateur L'opérateur RF n'existe pas.
2 / RFEXP01001   La mission de chargement RF n'existe pas

Détail de l'API

Read the RF operator data (LOPR) with the input parameters (typtie, sigtie, operator).

If the RF operator does not exist, the API returns an error code 3 and an error message «ELT_PASTRO».

For each loading mission (lmis.ltypact = 9) affected to an operator (lmis.statut =5) for the expedition tour (lmis.typentite = 2 and lmis.identite = idtrn)

If the mission is found.

Call the functon gnc_rf_controle_valid_mission (with the found mission data), as so to control the validity of the mission.

If the mission is not valid.

Delete the mission.

If the mission is valid and the ID of the operator assigned to the mission (LMIS.utimis) is the same as the operator ID from the RF operator data (LOPR.idopr).

The mission is considered as found.

If the mission is not found.

For each created (lmis.statut = 1) loading mission (lmis.ltypact = 9) for the expedition tour (lmis.typentite = 2 and lmis.identite = idtrn)

If the mission is found.

Call the functon gnc_rf_controle_valid_mission (with the found mission data), as so to control the validity of the mission.

If the mission is not valid.

Delete the mission.

Else

The mission is considered as found.

If the mission is not found.

For each blocked (lmis.statut = 2) loading mission (LMIS.ltypact = 9) for the expedition tour (lmis.typentite = 2 and lmis.identite = idtrn)

If the mission is found.

Call the funciton gnc_rf_controle_valid_mission (with the found mission data), as so to control the validity of the mission.

If the mission is not valid.

Delete the mission.

If the mission is valid and the blocking starting date is less than the system date.

The mission is considered as found.

If the mission is found.

If the activity is changed (LOPR.idact != LMIS.idact).

Save the mission data (lhstopr).

Modify the operator context (lopr).

Assign the mission to the operator (lmis.utimis = operator, lmis.statut = ‘5’).

Modify the mission with the used equipment (lmis.prfequip = lopr.prfequip, lmis.idequip = lopr.idequip).

Call the function gnc_rf_memorise_utimis, as so to store the operator assigned to the mission in the lmis parameterised field refered by the GESMIS.D1 if presented or in the first parameterized field otherwise.

Else.

The API returns an error code 2 and an error message “RFEXP01001”.

Paramètres en entrée

NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
typtie Char   3 O  
sigtie Char   12 O  
idtrn Long     O  
operateur Char   8 O  

Paramètres en sortie

NOM DU PARAMÈTRE TYPE FORMAT TAILLE OBL O/N REMARQUE
ParamOut1         identifiant de la mission créée