fixes bug#AL-3516
parent
9fcd7e868b
commit
f07f0e9838
4
pom.xml
4
pom.xml
|
@ -4,11 +4,11 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ventaboletosadm</artifactId>
|
<artifactId>ventaboletosadm</artifactId>
|
||||||
<version>1.32.1</version>
|
<version>1.32.2</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<modelWeb.version>1.23.1</modelWeb.version>
|
<modelWeb.version>1.23.2</modelWeb.version>
|
||||||
<flyway.version>1.19.0</flyway.version>
|
<flyway.version>1.19.0</flyway.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
|
@ -67,18 +67,21 @@ import com.rjconsultores.ventaboletos.entidad.RutaEmbarqueDesembarque;
|
||||||
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
|
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TramoServicio;
|
import com.rjconsultores.ventaboletos.entidad.TramoServicio;
|
||||||
|
import com.rjconsultores.ventaboletos.service.AsientoExclusivoService;
|
||||||
import com.rjconsultores.ventaboletos.service.AutobusService;
|
import com.rjconsultores.ventaboletos.service.AutobusService;
|
||||||
import com.rjconsultores.ventaboletos.service.BoletoService;
|
import com.rjconsultores.ventaboletos.service.BoletoService;
|
||||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||||
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
import com.rjconsultores.ventaboletos.service.ConstanteService;
|
||||||
import com.rjconsultores.ventaboletos.service.CorridaInfoService;
|
import com.rjconsultores.ventaboletos.service.CorridaInfoService;
|
||||||
import com.rjconsultores.ventaboletos.service.CorridaService;
|
import com.rjconsultores.ventaboletos.service.CorridaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.DisponibilidadService;
|
||||||
import com.rjconsultores.ventaboletos.service.DivisionService;
|
import com.rjconsultores.ventaboletos.service.DivisionService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EsquemaCorridaEmbarqueDesembarqueService;
|
import com.rjconsultores.ventaboletos.service.EsquemaCorridaEmbarqueDesembarqueService;
|
||||||
import com.rjconsultores.ventaboletos.service.EsquemaCorridaInfoService;
|
import com.rjconsultores.ventaboletos.service.EsquemaCorridaInfoService;
|
||||||
import com.rjconsultores.ventaboletos.service.EsquemaCorridaService;
|
import com.rjconsultores.ventaboletos.service.EsquemaCorridaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EsquemaTramoService;
|
import com.rjconsultores.ventaboletos.service.EsquemaTramoService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.IntegracaoTotvsService;
|
||||||
import com.rjconsultores.ventaboletos.service.MarcaClaseServicioService;
|
import com.rjconsultores.ventaboletos.service.MarcaClaseServicioService;
|
||||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||||
import com.rjconsultores.ventaboletos.service.RolOperativoService;
|
import com.rjconsultores.ventaboletos.service.RolOperativoService;
|
||||||
|
@ -142,6 +145,12 @@ public class EditarCorridaController extends MyGenericForwardComposer {
|
||||||
@Autowired
|
@Autowired
|
||||||
private CorridaInfoService corridaInfoService;
|
private CorridaInfoService corridaInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
private AsientoExclusivoService asientoExclusivoService;
|
||||||
|
@Autowired
|
||||||
|
private DisponibilidadService disponibilidadService;
|
||||||
|
@Autowired
|
||||||
|
private IntegracaoTotvsService integracaoTotvsService;
|
||||||
|
@Autowired
|
||||||
BoletoService boletoService;
|
BoletoService boletoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RutaEmbarqueDesembarqueService rutaEmbarqueDesembarqueService;
|
private RutaEmbarqueDesembarqueService rutaEmbarqueDesembarqueService;
|
||||||
|
@ -1065,9 +1074,7 @@ public class EditarCorridaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//apagando manualmente a tabela corrida_info, para evitar mexer no relacionamento com a entidade corrida, visto que é pouca informação e pouco usado essa tabela
|
apagarCorrida(corrida);
|
||||||
corridaInfoService.borrarByCorrida(corrida);
|
|
||||||
corridaService.borrar(corrida);
|
|
||||||
}catch (DataIntegrityViolationException e) {
|
}catch (DataIntegrityViolationException e) {
|
||||||
if(e.getRootCause()!=null && e.getRootCause().getLocalizedMessage() !=null && e.getRootCause().getLocalizedMessage().contains("SYS_C004956867")) {
|
if(e.getRootCause()!=null && e.getRootCause().getLocalizedMessage() !=null && e.getRootCause().getLocalizedMessage().contains("SYS_C004956867")) {
|
||||||
String msgErro = "Existe uma ocupação para esta corrida nesta data (tabela Disponibilidade). Corrida:" + corridaId + " data:" + DateUtil.getStringDate(dataIter);
|
String msgErro = "Existe uma ocupação para esta corrida nesta data (tabela Disponibilidade). Corrida:" + corridaId + " data:" + DateUtil.getStringDate(dataIter);
|
||||||
|
@ -1090,6 +1097,14 @@ public class EditarCorridaController extends MyGenericForwardComposer {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void apagarCorrida(Corrida corrida) {
|
||||||
|
corridaInfoService.borrarByCorrida(corrida);
|
||||||
|
asientoExclusivoService.borrarByCorrida(corrida);
|
||||||
|
disponibilidadService.borrarByCorrida(corrida);
|
||||||
|
integracaoTotvsService.borrarByCorrida(corrida);
|
||||||
|
corridaService.borrar(corrida);
|
||||||
|
}
|
||||||
|
|
||||||
private void salvaNovoEsquemaCorrida(Date dataDeFecInicioVigencia, List<EsquemaCorrida> lsEC)
|
private void salvaNovoEsquemaCorrida(Date dataDeFecInicioVigencia, List<EsquemaCorrida> lsEC)
|
||||||
throws InterruptedException {
|
throws InterruptedException {
|
||||||
Calendar agora = Calendar.getInstance();
|
Calendar agora = Calendar.getInstance();
|
||||||
|
|
|
@ -452,7 +452,8 @@
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingHistorico</value>
|
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingHistorico</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.PricingConexao</value>
|
<value>com.rjconsultores.ventaboletos.entidad.PricingConexao</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.OrgaoComprovanteCustomizado</value>
|
<value>com.rjconsultores.ventaboletos.entidad.OrgaoComprovanteCustomizado</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.HeaderTabelaEsquemaCorrida</value>
|
<value>com.rjconsultores.ventaboletos.entidad.HeaderTabelaEsquemaCorrida</value>
|
||||||
|
<value>com.rjconsultores.ventaboletos.entidad.Disponibilidad</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue