fixes bug #7578
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@57628 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
13a0ac59bf
commit
b7997c166f
|
@ -666,30 +666,36 @@ public class ModificacionMasivaTarifasController extends MyGenericForwardCompose
|
||||||
HSSFSheet sheet1 = null;
|
HSSFSheet sheet1 = null;
|
||||||
String ruta = "";
|
String ruta = "";
|
||||||
int contRow = 0;
|
int contRow = 0;
|
||||||
int contPlan = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < lsRutaCombinacion.size(); i++) {
|
for (int i = 0; i < lsRutaCombinacion.size(); i++) {
|
||||||
Object[] obj = (Object[]) lsRutaCombinacion.get(i);
|
Object[] obj = (Object[]) lsRutaCombinacion.get(i);
|
||||||
|
|
||||||
|
String sheetName = "";
|
||||||
|
|
||||||
|
try{
|
||||||
if (!ruta.equals(obj[4].toString().concat(obj[12].toString()))) {
|
if (!ruta.equals(obj[4].toString().concat(obj[12].toString()))) {
|
||||||
|
|
||||||
ruta = obj[4].toString().concat(obj[12].toString());
|
ruta = obj[4].toString().concat(obj[12].toString());
|
||||||
String sheetName = "";
|
String sentido = (obj[22].toString().equals("1"))?"IDA":"VOLTA";
|
||||||
|
|
||||||
if (obj[4].toString().length() > 26) {
|
if (obj[4].toString().length() > 26) {
|
||||||
sheetName = (obj[12].toString().concat("-").concat(obj[4].toString().substring(0, 26)));
|
sheetName = (obj[12].toString().concat("-").concat(obj[4].toString().substring(0, obj[4].toString().length()).concat(" - ").concat(sentido)));
|
||||||
} else {
|
} else {
|
||||||
sheetName = (obj[12].toString().concat("-").concat(obj[4].toString()));
|
sheetName = (obj[12].toString().concat("-").concat(obj[4].toString()).concat(" - ").concat(sentido));
|
||||||
}
|
}
|
||||||
sheetName = sheetName.replaceAll("/", "-");
|
sheetName = sheetName.replaceAll("/", "-");
|
||||||
|
|
||||||
sheetName += ++contPlan;
|
|
||||||
|
|
||||||
log.debug("Aba: " + sheetName);
|
log.debug("Aba: " + sheetName);
|
||||||
sheet1 = wb.createSheet(sheetName);
|
sheet1 = wb.createSheet(sheetName);
|
||||||
contRow = 1;
|
contRow = 1;
|
||||||
|
|
||||||
criarCabecalhoExcel(sheet1, estilo);
|
criarCabecalhoExcel(sheet1, estilo);
|
||||||
}
|
}
|
||||||
|
} catch(Exception exception){
|
||||||
|
System.err.println(sheetName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
popularPlanilha(sheet1, obj, estilo, coeficiente, contRow++);
|
popularPlanilha(sheet1, obj, estilo, coeficiente, contRow++);
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,11 +171,9 @@ public class ModificacionMasivaTarifasUploadController extends MyGenericForwardC
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean retorno = false;
|
boolean retorno = true;
|
||||||
|
|
||||||
if (componentePreco.equals(EnumTarifaPedagio.TODOS.getDescricao())){
|
if (!componentePreco.equals(EnumTarifaPedagio.TODOS.getDescricao())){
|
||||||
retorno = validarTodosComponentes(row);
|
|
||||||
} else{
|
|
||||||
retorno = validarComponenteEspecifico(row);
|
retorno = validarComponenteEspecifico(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,13 +595,4 @@ public class ModificacionMasivaTarifasUploadController extends MyGenericForwardC
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean validarTodosComponentes(Row row){
|
|
||||||
if (row.getCell(CELL_NOVO_PRECIO) == null || row.getCell(CELL_NOVO_PEAJE) == null || row.getCell(CELL_NOVO_TX_EMBARQUE) == null ||
|
|
||||||
row.getCell(CELL_NOVO_SEGURO) == null){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue