daniel.zauli 2016-06-27 14:37:53 +00:00
parent b891751f82
commit c2bf959d8a
2 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import java.util.List;
import com.rjconsultores.ventaboletos.dao.sqlbuilder.SQLBuilder;
import com.rjconsultores.ventaboletos.dao.util.DBUtil;
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
public class SQLBuilderOracle implements SQLBuilder {
private static final Integer HORAS_NO_DIA = Integer.valueOf(24);
@ -333,7 +334,9 @@ public class SQLBuilderOracle implements SQLBuilder {
sb.append(" and mc.activo = 1 ");
sb.append(" and re.activo = 1 ");
sb.append(" and r.orgaoconcedente_id <> 21 ");
sb.append(" and rc.indventa = 1 ");
if(ApplicationProperties.getInstance().criarTarifaApenasTrechoVendido()){
sb.append(" and rc.indventa = 1 ");
}
if (idsEmpresas != null) {
sb.append(" and re.empresa_id in ( ").append(idsEmpresas.toString().substring(1, idsEmpresas.toString().length()-1)).append(" ) ");
}

View File

@ -169,4 +169,10 @@ public class ApplicationProperties {
String property = p.getProperty("maxSizeNumCorrida", "-1");
return Integer.parseInt(property);
}
public boolean criarTarifaApenasTrechoVendido() {
String property = p.getProperty("criarTarifaApenasTrechoVendido", "0");
return property.equals("1");
}
}