...
The usp_updateLogisticsAllocations stored procedure will create/preserve job allocations for jobs and sites in -site allocations under the following conditions:
- The job status is NOT:
- Cancelled (-8) NOR
- Deleted (-9)
- For sites with allocation method of 'Major Work Flow Stage' (-1000):
- Job Major Stage = Site's major allocation stage
- For sites with allocation method of 'Construction/Maintenance Manager' (-1001):
- 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
- The job's minor stage is:
- Permit (Id: -7) OR
- Admin Complete (Id: -8)
OR
- The job's major stage is Construction (Id: -4) OR
- The job's major stage is Maintenance (Id: -5) AND
- The job's settlement date IS NULL OR
- The job's settlement date is within the threshold set by the preference 'Duration to Retain Maintenance Jobs (In Days)' (Id: -50069)
OR
- The job's major stage is 'Building (Englobo)' (Id: -8) OR
- The job's major stage is 'Building (Estate)' (Id: -12) OR
- The job's major stage is 'Building (Estate Stage)' (Id: -16)
OR
- For sites with allocation method of 'Construction/Maintenance Supervisor' (-1002):
- 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
- The job's minor stage is:
- Permit (Id: -7) OR
- Admin Complete (Id: -8)
OR
- The job's major stage is Construction (Id: -4) OR
- The job's major stage is Maintenance (Id: -5) AND
- The job's settlement date IS NULL OR
- The job's settlement date is within the threshold set by the preference 'Duration to Retain Maintenance Jobs (In Days)' (Id: -50069)
OR
- The job's major stage is 'Building (Englobo)' (Id: -8) OR
- The job's major stage is 'Building (Estate)' (Id: -12) OR
- The job's major stage is 'Building (Estate Stage)' (Id: -16)
OR
- For sites with an allocation method of 'Advanced Allocation Criteria':
- Criteria is 'Construction and Maintenance' (Id: -2524) AND
- The job's major stage is Cst (-4) OR
- The job's major stage is Maint (-5)
- Criteria is 'Construction and Maintenance' (Id: -2524) AND
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
...