Last active
August 4, 2016 18:12
-
-
Save jonatasemidio/76556bd92a1a0c041b1f694e25d6f645 to your computer and use it in GitHub Desktop.
BORDERO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l= | |
["seguradora ", | |
"broker ", | |
"contrato ", | |
"tipoPlano ", | |
"referencia ", | |
"cob ", | |
"singleCob ", | |
"periodoContaInicial", | |
"periodoContaFinal ", | |
"vigenciaInicial ", | |
"vigenciaFinal ", | |
"moeda ", | |
"seccao ", | |
"participacaoIRB ", | |
"limiteContrato ", | |
"comissaoResseguro ", | |
"comissaoCorretagem ", | |
"accountMode ", | |
"percentualResseguro"] | |
//'headerId=' + $('#headerId').val() + '&nomeLayout=' + $('#nomeLayout').val() | |
itens = l.collect{ "'&${it.trim()}=' + \$('#${it.trim()}').val()" }.join(' + ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l= | |
["seguradora ", | |
"broker ", | |
"contrato ", | |
"tipoPlano ", | |
"referencia ", | |
"cob ", | |
"singleCob ", | |
"periodoContaInicial", | |
"periodoContaFinal ", | |
"vigenciaInicial ", | |
"vigenciaFinal ", | |
"moeda ", | |
"seccao ", | |
"participacaoIRB ", | |
"limiteContrato ", | |
"comissaoResseguro ", | |
"comissaoCorretagem ", | |
"accountMode ", | |
"percentualResseguro"] | |
/* | |
if (filtro.getSeguradora() != null) { | |
where.append(" AND av.seguradora = :seguradora "); | |
params.put("seguradora", filtro.getSeguradora()); | |
} | |
*/ | |
itens = l.collect{ | |
""" | |
if (filtro.get${it[0].toUpperCase() + it.substring(1).trim()}() != null) { | |
where.append(" AND h.${it.trim()} = :${it.trim()} "); | |
params.put("${it.trim()}", filtro.get${it[0].toUpperCase() + it.substring(1).trim()}()); | |
} | |
""" | |
}.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment