Compare commits
5 Commits
ade3406b12
...
cfbc1ccc6b
| Author | SHA1 | Date |
|---|---|---|
|
|
cfbc1ccc6b | |
|
|
d7b11e1732 | |
|
|
9fb9e5da61 | |
|
|
ac6cc7c9ec | |
|
|
423ad06d8d |
|
|
@ -6,21 +6,13 @@
|
|||
package com.qsoft.wmp.services.rest;
|
||||
|
||||
import com.qsoft.dao.exception.DaoException;
|
||||
import com.qsoft.erp.constantes.DominioConstantes;
|
||||
import com.qsoft.erp.constantes.EntidadEnum;
|
||||
import com.qsoft.erp.dominio.AccionGenerica;
|
||||
import com.qsoft.erp.dominio.ConsultaGenerica;
|
||||
import com.qsoft.erp.dominio.exception.DominioExcepcion;
|
||||
import com.qsoft.erp.dto.PersonaPolizaDTO;
|
||||
import com.qsoft.util.constantes.CodigoRespuesta;
|
||||
import com.qsoft.util.constantes.ErrorTipo;
|
||||
import com.qsoft.util.ms.pojo.HeaderMS;
|
||||
import com.qsoft.wmp.services.util.ServiceUtil;
|
||||
import com.qsoft.wmp.services.xsd.EntradaAccion;
|
||||
import com.qsoft.wmp.services.xsd.EntradaConsulta;
|
||||
import com.qsoft.wmp.services.xsd.EntradaRecetas;
|
||||
import com.qsoft.wmp.services.xsd.SalidaAccion;
|
||||
import com.qsoft.wmp.services.xsd.SalidaAccionFarmaEnlace;
|
||||
import com.qsoft.wmp.services.xsd.SalidaConsulta;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,11 +9,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||
import com.qsoft.erp.constantes.DominioConstantes;
|
||||
import com.qsoft.erp.constantes.EntidadEnum;
|
||||
import com.qsoft.erp.dominio.AccionGenerica;
|
||||
import com.qsoft.erp.dto.DetalleEntradaDTO;
|
||||
import com.qsoft.erp.dto.DocumentoDTO;
|
||||
import com.qsoft.erp.dto.EstadoLiquidacionDTO;
|
||||
import com.qsoft.erp.dto.FacturaCompraDTO;
|
||||
import com.qsoft.erp.dto.LiquidacionDTO;
|
||||
import com.qsoft.erp.dto.AgendamientoDTO;
|
||||
import com.qsoft.erp.dto.EstadoAgendamientoDTO;
|
||||
import com.qsoft.wmp.services.rest.AccionResource;
|
||||
import com.qsoft.wmp.services.rest.ConsultaResource;
|
||||
import com.qsoft.wmp.services.xsd.EntradaAccion;
|
||||
|
|
@ -21,7 +18,6 @@ import com.qsoft.wmp.services.xsd.EntradaConsulta;
|
|||
import com.qsoft.wmp.services.xsd.SalidaConsulta;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -42,17 +38,17 @@ public class Tester {
|
|||
ObjectMapper maper = new ObjectMapper();
|
||||
EntradaConsulta entrada = new EntradaConsulta();
|
||||
entrada.getBodyIn().setTipoConsulta(1);
|
||||
entrada.getBodyIn().setEntidad(EntidadEnum.Liquidacion.name());
|
||||
entrada.getBodyIn().setEntidad(EntidadEnum.Agendamiento.name());
|
||||
|
||||
LiquidacionDTO ld = new LiquidacionDTO();
|
||||
List<DocumentoDTO> documentos = new ArrayList<>();
|
||||
List<EstadoLiquidacionDTO> estados = new ArrayList<>();
|
||||
documentos.add(new DocumentoDTO());
|
||||
estados.add(new EstadoLiquidacionDTO());
|
||||
ld.setDocumentos(documentos);
|
||||
ld.setEstados(estados);
|
||||
AgendamientoDTO dto = new AgendamientoDTO();
|
||||
|
||||
List<EstadoAgendamientoDTO> estados = new ArrayList<>();
|
||||
|
||||
estados.add(new EstadoAgendamientoDTO());
|
||||
|
||||
dto.setEstado(estados);
|
||||
Map<String, Object> parametros = new HashMap<>();
|
||||
parametros.put(EntidadEnum.Liquidacion.name(), ld);
|
||||
parametros.put(EntidadEnum.Agendamiento.name(), dto);
|
||||
|
||||
entrada.getBodyIn().setParametros(parametros);
|
||||
String s = maper.writeValueAsString(entrada);
|
||||
|
|
@ -70,7 +66,7 @@ public class Tester {
|
|||
ObjectMapper maper = new ObjectMapper();
|
||||
EntradaAccion entrada = new EntradaAccion();
|
||||
entrada.getBodyIn().setTipoAccion(AccionGenerica.GUARDA);
|
||||
entrada.getBodyIn().setEntidad(EntidadEnum.Auditoria.name());
|
||||
entrada.getBodyIn().setEntidad(EntidadEnum.Agendamiento.name());
|
||||
List<Map<String, Object>> entidades = new ArrayList<>();
|
||||
//TODO: agregar entidades
|
||||
entrada.getBodyIn().setEntidades(entidades);
|
||||
|
|
@ -79,23 +75,15 @@ public class Tester {
|
|||
System.out.println("JSON=> " + s);
|
||||
AccionResource ar = new AccionResource();
|
||||
System.out.println("POSTING....");
|
||||
List<FacturaCompraDTO> data = new ArrayList<>();
|
||||
List<AgendamientoDTO> data = new ArrayList<>();
|
||||
|
||||
FacturaCompraDTO factura = new FacturaCompraDTO();
|
||||
factura.setFacEstablecimiento("001");
|
||||
factura.setFacPtoEmision("001");
|
||||
factura.setFacSecuencial("00000095");
|
||||
factura.setFacFechaEmision(new Date());
|
||||
factura.setProCodigo(1);
|
||||
factura.setFacImporte(50.20);
|
||||
factura.setFacObservacion("Factura de prueba");
|
||||
|
||||
List<DetalleEntradaDTO> detalle = new ArrayList<>();
|
||||
AgendamientoDTO agenda = new AgendamientoDTO();
|
||||
List<EstadoAgendamientoDTO> detalle = new ArrayList<>();
|
||||
|
||||
detalle.add(new DetalleEntradaDTO());
|
||||
factura.setDetalle(detalle);
|
||||
detalle.add(new EstadoAgendamientoDTO());
|
||||
agenda.setEstado(detalle);
|
||||
|
||||
data.add(factura);
|
||||
data.add(agenda);
|
||||
|
||||
s = maper.writeValueAsString(data);
|
||||
System.out.println("JSON=> " + s);
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"headerIn": {
|
||||
"dispositivo": "WeLaptop",
|
||||
"canal": "01",
|
||||
"medio": "01",
|
||||
"aplicacion": "WeMedicalProV1.0",
|
||||
"tipoTransaccion": "0101110",
|
||||
"usuario": "james",
|
||||
"uuid": "ALGUN TOKEN",
|
||||
"fechaHora": null,
|
||||
"idioma": null,
|
||||
"empresa": null,
|
||||
"geolocalizacion": null
|
||||
},
|
||||
"bodyIn": {
|
||||
"tipoNotificacion": 1,
|
||||
"parametros": {
|
||||
"[ADJUNTO]": "/data/wmp/poliza/PREMIUM-signed.pdf",
|
||||
"[ASUNTO]": "Bienvenido al servicio de medicina Prepagada de Caridel",
|
||||
"[CLIENTE]": "EDISON RAMIRO",
|
||||
"[COBERTURA]": "25000.0",
|
||||
"[COMPROBANTE]": "POLIZA",
|
||||
"[EMAIL]": "karito_634@yahoo.es",
|
||||
"[EMISOR]": "CARIDEL S.A.",
|
||||
"[EMISOR_MAIL]": "notificaciones@caridelsa.com",
|
||||
"[EMISOR_WEB]": "http://cpnsalud.caridel.net/",
|
||||
"[FECHAEMI]": "01/04/2020 23:40:30",
|
||||
"[IDENTIFICACION]": "1002366654",
|
||||
"[NUMDOC]": "POL0000000332",
|
||||
"[PLAN]": "MASIVOS PREMIUN CPN"
|
||||
},
|
||||
"adjuntos": [
|
||||
{
|
||||
"nombre": "archivo1.pdf",
|
||||
"archivo": "UklGRoJgAABXRUJQVlA4IHZgAADQAwGdASoAAQABPjEUiEKiISEXq+4MIAMEtQBYU7REd+X/vH7S/lv8ndg......."
|
||||
},
|
||||
{
|
||||
"nombre": "archivo2.txt",
|
||||
"archivo": "zU4pk7xWlI3KLzi7huKBDIulPve0zFmNc30vUd3a29NIcoHBLRNxzamSywbh1dGBh2drEZI5qvE4WEvRutK5...."
|
||||
},
|
||||
{
|
||||
"nombre": "archivo3.jpg",
|
||||
"archivo": "3qwduvkya8kAXnvUbjh4X7oXRWt59pAIq+77Awuqo6CtaYmslelq0WZP9YG69Ons09NkwRKf5KFfEezMo+6VRyzpEln6qTMMUH0..."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
{
|
||||
"headerIn": {
|
||||
"dispositivo": "WeLaptop",
|
||||
"canal": null,
|
||||
"medio": null,
|
||||
"aplicacion": "WeMedicalProV1.0",
|
||||
"tipoTransaccion": "0101102",
|
||||
"tipoTransaccion": "0101114",
|
||||
"usuario": "1715060073",
|
||||
"uuid": "b5a66f87c713a14581ea",
|
||||
"fechaHora": null,
|
||||
|
|
@ -14,63 +15,40 @@
|
|||
},
|
||||
"bodyIn": {
|
||||
"tipoAccion": 1,
|
||||
"entidad": "DetalleLiquidacion",
|
||||
"entidad": "Agendamiento",
|
||||
"entidades": [
|
||||
{
|
||||
"preCodigo": 2,
|
||||
"liqCodigo": 251,
|
||||
"copCodigo": 589,
|
||||
"detTipo": 15006,
|
||||
"detCie10": 102,
|
||||
"delMedico": "Daniela Garcia",
|
||||
"delFacClaveAcceso": "",
|
||||
"delFacAutorizacion": "",
|
||||
"delServicio": "MEDICAMENTOS COMERCIALES (MARCA)",
|
||||
"delFecha": "10/09/2020",
|
||||
"delValorRegistrado": 245,
|
||||
"delFactura": "00100100005214",
|
||||
"detalle": [
|
||||
"ageFechaAgenda": null,
|
||||
"ageFechaCita": null,
|
||||
"ageFechaConfirma": null,
|
||||
"ageSintomas": null,
|
||||
"ageValor": null,
|
||||
"ageTelefono": null,
|
||||
"ageObservaciones": null,
|
||||
"ageNotificado": null,
|
||||
"ageEspecialidad": null,
|
||||
"ageMedico": null,
|
||||
"ageDocumentos": null,
|
||||
"ageAprobacion": null,
|
||||
"ageExamenes": null,
|
||||
"ageDiagnostico": null,
|
||||
"agePreexistencia": null,
|
||||
"ageIndicaciones": null,
|
||||
"locCodigo": null,
|
||||
"perBeneficiario": null,
|
||||
"polCodigo": null,
|
||||
"preCodigo": null,
|
||||
"detTipo": null,
|
||||
"usuCodigo": null,
|
||||
"estado": [
|
||||
{
|
||||
"talEstado": 1,
|
||||
"talDescripcion": "Detalle 1",
|
||||
"talCantidad": "1",
|
||||
"talValorRegistrado": 122
|
||||
}, {
|
||||
"talEstado": 1,
|
||||
"talDescripcion": "Descripcion 2",
|
||||
"talCantidad": "1",
|
||||
"talValorRegistrado": 123
|
||||
"esaObservaciones": null,
|
||||
"esaEstado": null,
|
||||
"detEstado": null,
|
||||
"usuCodigo": null
|
||||
}
|
||||
],
|
||||
"delEstado": 1
|
||||
}, {
|
||||
"preCodigo": 2,
|
||||
"liqCodigo": 251,
|
||||
"copCodigo": 580,
|
||||
"detTipo": 15002,
|
||||
"detCie10": 102,
|
||||
"delMedico": "Daniela Garcia",
|
||||
"delFacClaveAcceso": "",
|
||||
"delFacAutorizacion": "",
|
||||
"delServicio": "ATENCIÓN MÉDICA EN EL HOGAR",
|
||||
"delFecha": "10/09/2020",
|
||||
"delValorRegistrado": 245,
|
||||
"delFactura": "00100100005214",
|
||||
"detalle": [
|
||||
{
|
||||
"talEstado": 1,
|
||||
"talDescripcion": "Descripcion 3",
|
||||
"talCantidad": "1",
|
||||
"talValorRegistrado": 123
|
||||
}, {
|
||||
"talEstado": 1,
|
||||
"talDescripcion": "Descripcion 4",
|
||||
"talCantidad": "1",
|
||||
"talValorRegistrado": 122
|
||||
}
|
||||
],
|
||||
"delEstado": 1
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
#Generated by Maven
|
||||
#Tue Jul 28 11:32:06 ECT 2020
|
||||
#Mon Sep 28 13:53:51 ECT 2020
|
||||
groupId=com.qsoft
|
||||
artifactId=werp-services
|
||||
version=1.0-SNAPSHOT
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
-------------------------------------------------------------------------------
|
||||
Test set: com.qsoft.test.Tester
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.681 sec
|
||||
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.279 sec
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ function toggleAllBoxes() {
|
|||
<tr>
|
||||
<td>Tests passed/Failed/Skipped:</td><td>0/0/0</td>
|
||||
</tr><tr>
|
||||
<td>Started on:</td><td>Tue Jul 28 11:32:00 ECT 2020</td>
|
||||
<td>Started on:</td><td>Mon Sep 28 13:53:41 ECT 2020</td>
|
||||
</tr>
|
||||
<tr><td>Total time:</td><td>0 seconds (7 ms)</td>
|
||||
</tr><tr>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
|
||||
<testsuite ignored="0" hostname="localhost.localdomain" failures="0" tests="0" time="0.007" errors="0" timestamp="28 jul. 2020 16:32:00 GMT">
|
||||
<testsuite ignored="0" hostname="localhost.localdomain" failures="0" tests="0" time="0.007" errors="0" timestamp="28 sep. 2020 18:53:41 GMT">
|
||||
</testsuite>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<testng-results ignored="0" total="0" passed="0" failed="0" skipped="0">
|
||||
<reporter-output>
|
||||
</reporter-output>
|
||||
<suite started-at="2020-07-28T16:32:00Z" name="com.qsoft.test.Tester" finished-at="2020-07-28T16:32:00Z" duration-ms="7">
|
||||
<suite started-at="2020-09-28T18:53:41Z" name="com.qsoft.test.Tester" finished-at="2020-09-28T18:53:41Z" duration-ms="7">
|
||||
<groups>
|
||||
</groups>
|
||||
<test started-at="2020-07-28T16:32:00Z" name="Command line test" finished-at="2020-07-28T16:32:00Z" duration-ms="7">
|
||||
<test started-at="2020-09-28T18:53:41Z" name="Command line test" finished-at="2020-09-28T18:53:41Z" duration-ms="7">
|
||||
</test> <!-- Command line test -->
|
||||
</suite> <!-- com.qsoft.test.Tester -->
|
||||
</testng-results>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
|
||||
|
||||
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
|
||||
<servlet>
|
||||
<servlet-name>com.qsoft.wmp.services.rest.ApplicationConfig</servlet-name>
|
||||
<init-param>
|
||||
<param-name>jersey.config.server.provider.classnames</param-name>
|
||||
<param-value>org.glassfish.jersey.jackson.JacksonFeature</param-value>
|
||||
</init-param>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>com.qsoft.wmp.services.rest.ApplicationConfig</servlet-name>
|
||||
<url-pattern>/servicios/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue