Cambios contables
This commit is contained in:
parent
3a0ca4f706
commit
2b2c59ab28
|
|
@ -9,11 +9,16 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.qsoft.erp.constantes.DominioConstantes;
|
import com.qsoft.erp.constantes.DominioConstantes;
|
||||||
import com.qsoft.erp.constantes.EntidadEnum;
|
import com.qsoft.erp.constantes.EntidadEnum;
|
||||||
import com.qsoft.erp.dominio.AccionGenerica;
|
import com.qsoft.erp.dominio.AccionGenerica;
|
||||||
|
import com.qsoft.erp.dto.DescuentoFacturaDTO;
|
||||||
|
import com.qsoft.erp.dto.DetalleEntradaDTO;
|
||||||
|
import com.qsoft.erp.dto.DetalleFacturaDTO;
|
||||||
import com.qsoft.erp.dto.DocumentoDTO;
|
import com.qsoft.erp.dto.DocumentoDTO;
|
||||||
import com.qsoft.erp.dto.EstadoLiquidacionDTO;
|
import com.qsoft.erp.dto.EstadoLiquidacionDTO;
|
||||||
|
import com.qsoft.erp.dto.FacturaCompraDTO;
|
||||||
|
import com.qsoft.erp.dto.FacturaVentaDTO;
|
||||||
|
import com.qsoft.erp.dto.ImpuestoFacturaDTO;
|
||||||
import com.qsoft.erp.dto.LiquidacionDTO;
|
import com.qsoft.erp.dto.LiquidacionDTO;
|
||||||
import com.qsoft.erp.dto.RetencionDTO;
|
import com.qsoft.erp.model.FacturaCompra;
|
||||||
import com.qsoft.erp.dto.RubroRetenidoDTO;
|
|
||||||
import com.qsoft.wmp.services.rest.AccionResource;
|
import com.qsoft.wmp.services.rest.AccionResource;
|
||||||
import com.qsoft.wmp.services.rest.ConsultaResource;
|
import com.qsoft.wmp.services.rest.ConsultaResource;
|
||||||
import com.qsoft.wmp.services.xsd.EntradaAccion;
|
import com.qsoft.wmp.services.xsd.EntradaAccion;
|
||||||
|
|
@ -34,9 +39,10 @@ public class Tester {
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
System.out.println("TEST " + DominioConstantes.getDateTime());
|
System.out.println("TEST " + DominioConstantes.getDateTime());
|
||||||
testAccionService(); //0101154
|
testAccionService();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void testConsultaService() throws IOException {
|
public static void testConsultaService() throws IOException {
|
||||||
ObjectMapper maper = new ObjectMapper();
|
ObjectMapper maper = new ObjectMapper();
|
||||||
EntradaConsulta entrada = new EntradaConsulta();
|
EntradaConsulta entrada = new EntradaConsulta();
|
||||||
|
|
@ -69,7 +75,7 @@ public class Tester {
|
||||||
ObjectMapper maper = new ObjectMapper();
|
ObjectMapper maper = new ObjectMapper();
|
||||||
EntradaAccion entrada = new EntradaAccion();
|
EntradaAccion entrada = new EntradaAccion();
|
||||||
entrada.getBodyIn().setTipoAccion(AccionGenerica.GUARDA);
|
entrada.getBodyIn().setTipoAccion(AccionGenerica.GUARDA);
|
||||||
entrada.getBodyIn().setEntidad(EntidadEnum.Retencion.name());
|
entrada.getBodyIn().setEntidad(EntidadEnum.FacturaCompra.name());
|
||||||
List<Map<String, Object>> entidades = new ArrayList<>();
|
List<Map<String, Object>> entidades = new ArrayList<>();
|
||||||
//TODO: agregar entidades
|
//TODO: agregar entidades
|
||||||
entrada.getBodyIn().setEntidades(entidades);
|
entrada.getBodyIn().setEntidades(entidades);
|
||||||
|
|
@ -78,24 +84,23 @@ public class Tester {
|
||||||
System.out.println("JSON=> " + s);
|
System.out.println("JSON=> " + s);
|
||||||
AccionResource ar = new AccionResource();
|
AccionResource ar = new AccionResource();
|
||||||
System.out.println("POSTING....");
|
System.out.println("POSTING....");
|
||||||
List<RetencionDTO> data = new ArrayList<>();
|
List<FacturaCompraDTO> data = new ArrayList<>();
|
||||||
|
|
||||||
RetencionDTO retencion = new RetencionDTO();
|
FacturaCompraDTO factura = new FacturaCompraDTO();
|
||||||
retencion.setRetEstablecimiento("001");
|
factura.setFacEstablecimiento("001");
|
||||||
retencion.setRetPtoEmision("001");
|
factura.setFacPtoEmision("001");
|
||||||
retencion.setRetSecuencial("00000095");
|
factura.setFacSecuencial("00000095");
|
||||||
retencion.setRetFechaEmision(new Date());
|
factura.setFacFechaEmision(new Date());
|
||||||
retencion.setCliCodigo(1);
|
factura.setProCodigo(1);
|
||||||
retencion.setRetTotalRetenido(50.20);
|
factura.setFacImporte(50.20);
|
||||||
retencion.setRetReferencia("Retencion para factura de prueba");
|
factura.setFacObservacion("Factura de prueba");
|
||||||
|
|
||||||
|
List<DetalleEntradaDTO> detalle = new ArrayList<>();
|
||||||
|
|
||||||
|
detalle.add(new DetalleEntradaDTO());
|
||||||
|
factura.setDetalle(detalle);
|
||||||
|
|
||||||
List<RubroRetenidoDTO> detalle = new ArrayList<>();
|
data.add(factura);
|
||||||
|
|
||||||
detalle.add(new RubroRetenidoDTO());
|
|
||||||
retencion.setDetalle(detalle);
|
|
||||||
|
|
||||||
data.add(retencion);
|
|
||||||
|
|
||||||
s = maper.writeValueAsString(data);
|
s = maper.writeValueAsString(data);
|
||||||
System.out.println("JSON=> " + s);
|
System.out.println("JSON=> " + s);
|
||||||
|
|
|
||||||
|
|
@ -4,55 +4,141 @@
|
||||||
"canal": null,
|
"canal": null,
|
||||||
"medio": null,
|
"medio": null,
|
||||||
"aplicacion": "WeMedicalProV1.0",
|
"aplicacion": "WeMedicalProV1.0",
|
||||||
"tipoTransaccion": "0101154",
|
"tipoTransaccion": "0101113",
|
||||||
"usuario": "james",
|
"usuario": "james",
|
||||||
"uuid": "4a410b3e2eebc30e865d6935aec3481bb3d394d863b28157d6f06bcc280635bd",
|
"uuid": "08dd2f23c2503122ac3e915c1352eb694596528eb8996878886188373eff0a90",
|
||||||
"fechaHora": null,
|
"fechaHora": null,
|
||||||
"idioma": null,
|
"idioma": null,
|
||||||
"empresa": null,
|
"empresa": null,
|
||||||
"geolocalizacion": null
|
"geolocalizacion": null
|
||||||
},
|
},
|
||||||
"bodyIn": {
|
"bodyIn": {
|
||||||
"tipoAccion": 1,
|
"tipoAccion": 2,
|
||||||
"entidad": "Retencion",
|
"entidad": "Persona",
|
||||||
"entidades": [
|
"entidades": [{
|
||||||
{
|
"perCodigo": 2,
|
||||||
"retCodigo": null,
|
"detTipoIdentificacion": 3,
|
||||||
"retEstablecimiento": "001",
|
"perIdentificacion": "1715060073",
|
||||||
"retPtoEmision": "001",
|
"perApellidos": "Ruales",
|
||||||
"retSecuencial": "00000095",
|
"perNombres": "Jaime",
|
||||||
"retTotalBase": null,
|
"perFechaNacimiento": "10/07/1980",
|
||||||
"retAutorizacion": null,
|
"perDireccion": "TEST JAMES",
|
||||||
"retClaveAcceso": null,
|
"perNacionalidad": "Ecuatorianao",
|
||||||
"retFechaEmision": "01/07/2019 14:00:25",
|
"perMail": "test_updated@qsoftec.com",
|
||||||
"retFechaRegistro": null,
|
"detGenero": 17204,
|
||||||
"retFechaAutorizacion": null,
|
"locCodigo": "170150",
|
||||||
"retTotalRetenido": 50.2,
|
"telefono": [
|
||||||
"retReferencia": "Retencion para factura de prueba",
|
|
||||||
"retEstado": null,
|
|
||||||
"detTipo": null,
|
|
||||||
"facCodigo": null,
|
|
||||||
"favCodigo": null,
|
|
||||||
"usuCodigo": null,
|
|
||||||
"cliCodigo": 1,
|
|
||||||
"sucCodigo": null,
|
|
||||||
"proCodigo": null,
|
|
||||||
"ejeCodigo": null,
|
|
||||||
"detalle": [
|
|
||||||
{
|
{
|
||||||
"rucCodigo": null,
|
"detTipo": 17208,
|
||||||
"rucImpuesto": null,
|
"telNumero": "099666777",
|
||||||
"rucCodSri": null,
|
"telObservacion": "Cambio Observacion James",
|
||||||
"rucBase": null,
|
"telEstado": 1,
|
||||||
"rucPorcentaje": null,
|
"telCodigo": 3490
|
||||||
"rucRetencion": null,
|
}, {
|
||||||
"rucDescripcion": null,
|
"detTipo": 17208,
|
||||||
"rucFechaRegistro": null,
|
"telNumero": "023102108",
|
||||||
"retCodigo": null,
|
"telObservacion": "Cambio estado y observacion",
|
||||||
"rubCodigo": null
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3491
|
||||||
|
}, {
|
||||||
|
"detTipo": 23586,
|
||||||
|
"telNumero": "091234567",
|
||||||
|
"telObservacion": "Este es nuevo",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3495
|
||||||
|
}, {
|
||||||
|
"detTipo": 23584,
|
||||||
|
"telNumero": "33332342",
|
||||||
|
"telObservacion": "colonavilus",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3496
|
||||||
|
}, {
|
||||||
|
"detTipo": 23584,
|
||||||
|
"telNumero": "990000002",
|
||||||
|
"telObservacion": "aglegal",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3497
|
||||||
|
}, {
|
||||||
|
"detTipo": 23584,
|
||||||
|
"telNumero": "9299",
|
||||||
|
"telObservacion": "",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3498
|
||||||
|
}, {
|
||||||
|
"detTipo": 23584,
|
||||||
|
"telNumero": "099666777",
|
||||||
|
"telObservacion": "no llame nunca please",
|
||||||
|
"telEstado": 1,
|
||||||
|
"telCodigo": 3499
|
||||||
|
}, {
|
||||||
|
"detTipo": 17208,
|
||||||
|
"telNumero": "7381781278",
|
||||||
|
"telObservacion": "tirate un paso",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3500
|
||||||
|
}, {
|
||||||
|
"detTipo": 23585,
|
||||||
|
"telNumero": "0999999",
|
||||||
|
"telObservacion": "enikma build",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3501
|
||||||
|
}, {
|
||||||
|
"detTipo": 17208,
|
||||||
|
"telNumero": "02222911",
|
||||||
|
"telObservacion": "casa",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3503
|
||||||
|
}, {
|
||||||
|
"detTipo": 17208,
|
||||||
|
"telNumero": "02222",
|
||||||
|
"telObservacion": "SSS",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3504
|
||||||
|
}, {
|
||||||
|
"detTipo": 17208,
|
||||||
|
"telNumero": "123123",
|
||||||
|
"telObservacion": "ssaa",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3506
|
||||||
|
}, {
|
||||||
|
"detTipo": 17208,
|
||||||
|
"telNumero": "02020239911",
|
||||||
|
"telObservacion": "hola",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3507
|
||||||
|
}, {
|
||||||
|
"detTipo": 23584,
|
||||||
|
"telNumero": "4546554",
|
||||||
|
"telObservacion": "ytyutyut",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3510
|
||||||
|
}, {
|
||||||
|
"detTipo": 23586,
|
||||||
|
"telNumero": "1111",
|
||||||
|
"telObservacion": "",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3544
|
||||||
|
}, {
|
||||||
|
"detTipo": 23586,
|
||||||
|
"telNumero": "0992233213",
|
||||||
|
"telObservacion": "",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3572
|
||||||
|
}, {
|
||||||
|
"detTipo": 23586,
|
||||||
|
"telNumero": "11111",
|
||||||
|
"telObservacion": "telefono jaimito",
|
||||||
|
"telEstado": 1,
|
||||||
|
"telCodigo": 3573
|
||||||
|
}, {
|
||||||
|
"detTipo": 23585,
|
||||||
|
"telNumero": "12311",
|
||||||
|
"telObservacion": "3aaa",
|
||||||
|
"telEstado": 0,
|
||||||
|
"telCodigo": 3574
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue