Páginas filhas
  • TRZUVI_DT_Mensagem_ScheduleWork_Exclusao_Horarios

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Adapter EAIAdapterScheduleWork1 - Mensagem ScheduleWork

Linha de Produto:

Logix

Segmento:

Manufatura.

Módulo:

RHFolha de Pagamento - RHU

Função:

EAIAdapterScheduleWork1 - Adapter da mensagem ScheduleWork versão 1.000

Situação/Requisito:

Devido a alteração na funcionalidade de exclusão de horários, na mensagem única padrão ScheduleWork, agora atualmente, quando ocorre o envio da exclusão de um horário, é enviado enviada a sequencia sequência de horários que está sendo excluída, diferentemente de como a rotina funcionava anteriormente, quando era enviado na exclusão, somente os horários que permaneciam.

Solução/Implementação:

Permitir O programa foi alterado para permitir que, quando venha for enviada uma mensagem de exclusão de horários, identifique qual a sequencia que veio na seja identificada a sequência de horários da mensagem e exclua somente ela esta sequência na tabela ESCALA_HORARIOS. Para os casos em que venha apresentar a primeira sequenciasequência, deverá, além de excluir a tabela ESCALA_HORARIOS, continuar excluíndo excluir as tabelas ESCALA e TURNO_RHU.Exemplos

Chamados relacionados:

É enviada a seguinte mensagem de inclusão de horários pelo Protheus:

<TOTVSMessage>
<MessageInformation version="1.000">
<UUID>8b7b7dd6-f10e-eefc-bd70-dd2u548502ca</UUID>
<Type>BusinessMessage</Type>
<Transaction>SCHEDULEWORK</Transaction>
<StandardVersion>1.000</StandardVersion>
<SourceApplication>P118</SourceApplication>
<CompanyId>YY</CompanyId>
<BranchId>01</BranchId>
<Product name="PROTHEUS" version="11"/>
<GeneratedOn>2015-07-28T14:37:22</GeneratedOn>
<DeliveryType>Sync</DeliveryType>
</MessageInformation>
<BusinessMessage>
<BusinessEvent>
<Entity>ScheduleWork</Entity>
<Event>upsert</Event>
<Identification>
<key name="Code">YY||305|02</key>
</Identification>
</BusinessEvent>
<BusinessContent>
<CompanyId>YY</CompanyId>
<BranchId/>
<WorkShiftCode>305</WorkShiftCode>
<WorkShiftInternalId>YY||305</WorkShiftInternalId>
<Description>TURNO TESTE LOGIX III</Description>
<RegularHour>0</RegularHour>
<RestHour>0</RestHour>
<StartDateScheduleWork>2015-07-27</StartDateScheduleWork>
<ListOfSchedule>
<Schedule>
<StartSequence>1</StartSequence>
<EndSequence>1</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>2</StartSequence>
<EndSequence>2</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>3</StartSequence>
<EndSequence>3</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>4</StartSequence>
<EndSequence>4</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>5</StartSequence>
<EndSequence>5</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>6</StartSequence>
<EndSequence>6</EndSequence>
<TypeOfDay>2</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>7</StartSequence>
<EndSequence>7</EndSequence>
<TypeOfDay>3</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>8</StartSequence>
<EndSequence>8</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>9</StartSequence>
<EndSequence>9</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>10</StartSequence>
<EndSequence>10</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>11</StartSequence>
<EndSequence>11</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>12</StartSequence>
<EndSequence>12</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>13</StartSequence>
<EndSequence>13</EndSequence>
<TypeOfDay>2</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>14</StartSequence>
<EndSequence>14</EndSequence>
<TypeOfDay>3</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
</ListOfSchedule>
</BusinessContent>
</BusinessMessage>
</TOTVSMessage>

 

Exemplo 01)

Na mensagem única é enviado a seguinte mensagem de exclusão, conforme abaixo. Como destacado na mensagem, é identificado que a mensagem é de exclusão e a sequencia que está sendo excluída é a partir da 8 (as mensagem do Protheus são enviadas sempre com sequencias identificando semanas: semana 1, sequencia 1 a 7; semana 2, sequencia 8 a 14; semana 3, sequencia 15 a 21; etc). Dessa forma, deverá prever a exclusão da tabela ESCALA_HORARIOS, para a empresa e escala em questão, das sequencia 08 a 14:

<TOTVSMessage>
<MessageInformation version="1.000">
<UUID>26f55255-25c4-a64e-431d-55b229294b16</UUID>
<Type>BusinessMessage</Type>
<Transaction>SCHEDULEWORK</Transaction>
<StandardVersion>1.000</StandardVersion>
<SourceApplication>P118</SourceApplication>
<CompanyId>YY</CompanyId>
<BranchId>01</BranchId>
<Product name="PROTHEUS" version="11"/>
<GeneratedOn>2015-07-28T14:48:01</GeneratedOn>
<DeliveryType>Sync</DeliveryType>
</MessageInformation>
<BusinessMessage>
<BusinessEvent>
<Entity>ScheduleWork</Entity>
<Event>delete</Event>
<Identification>
<key name="Code">YY||305|02</key>
</Identification>
</BusinessEvent>
<BusinessContent>
<CompanyId>YY</CompanyId>
<BranchId/>
<WorkShiftCode>305</WorkShiftCode>
<WorkShiftInternalId>YY||305</WorkShiftInternalId>
<Description>TURNO TESTE LOGIX III</Description>
<RegularHour>0</RegularHour>
<RestHour>0</RestHour>
<StartDateScheduleWork>2015-07-27</StartDateScheduleWork>
<ListOfSchedule>
<Schedule>
<StartSequence>8</StartSequence>
<EndSequence>8</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>9</StartSequence>
<EndSequence>9</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>10</StartSequence>
<EndSequence>10</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>11</StartSequence>
<EndSequence>11</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>12</StartSequence>
<EndSequence>12</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>22.00</StartHour>
<EndHour>5.00</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>1.00</StartHour>
<EndHour>2.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>13</StartSequence>
<EndSequence>13</EndSequence>
<TypeOfDay>2</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>14</StartSequence>
<EndSequence>14</EndSequence>
<TypeOfDay>3</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
</ListOfSchedule>
</BusinessContent>
</BusinessMessage>
</TOTVSMessage>

Exemplo 02) 

Na situação abaixo, é enviado a mensagem de exclusão da sequencia 1, conforme destaques. Dessa forma, identificando que é a primeira sequencia que está sendo excluída e que não haverá mais turnos e escalas registrado para o horário enviado, deverá ser previsto, além da exclusão da tabela ESCALA_HORARIOS, também a exclusão das tabelas TURNO_RHU e ESCALA.

<TOTVSMessage>
<MessageInformation version="1.000">
<UUID>60851bb8-dedd-b76d-0f4n-429fa9a9419f</UUID>
<Type>BusinessMessage</Type>
<Transaction>SCHEDULEWORK</Transaction>
<StandardVersion>1.000</StandardVersion>
<SourceApplication>P118</SourceApplication>
<CompanyId>YY</CompanyId>
<BranchId>01</BranchId>
<Product name="PROTHEUS" version="11"/>
<GeneratedOn>2015-07-28T15:20:25</GeneratedOn>
<DeliveryType>Sync</DeliveryType>
</MessageInformation>
<BusinessMessage>
<BusinessEvent>
<Entity>ScheduleWork</Entity>
<Event>delete</Event>
<Identification>
<key name="Code">YY||305|01</key>
</Identification>
</BusinessEvent>
<BusinessContent>
<CompanyId>YY</CompanyId>
<BranchId/>
<WorkShiftCode>305</WorkShiftCode>
<WorkShiftInternalId>YY||305</WorkShiftInternalId>
<Description>TURNO TESTE LOGIX III</Description>
<RegularHour>0</RegularHour>
<RestHour>0</RestHour>
<StartDateScheduleWork>2015-07-27</StartDateScheduleWork>
<ListOfSchedule>
<Schedule>
<StartSequence>1</StartSequence>
<EndSequence>1</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>2</StartSequence>
<EndSequence>2</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>3</StartSequence>
<EndSequence>3</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>4</StartSequence>
<EndSequence>4</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>5</StartSequence>
<EndSequence>5</EndSequence>
<TypeOfDay>1</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>8.00</StartHour>
<EndHour>17.30</EndHour>
</ScheduleHour>
<ScheduleHour>
<HourType>2</HourType>
<StartHour>12.00</StartHour>
<EndHour>13.30</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>6</StartSequence>
<EndSequence>6</EndSequence>
<TypeOfDay>2</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
<Schedule>
<StartSequence>7</StartSequence>
<EndSequence>7</EndSequence>
<TypeOfDay>3</TypeOfDay>
<ListOfScheduleHour>
<ScheduleHour>
<HourType>1</HourType>
<StartHour>0.00</StartHour>
<EndHour>0.00</EndHour>
</ScheduleHour>
</ListOfScheduleHour>
</Schedule>
</ListOfSchedule>
</BusinessContent>
</BusinessMessage>
</TOTVSMessage>

 

 

Conversores e Parâmetros:

Não se aplica

Chamados relacionados:

Informe o(s) chamado(s) relacionado(s).

 Requisito (ISSUE): Informe o requisito relacionado.

TSWELD

Release:

10.2/11-05

Versões/Release:

Informe as versões.