addONU: Adicionado função de vincular ao TopSapp_part4
Signed-off-by: Rodrigo Bertoldo de Sousa Martins <rodrigo.sousa.577@gmail.com>
This commit is contained in:
1 parent
6e487fdfc6
commit
57c0a4d080
1 file changed
+18
-1
+18
-1
@@ -3330,6 +3330,8 @@ Digite /help para ver todos os comandos disponíveis!
|
||||
oltId,
|
||||
oltHost: oltEquipment ? oltEquipment.host : '',
|
||||
serial: serialNumber,
|
||||
onuId,
|
||||
servicePort: result.servicePortId ? parseInt(result.servicePortId) : null,
|
||||
portaAlias: slot
|
||||
}
|
||||
});
|
||||
@@ -6177,11 +6179,20 @@ Digite /help para ver todos os comandos disponíveis!
|
||||
|
||||
const ftthData = {
|
||||
serial: onuData.serial,
|
||||
ftth_serial: onuData.serial,
|
||||
ftth_ipgerencia: onuData.oltHost,
|
||||
idAP: oltEncontrada.id,
|
||||
idPorta: portaEncontrada.id,
|
||||
idPerfil: perfilEncontrado.id
|
||||
};
|
||||
|
||||
if (onuData.onuId !== undefined && onuData.onuId !== null) {
|
||||
ftthData.ftth_onuid = parseInt(onuData.onuId);
|
||||
}
|
||||
if (onuData.servicePort !== null && onuData.servicePort !== undefined) {
|
||||
ftthData.ftth_servport = onuData.servicePort;
|
||||
}
|
||||
|
||||
// Salvar payload de confirmação na sessão
|
||||
const session = this.userSessions.get(userId);
|
||||
session.action = 'topsapp_onu_confirmando';
|
||||
@@ -6193,11 +6204,17 @@ Digite /help para ver todos os comandos disponíveis!
|
||||
};
|
||||
this.userSessions.set(userId, session);
|
||||
|
||||
const onuIdInfo = onuData.onuId !== undefined && onuData.onuId !== null
|
||||
? `\n🔢 *ONU ID:* ${onuData.onuId}` : '';
|
||||
const spInfo = onuData.servicePort !== null && onuData.servicePort !== undefined
|
||||
? `\n🔌 *Service-port:* ${onuData.servicePort}` : '';
|
||||
|
||||
await this.bot.sendMessage(chatId,
|
||||
`🔌 *Confirmar Vinculação no TopSapp*\n\n` +
|
||||
`📱 *Serial:* \`${onuData.serial}\`\n` +
|
||||
`🏢 *OLT:* ${oltEncontrada.nome}\n` +
|
||||
`📡 *Porta:* ${portaEncontrada.alias}\n` +
|
||||
`📡 *Porta:* ${portaEncontrada.alias}` +
|
||||
onuIdInfo + spInfo + `\n` +
|
||||
`⚙️ *Perfil:* ${perfilEncontrado.identificacao}\n` +
|
||||
`🆔 *Serviço ID:* ${idServico}\n` +
|
||||
`👤 *Cliente ID:* ${idCliente}\n\n` +
|
||||
|
||||
Reference in new issue
Block a user