TMACUL

CA SDM::. Qual a tabela do turno de trabalho?

Blog Post created by TMACUL Champion on Jan 13, 2018

table: bpwshft

Bop_Workshift

object: wrkshft

 

 

bop_sinfo -dq wrkshft

 

Factory wrkshft < Bop_Workshift >
Attributes:
id INTEGER UNIQUE
producer_id LOCAL STRING(20)
persistent_id persid STRING(30)
delete_flag del SREL -> actbool.enum REQUIRED
sym STRING(60) REQUIRED
description STRING(255)
sched STRING(1000)
last_mod_dt DATE
last_mod_by SREL -> cnt.id TENANCY_UNRESTRICTED
pcat_svc BREL <- lrel_svc_schedules_pcat_svc.wrkshft (LREL pcat)
{wrkshft = ?}
chgcat_svc BREL <- lrel_svc_schedules_chgcat_svc.wrkshft (LREL chgc
at) {wrkshft = ?}
isscat_svc BREL <- lrel_svc_schedules_isscat_svc.wrkshft (LREL issc
at) {wrkshft = ?}

Por padrão o CA SDM obtém:

 

Regular 
Fora do horário comercial
24 horas

 

Turno de trablaho registrado na tabela usp_contact

c_schedule: Analysts workshift for auto-assignment. Foreign key to the persistent_id field of the bpwshft table.

c_ws_id1

c_ws_id2

c_ws_id3

c_ws_id4

 

>bop_sinfo -dq cnt |find "wrkshft"

notify_ws1 c_ws_id1 SREL -> wrkshft.persistent_id
notify_ws2 c_ws_id2 SREL -> wrkshft.persistent_id
notify_ws3 c_ws_id3 SREL -> wrkshft.persistent_id
notify_ws4 c_ws_id4 SREL -> wrkshft.persistent_id
schedule c_schedule SREL -> wrkshft.persistent_id

 

Caso deseje executar uma consulta na base de dados:

select * from bpwshft

OU uma consulta analisando quais usuários contém quais turnos de trabalho

 

select cnt.userid, bpwshft.sym
from ca_contact as cnt
inner join usp_contact as usp on cnt.contact_uuid = usp.contact_uuid
left join bpwshft on bpwshft.persid = usp.c_schedule
where cnt.contact_type <> 2308 and cnt.inactive =0
and usp.c_schedule is not null

Exemplo de atualização

 

update usp_contact
set c_schedule = 'wrkshft:4600'
where c_schedule is null
and contact_uuid in (select contact_uuid from ca_contact as cnt where cnt.contact_type <> 2308)

 

Referências cruzadas de tabelas e objetos - CA Service Management - 14.1 - Portuguese - Brazil - CA Technologies Documen… 

usp_contact 

Outcomes