From 895700ab90128aaef66d31267e83e75d8a408631 Mon Sep 17 00:00:00 2001 From: Matheuscruztj Date: Thu, 28 Apr 2022 14:15:52 -0300 Subject: [PATCH 1/2] feat: add infoMandElet data --- .../esquemas/eventos/tsvinicio/ESocial.java | 122 +++++++++++++++++- .../src/main/resources/xsd/evtTSVInicio.xsd | 20 +++ .../dominio/semvinculo/InfoMandElet.java | 44 ++++++- 3 files changed, 182 insertions(+), 4 deletions(-) diff --git a/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/tsvinicio/ESocial.java b/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/tsvinicio/ESocial.java index 3b28e1a3b..e7782792d 100644 --- a/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/tsvinicio/ESocial.java +++ b/src/esocial-esquemas/src/main/java/br/jus/tst/esocial/esquemas/eventos/tsvinicio/ESocial.java @@ -216,6 +216,10 @@ * <element name="indRemunCargo" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_indRemunCargo" minOccurs="0"/> * <element name="tpRegTrab" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegTrab"/> * <element name="tpRegPrev" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegPrev"/> + * <element name="categOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codCateg"/> + * <element name="cnpjOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_cnpj"/> + * <element name="matricOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codigo_esocial"/> + * <element name="dtExercOrig" type="{http://www.w3.org/2001/XMLSchema}date"/> * </sequence> * </restriction> * </complexContent> @@ -533,6 +537,10 @@ public void setSignature(SignatureType value) { * <element name="indRemunCargo" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_indRemunCargo" minOccurs="0"/> * <element name="tpRegTrab" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegTrab"/> * <element name="tpRegPrev" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegPrev"/> + * <element name="categOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codCateg"/> + * <element name="cnpjOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_cnpj"/> + * <element name="matricOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codigo_esocial"/> + * <element name="dtExercOrig" type="{http://www.w3.org/2001/XMLSchema}date"/> * </sequence> * </restriction> * </complexContent> @@ -839,6 +847,10 @@ public void setId(String value) { * <element name="indRemunCargo" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_indRemunCargo" minOccurs="0"/> * <element name="tpRegTrab" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegTrab"/> * <element name="tpRegPrev" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegPrev"/> + * <element name="categOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codCateg"/> + * <element name="cnpjOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_cnpj"/> + * <element name="matricOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codigo_esocial"/> + * <element name="dtExercOrig" type="{http://www.w3.org/2001/XMLSchema}date"/> * </sequence> * </restriction> * </complexContent> @@ -1333,6 +1345,10 @@ public void setCodMotAfast(String value) { * <element name="indRemunCargo" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_indRemunCargo" minOccurs="0"/> * <element name="tpRegTrab" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegTrab"/> * <element name="tpRegPrev" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegPrev"/> + * <element name="categOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codCateg"/> + * <element name="cnpjOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_cnpj"/> + * <element name="matricOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codigo_esocial"/> + * <element name="dtExercOrig" type="{http://www.w3.org/2001/XMLSchema}date"/> * </sequence> * </restriction> * </complexContent> @@ -1953,6 +1969,10 @@ public void setTpRegPrev(byte value) { * <element name="indRemunCargo" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_indRemunCargo" minOccurs="0"/> * <element name="tpRegTrab" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegTrab"/> * <element name="tpRegPrev" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_tpRegPrev"/> + * <element name="categOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codCateg"/> + * <element name="cnpjOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_cnpj"/> + * <element name="matricOrig" type="{http://www.esocial.gov.br/schema/evt/evtTSVInicio/v_S_01_00_00}TS_codigo_esocial"/> + * <element name="dtExercOrig" type="{http://www.w3.org/2001/XMLSchema}date"/> * </sequence> * </restriction> * </complexContent> @@ -1965,14 +1985,22 @@ public void setTpRegPrev(byte value) { @XmlType(name = "", propOrder = { "indRemunCargo", "tpRegTrab", - "tpRegPrev" + "tpRegPrev", + "categOrig", + "cnpjOrig", + "matricOrig", + "dtExercOrig" }) public static class InfoMandElet { - @XmlSchemaType(name = "string") protected TSSimNao indRemunCargo; protected byte tpRegTrab; protected byte tpRegPrev; + protected BigInteger categOrig; + protected String cnpjOrig; + protected String matricOrig; + @XmlSchemaType(name = "date") + protected XMLGregorianCalendar dtExercOrig; /** * Gets the value of the indRemunCargo property. @@ -2030,6 +2058,96 @@ public void setTpRegPrev(byte value) { this.tpRegPrev = value; } + /** + * Gets the value of the categOrig property. + * + * @return + * possible object is + * {@link BigInteger } + */ + public BigInteger getCategOrig() { + return categOrig; + } + + /** + * Sets the value of the categOrig property. + * + */ + public void setCategOrig(BigInteger value) { + this.categOrig = value; + } + + /** + * Gets the value of the cnpjOrig property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getCnpjOrig() { + return cnpjOrig; + } + + /** + * Sets the value of the cnpjOrig property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setCnpjOrig(String value) { + this.cnpjOrig = value; + } + + /** + * Gets the value of the matricOrig property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMatricOrig() { + return matricOrig; + } + + /** + * Sets the value of the matricOrig property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMatricOrig(String value) { + this.matricOrig = value; + } + + /** + * Gets the value of the dtExercOrig property. + * + * @return + * possible object is + * {@link XMLGregorianCalendar } + * + */ + public XMLGregorianCalendar getDtExercOrig() { + return dtExercOrig; + } + + /** + * Sets the value of the dtExercOrig property. + * + * @param value + * allowed object is + * {@link XMLGregorianCalendar } + * + */ + public void setDtExercOrig(XMLGregorianCalendar value) { + this.dtExercOrig = value; + } } diff --git a/src/esocial-esquemas/src/main/resources/xsd/evtTSVInicio.xsd b/src/esocial-esquemas/src/main/resources/xsd/evtTSVInicio.xsd index 2b9774609..9e12500d2 100644 --- a/src/esocial-esquemas/src/main/resources/xsd/evtTSVInicio.xsd +++ b/src/esocial-esquemas/src/main/resources/xsd/evtTSVInicio.xsd @@ -361,6 +361,26 @@ Tipo de regime previdenciário (ou Sistema de Proteção Social dos Militares). + + + Código da categoria de original + + + + + Cnpj da empresa de origem + + + + + Matrícula na empresa de origem + + + + + Matrícula na empresa de origem + + diff --git a/src/esocial-jt-dominio/src/main/java/br/jus/tst/esocial/dominio/semvinculo/InfoMandElet.java b/src/esocial-jt-dominio/src/main/java/br/jus/tst/esocial/dominio/semvinculo/InfoMandElet.java index 5ce67eb5c..514bf8f6f 100644 --- a/src/esocial-jt-dominio/src/main/java/br/jus/tst/esocial/dominio/semvinculo/InfoMandElet.java +++ b/src/esocial-jt-dominio/src/main/java/br/jus/tst/esocial/dominio/semvinculo/InfoMandElet.java @@ -1,5 +1,12 @@ package br.jus.tst.esocial.dominio.semvinculo; +import javax.validation.constraints.NotNull; + +import org.hibernate.validator.constraints.br.CNPJ; + +import java.math.BigInteger; +import java.util.Calendar; + import br.jus.tst.esocial.dominio.enums.SimNao; public class InfoMandElet { @@ -7,6 +14,17 @@ public class InfoMandElet { private SimNao indRemunCargo; private byte tpRegTrab; private byte tpRegPrev; + + @NotNull + private BigInteger categOrig; + + @CNPJ + private String cnpjOrig; + + private String matricOrig; + + @NotNull + private Calendar dtExercOrig; public SimNao getIndRemunCargo() { return indRemunCargo; @@ -26,6 +44,28 @@ public byte getTpRegPrev() { public void setTpRegPrev(byte tpRegPrev) { this.tpRegPrev = tpRegPrev; } - - + public BigInteger getCategOrig() { + return categOrig; + } + public void setCategOrig(BigInteger categOrig) { + this.categOrig = categOrig; + } + public String getCnpjOrig() { + return cnpjOrig; + } + public void setCnpjOrig(String cnpjOrig) { + this.cnpjOrig = cnpjOrig; + } + public String getMatricOrig() { + return matricOrig; + } + public void setMatricOrig(String matricOrig) { + this.matricOrig = matricOrig; + } + public Calendar getDtExercOrig() { + return dtExercOrig; + } + public void setDtExercOrig(Calendar dtExercOrig) { + this.dtExercOrig = dtExercOrig; + } } From 487fca5ff82d8a9b7f45782c9286a1f005cb62c0 Mon Sep 17 00:00:00 2001 From: Matheus Santos Date: Tue, 31 May 2022 16:59:45 -0300 Subject: [PATCH 2/2] fix: ajuste ocorrencia sem evento relacionado --- .../src/main/java/br/jus/tst/esocialjt/dominio/Ocorrencia.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/esocial-jt-service/src/main/java/br/jus/tst/esocialjt/dominio/Ocorrencia.java b/src/esocial-jt-service/src/main/java/br/jus/tst/esocialjt/dominio/Ocorrencia.java index ea7739ddc..fc3df4db4 100644 --- a/src/esocial-jt-service/src/main/java/br/jus/tst/esocialjt/dominio/Ocorrencia.java +++ b/src/esocial-jt-service/src/main/java/br/jus/tst/esocialjt/dominio/Ocorrencia.java @@ -42,7 +42,7 @@ @Entity @Table(name = "EST_OCORRENCIA") @NamedQueries({ - @NamedQuery(name = "Ocorrencia.ocorrenciasSemEvento", query = "SELECT o FROM Ocorrencia o where o.id NOT IN (SELECT e.ocorrencia.id FROM Evento e)"), + @NamedQuery(name = "Ocorrencia.ocorrenciasSemEvento", query = "SELECT o FROM Ocorrencia o LEFT JOIN Evento e on o.id = e.ocorrencia.id WHERE e.id IS NULL"), @NamedQuery(name = "Ocorrencia.findNecessaryDataOnly", query = "SELECT new br.jus.tst.esocialjt.ocorrencia.OcorrenciaDadosBasicosDTO(o.id, o.tipoOcorrencia, o.dataOcorrencia, estadoEvento, ocorrenciaTipoEvento) " + " FROM Ocorrencia o "