Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The usp_updateLogisticsAllocations stored procedure will create/preserve job allocations for jobs and sites in -site allocations under the following conditions:

  1. The job status is NOT:
    1. Cancelled (-8) NOR
    2. Deleted (-9)
  2. For sites with allocation method of 'Major Work Flow Stage' (-1000):
    1. Job Major Stage = Site's major allocation stage
  3. For sites with allocation method of 'Construction/Maintenance Manager' (-1001):
    1. The site's cst manager is one of the job's linked entities (in the job_entity table, with the role 'Cst Manger (id: -137)) AND
    2. The job's minor stage is:
      1. Permit (Id: -7) OR
      2. Admin Complete (Id: -8)
        OR
    3. The job's major stage is Construction (Id: -4) OR
    4. The job's major stage is Maintenance (Id: -5) AND
      1. The job's settlement date IS NULL OR
      2. The job's settlement date is within the threshold set by the preference 'Duration to Retain Maintenance Jobs (In Days)' (Id: -50069)
        OR
    5. The job's major stage is 'Building (Englobo)' (Id: -8) OR 
    6. The job's major stage is 'Building (Estate)' (Id: -12) OR
    7. The job's major stage is 'Building (Estate Stage)' (Id: -16)

      OR

    The site's manager criteria = a manager on an 'open' maintenance request for the job (i.e where the maintenance request sign off date is NULL OR is within the last month)

  4. For sites with allocation method of 'Construction/Maintenance Supervisor' (-1002):
    1. The site's cst supervisor is one of the job's linked entities (in the job_entity table, with the role 'Cst Supervisor (id: -136)) AND
    2. The job's minor stage is:
      1. Permit (Id: -7) OR
      2. Admin Complete (Id: -8)
        OR
    3. The job's major stage is Construction (Id: -4) OR
    4. The job's major stage is Maintenance (Id: -5) AND
      1. The job's settlement date IS NULL OR
      2. The job's settlement date is within the threshold set by the preference 'Duration to Retain Maintenance Jobs (In Days)' (Id: -50069)
        OR
    5. The job's major stage is 'Building (Englobo)' (Id: -8) OR
    6. The job's major stage is 'Building (Estate)' (Id: -12) OR
    7. The job's major stage is 'Building (Estate Stage)' (Id: -16)

      OR

    The site's manager criteria = a manager on an 'open' maintenance request for the job (i.e where the maintenance request sign off date is NULL OR is within the last month)

  5. For sites with an allocation method of 'Advanced Allocation Criteria':
    1. Criteria is 'Construction and Maintenance' (Id: -2524) AND
      1. The job's major stage is Cst (-4) OR
      2. The job's major stage is Maint (-5)


Any job allocations that exist but do NOT meet the above conditions for a given site/job are DELETED by the proc (i.e the jobs are de-allocated fro the site)


Job Type influence on Logistics Job Allocations

...