Skip to content

Instantly share code, notes, and snippets.

sem parm
main program = true
call protocol = HTTP
java try{
do 'AnnaParametros'
&LinkWSIntegracao = &TEC_AnnaParamWSIntegracao
&LinkWSCallBack = &TEC_AnnaParamWSCallBack
param (in:&CallHash,
in:&SdtMacroAnswers,
in:&UserCelphone,
in:&ModuloERP,
inout:&Place,
inout:&NextPlace,
in:&Provider,
out:&WSPlace,
out: &Json_Out);
create FUNCTION DELSOFTX_PK (@tabela char(50))
RETURNS TABLE
AS
RETURN
(
SELECT posicao, tb, campo
FROM (
SELECT c.obj_name as tb, b.attri_name as campo, e.attri_type as tipo, e.length as tamanho, e.decimals as decimais, 1 AS iskey,
a.position_ck+1 AS posicao
FROM CK_ATRI a
USE gx_kb_atual
DECLARE @tabela VARCHAR(500) = 'RHF_ColabIntermitenteItem';
DECLARE @sql NVARCHAR(4000);
SELECT @sql = comandosql FROM DELSOFTX_TABELA(@tabela)
USE fanavid
EXEC(@sql)
* CAMPOS
USE gx_kb_atual
DECLARE @coluna VARCHAR(500) = 'RHF_COLABINTERCALCULADO';
DECLARE @sql NVARCHAR(4000);
@mukasc
mukasc / TripleDES.java
Created June 12, 2020 13:57
TripleDES
package br.com.delsoftsistemas;
import br.com.delsoftsistemas.comum.FuncoesComuns;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import org.apache.commons.codec.binary.Base64;
Main Program: True
encryppt parameters: no
call protocol: HTTP
webservice
csharp try{
PrcSaveLog.Call(!'ANNAINTEGRATIONLOG',&UserCelphone,&Pgmname+ !' / '+!'Entrou')
Parm(
in:&WSPlace,
inout:&NextPlace,
inout:&Saudacao,
inout:&CallHash,
out:&SdtWSContainersContainer);
&LinkWSIntegracao = 'http://itda.com.br/mxns/aPrcWSAnnAMxns.aspx'
&LinkWSCallBack = 'http://itda.com.br/mxns/aPrcAnnACallBack.aspx'
Parm(in:&CallHash,in:&SdtMacroAnswers,in:&UserCelphone,inout:&Place,inout:&NextPlace,in:&Provider,out:&WSPlace,out:&SdtWSContainers);
&SdtWSContainers = new()
&SdtWSContainers.ClientStatus = !'OK'
do case
case &Place.ToUpper() = 'QUESTIONS'
//Chamo a sub com a pergunta 1
Parm(in:&LogType,in:&LogUser,in:&LogDescription);
New
LogType = &LogType
LogUser = &LogUser
LogDescription = &LogDescription
LogDate = now()
endnew
Parm(In: &Json, In: &EncKEY, In: &DecKEY, In: &IV, Out: &StringResponse);
&CryptoEncrypt = new()
&CryptoEncrypt.Algorithm = CryptoEncryptAlgorithm.TripleDES
&Result = &CryptoEncrypt.Encrypt(!'DUMMY')
&NewIV = &CryptoEncrypt.IV
&NewIVCript = PrcEncryptTripleDES.Udp(&NewIV, &DecKEY, &IV )
&StringResponse = PrcEncryptTripleDES.Udp(&Json, &EncKEY, &NewIV) + &IV + &NewIVCript