Árvore de páginas

Versões comparadas

Chave

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

...

Implementada a API employeesManagerDataContent que irá retornar uma lista contendo o líder direto dos empregados, semelhante a API employeeDataContent que retorna a lista dos empregados.

A API receberá os seguintes query params:

...


Nota
titleObservação

A estrutura hierárquica utilizada para verificar o líder do empregado possui a mesma configuração que é utilizada no Portal de Gestão de Capital Humano e no Meu RH, através da configuração de departamentos, postos e/ou visão.

Para mais informações, consulte as documentações a seguir: https://tdn.totvs.com/x/LYx9Hghttps://tdn.totvs.com/x/dfryHQ e https://tdn.totvs.com/x/kfvRHQ.


A API receberá os seguintes query params:

Query ParamDescriçãoObrigatórioTipoValor padrãoValor de exemplo
companyIdCódigo do grupo de empresas para filtroSimString
01
branchIdCódigo da filial do empregado para filtroSimString
0101
pagePágina que está sendo requisitadaNãoInteger11
pageSizeQuantidade de registros por páginaNãoInteger2000100
employeeCodeCódigo da matrícula do empregado para filtroNãoString""000100
employeeCostCenterCodeCódigo do centro de custo do(s) empregado(s) para filtroNãoString""1.01.01
visionCodeCódigo da visão contendo a estrutura hierárquica quando utilizado o parâmetro MV_ORGCFG com 1 ou 2NãoString""00001


A API retornará as seguintes propriedades:

PropriedadeDescriçãoTipo
hasNextIndica se há registros na próxima páginaBoolean
totalIndica o total de registros retornadosInteger
itemsLista dos líderes direto dos empregadosArray


A propriedade items contém as seguintes propriedades:

PropriedadeDescriçãoTipoOrigem do valor
managerBranchFilial do líderStringRA_FILIAL
managerCodeMatrícula do líderStringRA_MAT
managerNameNome do líderStringRA_NOME
managerFullNameNome completo do líderStringRA_NOMECMP
managerEmailE-mail do líderStringRA_EMAIL
managerDepartmentCodeCódigo do departamento do líderStringRA_DEPTO
managerDepartmentDescriptionDescrição do departamento do líderStringQB_DESCRIC
managerCostCenterCodeCódigo do centro de custo do líderStringRA_CC
managerCostCenterDescriptionDescrição do centro de custo do líderStringCTT_DESC01
employeeBranchFilial do empregadoStringRA_FILIAL
employeeCodeMatrícula do empregadoStringRA_MAT
employeeNameNome do empregadoStringRA_NOME
employeeFullNameNome completo do empregadoStringRA_NOMECMP


Exemplos de requisição e retorno:

RequisiçãoRetornoExplicação
http://localhost:8060/rest/rh/v1/employeesManagerDataContent?companyId=T2&branchId=L MG 01 
Bloco de código
collapsetrue
{
	"hasNext": false,
	"total": 8,
	"items": [
		{
			"managerBranch": "",
			"managerCode": "",
			"managerName": "",
			"managerFullName": "",
			"managerEmail": "",
			"managerDepartmentCode": "",
			"managerDepartmentDescription": "",
			"managerCostCenterCode": "",
			"managerCostCenterDescription": "",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408074",
			"employeeName": "CEO",
			"employeeFullName": "CEO"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408074",
			"managerName": "CEO",
			"managerFullName": "CEO",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999901",
			"managerDepartmentDescription": "PRESIDENCIA",
			"managerCostCenterCode": "1                   ",
			"managerCostCenterDescription": "DIRETORIA",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408075",
			"employeeName": "VP",
			"employeeFullName": "VP"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408075",
			"managerName": "VP",
			"managerFullName": "VP",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999902",
			"managerDepartmentDescription": "VICE PRESIDENCIA",
			"managerCostCenterCode": "1                   ",
			"managerCostCenterDescription": "DIRETORIA",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408076",
			"employeeName": "DIRETORA EXECUTIVA",
			"employeeFullName": "DIRETORA EXECUTIVA"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408076",
			"managerName": "DIRETORA EXECUTIVA",
			"managerFullName": "DIRETORA EXECUTIVA",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999903",
			"managerDepartmentDescription": "DIRETORIA EXECUTIVA",
			"managerCostCenterCode": "1                   ",
			"managerCostCenterDescription": "DIRETORIA",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408077",
			"employeeName": "DIRETORA",
			"employeeFullName": "DIRETORA"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408077",
			"managerName": "DIRETORA",
			"managerFullName": "DIRETORA",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999904",
			"managerDepartmentDescription": "DIRETORIA",
			"managerCostCenterCode": "1                   ",
			"managerCostCenterDescription": "DIRETORIA",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408078",
			"employeeName": "GESTORA EXECUTIVA",
			"employeeFullName": "GESTORA EXECUTIVA"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408078",
			"managerName": "GESTORA EXECUTIVA",
			"managerFullName": "GESTORA EXECUTIVA",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999905",
			"managerDepartmentDescription": "GERENCIA EXECUTIVA",
			"managerCostCenterCode": "1.01                ",
			"managerCostCenterDescription": "ADMINISTRACAO",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408079",
			"employeeName": "GESTORA",
			"employeeFullName": "GESTORA"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408079",
			"managerName": "GESTORA",
			"managerFullName": "GESTORA",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999906",
			"managerDepartmentDescription": "GERENCIA",
			"managerCostCenterCode": "1.01                ",
			"managerCostCenterDescription": "ADMINISTRACAO",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408080",
			"employeeName": "COORDENADORA",
			"employeeFullName": "COORDENADORA"
		},
		{
			"managerBranch": "L MG 01 ",
			"managerCode": "408080",
			"managerName": "COORDENADORA",
			"managerFullName": "COORDENADORA",
			"managerEmail": "[email protected]",
			"managerDepartmentCode": "999999907",
			"managerDepartmentDescription": "SQUAD",
			"managerCostCenterCode": "1.01.01             ",
			"managerCostCenterDescription": "FOLHA DE PAGAMENTO",
			"employeeBranch": "L MG 01 ",
			"employeeCode": "408081",
			"employeeName": "ANALISTA",
			"employeeFullName": "ANALISTA"
		}
	]
}
Retorno dos empregados e respectivos líderes da empresa T2 e filial L MG 01 
http://localhost:8060/rest/rh/v1/employeesManagerDataContent?companyId=T2&branchId=L MG 01 &pageSize=6
Bloco de código
collapsetrue
{
    "hasNext": true,
    "total": 8,
    "items": [
        {
            "managerBranch": "",
            "managerCode": "",
            "managerName": "",
            "managerFullName": "",
            "managerEmail": "",
            "managerDepartmentCode": "",
            "managerDepartmentDescription": "",
            "managerCostCenterCode": "",
            "managerCostCenterDescription": "",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408074",
            "employeeName": "CEO",
            "employeeFullName": "CEO"
        },
        {
            "managerBranch": "L MG 01 ",
            "managerCode": "408074",
            "managerName": "CEO",
            "managerFullName": "CEO",
            "managerEmail": "[email protected]",
            "managerDepartmentCode": "999999901",
            "managerDepartmentDescription": "PRESIDENCIA",
            "managerCostCenterCode": "1                   ",
            "managerCostCenterDescription": "DIRETORIA",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408075",
            "employeeName": "VP",
            "employeeFullName": "VP"
        },
        {
            "managerBranch": "L MG 01 ",
            "managerCode": "408075",
            "managerName": "VP",
            "managerFullName": "VP",
            "managerEmail": "[email protected]",
            "managerDepartmentCode": "999999902",
            "managerDepartmentDescription": "VICE PRESIDENCIA",
            "managerCostCenterCode": "1                   ",
            "managerCostCenterDescription": "DIRETORIA",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408076",
            "employeeName": "DIRETORA EXECUTIVA",
            "employeeFullName": "DIRETORA EXECUTIVA"
        },
        {
            "managerBranch": "L MG 01 ",
            "managerCode": "408076",
            "managerName": "DIRETORA EXECUTIVA",
            "managerFullName": "DIRETORA EXECUTIVA",
            "managerEmail": "[email protected]",
            "managerDepartmentCode": "999999903",
            "managerDepartmentDescription": "DIRETORIA EXECUTIVA",
            "managerCostCenterCode": "1                   ",
            "managerCostCenterDescription": "DIRETORIA",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408077",
            "employeeName": "DIRETORA",
            "employeeFullName": "DIRETORA"
        },
        {
            "managerBranch": "L MG 01 ",
            "managerCode": "408077",
            "managerName": "DIRETORA",
            "managerFullName": "DIRETORA",
            "managerEmail": "[email protected]",
            "managerDepartmentCode": "999999904",
            "managerDepartmentDescription": "DIRETORIA",
            "managerCostCenterCode": "1                   ",
            "managerCostCenterDescription": "DIRETORIA",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408078",
            "employeeName": "GESTORA EXECUTIVA",
            "employeeFullName": "GESTORA EXECUTIVA"
        },
        {
            "managerBranch": "L MG 01 ",
            "managerCode": "408078",

A API retornará as seguintes propriedades:

...

A propriedade items contém as seguintes propriedades:

...

Exemplo de retorno:

...

collapsetrue

...

            "

...

managerName": "

...

GESTORA EXECUTIVA",

...

            "managerFullName": "

...

GESTORA EXECUTIVA",

...

            "managerEmail": "

...

...

            "managerDepartmentCode": "

...

999999905"

...

,
            "managerDepartmentDescription": "GERENCIA EXECUTIVA",
            "managerCostCenterCode": "1.01                ",
            "managerCostCenterDescription": "ADMINISTRACAO",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408079",
            "employeeName": "GESTORA",
            "

...

employeeFullName": "

...

GESTORA"

...


        }
    ]
}
Retorno dos empregados e respectivos líderes da empresa T2 e filial L MG 01 , com paginação de 6 registros por página
http://localhost:8060/rest/rh/v1/employeesManagerDataContent?companyId=T2&branchId=L MG 01 &employeeCode=408081
Bloco de código
collapsetrue
{
    "hasNext": false,
    "total": 1,
    "items": [
        {
            "managerBranch": "L MG 01 ",
            

...

"managerCode": "

...

408080",

...

            "managerName": "

...

COORDENADORA",

...

            "managerFullName": "

...

COORDENADORA",

...

            "managerEmail": "

...

[email protected]",
            "managerDepartmentCode": "999999907",
            "managerDepartmentDescription": "SQUAD",
            "managerCostCenterCode": "1.01.01             ",
            "managerCostCenterDescription": "FOLHA DE PAGAMENTO",
            "employeeBranch": "L MG 01 ",
            "employeeCode": "408081",
            "

...

employeeName": "

...

ANALISTA",

...

            "employeeFullName": "

...

ANALISTA"

...


        }
    ]
}
Retorno do empregado e respectivo líder da empresa T2, filial L MG 01  e matrícula 408081
http://localhost:8060/rest/rh/v1/employeesManagerDataContent?companyId=T2&branchId=L MG 01 &employeeCostCenterCode=1.01.01
Bloco de código
collapsetrue
{
    "hasNext": false,
    "total": 2,
    "items": [
        {
           

...

 "

...

managerBranch": "L MG 01 ",

...

            "managerCode": "408079",

...

            "managerName": "GESTORA",

...

            "managerFullName": "GESTORA",

...

            "managerEmail": "[email protected]

...

",
            "managerDepartmentCode": "999999906",

...

            "managerDepartmentDescription": "GERENCIA",

...

            "managerCostCenterCode": "1.01                ",

...

            "managerCostCenterDescription": "ADMINISTRACAO",

...

            "employeeBranch": "L MG 01 ",

...

            "employeeCode": "408080",

...

            "employeeName": "COORDENADORA",

...

            "employeeFullName": "COORDENADORA"

...

        },

...

        {
            "managerBranch": "L MG 01 ",

...

            "managerCode": "408080",

...

            "managerName": "COORDENADORA",
            "managerFullName": "COORDENADORA",

...

            "managerEmail": "[email protected]",

...

            "managerDepartmentCode": "999999907",

...

            "managerDepartmentDescription": "SQUAD",

...

            "managerCostCenterCode": "1.01.01             ",

...

            "managerCostCenterDescription": "FOLHA DE PAGAMENTO",

...

            "employeeBranch": "L MG 01 ",

...

            "employeeCode": "408081",
            "employeeName": "ANALISTA",

...

            "employeeFullName": "ANALISTA"

...

        }

...

    ]
}
Retorno dos empregados e respectivos líderes da empresa T2, filial L MG 01  e centro de custo 1.01.01



Situações de erros tratados:

...