FEAT: Dicionario de categorias adicionado
This commit is contained in:
parent
d197d9903b
commit
9c31d2e8c9
1
app.js
1
app.js
@ -1,4 +1,5 @@
|
|||||||
const hubsoftController = require('./controller/processController.js');
|
const hubsoftController = require('./controller/processController.js');
|
||||||
|
const { logError, logInfo } = require('./utils/logger');
|
||||||
|
|
||||||
logInfo('Aplicação iniciada', {
|
logInfo('Aplicação iniciada', {
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
|
|||||||
@ -24,6 +24,48 @@ const statusAtendimentoGLPI = {
|
|||||||
'Resolvido': 5
|
'Resolvido': 5
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const categoriaGLPI = {
|
||||||
|
'Lan-to-Lan 100 Mbps' : 5708 ,
|
||||||
|
'Link de Internet Dedicado 2 Gbps Full Duplex' : 5707 ,
|
||||||
|
'Lan-to-Lan' : 5707 ,
|
||||||
|
'Lan-to-Lan 500 Mbps' : 5708 ,
|
||||||
|
'Link de internet - Banda Larga' : 5708 ,
|
||||||
|
'Lan-to-Lan 700 Mbps' : 5708 ,
|
||||||
|
'Link de Internet Dedicado 20 Mbps Full Duplex' : 5707 ,
|
||||||
|
'Lan-to-Lan 300 Mbps' : 5708 ,
|
||||||
|
'Link de Internet Dedicado 5Gbs + Burst 5Gbs Burs Full Duplex Anti DDOS' : 5707 ,
|
||||||
|
'Link de Internet - Banda Larga - 500 Mbps' : 5708 ,
|
||||||
|
'Link de Internet Dedicado 600Mbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet - Banda Larga - 1Gbps' : 5707 ,
|
||||||
|
'Link de Internet Dedicado 1Gbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet Dedicado Full Duplex' : 5707 ,
|
||||||
|
'Fibra Apagada' : 5706 ,
|
||||||
|
'Link de Internet - Banda Larga - 100 Mbps' : 5708 ,
|
||||||
|
'Canal de Voz IP' : 5715 ,
|
||||||
|
'Link de Internet Dedicado 500Mbps Full Duplex' : 5707 ,
|
||||||
|
'Lan-to-Lan 200 Mbps' : 5708 ,
|
||||||
|
'Lan-to-Lan 50 Mbps' : 5708 ,
|
||||||
|
'Linha IP - Limitado' : 5715 ,
|
||||||
|
'PABX IP Cloud' : 5717 ,
|
||||||
|
'Link de Internet Dedicado 100 Mbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet Dedicado 200 Mbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet - Banda Larga - 200 Mbps' : 5708 ,
|
||||||
|
'Link de Internet - Banda Larga - 300 Mbps' : 5708 ,
|
||||||
|
'Link de Internet - Banda Larga - 700 Mbps' : 5708 ,
|
||||||
|
'Link de Internet Dedicado 300 Mbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet Dedicado 50Mbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet Dedicado 10 Mbps Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet Dedicado 30 Mbps Full Duplex' : 5707 ,
|
||||||
|
'PABX IP - Até 30 ramais com telefones IPs (CAOA ESTADO DE SP)' : 5717 ,
|
||||||
|
'Lan-to-Lan 1GB' : 5707 ,
|
||||||
|
'PABX IP - Até 30 ramais com telefones IPs (CAOA OUTROS ESTADOS)' : 5717 ,
|
||||||
|
'Link de Internet Dedicado 700MB Full Duplex' : 5707 ,
|
||||||
|
'Link de Internet Dedicado - Temporário' : 5707
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ================================================================================
|
// ================================================================================
|
||||||
// Funções Utilitárias
|
// Funções Utilitárias
|
||||||
// ================================================================================
|
// ================================================================================
|
||||||
@ -76,7 +118,7 @@ const formatTicketDataForGlpi = async (ticketData) => {
|
|||||||
impact: 3,
|
impact: 3,
|
||||||
priority: 3,
|
priority: 3,
|
||||||
type: 1,
|
type: 1,
|
||||||
itilcategories_id: 1,
|
itilcategories_id: categoriaGLPI[ticketData.servico_nome] || 1,
|
||||||
date_creation: new Date(),
|
date_creation: new Date(),
|
||||||
// entidades_id: 0 //await glpiModel.selectEntityId() //TODO: Implementar a busca da entidade
|
// entidades_id: 0 //await glpiModel.selectEntityId() //TODO: Implementar a busca da entidade
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user