mirror of
https://github.com/KeymonSoft/jRDC-Multi.git
synced 2026-04-17 12:56:23 +00:00
- VERSION 5.08.25
- Se modificaron los archivos de reinicio de los servicios (servidor y Bow) y se cambio el menu del "manager" para que a seccion de "reload" incluya la liga a reinciar Bow.
This commit is contained in:
@@ -29,9 +29,8 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
Connector = Main.Connectors.Get("DB1")
|
||||
Dim con As SQL
|
||||
Try
|
||||
Log(1)
|
||||
con = Connector.GetConnection("DB1")
|
||||
Log("regresamos 1")
|
||||
Log("Metodo: " & method)
|
||||
If method = "query2" Then
|
||||
q = ExecuteQuery2("DB1", con, in, resp)
|
||||
'#if VERSION1
|
||||
|
||||
161
DB1JsonHandler.bas
Normal file
161
DB1JsonHandler.bas
Normal file
@@ -0,0 +1,161 @@
|
||||
B4J=true
|
||||
Group=Default Group
|
||||
ModulesStructureVersion=1
|
||||
Type=Class
|
||||
Version=10.3
|
||||
@EndOfDesignText@
|
||||
'Handler class for JSON requests from Web Clients (JavaScript/axios)
|
||||
'VERSION 14 (Validación de Parámetros): Chequea que el número de '?' coincida con los parámetros recibidos.
|
||||
Sub Class_Globals
|
||||
Private Connector As RDCConnector
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
' --- Headers CORS ---
|
||||
resp.SetHeader("Access-Control-Allow-Origin", "*")
|
||||
resp.SetHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||
resp.SetHeader("Access-Control-Allow-Headers", "Content-Type")
|
||||
|
||||
If req.Method = "OPTIONS" Then Return
|
||||
|
||||
Dim DB As String = "DB1"
|
||||
Connector = Main.Connectors.Get(DB)
|
||||
Dim con As SQL
|
||||
|
||||
Try
|
||||
Dim jsonString As String = req.GetParameter("j")
|
||||
If jsonString = Null Or jsonString = "" Then
|
||||
SendErrorResponse(resp, 400, "Missing 'j' parameter")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim parser As JSONParser
|
||||
parser.Initialize(jsonString)
|
||||
Dim RootMap As Map = parser.NextObject
|
||||
|
||||
Dim execType As String = RootMap.GetDefault("exec", "")
|
||||
Dim queryName As String = RootMap.Get("query")
|
||||
Dim paramsMap As Map = RootMap.Get("params")
|
||||
|
||||
If RootMap.Get("dbx") <> Null Then DB = RootMap.Get("dbx") ' Si se especifica, usamos la BD indicada, si no, usamos "DB1".
|
||||
|
||||
' Log("RootMap: " & RootMap)
|
||||
' Log("LA BD: " & DB)
|
||||
' Log(Main.listaDeCP.size)
|
||||
' Log("Contiene: " & Main.listaDeCP.IndexOf(DB))
|
||||
|
||||
If Main.listaDeCP.IndexOf(DB) = -1 Then
|
||||
SendErrorResponse(resp, 400, "Invalid 'DB' name. The '" & DB & "' name is not valid.")
|
||||
|
||||
End If
|
||||
|
||||
Dim paramKeys As List
|
||||
paramKeys.Initialize
|
||||
If paramsMap <> Null And paramsMap.IsInitialized Then
|
||||
For Each key As String In paramsMap.Keys
|
||||
paramKeys.Add(key)
|
||||
Next
|
||||
End If
|
||||
paramKeys.Sort(True)
|
||||
|
||||
Dim orderedParams As List
|
||||
orderedParams.Initialize
|
||||
For Each key As String In paramKeys
|
||||
orderedParams.Add(paramsMap.Get(key))
|
||||
Next
|
||||
|
||||
con = Connector.GetConnection(DB)
|
||||
Dim sqlCommand As String = Connector.GetCommand(DB, queryName)
|
||||
|
||||
If execType.ToLowerCase = "executequery" Then
|
||||
Dim rs As ResultSet
|
||||
|
||||
If sqlCommand.Contains("?") Then
|
||||
' =================================================================
|
||||
' === VALIDACIÓN DE CONTEO DE PARÁMETROS ==========================
|
||||
' =================================================================
|
||||
Dim expectedParams As Int = sqlCommand.Length - sqlCommand.Replace("?", "").Length
|
||||
Dim receivedParams As Int = orderedParams.Size
|
||||
If expectedParams <> receivedParams Then
|
||||
SendErrorResponse(resp, 400, $"Parameter count mismatch. The command '${queryName}' expects ${expectedParams} parameter(s), but received ${receivedParams}."$)
|
||||
Return ' Detenemos la ejecución antes de tocar la BD
|
||||
End If
|
||||
' =================================================================
|
||||
rs = con.ExecQuery2(sqlCommand, orderedParams)
|
||||
Else
|
||||
rs = con.ExecQuery(sqlCommand)
|
||||
End If
|
||||
|
||||
' --- Procesamiento de resultados (sin cambios) ---
|
||||
Dim ResultList As List
|
||||
ResultList.Initialize
|
||||
Dim jrs As JavaObject = rs
|
||||
Dim rsmd As JavaObject = jrs.RunMethod("getMetaData", Null)
|
||||
Dim cols As Int = rsmd.RunMethod("getColumnCount", Null)
|
||||
|
||||
Do While rs.NextRow
|
||||
Dim RowMap As Map
|
||||
RowMap.Initialize
|
||||
For i = 1 To cols
|
||||
Dim ColumnName As String = rsmd.RunMethod("getColumnName", Array(i))
|
||||
Dim value As Object = jrs.RunMethod("getObject", Array(i))
|
||||
RowMap.Put(ColumnName, value)
|
||||
Next
|
||||
ResultList.Add(RowMap)
|
||||
Loop
|
||||
rs.Close
|
||||
|
||||
SendSuccessResponse(resp, CreateMap("result": ResultList))
|
||||
Else If execType.ToLowerCase = "executecommand" Then
|
||||
If sqlCommand.Contains("?") Then
|
||||
' =================================================================
|
||||
' === VALIDACIÓN DE CONTEO DE PARÁMETROS (para Comandos) ==========
|
||||
' =================================================================
|
||||
Dim expectedParams As Int = sqlCommand.Length - sqlCommand.Replace("?", "").Length
|
||||
Dim receivedParams As Int = orderedParams.Size
|
||||
If expectedParams <> receivedParams Then
|
||||
SendErrorResponse(resp, 400, $"Parameter count mismatch. The command '${queryName}' expects ${expectedParams} parameter(s), but received ${receivedParams}."$)
|
||||
Return ' Detenemos la ejecución
|
||||
End If
|
||||
' =================================================================
|
||||
End If
|
||||
|
||||
con.ExecNonQuery2(sqlCommand, orderedParams)
|
||||
SendSuccessResponse(resp, CreateMap("message": "Command executed successfully"))
|
||||
|
||||
Else
|
||||
SendErrorResponse(resp, 400, "Invalid 'exec' value. Use '" & execType & "' is not valid.")
|
||||
End If
|
||||
|
||||
Catch
|
||||
Log(LastException)
|
||||
SendErrorResponse(resp, 500, LastException.Message)
|
||||
End Try
|
||||
|
||||
If con <> Null And con.IsInitialized Then
|
||||
con.Close
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
' --- Subrutinas de ayuda para respuestas JSON (sin cambios) ---
|
||||
Private Sub SendSuccessResponse(resp As ServletResponse, dataMap As Map)
|
||||
dataMap.Put("success", True)
|
||||
Dim jsonGenerator As JSONGenerator
|
||||
jsonGenerator.Initialize(dataMap)
|
||||
resp.ContentType = "application/json"
|
||||
resp.Write(jsonGenerator.ToString)
|
||||
End Sub
|
||||
|
||||
Private Sub SendErrorResponse(resp As ServletResponse, statusCode As Int, errorMessage As String)
|
||||
Dim resMap As Map = CreateMap("success": False, "error": errorMessage)
|
||||
Dim jsonGenerator As JSONGenerator
|
||||
jsonGenerator.Initialize(resMap)
|
||||
resp.Status = statusCode
|
||||
resp.ContentType = "application/json"
|
||||
resp.Write(jsonGenerator.ToString)
|
||||
End Sub
|
||||
130
DB2JsonHandler.bas
Normal file
130
DB2JsonHandler.bas
Normal file
@@ -0,0 +1,130 @@
|
||||
B4J=true
|
||||
Group=Default Group
|
||||
ModulesStructureVersion=1
|
||||
Type=Class
|
||||
Version=10.3
|
||||
@EndOfDesignText@
|
||||
'Handler class for JSON requests from Web Clients (JavaScript/axios)
|
||||
'VERSION 13 (Corrección Final): Soluciona "Miembro desconocido" usando jrs.RunMethod.
|
||||
Sub Class_Globals
|
||||
Private Connector As RDCConnector
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
End Sub
|
||||
|
||||
Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
' --- Headers CORS ---
|
||||
resp.SetHeader("Access-Control-Allow-Origin", "*")
|
||||
resp.SetHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||
resp.SetHeader("Access-Control-Allow-Headers", "Content-Type")
|
||||
|
||||
If req.Method = "OPTIONS" Then Return
|
||||
|
||||
Dim DB As String = "DB1"
|
||||
Connector = Main.Connectors.Get(DB)
|
||||
Dim con As SQL
|
||||
|
||||
Try
|
||||
Dim jsonString As String = req.GetParameter("j")
|
||||
If jsonString = Null Or jsonString = "" Then
|
||||
SendErrorResponse(resp, 400, "Missing 'j' parameter")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim parser As JSONParser
|
||||
parser.Initialize(jsonString)
|
||||
Dim RootMap As Map = parser.NextObject
|
||||
|
||||
Dim execType As String = RootMap.GetDefault("exec", "")
|
||||
Dim queryName As String = RootMap.Get("query")
|
||||
Dim paramsMap As Map = RootMap.Get("params")
|
||||
|
||||
Dim paramKeys As List
|
||||
paramKeys.Initialize
|
||||
If paramsMap <> Null And paramsMap.IsInitialized Then
|
||||
For Each key As String In paramsMap.Keys
|
||||
paramKeys.Add(key)
|
||||
Next
|
||||
End If
|
||||
paramKeys.Sort(True)
|
||||
|
||||
Dim orderedParams As List
|
||||
orderedParams.Initialize
|
||||
For Each key As String In paramKeys
|
||||
orderedParams.Add(paramsMap.Get(key))
|
||||
Next
|
||||
|
||||
con = Connector.GetConnection(DB)
|
||||
Dim sqlCommand As String = Connector.GetCommand(DB, queryName)
|
||||
|
||||
If execType.ToLowerCase = "executequery" Then
|
||||
Dim rs As ResultSet
|
||||
|
||||
If sqlCommand.Contains("?") Then
|
||||
rs = con.ExecQuery2(sqlCommand, orderedParams)
|
||||
Else
|
||||
rs = con.ExecQuery(sqlCommand)
|
||||
End If
|
||||
|
||||
Dim ResultList As List
|
||||
ResultList.Initialize
|
||||
Dim jrs As JavaObject = rs
|
||||
|
||||
Dim rsmd As JavaObject = jrs.RunMethod("getMetaData", Null)
|
||||
Dim cols As Int = rsmd.RunMethod("getColumnCount", Null)
|
||||
|
||||
Do While rs.NextRow
|
||||
Dim RowMap As Map
|
||||
RowMap.Initialize
|
||||
For i = 1 To cols
|
||||
Dim ColumnName As String = rsmd.RunMethod("getColumnName", Array(i))
|
||||
' =================================================================
|
||||
' === CORRECCIÓN "MIEMBRO DESCONOCIDO" ============================
|
||||
' =================================================================
|
||||
Dim value As Object = jrs.RunMethod("getObject", Array(i))
|
||||
RowMap.Put(ColumnName, value)
|
||||
Next
|
||||
ResultList.Add(RowMap)
|
||||
Loop
|
||||
rs.Close
|
||||
|
||||
SendSuccessResponse(resp, CreateMap("result": ResultList))
|
||||
|
||||
Else If execType.ToLowerCase = "executecommand" Then
|
||||
con.ExecNonQuery2(sqlCommand, orderedParams)
|
||||
SendSuccessResponse(resp, CreateMap("message": "Command executed successfully"))
|
||||
|
||||
Else
|
||||
SendErrorResponse(resp, 400, "Invalid 'exec' value. Use '" & execType & "' is not valid.")
|
||||
End If
|
||||
|
||||
Catch
|
||||
Log(LastException)
|
||||
SendErrorResponse(resp, 500, LastException.Message)
|
||||
End Try
|
||||
|
||||
If con <> Null And con.IsInitialized Then
|
||||
con.Close
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
' --- Subrutinas de ayuda para respuestas JSON (sin cambios) ---
|
||||
Private Sub SendSuccessResponse(resp As ServletResponse, dataMap As Map)
|
||||
dataMap.Put("success", True)
|
||||
Dim jsonGenerator As JSONGenerator
|
||||
jsonGenerator.Initialize(dataMap)
|
||||
resp.ContentType = "application/json"
|
||||
resp.Write(jsonGenerator.ToString)
|
||||
End Sub
|
||||
|
||||
Private Sub SendErrorResponse(resp As ServletResponse, statusCode As Int, errorMessage As String)
|
||||
If errorMessage.Contains("Índice de columnas no válido") Or errorMessage.Contains("ORA-17003") Then errorMessage = "NUMERO DE PARAMETROS EQUIVOCADO: " & errorMessage
|
||||
Dim resMap As Map = CreateMap("success": False, "error": errorMessage)
|
||||
Dim jsonGenerator As JSONGenerator
|
||||
jsonGenerator.Initialize(resMap)
|
||||
resp.Status = statusCode
|
||||
resp.ContentType = "application/json"
|
||||
resp.Write(jsonGenerator.ToString)
|
||||
End Sub
|
||||
15
Manager.bas
15
Manager.bas
@@ -22,7 +22,7 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
' rdcc.Initialize
|
||||
Private estaDB As String = ""
|
||||
' Log(Main.listaDeCP)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
For i = 0 To Main.listaDeCP.Size - 1
|
||||
Main.Connectors.Get(Main.listaDeCP.get(i)).As(RDCConnector).Initialize(Main.listaDeCP.get(i))
|
||||
If Main.listaDeCP.get(i) <> "DB1" Then estaDB = "." & Main.listaDeCP.get(i) Else estaDB = ""
|
||||
@@ -42,7 +42,7 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
' shl.WorkingDirectory = GlobalParameters.WorkingDirectory
|
||||
' shl.Run(-1)
|
||||
else If Command = "rsx" Then 'Reiniciamos el servidor DBReq
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
Log($"Ejecutamos ${File.DirApp}\start.bat"$)
|
||||
resp.Write($"Ejecutamos ${File.DirApp}\start.bat"$)
|
||||
Public shl As Shell
|
||||
@@ -50,13 +50,22 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
shl.WorkingDirectory = File.DirApp
|
||||
shl.Run(-1)
|
||||
else If Command = "rpm2" Then 'Reiniciamos el proceso DBReq en PM2
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
Log($"Ejecutamos ${File.DirApp}\reiniciaProcesoPM2.bat"$)
|
||||
resp.Write($"Ejecutamos ${File.DirApp}\reiniciaProcesoPM2.bat"$)
|
||||
Public shl As Shell
|
||||
shl.Initialize("shl","cmd",Array("/c",File.DirApp & "\reiniciaProcesoPM2.bat " & Main.srvr.Port))
|
||||
shl.WorkingDirectory = File.DirApp
|
||||
shl.Run(-1)
|
||||
else If Command = "reviveBow" Then 'Reiniciamos el proceso DBReq en PM2
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
Log($"Ejecutamos ${File.DirApp}\reiniciaProcesoBow.bat"$)
|
||||
resp.Write($"Ejecutamos ${File.DirApp}\reiniciaProcesoBow.bat<br><br>"$)
|
||||
resp.Write($"!!!BOW REINICIANDO!!!"$)
|
||||
Public shl As Shell
|
||||
shl.Initialize("shl","cmd",Array("/c",File.DirApp & "\reiniciaProcesoBow.bat " & Main.srvr.Port))
|
||||
shl.WorkingDirectory = File.DirApp
|
||||
shl.Run(-1)
|
||||
else If Command = "paused" Then
|
||||
GlobalParameters.IsPaused = 1
|
||||
else If Command = "continue" Then
|
||||
|
||||
@@ -19,7 +19,7 @@ Public Sub Initialize(DB As String)
|
||||
' Log("RDCConnector Initialize")
|
||||
If DB.EqualsIgnoreCase("DB1") Then DB = "" 'Esto para el config.properties por default
|
||||
Dim config As Map = LoadConfigMap(DB)
|
||||
Log($"Inicializamos ${DB}, usuario: ${config.Get("User")}"$)
|
||||
Log($"Inicializamos ${DB}, usuario: ${config.Get("User")} - Puerto: ${config.Get("ServerPort")}"$)
|
||||
pool.Initialize(config.Get("DriverClass"), config.Get("JdbcUrl"), config.Get("User"), config.Get("Password"))
|
||||
Dim jo As JavaObject = pool
|
||||
jo.RunMethod("setMaxPoolSize", Array(5)) 'number of concurrent connections
|
||||
@@ -100,8 +100,8 @@ Public Sub GetCommand(DB As String, Key As String) As String
|
||||
If commands.ContainsKey("sql." & Key) = False Then
|
||||
Log("*** Command not found: " & Key)
|
||||
End If
|
||||
Log("**** " & Key & " ****")
|
||||
Log(commands.Get("sql." & Key))
|
||||
Log("========= Traemos """ & Key & """ ==========")
|
||||
Log(">>>>>> " & commands.Get("sql." & Key) & " <<<<<<")
|
||||
Return commands.Get("sql." & Key)
|
||||
End Sub
|
||||
|
||||
@@ -109,7 +109,7 @@ Public Sub GetConnection(DB As String) As SQL
|
||||
Log("============= GetConnection ============= ")
|
||||
If DB.EqualsIgnoreCase("DB1") Then DB = "" 'Esto para el config.properties or default
|
||||
If DebugQueries Then LoadSQLCommands(LoadConfigMap(DB), DB)
|
||||
Log("regresamos 0")
|
||||
' Log("regresamos 0")
|
||||
Return pool.GetConnection
|
||||
End Sub
|
||||
|
||||
@@ -123,7 +123,7 @@ Private Sub LoadSQLCommands(config2 As Map, DB As String)
|
||||
End If
|
||||
Next
|
||||
commands = newCommands
|
||||
Log(commands)
|
||||
' Log(commands)
|
||||
' Log($"Inicializado: ${DB} "$ & Main.commandsMap.IsInitialized)
|
||||
Main.commandsMap.Put(DB, commands)
|
||||
End Sub
|
||||
|
||||
@@ -16,7 +16,7 @@ End Sub
|
||||
Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
Log("TEST")
|
||||
resp.ContentType = "text/html"
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
resp.Write($"RemoteServer is running on port <strong>${Main.srvr.Port}</strong> ($DateTime{DateTime.Now})<br/>"$)
|
||||
Try
|
||||
' Dim con As SQL = Main.rdcConnectorDB1.GetConnection("")
|
||||
|
||||
77
config.DB2.properties
Normal file
77
config.DB2.properties
Normal file
@@ -0,0 +1,77 @@
|
||||
#Lines starting with '#' are comments.
|
||||
#Backslash character at the end of line means that the command continues in the next line.
|
||||
|
||||
DriverClass=oracle.jdbc.driver.OracleDriver
|
||||
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
|
||||
|
||||
#SQL Server
|
||||
#DriverClass=net.sourceforge.jtds.jdbc.Driver
|
||||
|
||||
# este para produccion GHAN JdbcUrl=jdbc:oracle:thin:@//192.168.15.53:1521/DBKMT
|
||||
#GOHAN ---> server
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.205:1521/DBKMT
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.236:1521/DBKMT
|
||||
JdbcUrl=jdbc:oracle:thin:@//192.168.101.13:1521/DBKMT
|
||||
|
||||
# SVR-KEYMON-PRODUCCION--> Usuario
|
||||
User=SALMA
|
||||
Password=SALMAD2016M
|
||||
|
||||
#User=TORRADOCONAUTO
|
||||
#Password=TORRADOCONAUTOD2016M
|
||||
|
||||
|
||||
#--> Puertos
|
||||
#SAC - DFR - MDA / GOHAN -->COBRANZA
|
||||
#ServerPort=1783
|
||||
#GUNA - SALMA - DURAKELO - DBC / SVR-KEYMON-PRODUCCION --> DISTRIBUIDORAS
|
||||
ServerPort=9010
|
||||
#CMG - TORRADO / TRUNKS -->COBRANZA/ GM
|
||||
#ServerPort=1781
|
||||
|
||||
#If Debug is true then this file will be reloaded on every query.
|
||||
#This is useful if you need to modify the queries.
|
||||
Debug=true
|
||||
|
||||
#SQL COMMANDS
|
||||
|
||||
##################
|
||||
#################
|
||||
################ S O P O R T E
|
||||
#################
|
||||
##################
|
||||
|
||||
sql.traeConexion=select 'DB2' as conexion from dual
|
||||
sql.select_soporte=select * from GUNA.soporte
|
||||
sql.select_conexion=SELECT 'OK' AS VALOR FROM DUAL
|
||||
|
||||
sql.select_almacenes_KELL=select CAT_AG_ID, CAT_AG_NOMBRE from KELLOGGS.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_GUNA=select CAT_AG_ID, CAT_AG_NOMBRE from GUNA.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_SALMA=select CAT_AG_ID, CAT_AG_NOMBRE from SALMA.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_DANVIT=select CAT_AG_ID, CAT_AG_NOMBRE from DANVIT.cat_agencias order by CAT_AG_NOMBRE
|
||||
|
||||
sql.proc_QUITAR_VENTA_KELL=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_QUITAR_VENTA_X_TIPO( '''||(?)||''', '''||(?)||''', '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_GUNA=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN GUNA.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS, '''||(?)||'''); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_SALMA=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN SALMA.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_DANVIT=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN DANVIT.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_PAGOPAGARE_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_ELIMINAS_PAGOS_PAGARES_REP( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_LIBERA_BANDERA_FACTURACION_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_LIBERA_FACTURACION(Cursor_SYS); end;'); END;
|
||||
sql.proc_LIBERA_BANDERA_CARGAFORANEA_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_LLENAR_FILTROS ( '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
|
||||
|
||||
sql.proc_QUITAR_TICKET_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_QUITAR_TICKET( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
|
||||
sql.revisa_liquidada_Guna=SELECT COUNT(*) as liquidada FROM GUNA.HIST_VENTAS_DETALLE WHERE trunc(HVD_DTESYNC) = trunc(sysdate) and hvd_almacen = (?) and hvd_ruta = (?) AND (HVD_DESCUENTO != 0 or HVD_FECHA_AVION IS NOT NULL)
|
||||
sql.revisa_liquidada_Kell=SELECT COUNT(*) as liquidada FROM KELLOGGS.HIST_VENTAS_DETALLE WHERE trunc(HVD_DTESYNC) = trunc(sysdate) and hvd_almacen = (?) and hvd_ruta = (?) and HVD_TIPOVENTA = (?) AND HVD_ESTATUS = 'Liquidado'
|
||||
|
||||
sql.select_todos_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_lo_ruta from cat_logins left join cat_agencias on cat_lo_agencia = cat_ag_id where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_lo_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosGUNA_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from cat_logins left join cat_agencias on cat_lo_agencia = cat_ag_id left join cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosKELLOGGS_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from KELLOGGS.cat_logins left join KELLOGGS.cat_agencias on cat_lo_agencia = cat_ag_id left join KELLOGGS.cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosSALMA_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_lo_ruta as cat_ru_ruta from SALMA.cat_logins left join SALMA.cat_agencias on cat_lo_agencia = cat_ag_id where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_lo_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosDANVIT_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from DANVIT.cat_logins left join DANVIT.cat_agencias on cat_lo_agencia = cat_ag_id left join DANVIT.cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_ventaXrutaGuna_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaKelloggs_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from KELLOGGS.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) and hvd_tipoventa=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaSalma_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from SALMA.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaDanvit_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from DANVIT.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_prodsTicket_Kelloggs=SELECT HVD_CLIENTE CLIENTE, HVD_PROID PRODUCTO_ID, HVD_PRONOMBRE NOMBRE_PRODUCTO, HVD_CANT CANTIDAD, HVD_COSTO_TOT COSTO_TOTAL, HVD_RUTA RUTA, HVD_CODPROMO CODPROMO,NVL(HVD_TIPOVENTA,' ') TIPOVENTA, NVL(HVD_ESTATUS,' ') ESTATUS, hvd_cedis FROM KELLOGGS.HIST_VENTAS_DETALLE WHERE TRUNC(HVD_FECHA) = TRUNC(SYSDATE) AND HVD_ALMACEN = (?) AND HVD_CLIENTE = (?) and hvd_rechazo is null ORDER BY HVD_CODPROMO, HVD_PRONOMBRE
|
||||
|
||||
76
config.DB3.properties
Normal file
76
config.DB3.properties
Normal file
@@ -0,0 +1,76 @@
|
||||
#Lines starting with '#' are comments.
|
||||
#Backslash character at the end of line means that the command continues in the next line.
|
||||
|
||||
DriverClass=oracle.jdbc.driver.OracleDriver
|
||||
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
|
||||
|
||||
#SQL Server
|
||||
#DriverClass=net.sourceforge.jtds.jdbc.Driver
|
||||
|
||||
# este para produccion GHAN JdbcUrl=jdbc:oracle:thin:@//192.168.15.53:1521/DBKMT
|
||||
#GOHAN ---> server
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.205:1521/DBKMT
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.236:1521/DBKMT
|
||||
JdbcUrl=jdbc:oracle:thin:@//192.168.101.12:1521/DBKMT
|
||||
|
||||
|
||||
# SVR-KEYMON-PRODUCCION--> Usuario
|
||||
#User=GUNA
|
||||
#Password=GUNAD2015M
|
||||
|
||||
User=TORRADOCONAUTO
|
||||
Password=TORRADOCONAUTOD2016M
|
||||
|
||||
#--> Puertos
|
||||
#SAC - DFR - MDA / GOHAN -->COBRANZA
|
||||
#ServerPort=1783
|
||||
#GUNA - SALMA - DURAKELO - DBC / SVR-KEYMON-PRODUCCION --> DISTRIBUIDORAS
|
||||
ServerPort=9010
|
||||
#CMG - TORRADO / TRUNKS -->COBRANZA/ GM
|
||||
#ServerPort=1781
|
||||
|
||||
#If Debug is true then this file will be reloaded on every query.
|
||||
#This is useful if you need to modify the queries.
|
||||
Debug=true
|
||||
|
||||
#SQL COMMANDS
|
||||
|
||||
##################
|
||||
#################
|
||||
################ S O P O R T E
|
||||
#################
|
||||
##################
|
||||
|
||||
sql.traeConexion=select 'DB3' as conexion from dual
|
||||
sql.select_soporte=select * from GUNA.soporte
|
||||
|
||||
sql.select_almacenes_KELL=select CAT_AG_ID, CAT_AG_NOMBRE from KELLOGGS.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_GUNA=select CAT_AG_ID, CAT_AG_NOMBRE from GUNA.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_SALMA=select CAT_AG_ID, CAT_AG_NOMBRE from SALMA.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_DANVIT=select CAT_AG_ID, CAT_AG_NOMBRE from DANVIT.cat_agencias order by CAT_AG_NOMBRE
|
||||
|
||||
sql.proc_QUITAR_VENTA_KELL=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_QUITAR_VENTA_X_TIPO( '''||(?)||''', '''||(?)||''', '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_GUNA=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN GUNA.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS, '''||(?)||'''); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_SALMA=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN SALMA.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_DANVIT=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN DANVIT.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_PAGOPAGARE_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_ELIMINAS_PAGOS_PAGARES_REP( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_LIBERA_BANDERA_FACTURACION_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_LIBERA_FACTURACION(Cursor_SYS); end;'); END;
|
||||
sql.proc_LIBERA_BANDERA_CARGAFORANEA_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_LLENAR_FILTROS ( '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
|
||||
|
||||
sql.proc_QUITAR_TICKET_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_QUITAR_TICKET( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
|
||||
sql.revisa_liquidada_Guna=SELECT COUNT(*) as liquidada FROM GUNA.HIST_VENTAS_DETALLE WHERE trunc(HVD_DTESYNC) = trunc(sysdate) and hvd_almacen = (?) and hvd_ruta = (?) AND (HVD_DESCUENTO != 0 or HVD_FECHA_AVION IS NOT NULL)
|
||||
sql.revisa_liquidada_Kell=SELECT COUNT(*) as liquidada FROM KELLOGGS.HIST_VENTAS_DETALLE WHERE trunc(HVD_DTESYNC) = trunc(sysdate) and hvd_almacen = (?) and hvd_ruta = (?) and HVD_TIPOVENTA = (?) AND HVD_ESTATUS = 'Liquidado'
|
||||
|
||||
sql.select_todos_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_lo_ruta from cat_logins left join cat_agencias on cat_lo_agencia = cat_ag_id where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_lo_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosGUNA_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from cat_logins left join cat_agencias on cat_lo_agencia = cat_ag_id left join cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosKELLOGGS_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from KELLOGGS.cat_logins left join KELLOGGS.cat_agencias on cat_lo_agencia = cat_ag_id left join KELLOGGS.cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosSALMA_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_lo_ruta as cat_ru_ruta from SALMA.cat_logins left join SALMA.cat_agencias on cat_lo_agencia = cat_ag_id where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_lo_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosDANVIT_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from DANVIT.cat_logins left join DANVIT.cat_agencias on cat_lo_agencia = cat_ag_id left join DANVIT.cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_ventaXrutaGuna_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaKelloggs_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from KELLOGGS.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) and hvd_tipoventa=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaSalma_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from SALMA.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaDanvit_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from DANVIT.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_prodsTicket_Kelloggs=SELECT HVD_CLIENTE CLIENTE, HVD_PROID PRODUCTO_ID, HVD_PRONOMBRE NOMBRE_PRODUCTO, HVD_CANT CANTIDAD, HVD_COSTO_TOT COSTO_TOTAL, HVD_RUTA RUTA, HVD_CODPROMO CODPROMO,NVL(HVD_TIPOVENTA,' ') TIPOVENTA, NVL(HVD_ESTATUS,' ') ESTATUS, hvd_cedis FROM KELLOGGS.HIST_VENTAS_DETALLE WHERE TRUNC(HVD_FECHA) = TRUNC(SYSDATE) AND HVD_ALMACEN = (?) AND HVD_CLIENTE = (?) and hvd_rechazo is null ORDER BY HVD_CODPROMO, HVD_PRONOMBRE
|
||||
|
||||
77
config.DB4.properties
Normal file
77
config.DB4.properties
Normal file
@@ -0,0 +1,77 @@
|
||||
#Lines starting with '#' are comments.
|
||||
#Backslash character at the end of line means that the command continues in the next line.
|
||||
|
||||
DriverClass=oracle.jdbc.driver.OracleDriver
|
||||
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
|
||||
|
||||
#SQL Server
|
||||
#DriverClass=net.sourceforge.jtds.jdbc.Driver
|
||||
|
||||
# este para produccion GHAN JdbcUrl=jdbc:oracle:thin:@//192.168.15.53:1521/DBKMT
|
||||
#GOHAN ---> server
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.205:1521/DBKMT
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.236:1521/DBKMT
|
||||
JdbcUrl=jdbc:oracle:thin:@//192.168.101.13:1521/DBKMT
|
||||
|
||||
# SVR-KEYMON-PRODUCCION--> Usuario
|
||||
User=SALMA
|
||||
Password=SALMAD2016M
|
||||
|
||||
#User=TORRADOCONAUTO
|
||||
#Password=TORRADOCONAUTOD2016M
|
||||
|
||||
|
||||
#--> Puertos
|
||||
#SAC - DFR - MDA / GOHAN -->COBRANZA
|
||||
#ServerPort=1783
|
||||
#GUNA - SALMA - DURAKELO - DBC / SVR-KEYMON-PRODUCCION --> DISTRIBUIDORAS
|
||||
ServerPort=9000
|
||||
#CMG - TORRADO / TRUNKS -->COBRANZA/ GM
|
||||
#ServerPort=1781
|
||||
|
||||
#If Debug is true then this file will be reloaded on every query.
|
||||
#This is useful if you need to modify the queries.
|
||||
Debug=true
|
||||
|
||||
#SQL COMMANDS
|
||||
|
||||
##################
|
||||
#################
|
||||
################ S O P O R T E
|
||||
#################
|
||||
##################
|
||||
|
||||
sql.traeConexion=select 'DB4' as conexion from dual
|
||||
sql.select_soporte=select * from GUNA.soporte
|
||||
sql.select_conexion=SELECT 'OK' AS VALOR FROM DUAL
|
||||
|
||||
sql.select_almacenes_KELL=select CAT_AG_ID, CAT_AG_NOMBRE from KELLOGGS.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_GUNA=select CAT_AG_ID, CAT_AG_NOMBRE from GUNA.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_SALMA=select CAT_AG_ID, CAT_AG_NOMBRE from SALMA.cat_agencias order by CAT_AG_NOMBRE
|
||||
sql.select_almacenes_DANVIT=select CAT_AG_ID, CAT_AG_NOMBRE from DANVIT.cat_agencias order by CAT_AG_NOMBRE
|
||||
|
||||
sql.proc_QUITAR_VENTA_KELL=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_QUITAR_VENTA_X_TIPO( '''||(?)||''', '''||(?)||''', '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_GUNA=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN GUNA.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS, '''||(?)||'''); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_SALMA=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN SALMA.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_VENTA_DANVIT=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN DANVIT.SP_QUITAR_VENTA( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_QUITAR_PAGOPAGARE_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_ELIMINAS_PAGOS_PAGARES_REP( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
sql.proc_LIBERA_BANDERA_FACTURACION_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_LIBERA_FACTURACION(Cursor_SYS); end;'); END;
|
||||
sql.proc_LIBERA_BANDERA_CARGAFORANEA_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_LLENAR_FILTROS ( '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
|
||||
|
||||
sql.proc_QUITAR_TICKET_KELLOGGS=BEGIN EXECUTE IMMEDIATE ('DECLARE Cursor_SYS Sys_Refcursor; BEGIN KELLOGGS.SP_QUITAR_TICKET( '''||(?)||''', '''||(?)||''', '''||(?)||''', Cursor_SYS); end;'); END;
|
||||
|
||||
sql.revisa_liquidada_Guna=SELECT COUNT(*) as liquidada FROM GUNA.HIST_VENTAS_DETALLE WHERE trunc(HVD_DTESYNC) = trunc(sysdate) and hvd_almacen = (?) and hvd_ruta = (?) AND (HVD_DESCUENTO != 0 or HVD_FECHA_AVION IS NOT NULL)
|
||||
sql.revisa_liquidada_Kell=SELECT COUNT(*) as liquidada FROM KELLOGGS.HIST_VENTAS_DETALLE WHERE trunc(HVD_DTESYNC) = trunc(sysdate) and hvd_almacen = (?) and hvd_ruta = (?) and HVD_TIPOVENTA = (?) AND HVD_ESTATUS = 'Liquidado'
|
||||
|
||||
sql.select_todos_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_lo_ruta from cat_logins left join cat_agencias on cat_lo_agencia = cat_ag_id where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_lo_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosGUNA_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from cat_logins left join cat_agencias on cat_lo_agencia = cat_ag_id left join cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosKELLOGGS_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from KELLOGGS.cat_logins left join KELLOGGS.cat_agencias on cat_lo_agencia = cat_ag_id left join KELLOGGS.cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosSALMA_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_lo_ruta as cat_ru_ruta from SALMA.cat_logins left join SALMA.cat_agencias on cat_lo_agencia = cat_ag_id where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_lo_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_todosDANVIT_soporte=select cat_lo_usuario, cat_lo_estatus, cat_lo_nombre, cat_lo_contrasena, cat_lo_agencia, cat_agencias.cat_ag_nombre, cat_ru_ruta from DANVIT.cat_logins left join DANVIT.cat_agencias on cat_lo_agencia = cat_ag_id left join DANVIT.cat_rutas on cat_lo_usuario = cat_ru_vendedor where (cat_lo_usuario LIKE ('%'||(?)||'%') or cat_lo_nombre LIKE ('%'||(?)||'%')) and cat_ag_nombre LIKE ('%'||(?)||'%') and cat_ru_ruta LIKE ('%'||(?)||'%') and rownum <= 20
|
||||
sql.select_ventaXrutaGuna_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaKelloggs_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from KELLOGGS.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) and hvd_tipoventa=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaSalma_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from SALMA.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_ventaXrutaDanvit_soporte=select hvd_ruta, sum(hvd_costo_tot) as monto, hvd_tipoventa from DANVIT.hist_ventas_detalle where trunc(hvd_fecha)=trunc(sysdate) and hvd_ruta=(?) and hvd_almacen=(?) AND hvd_codpromo <> 'BASICA' group by hvd_ruta, hvd_tipoventa
|
||||
sql.select_prodsTicket_Kelloggs=SELECT HVD_CLIENTE CLIENTE, HVD_PROID PRODUCTO_ID, HVD_PRONOMBRE NOMBRE_PRODUCTO, HVD_CANT CANTIDAD, HVD_COSTO_TOT COSTO_TOTAL, HVD_RUTA RUTA, HVD_CODPROMO CODPROMO,NVL(HVD_TIPOVENTA,' ') TIPOVENTA, NVL(HVD_ESTATUS,' ') ESTATUS, hvd_cedis FROM KELLOGGS.HIST_VENTAS_DETALLE WHERE TRUNC(HVD_FECHA) = TRUNC(SYSDATE) AND HVD_ALMACEN = (?) AND HVD_CLIENTE = (?) and hvd_rechazo is null ORDER BY HVD_CODPROMO, HVD_PRONOMBRE
|
||||
|
||||
49
config.properties
Normal file
49
config.properties
Normal file
@@ -0,0 +1,49 @@
|
||||
#Lines starting with '#' are comments.
|
||||
#Backslash character at the end of line means that the command continues in the next line.
|
||||
|
||||
DriverClass=oracle.jdbc.driver.OracleDriver
|
||||
#JdbcUrl=jdbc:mysql://localhost/test?characterEncoding=utf8
|
||||
|
||||
#SQL Server
|
||||
#DriverClass=net.sourceforge.jtds.jdbc.Driver
|
||||
|
||||
# este para produccion GHAN JdbcUrl=jdbc:oracle:thin:@//192.168.15.53:1521/DBKMT
|
||||
#GOHAN ---> server
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.205:1521/DBKMT
|
||||
#JdbcUrl=jdbc:oracle:thin:@//10.0.0.236:1521/DBKMT
|
||||
JdbcUrl=jdbc:oracle:thin:@//192.168.101.10:1521/DBKMT?oracle.jdbc.defaultClientIdentifier=jRDC_Multi
|
||||
|
||||
|
||||
# SVR-KEYMON-PRODUCCION--> Usuario
|
||||
User=GUNA
|
||||
Password=GUNAD2015M
|
||||
|
||||
#User=TORRADOCONAUTO
|
||||
#Password=TORRADOCONAUTOD2016M
|
||||
|
||||
|
||||
#--> Puertos
|
||||
#SAC - DFR - MDA / GOHAN -->COBRANZA
|
||||
#ServerPort=1783
|
||||
#GUNA - SALMA - DURAKELO - DBC / SVR-KEYMON-PRODUCCION --> DISTRIBUIDORAS
|
||||
ServerPort=9010
|
||||
#CMG - TORRADO / TRUNKS -->COBRANZA/ GM
|
||||
#ServerPort=1781
|
||||
|
||||
#If Debug is true then this file will be reloaded on every query.
|
||||
#This is useful if you need to modify the queries.
|
||||
Debug=true
|
||||
|
||||
#SQL COMMANDS
|
||||
|
||||
##################
|
||||
#################
|
||||
################ S O P O R T E
|
||||
#################
|
||||
##################
|
||||
|
||||
sql.select_revisaClienteCredito_GUNA2=select (select count(CAT_CL_CODIGO) from GUNA.CAT_CLIENTES where CAT_CL_CODIGO = ? and CAT_CL_IDALMACEN <> '100') as cuantos, (select count(ID_CLIENTE) from GUNA.CAT_CLIENTES_CREDITO where ID_CLIENTE = ?) as cuantosCredito from DUAL
|
||||
|
||||
sql.traeConexion=select 'DB1' as conexion from dual
|
||||
sql.select_soporte=select * from GUNA.soporte
|
||||
sql.select_conexion=SELECT 'OK' AS VALOR FROM DUAL
|
||||
@@ -3,25 +3,28 @@ Build1=Default,b4j.JRDCMulti
|
||||
File1=config.properties
|
||||
FileGroup1=Default Group
|
||||
Group=Default Group
|
||||
Library1=javaobject
|
||||
Library2=jcore
|
||||
Library3=jrandomaccessfile
|
||||
Library4=jserver
|
||||
Library5=jshell
|
||||
Library6=json
|
||||
Library7=jsql
|
||||
Library8=byteconverter
|
||||
Library1=byteconverter
|
||||
Library2=javaobject
|
||||
Library3=jcore
|
||||
Library4=jrandomaccessfile
|
||||
Library5=jserver
|
||||
Library6=jshell
|
||||
Library7=json
|
||||
Library8=jsql
|
||||
Module1=DB1Handler
|
||||
Module2=DB2Handler
|
||||
Module3=DB3Handler
|
||||
Module4=DB4Handler
|
||||
Module5=GlobalParameters
|
||||
Module6=Manager
|
||||
Module7=RDCConnector
|
||||
Module8=TestHandler
|
||||
Module10=RDCConnector
|
||||
Module11=TestHandler
|
||||
Module2=DB1JsonHandler
|
||||
Module3=DB2Handler
|
||||
Module4=DB2JsonHandler
|
||||
Module5=DB3Handler
|
||||
Module6=DB4Handler
|
||||
Module7=GlobalParameters
|
||||
Module8=Manager
|
||||
Module9=ping
|
||||
NumberOfFiles=1
|
||||
NumberOfLibraries=8
|
||||
NumberOfModules=8
|
||||
NumberOfModules=11
|
||||
Version=10.3
|
||||
@EndOfDesignText@
|
||||
'Non-UI application (console / server application)
|
||||
@@ -48,12 +51,13 @@ Version=10.3
|
||||
|
||||
Sub Process_Globals
|
||||
Public srvr As Server
|
||||
Public const VERSION As Float = 2.23
|
||||
Public const VERSION As String = "5.08.12"
|
||||
Type DBCommand (Name As String, Parameters() As Object)
|
||||
Type DBResult (Tag As Object, Columns As Map, Rows As List)
|
||||
Dim listaDeCP As List
|
||||
Dim cpFiles As List
|
||||
Public Connectors, commandsMap As Map
|
||||
Dim onPing As Boolean = False
|
||||
End Sub
|
||||
|
||||
Sub AppStart (Args() As String)
|
||||
@@ -89,9 +93,9 @@ Sub AppStart (Args() As String)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
srvr.AddHandler("/ping", "ping", False) ' Agrega un manejador a la ruta "/test", asignando las solicitudes a la clase TestHandler, el último parámetro indica si el manejador debe ejecutar en un nuevo hilo (False en este caso)
|
||||
srvr.AddHandler("/test", "TestHandler", False) ' Agrega un manejador a la ruta "/test", asignando las solicitudes a la clase TestHandler, el último parámetro indica si el manejador debe ejecutar en un nuevo hilo (False en este caso)
|
||||
srvr.AddHandler("/manager", "Manager", False)
|
||||
srvr.AddHandler("/*", "DB1Handler", False) ' Si no se especifica una base de datos, entonces asignamos la solicitud a la DB1.
|
||||
srvr.AddHandler("/db1", "DB1Handler", False)
|
||||
srvr.AddHandler("/DB1", "DB1Handler", False)
|
||||
srvr.AddHandler("/db2", "DB2Handler", False)
|
||||
@@ -100,9 +104,12 @@ Sub AppStart (Args() As String)
|
||||
srvr.AddHandler("/DB3", "DB3Handler", False)
|
||||
srvr.AddHandler("/db4", "DB4Handler", False)
|
||||
srvr.AddHandler("/DB4", "DB4Handler", False)
|
||||
srvr.AddHandler("/DBJ", "DB1JsonHandler", False)
|
||||
srvr.AddHandler("/dbrquery", "DB1JsonHandler", False)
|
||||
srvr.AddHandler("/*", "DB1Handler", False) ' Si no se especifica una base de datos, entonces asignamos la solicitud a la DB1.
|
||||
srvr.Start
|
||||
Log("===========================================================")
|
||||
Log($"-=== jRDC is running on port: ${srvr.port} (version = $1.2{VERSION}) ===-"$)
|
||||
Log($"-======== jRDC is running on port: ${srvr.port} (Version: ${VERSION}) ========-"$)
|
||||
Log("===========================================================")
|
||||
StartMessageLoop
|
||||
End Sub
|
||||
@@ -1,5 +1,7 @@
|
||||
ModuleBookmarks0=
|
||||
ModuleBookmarks1=
|
||||
ModuleBookmarks10=
|
||||
ModuleBookmarks11=
|
||||
ModuleBookmarks2=
|
||||
ModuleBookmarks3=
|
||||
ModuleBookmarks4=
|
||||
@@ -7,8 +9,11 @@ ModuleBookmarks5=
|
||||
ModuleBookmarks6=
|
||||
ModuleBookmarks7=
|
||||
ModuleBookmarks8=
|
||||
ModuleBookmarks9=
|
||||
ModuleBreakpoints0=
|
||||
ModuleBreakpoints1=
|
||||
ModuleBreakpoints10=
|
||||
ModuleBreakpoints11=
|
||||
ModuleBreakpoints2=
|
||||
ModuleBreakpoints3=
|
||||
ModuleBreakpoints4=
|
||||
@@ -16,8 +21,11 @@ ModuleBreakpoints5=
|
||||
ModuleBreakpoints6=
|
||||
ModuleBreakpoints7=
|
||||
ModuleBreakpoints8=
|
||||
ModuleBreakpoints9=
|
||||
ModuleClosedNodes0=
|
||||
ModuleClosedNodes1=
|
||||
ModuleClosedNodes1=7,10
|
||||
ModuleClosedNodes10=
|
||||
ModuleClosedNodes11=
|
||||
ModuleClosedNodes2=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes4=
|
||||
@@ -25,6 +33,7 @@ ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
NavigationStack=RDCConnector,LoadSQLCommands,110,2,Main,Process_Globals,30,0,TestHandler,Handle,27,0,RDCConnector,LoadConfigMap,82,1,RDCConnector,Class_Globals,6,0,RDCConnector,GetConnection,108,6,RDCConnector,GetCommand,100,0,RDCConnector,Initialize,59,6,Manager,Handle,20,0,Main,AppStart,45,6
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=ping,SendSuccessResponse,39,0,RDCConnector,GetConnection,102,0,RDCConnector,Initialize,11,0,RDCConnector,Class_Globals,9,0,Main,AppStart,65,6,Main,Process_Globals,30,5,ping,Initialize,9,0,ping,Handle,10,6,DB1Handler,Initialize,15,0,DB1Handler,Handle,48,6,Manager,Handle,16,5
|
||||
SelectedBuild=0
|
||||
VisibleModules=1,2,3,4,7,6,8
|
||||
VisibleModules=1,2,10,8,11,9
|
||||
|
||||
11
jRDC_Multi.config.js
Normal file
11
jRDC_Multi.config.js
Normal file
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
"apps":[
|
||||
{
|
||||
"name":"jRDC-Multi",
|
||||
"cwd":"C:/jRDC-Multi",
|
||||
"script":"C:/java/jdk-14.0.1/bin/JAVA.EXE",
|
||||
"args":"-jar C:/jRDC-Multi/jRDC_Multi.jar",
|
||||
"exec_interpreter":""
|
||||
}
|
||||
]
|
||||
}
|
||||
47
ping.bas
Normal file
47
ping.bas
Normal file
@@ -0,0 +1,47 @@
|
||||
B4J=true
|
||||
Group=Default Group
|
||||
ModulesStructureVersion=1
|
||||
Type=Class
|
||||
Version=10.3
|
||||
@EndOfDesignText@
|
||||
'Handler class for JSON requests from Web Clients (JavaScript/axios)
|
||||
'VERSION 14 (Validación de Parámetros): Chequea que el número de '?' coincida con los parámetros recibidos.
|
||||
Sub Class_Globals
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
' --- Headers CORS ---
|
||||
resp.SetHeader("Access-Control-Allow-Origin", "*")
|
||||
resp.SetHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS")
|
||||
resp.SetHeader("Access-Control-Allow-Headers", "Content-Type")
|
||||
Try
|
||||
SendSuccessResponse(resp, CreateMap("message": $"Pong ${DateTime.now}"$))
|
||||
Catch
|
||||
Log(LastException)
|
||||
SendErrorResponse(resp, 500, LastException.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
' --- Subrutinas de ayuda para respuestas JSON (sin cambios) ---
|
||||
Private Sub SendSuccessResponse(resp As ServletResponse, dataMap As Map)
|
||||
dataMap.Put("success", True)
|
||||
Dim jsonGenerator As JSONGenerator
|
||||
jsonGenerator.Initialize(dataMap)
|
||||
resp.ContentType = "application/json"
|
||||
resp.Write(jsonGenerator.ToString)
|
||||
End Sub
|
||||
|
||||
Private Sub SendErrorResponse(resp As ServletResponse, statusCode As Int, errorMessage As String)
|
||||
Dim resMap As Map = CreateMap("success": False, "error": errorMessage)
|
||||
Dim jsonGenerator As JSONGenerator
|
||||
jsonGenerator.Initialize(resMap)
|
||||
resp.Status = statusCode
|
||||
resp.ContentType = "application/json"
|
||||
resp.Write(jsonGenerator.ToString)
|
||||
End Sub
|
||||
9
reiniciaProcesoBow.bat
Normal file
9
reiniciaProcesoBow.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@rem Este script reinicia el proceso en PM2 del servidor de jRDC2
|
||||
|
||||
@rem estas lineas sirven para que el archivo bat corra en modo administrador.
|
||||
set "params=%*"
|
||||
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
|
||||
|
||||
pm2 restart BotSoporte_4.0
|
||||
|
||||
exit
|
||||
@@ -4,6 +4,6 @@
|
||||
set "params=%*"
|
||||
cd /d "%~dp0" && ( if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs" ) && fsutil dirty query %systemdrive% 1>nul 2>nul || ( echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "cmd.exe", "/k cd ""%~sdp0"" && ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs" && "%temp%\getadmin.vbs" && exit /B )
|
||||
|
||||
pm2 start RDC-Multi
|
||||
pm2 restart jRDC-Multi
|
||||
|
||||
exit
|
||||
Reference in New Issue
Block a user