Commit ce46c6e447d350dcc561037e8857b4db91fba986
1 parent
3a9bebc7
Exists in
master
Ajustado todos os relatórios para atender a nova fábrica;
Refs #193
Showing
16 changed files
with
115 additions
and
100 deletions
Show diff stats
ieducar/modules/Reports/ReportSources/portabilis_atestado_frequencia.jasper
0 → 100644
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_atestado_frequencia.jrxml
| @@ -16,6 +16,8 @@ | @@ -16,6 +16,8 @@ | ||
| 16 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 16 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 17 | </parameter> | 17 | </parameter> |
| 18 | <parameter name="logo" class="java.lang.String"/> | 18 | <parameter name="logo" class="java.lang.String"/> |
| 19 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 20 | + <parameter name="database" class="java.lang.String"/> | ||
| 19 | <queryString> | 21 | <queryString> |
| 20 | <![CDATA[SELECT fcn_upper(instituicao.nm_instituicao) AS nm_instituicao, | 22 | <![CDATA[SELECT fcn_upper(instituicao.nm_instituicao) AS nm_instituicao, |
| 21 | fcn_upper(instituicao.nm_responsavel) AS nm_responsavel, | 23 | fcn_upper(instituicao.nm_responsavel) AS nm_responsavel, |
ieducar/modules/Reports/ReportSources/portabilis_atestado_matricula.jasper
0 → 100644
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_atestado_matricula.jrxml
| @@ -16,6 +16,8 @@ | @@ -16,6 +16,8 @@ | ||
| 16 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 16 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 17 | </parameter> | 17 | </parameter> |
| 18 | <parameter name="logo" class="java.lang.String"/> | 18 | <parameter name="logo" class="java.lang.String"/> |
| 19 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 20 | + <parameter name="database" class="java.lang.String"/> | ||
| 19 | <queryString> | 21 | <queryString> |
| 20 | <![CDATA[SELECT fcn_upper(instituicao.nm_instituicao) AS nm_instituicao, | 22 | <![CDATA[SELECT fcn_upper(instituicao.nm_instituicao) AS nm_instituicao, |
| 21 | fcn_upper(instituicao.nm_responsavel) AS nm_responsavel, | 23 | fcn_upper(instituicao.nm_responsavel) AS nm_responsavel, |
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_atestado_vaga.jrxml
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="portabilis_atestado_vaga" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0cebf96a-c86e-439d-b777-7239a5c2af6a"> | 2 | <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="portabilis_atestado_vaga" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="0cebf96a-c86e-439d-b777-7239a5c2af6a"> |
| 3 | <property name="ireport.zoom" value="1.1"/> | 3 | <property name="ireport.zoom" value="1.1"/> |
| 4 | <property name="ireport.x" value="0"/> | 4 | <property name="ireport.x" value="0"/> |
| 5 | - <property name="ireport.y" value="341"/> | 5 | + <property name="ireport.y" value="320"/> |
| 6 | <parameter name="instituicao" class="java.lang.Integer"> | 6 | <parameter name="instituicao" class="java.lang.Integer"> |
| 7 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 7 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 8 | </parameter> | 8 | </parameter> |
| @@ -22,6 +22,8 @@ | @@ -22,6 +22,8 @@ | ||
| 22 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 22 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 23 | </parameter> | 23 | </parameter> |
| 24 | <parameter name="logo" class="java.lang.String"/> | 24 | <parameter name="logo" class="java.lang.String"/> |
| 25 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 26 | + <parameter name="database" class="java.lang.String"/> | ||
| 25 | <queryString> | 27 | <queryString> |
| 26 | <![CDATA[SELECT public.fcn_upper(nm_instituicao) AS nome_instituicao, | 28 | <![CDATA[SELECT public.fcn_upper(nm_instituicao) AS nome_instituicao, |
| 27 | public.fcn_upper(nm_responsavel) AS nm_responsavel, | 29 | public.fcn_upper(nm_responsavel) AS nm_responsavel, |
ieducar/modules/Reports/ReportSources/portabilis_biblioteca_autor.jasper
0 → 100644
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_biblioteca_autor.jrxml
| @@ -11,6 +11,8 @@ | @@ -11,6 +11,8 @@ | ||
| 11 | </parameter> | 11 | </parameter> |
| 12 | <parameter name="logo" class="java.lang.String"/> | 12 | <parameter name="logo" class="java.lang.String"/> |
| 13 | <parameter name="ordem" class="java.lang.String"/> | 13 | <parameter name="ordem" class="java.lang.String"/> |
| 14 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 15 | + <parameter name="database" class="java.lang.String"/> | ||
| 14 | <queryString> | 16 | <queryString> |
| 15 | <![CDATA[SELECT public.fcn_upper(instituicao.nm_instituicao) as nm_instituicao, | 17 | <![CDATA[SELECT public.fcn_upper(instituicao.nm_instituicao) as nm_instituicao, |
| 16 | cod_acervo_autor, | 18 | cod_acervo_autor, |
ieducar/modules/Reports/ReportSources/portabilis_biblioteca_editora.jasper
0 → 100644
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_biblioteca_editora.jrxml
| @@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
| 10 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 10 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 11 | </parameter> | 11 | </parameter> |
| 12 | <parameter name="logo" class="java.lang.String"/> | 12 | <parameter name="logo" class="java.lang.String"/> |
| 13 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 14 | + <parameter name="database" class="java.lang.String"/> | ||
| 13 | <queryString> | 15 | <queryString> |
| 14 | <![CDATA[SELECT public.fcn_upper(instituicao.nm_instituicao) as nm_instituicao, | 16 | <![CDATA[SELECT public.fcn_upper(instituicao.nm_instituicao) as nm_instituicao, |
| 15 | acervo_editora.cod_acervo_editora, | 17 | acervo_editora.cod_acervo_editora, |
ieducar/modules/Reports/ReportSources/portabilis_biblioteca_obra.jasper
0 → 100644
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_biblioteca_obra.jrxml
| @@ -10,6 +10,8 @@ | @@ -10,6 +10,8 @@ | ||
| 10 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 10 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 11 | </parameter> | 11 | </parameter> |
| 12 | <parameter name="logo" class="java.lang.String"/> | 12 | <parameter name="logo" class="java.lang.String"/> |
| 13 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 14 | + <parameter name="database" class="java.lang.String"/> | ||
| 13 | <queryString> | 15 | <queryString> |
| 14 | <![CDATA[SELECT public.fcn_upper(instituicao.nm_instituicao) as nm_instituicao, | 16 | <![CDATA[SELECT public.fcn_upper(instituicao.nm_instituicao) as nm_instituicao, |
| 15 | acervo.cod_acervo, | 17 | acervo.cod_acervo, |
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_boletim.jrxml
| @@ -25,6 +25,8 @@ | @@ -25,6 +25,8 @@ | ||
| 25 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> | 25 | <defaultValueExpression><![CDATA[new java.lang.Integer(0)]]></defaultValueExpression> |
| 26 | </parameter> | 26 | </parameter> |
| 27 | <parameter name="logo" class="java.lang.String"/> | 27 | <parameter name="logo" class="java.lang.String"/> |
| 28 | + <parameter name="SUBREPORT_DIR" class="java.lang.String"/> | ||
| 29 | + <parameter name="database" class="java.lang.String"/> | ||
| 28 | <queryString> | 30 | <queryString> |
| 29 | <![CDATA[SELECT (SELECT escola_ano_letivo.ano | 31 | <![CDATA[SELECT (SELECT escola_ano_letivo.ano |
| 30 | FROM pmieducar.escola_ano_letivo | 32 | FROM pmieducar.escola_ano_letivo |
| @@ -196,7 +198,7 @@ nome_disciplina, | @@ -196,7 +198,7 @@ nome_disciplina, | ||
| 196 | 198 | ||
| 197 | componente_curricular.id as id_disciplina, | 199 | componente_curricular.id as id_disciplina, |
| 198 | 200 | ||
| 199 | - (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = 10 THEN | 201 | + (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = '10' THEN |
| 200 | '10,0' | 202 | '10,0' |
| 201 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN | 203 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN |
| 202 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' | 204 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' |
| @@ -208,11 +210,11 @@ nome_disciplina, | @@ -208,11 +210,11 @@ nome_disciplina, | ||
| 208 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND | 210 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND |
| 209 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND | 211 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 210 | nota_aluno.matricula_id = matricula.cod_matricula AND | 212 | nota_aluno.matricula_id = matricula.cod_matricula AND |
| 211 | - nota_componente_curricular.etapa = 1 | 213 | + nota_componente_curricular.etapa = '1' |
| 212 | ) AS nota1, | 214 | ) AS nota1, |
| 213 | 215 | ||
| 214 | 216 | ||
| 215 | - (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = 10 THEN | 217 | + (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = '10' THEN |
| 216 | '10,0' | 218 | '10,0' |
| 217 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN | 219 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN |
| 218 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' | 220 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' |
| @@ -224,10 +226,10 @@ nome_disciplina, | @@ -224,10 +226,10 @@ nome_disciplina, | ||
| 224 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND | 226 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND |
| 225 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND | 227 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 226 | nota_aluno.matricula_id = matricula.cod_matricula AND | 228 | nota_aluno.matricula_id = matricula.cod_matricula AND |
| 227 | - nota_componente_curricular.etapa = 2 | 229 | + nota_componente_curricular.etapa = '2' |
| 228 | ) AS nota2, | 230 | ) AS nota2, |
| 229 | 231 | ||
| 230 | - (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = 10 THEN | 232 | + (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = '10' THEN |
| 231 | '10,0' | 233 | '10,0' |
| 232 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN | 234 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN |
| 233 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' | 235 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' |
| @@ -239,10 +241,10 @@ nome_disciplina, | @@ -239,10 +241,10 @@ nome_disciplina, | ||
| 239 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND | 241 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND |
| 240 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND | 242 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 241 | nota_aluno.matricula_id = matricula.cod_matricula AND | 243 | nota_aluno.matricula_id = matricula.cod_matricula AND |
| 242 | - nota_componente_curricular.etapa = 3 | 244 | + nota_componente_curricular.etapa = '3' |
| 243 | ) AS nota3, | 245 | ) AS nota3, |
| 244 | 246 | ||
| 245 | - (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = 10 THEN | 247 | + (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = '10' THEN |
| 246 | '10,0' | 248 | '10,0' |
| 247 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN | 249 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN |
| 248 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' | 250 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' |
| @@ -254,11 +256,11 @@ nome_disciplina, | @@ -254,11 +256,11 @@ nome_disciplina, | ||
| 254 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND | 256 | WHERE nota_componente_curricular.nota_aluno_id = nota_aluno.id AND |
| 255 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND | 257 | nota_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 256 | nota_aluno.matricula_id = matricula.cod_matricula AND | 258 | nota_aluno.matricula_id = matricula.cod_matricula AND |
| 257 | - nota_componente_curricular.etapa = 4 | 259 | + nota_componente_curricular.etapa = '4' |
| 258 | ) AS nota4, | 260 | ) AS nota4, |
| 259 | 261 | ||
| 260 | 262 | ||
| 261 | - (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = 10 THEN | 263 | + (SELECT CASE WHEN nota_componente_curricular.nota_arredondada = '10' THEN |
| 262 | '10,0' | 264 | '10,0' |
| 263 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN | 265 | WHEN char_length(nota_componente_curricular.nota_arredondada) = 1 THEN |
| 264 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' | 266 | replace(nota_componente_curricular.nota_arredondada,'.',',') || ',0' |
| @@ -274,7 +276,7 @@ nome_disciplina, | @@ -274,7 +276,7 @@ nome_disciplina, | ||
| 274 | ) AS nota_exame, | 276 | ) AS nota_exame, |
| 275 | 277 | ||
| 276 | 278 | ||
| 277 | - (SELECT CASE WHEN nota_componente_curricular_media.media_arredondada = 10 THEN | 279 | + (SELECT CASE WHEN nota_componente_curricular_media.media_arredondada = '10' THEN |
| 278 | '10,0' | 280 | '10,0' |
| 279 | WHEN char_length(nota_componente_curricular_media.media_arredondada) = 1 THEN | 281 | WHEN char_length(nota_componente_curricular_media.media_arredondada) = 1 THEN |
| 280 | replace(nota_componente_curricular_media.media_arredondada,'.',',') || ',0' | 282 | replace(nota_componente_curricular_media.media_arredondada,'.',',') || ',0' |
| @@ -337,7 +339,7 @@ nome_disciplina, | @@ -337,7 +339,7 @@ nome_disciplina, | ||
| 337 | modules.falta_aluno | 339 | modules.falta_aluno |
| 338 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND | 340 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND |
| 339 | falta_aluno.matricula_id = matricula.cod_matricula AND | 341 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 340 | - falta_geral.etapa = 1 AND | 342 | + falta_geral.etapa = '1' AND |
| 341 | falta_aluno.tipo_falta = 1) as total_faltas_et1, | 343 | falta_aluno.tipo_falta = 1) as total_faltas_et1, |
| 342 | 344 | ||
| 343 | (SELECT sum(falta_geral.quantidade) | 345 | (SELECT sum(falta_geral.quantidade) |
| @@ -345,7 +347,7 @@ nome_disciplina, | @@ -345,7 +347,7 @@ nome_disciplina, | ||
| 345 | modules.falta_aluno | 347 | modules.falta_aluno |
| 346 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND | 348 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND |
| 347 | falta_aluno.matricula_id = matricula.cod_matricula AND | 349 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 348 | - falta_geral.etapa = 2 AND | 350 | + falta_geral.etapa = '2' AND |
| 349 | falta_aluno.tipo_falta = 1) as total_faltas_et2, | 351 | falta_aluno.tipo_falta = 1) as total_faltas_et2, |
| 350 | 352 | ||
| 351 | (SELECT sum(falta_geral.quantidade) | 353 | (SELECT sum(falta_geral.quantidade) |
| @@ -353,7 +355,7 @@ nome_disciplina, | @@ -353,7 +355,7 @@ nome_disciplina, | ||
| 353 | modules.falta_aluno | 355 | modules.falta_aluno |
| 354 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND | 356 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND |
| 355 | falta_aluno.matricula_id = matricula.cod_matricula AND | 357 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 356 | - falta_geral.etapa = 3 AND | 358 | + falta_geral.etapa = '3' AND |
| 357 | falta_aluno.tipo_falta = 1) as total_faltas_et3, | 359 | falta_aluno.tipo_falta = 1) as total_faltas_et3, |
| 358 | 360 | ||
| 359 | (SELECT sum(falta_geral.quantidade) | 361 | (SELECT sum(falta_geral.quantidade) |
| @@ -361,7 +363,7 @@ nome_disciplina, | @@ -361,7 +363,7 @@ nome_disciplina, | ||
| 361 | modules.falta_aluno | 363 | modules.falta_aluno |
| 362 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND | 364 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND |
| 363 | falta_aluno.matricula_id = matricula.cod_matricula AND | 365 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 364 | - falta_geral.etapa = 4 AND | 366 | + falta_geral.etapa = '4' AND |
| 365 | falta_aluno.tipo_falta = 1) as total_faltas_et4, | 367 | falta_aluno.tipo_falta = 1) as total_faltas_et4, |
| 366 | 368 | ||
| 367 | (SELECT sum(falta_geral.quantidade) | 369 | (SELECT sum(falta_geral.quantidade) |
| @@ -376,7 +378,7 @@ nome_disciplina, | @@ -376,7 +378,7 @@ nome_disciplina, | ||
| 376 | modules.falta_aluno | 378 | modules.falta_aluno |
| 377 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND | 379 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND |
| 378 | falta_aluno.matricula_id = matricula.cod_matricula AND | 380 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 379 | - falta_componente_curricular.etapa = 1 AND | 381 | + falta_componente_curricular.etapa = '1' AND |
| 380 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND | 382 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 381 | falta_aluno.tipo_falta = 2) as faltas_componente_et1, | 383 | falta_aluno.tipo_falta = 2) as faltas_componente_et1, |
| 382 | 384 | ||
| @@ -385,7 +387,7 @@ nome_disciplina, | @@ -385,7 +387,7 @@ nome_disciplina, | ||
| 385 | modules.falta_aluno | 387 | modules.falta_aluno |
| 386 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND | 388 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND |
| 387 | falta_aluno.matricula_id = matricula.cod_matricula AND | 389 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 388 | - falta_componente_curricular.etapa = 2 AND | 390 | + falta_componente_curricular.etapa = '2' AND |
| 389 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND | 391 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 390 | falta_aluno.tipo_falta = 2) as faltas_componente_et2, | 392 | falta_aluno.tipo_falta = 2) as faltas_componente_et2, |
| 391 | 393 | ||
| @@ -394,7 +396,7 @@ nome_disciplina, | @@ -394,7 +396,7 @@ nome_disciplina, | ||
| 394 | modules.falta_aluno | 396 | modules.falta_aluno |
| 395 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND | 397 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND |
| 396 | falta_aluno.matricula_id = matricula.cod_matricula AND | 398 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 397 | - falta_componente_curricular.etapa = 3 AND | 399 | + falta_componente_curricular.etapa = '3' AND |
| 398 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND | 400 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 399 | falta_aluno.tipo_falta = 2) as faltas_componente_et3, | 401 | falta_aluno.tipo_falta = 2) as faltas_componente_et3, |
| 400 | 402 | ||
| @@ -403,7 +405,7 @@ nome_disciplina, | @@ -403,7 +405,7 @@ nome_disciplina, | ||
| 403 | modules.falta_aluno | 405 | modules.falta_aluno |
| 404 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND | 406 | WHERE falta_componente_curricular.falta_aluno_id = falta_aluno.id AND |
| 405 | falta_aluno.matricula_id = matricula.cod_matricula AND | 407 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 406 | - falta_componente_curricular.etapa = 4 AND | 408 | + falta_componente_curricular.etapa = '4' AND |
| 407 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND | 409 | falta_componente_curricular.componente_curricular_id = componente_curricular.id AND |
| 408 | falta_aluno.tipo_falta = 2) as faltas_componente_et4, | 410 | falta_aluno.tipo_falta = 2) as faltas_componente_et4, |
| 409 | 411 | ||
| @@ -425,7 +427,7 @@ nome_disciplina, | @@ -425,7 +427,7 @@ nome_disciplina, | ||
| 425 | falta_aluno.tipo_falta = 2) as total_geral_faltas_componente, | 427 | falta_aluno.tipo_falta = 2) as total_geral_faltas_componente, |
| 426 | 428 | ||
| 427 | 429 | ||
| 428 | - (SELECT to_number((((select serie.dias_letivos | 430 | + (SELECT ((((select serie.dias_letivos |
| 429 | from pmieducar.serie | 431 | from pmieducar.serie |
| 430 | where serie.cod_serie = matricula.ref_ref_cod_serie)::float - | 432 | where serie.cod_serie = matricula.ref_ref_cod_serie)::float - |
| 431 | (SELECT sum(falta_geral.quantidade) | 433 | (SELECT sum(falta_geral.quantidade) |
| @@ -433,9 +435,9 @@ nome_disciplina, | @@ -433,9 +435,9 @@ nome_disciplina, | ||
| 433 | modules.falta_aluno | 435 | modules.falta_aluno |
| 434 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND | 436 | WHERE falta_geral.falta_aluno_id = falta_aluno.id AND |
| 435 | falta_aluno.matricula_id = matricula.cod_matricula AND | 437 | falta_aluno.matricula_id = matricula.cod_matricula AND |
| 436 | - falta_geral.etapa in('1','2','3','4')))::float * 100::float )::float / (select serie.dias_letivos from pmieducar.serie where serie.cod_serie = matricula.ref_ref_cod_serie) :: float,'999')) AS frequencia, | 438 | + falta_geral.etapa in('1','2','3','4')))::float * 100::float )::float / (select serie.dias_letivos from pmieducar.serie where serie.cod_serie = matricula.ref_ref_cod_serie) :: float,'999')::varchar) AS frequencia, |
| 437 | 439 | ||
| 438 | - (SELECT sum(to_number(componente_curricular_ano_escolar.carga_horaria,'999')) | 440 | + (SELECT sum(to_number(componente_curricular_ano_escolar.carga_horaria::varchar,'999')) |
| 439 | FROM modules.componente_curricular_ano_escolar | 441 | FROM modules.componente_curricular_ano_escolar |
| 440 | WHERE componente_curricular_ano_escolar.componente_curricular_id = componente_curricular.id) AS carga_horaria, | 442 | WHERE componente_curricular_ano_escolar.componente_curricular_id = componente_curricular.id) AS carga_horaria, |
| 441 | 443 | ||
| @@ -556,14 +558,14 @@ ORDER BY nome_aluno, nome_disciplina]]> | @@ -556,14 +558,14 @@ ORDER BY nome_aluno, nome_disciplina]]> | ||
| 556 | <field name="faltas_componente_et4" class="java.lang.Long"/> | 558 | <field name="faltas_componente_et4" class="java.lang.Long"/> |
| 557 | <field name="total_faltas_componente" class="java.lang.Long"/> | 559 | <field name="total_faltas_componente" class="java.lang.Long"/> |
| 558 | <field name="total_geral_faltas_componente" class="java.lang.Long"/> | 560 | <field name="total_geral_faltas_componente" class="java.lang.Long"/> |
| 559 | - <field name="frequencia" class="java.math.BigDecimal"/> | 561 | + <field name="frequencia" class="java.lang.String"/> |
| 560 | <field name="carga_horaria" class="java.math.BigDecimal"/> | 562 | <field name="carga_horaria" class="java.math.BigDecimal"/> |
| 561 | <field name="curso_hora_falta" class="java.lang.Double"/> | 563 | <field name="curso_hora_falta" class="java.lang.Double"/> |
| 562 | <field name="carga_horaria_componente" class="java.lang.Integer"/> | 564 | <field name="carga_horaria_componente" class="java.lang.Integer"/> |
| 563 | <field name="carga_horaria_serie" class="java.lang.Double"/> | 565 | <field name="carga_horaria_serie" class="java.lang.Double"/> |
| 564 | <field name="frequencia_boletim" class="java.lang.Double"/> | 566 | <field name="frequencia_boletim" class="java.lang.Double"/> |
| 565 | <field name="frequencia_boletim_componente" class="java.lang.Double"/> | 567 | <field name="frequencia_boletim_componente" class="java.lang.Double"/> |
| 566 | - <field name="tipo_presenca" class="java.lang.Integer"/> | 568 | + <field name="tipo_presenca" class="java.lang.String"/> |
| 567 | <group name="matricula"> | 569 | <group name="matricula"> |
| 568 | <groupExpression><![CDATA[$F{matricula}]]></groupExpression> | 570 | <groupExpression><![CDATA[$F{matricula}]]></groupExpression> |
| 569 | <groupHeader> | 571 | <groupHeader> |
| @@ -1012,7 +1014,7 @@ ORDER BY nome_aluno, nome_disciplina]]> | @@ -1012,7 +1014,7 @@ ORDER BY nome_aluno, nome_disciplina]]> | ||
| 1012 | </textField> | 1014 | </textField> |
| 1013 | <textField isBlankWhenNull="true"> | 1015 | <textField isBlankWhenNull="true"> |
| 1014 | <reportElement uuid="1017fdae-39da-41ac-a63d-2b175117bcd0" x="510" y="145" width="26" height="11" printWhenGroupChanges="matricula"> | 1016 | <reportElement uuid="1017fdae-39da-41ac-a63d-2b175117bcd0" x="510" y="145" width="26" height="11" printWhenGroupChanges="matricula"> |
| 1015 | - <printWhenExpression><![CDATA[$F{tipo_presenca} = 1]]></printWhenExpression> | 1017 | + <printWhenExpression><![CDATA[$F{tipo_presenca} == 1]]></printWhenExpression> |
| 1016 | </reportElement> | 1018 | </reportElement> |
| 1017 | <textElement textAlignment="Center"> | 1019 | <textElement textAlignment="Center"> |
| 1018 | <font fontName="DejaVu Sans" size="8" isBold="false"/> | 1020 | <font fontName="DejaVu Sans" size="8" isBold="false"/> |
| @@ -1021,7 +1023,7 @@ ORDER BY nome_aluno, nome_disciplina]]> | @@ -1021,7 +1023,7 @@ ORDER BY nome_aluno, nome_disciplina]]> | ||
| 1021 | </textField> | 1023 | </textField> |
| 1022 | <textField isBlankWhenNull="true"> | 1024 | <textField isBlankWhenNull="true"> |
| 1023 | <reportElement uuid="1017fdae-39da-41ac-a63d-2b175117bcd0" x="510" y="145" width="26" height="11" printWhenGroupChanges="matricula"> | 1025 | <reportElement uuid="1017fdae-39da-41ac-a63d-2b175117bcd0" x="510" y="145" width="26" height="11" printWhenGroupChanges="matricula"> |
| 1024 | - <printWhenExpression><![CDATA[$F{tipo_presenca} = 2]]></printWhenExpression> | 1026 | + <printWhenExpression><![CDATA[$F{tipo_presenca} == 2]]></printWhenExpression> |
| 1025 | </reportElement> | 1027 | </reportElement> |
| 1026 | <textElement textAlignment="Center"> | 1028 | <textElement textAlignment="Center"> |
| 1027 | <font fontName="DejaVu Sans" size="8" isBold="false"/> | 1029 | <font fontName="DejaVu Sans" size="8" isBold="false"/> |
| @@ -1248,7 +1250,7 @@ ORDER BY nome_aluno, nome_disciplina]]> | @@ -1248,7 +1250,7 @@ ORDER BY nome_aluno, nome_disciplina]]> | ||
| 1248 | </line> | 1250 | </line> |
| 1249 | <textField pattern="#,##0 %" isBlankWhenNull="true"> | 1251 | <textField pattern="#,##0 %" isBlankWhenNull="true"> |
| 1250 | <reportElement uuid="1017fdae-39da-41ac-a63d-2b175117bcd0" x="510" y="1" width="26" height="15" printWhenGroupChanges="matricula"> | 1252 | <reportElement uuid="1017fdae-39da-41ac-a63d-2b175117bcd0" x="510" y="1" width="26" height="15" printWhenGroupChanges="matricula"> |
| 1251 | - <printWhenExpression><![CDATA[$F{tipo_presenca} = 2]]></printWhenExpression> | 1253 | + <printWhenExpression><![CDATA[$F{tipo_presenca} == 2]]></printWhenExpression> |
| 1252 | </reportElement> | 1254 | </reportElement> |
| 1253 | <textElement textAlignment="Center"> | 1255 | <textElement textAlignment="Center"> |
| 1254 | <font fontName="DejaVu Sans" size="8" isBold="false"/> | 1256 | <font fontName="DejaVu Sans" size="8" isBold="false"/> |
ieducar/modules/Reports/ReportSources/portabilis_historico_escolar_9anos.jasper
0 → 100644
No preview for this file type
ieducar/modules/Reports/ReportSources/portabilis_historico_escolar_9anos.jrxml
| @@ -21,6 +21,7 @@ | @@ -21,6 +21,7 @@ | ||
| 21 | <parameter name="logo" class="java.lang.String"> | 21 | <parameter name="logo" class="java.lang.String"> |
| 22 | <defaultValueExpression><![CDATA[]]></defaultValueExpression> | 22 | <defaultValueExpression><![CDATA[]]></defaultValueExpression> |
| 23 | </parameter> | 23 | </parameter> |
| 24 | + <parameter name="database" class="java.lang.String"/> | ||
| 24 | <queryString> | 25 | <queryString> |
| 25 | <![CDATA[select nm_disciplina, | 26 | <![CDATA[select nm_disciplina, |
| 26 | MAX(nota) AS NOTA, | 27 | MAX(nota) AS NOTA, |
| @@ -267,7 +268,7 @@ SELECT nm_disciplina, | @@ -267,7 +268,7 @@ SELECT nm_disciplina, | ||
| 267 | where hd.sequencial = historico_disciplinas.sequencial AND | 268 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 268 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 269 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 269 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 270 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 270 | - substring(nm_serie,1,1) = 1) as nota_1serie, | 271 | + substring(nm_serie,1,1) = '1') as nota_1serie, |
| 271 | 272 | ||
| 272 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 273 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 273 | '10,0' | 274 | '10,0' |
| @@ -278,7 +279,7 @@ SELECT nm_disciplina, | @@ -278,7 +279,7 @@ SELECT nm_disciplina, | ||
| 278 | where hd.sequencial = historico_disciplinas.sequencial AND | 279 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 279 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 280 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 280 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 281 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 281 | - substring(nm_serie,1,1) = 2) as nota_2serie, | 282 | + substring(nm_serie,1,1) = '2') as nota_2serie, |
| 282 | 283 | ||
| 283 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 284 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 284 | '10,0' | 285 | '10,0' |
| @@ -289,7 +290,7 @@ SELECT nm_disciplina, | @@ -289,7 +290,7 @@ SELECT nm_disciplina, | ||
| 289 | where hd.sequencial = historico_disciplinas.sequencial AND | 290 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 290 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 291 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 291 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 292 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 292 | - substring(nm_serie,1,1) = 3) as nota_3serie, | 293 | + substring(nm_serie,1,1) = '3') as nota_3serie, |
| 293 | 294 | ||
| 294 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 295 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 295 | '10,0' | 296 | '10,0' |
| @@ -300,7 +301,7 @@ SELECT nm_disciplina, | @@ -300,7 +301,7 @@ SELECT nm_disciplina, | ||
| 300 | where hd.sequencial = historico_disciplinas.sequencial AND | 301 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 301 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 302 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 302 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 303 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 303 | - substring(nm_serie,1,1) = 4) as nota_4serie, | 304 | + substring(nm_serie,1,1) = '4') as nota_4serie, |
| 304 | 305 | ||
| 305 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 306 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 306 | '10,0' | 307 | '10,0' |
| @@ -311,7 +312,7 @@ SELECT nm_disciplina, | @@ -311,7 +312,7 @@ SELECT nm_disciplina, | ||
| 311 | where hd.sequencial = historico_disciplinas.sequencial AND | 312 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 312 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 313 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 313 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 314 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 314 | - substring(nm_serie,1,1) = 5) as nota_5serie, | 315 | + substring(nm_serie,1,1) = '5') as nota_5serie, |
| 315 | 316 | ||
| 316 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 317 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 317 | '10,0' | 318 | '10,0' |
| @@ -322,7 +323,7 @@ SELECT nm_disciplina, | @@ -322,7 +323,7 @@ SELECT nm_disciplina, | ||
| 322 | where hd.sequencial = historico_disciplinas.sequencial AND | 323 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 323 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 324 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 324 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 325 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 325 | - substring(nm_serie,1,1) = 6) as nota_6serie, | 326 | + substring(nm_serie,1,1) = '6') as nota_6serie, |
| 326 | 327 | ||
| 327 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 328 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 328 | '10,0' | 329 | '10,0' |
| @@ -333,7 +334,7 @@ SELECT nm_disciplina, | @@ -333,7 +334,7 @@ SELECT nm_disciplina, | ||
| 333 | where hd.sequencial = historico_disciplinas.sequencial AND | 334 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 334 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 335 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 335 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 336 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 336 | - substring(nm_serie,1,1) = 7) as nota_7serie, | 337 | + substring(nm_serie,1,1) = '7') as nota_7serie, |
| 337 | 338 | ||
| 338 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 339 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 339 | '10,0' | 340 | '10,0' |
| @@ -344,7 +345,7 @@ SELECT nm_disciplina, | @@ -344,7 +345,7 @@ SELECT nm_disciplina, | ||
| 344 | where hd.sequencial = historico_disciplinas.sequencial AND | 345 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 345 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 346 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 346 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 347 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 347 | - substring(nm_serie,1,1) = 8) as nota_8serie, | 348 | + substring(nm_serie,1,1) = '8') as nota_8serie, |
| 348 | 349 | ||
| 349 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN | 350 | (select CASE WHEN replace(substring(trim(hd.nota),1,3),'.',',') = '10,' THEN |
| 350 | '10,0' | 351 | '10,0' |
| @@ -355,7 +356,7 @@ SELECT nm_disciplina, | @@ -355,7 +356,7 @@ SELECT nm_disciplina, | ||
| 355 | where hd.sequencial = historico_disciplinas.sequencial AND | 356 | where hd.sequencial = historico_disciplinas.sequencial AND |
| 356 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND | 357 | hd.ref_ref_cod_aluno = historico_disciplinas.ref_ref_cod_aluno AND |
| 357 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 358 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 358 | - substring(nm_serie,1,1) = 9) as nota_9serie, | 359 | + substring(nm_serie,1,1) = '9') as nota_9serie, |
| 359 | 360 | ||
| 360 | (select ano | 361 | (select ano |
| 361 | from pmieducar.historico_escolar he, | 362 | from pmieducar.historico_escolar he, |
| @@ -365,7 +366,7 @@ SELECT nm_disciplina, | @@ -365,7 +366,7 @@ SELECT nm_disciplina, | ||
| 365 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 366 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 366 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 367 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 367 | hd.ref_sequencial = he.sequencial AND | 368 | hd.ref_sequencial = he.sequencial AND |
| 368 | - substring(nm_serie,1,1) = 1) as ano_1serie, | 369 | + substring(nm_serie,1,1) = '1') as ano_1serie, |
| 369 | 370 | ||
| 370 | (select escola | 371 | (select escola |
| 371 | from pmieducar.historico_escolar he, | 372 | from pmieducar.historico_escolar he, |
| @@ -375,7 +376,7 @@ SELECT nm_disciplina, | @@ -375,7 +376,7 @@ SELECT nm_disciplina, | ||
| 375 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 376 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 376 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 377 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 377 | hd.ref_sequencial = he.sequencial AND | 378 | hd.ref_sequencial = he.sequencial AND |
| 378 | - substring(nm_serie,1,1) = 1) as escola_1serie, | 379 | + substring(nm_serie,1,1) = '1') as escola_1serie, |
| 379 | 380 | ||
| 380 | (select escola_cidade | 381 | (select escola_cidade |
| 381 | from pmieducar.historico_escolar he, | 382 | from pmieducar.historico_escolar he, |
| @@ -385,7 +386,7 @@ SELECT nm_disciplina, | @@ -385,7 +386,7 @@ SELECT nm_disciplina, | ||
| 385 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 386 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 386 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 387 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 387 | hd.ref_sequencial = he.sequencial AND | 388 | hd.ref_sequencial = he.sequencial AND |
| 388 | - substring(nm_serie,1,1) = 1) as escola_cidade_1serie, | 389 | + substring(nm_serie,1,1) = '1') as escola_cidade_1serie, |
| 389 | 390 | ||
| 390 | 391 | ||
| 391 | (select escola_uf | 392 | (select escola_uf |
| @@ -396,7 +397,7 @@ SELECT nm_disciplina, | @@ -396,7 +397,7 @@ SELECT nm_disciplina, | ||
| 396 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 397 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 397 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 398 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 398 | hd.ref_sequencial = he.sequencial AND | 399 | hd.ref_sequencial = he.sequencial AND |
| 399 | - substring(nm_serie,1,1) = 1) as escola_uf_1serie, | 400 | + substring(nm_serie,1,1) = '1') as escola_uf_1serie, |
| 400 | 401 | ||
| 401 | (select ano | 402 | (select ano |
| 402 | from pmieducar.historico_escolar he, | 403 | from pmieducar.historico_escolar he, |
| @@ -406,7 +407,7 @@ SELECT nm_disciplina, | @@ -406,7 +407,7 @@ SELECT nm_disciplina, | ||
| 406 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 407 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 407 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 408 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 408 | hd.ref_sequencial = he.sequencial AND | 409 | hd.ref_sequencial = he.sequencial AND |
| 409 | - substring(nm_serie,1,1) = 2) as ano_2serie, | 410 | + substring(nm_serie,1,1) = '2') as ano_2serie, |
| 410 | 411 | ||
| 411 | (select escola | 412 | (select escola |
| 412 | from pmieducar.historico_escolar he, | 413 | from pmieducar.historico_escolar he, |
| @@ -416,7 +417,7 @@ SELECT nm_disciplina, | @@ -416,7 +417,7 @@ SELECT nm_disciplina, | ||
| 416 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 417 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 417 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 418 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 418 | hd.ref_sequencial = he.sequencial AND | 419 | hd.ref_sequencial = he.sequencial AND |
| 419 | - substring(nm_serie,1,1) = 2) as escola_2serie, | 420 | + substring(nm_serie,1,1) = '2') as escola_2serie, |
| 420 | 421 | ||
| 421 | (select escola_cidade | 422 | (select escola_cidade |
| 422 | from pmieducar.historico_escolar he, | 423 | from pmieducar.historico_escolar he, |
| @@ -426,7 +427,7 @@ SELECT nm_disciplina, | @@ -426,7 +427,7 @@ SELECT nm_disciplina, | ||
| 426 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 427 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 427 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 428 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 428 | hd.ref_sequencial = he.sequencial AND | 429 | hd.ref_sequencial = he.sequencial AND |
| 429 | - substring(nm_serie,1,1) = 2) as escola_cidade_2serie, | 430 | + substring(nm_serie,1,1) = '2') as escola_cidade_2serie, |
| 430 | 431 | ||
| 431 | 432 | ||
| 432 | (select escola_uf | 433 | (select escola_uf |
| @@ -437,7 +438,7 @@ SELECT nm_disciplina, | @@ -437,7 +438,7 @@ SELECT nm_disciplina, | ||
| 437 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 438 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 438 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 439 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 439 | hd.ref_sequencial = he.sequencial AND | 440 | hd.ref_sequencial = he.sequencial AND |
| 440 | - substring(nm_serie,1,1) = 2) as escola_uf_2serie, | 441 | + substring(nm_serie,1,1) = '2') as escola_uf_2serie, |
| 441 | 442 | ||
| 442 | (select ano | 443 | (select ano |
| 443 | from pmieducar.historico_escolar he, | 444 | from pmieducar.historico_escolar he, |
| @@ -447,7 +448,7 @@ SELECT nm_disciplina, | @@ -447,7 +448,7 @@ SELECT nm_disciplina, | ||
| 447 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 448 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 448 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 449 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 449 | hd.ref_sequencial = he.sequencial AND | 450 | hd.ref_sequencial = he.sequencial AND |
| 450 | - substring(nm_serie,1,1) = 3) as ano_3serie, | 451 | + substring(nm_serie,1,1) = '3') as ano_3serie, |
| 451 | 452 | ||
| 452 | (select escola | 453 | (select escola |
| 453 | from pmieducar.historico_escolar he, | 454 | from pmieducar.historico_escolar he, |
| @@ -457,7 +458,7 @@ SELECT nm_disciplina, | @@ -457,7 +458,7 @@ SELECT nm_disciplina, | ||
| 457 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 458 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 458 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 459 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 459 | hd.ref_sequencial = he.sequencial AND | 460 | hd.ref_sequencial = he.sequencial AND |
| 460 | - substring(nm_serie,1,1) = 3) as escola_3serie, | 461 | + substring(nm_serie,1,1) = '3') as escola_3serie, |
| 461 | 462 | ||
| 462 | (select escola_cidade | 463 | (select escola_cidade |
| 463 | from pmieducar.historico_escolar he, | 464 | from pmieducar.historico_escolar he, |
| @@ -467,7 +468,7 @@ SELECT nm_disciplina, | @@ -467,7 +468,7 @@ SELECT nm_disciplina, | ||
| 467 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 468 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 468 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 469 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 469 | hd.ref_sequencial = he.sequencial AND | 470 | hd.ref_sequencial = he.sequencial AND |
| 470 | - substring(nm_serie,1,1) = 3) as escola_cidade_3serie, | 471 | + substring(nm_serie,1,1) = '3') as escola_cidade_3serie, |
| 471 | 472 | ||
| 472 | 473 | ||
| 473 | (select escola_uf | 474 | (select escola_uf |
| @@ -478,7 +479,7 @@ SELECT nm_disciplina, | @@ -478,7 +479,7 @@ SELECT nm_disciplina, | ||
| 478 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 479 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 479 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 480 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 480 | hd.ref_sequencial = he.sequencial AND | 481 | hd.ref_sequencial = he.sequencial AND |
| 481 | - substring(nm_serie,1,1) = 3) as escola_uf_3serie, | 482 | + substring(nm_serie,1,1) = '3') as escola_uf_3serie, |
| 482 | 483 | ||
| 483 | (select ano | 484 | (select ano |
| 484 | from pmieducar.historico_escolar he, | 485 | from pmieducar.historico_escolar he, |
| @@ -488,7 +489,7 @@ SELECT nm_disciplina, | @@ -488,7 +489,7 @@ SELECT nm_disciplina, | ||
| 488 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 489 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 489 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 490 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 490 | hd.ref_sequencial = he.sequencial AND | 491 | hd.ref_sequencial = he.sequencial AND |
| 491 | - substring(nm_serie,1,1) = 4) as ano_4serie, | 492 | + substring(nm_serie,1,1) = '4') as ano_4serie, |
| 492 | 493 | ||
| 493 | (select escola | 494 | (select escola |
| 494 | from pmieducar.historico_escolar he, | 495 | from pmieducar.historico_escolar he, |
| @@ -498,7 +499,7 @@ SELECT nm_disciplina, | @@ -498,7 +499,7 @@ SELECT nm_disciplina, | ||
| 498 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 499 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 499 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 500 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 500 | hd.ref_sequencial = he.sequencial AND | 501 | hd.ref_sequencial = he.sequencial AND |
| 501 | - substring(nm_serie,1,1) = 4) as escola_4serie, | 502 | + substring(nm_serie,1,1) = '4') as escola_4serie, |
| 502 | 503 | ||
| 503 | (select escola_cidade | 504 | (select escola_cidade |
| 504 | from pmieducar.historico_escolar he, | 505 | from pmieducar.historico_escolar he, |
| @@ -508,7 +509,7 @@ SELECT nm_disciplina, | @@ -508,7 +509,7 @@ SELECT nm_disciplina, | ||
| 508 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 509 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 509 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 510 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 510 | hd.ref_sequencial = he.sequencial AND | 511 | hd.ref_sequencial = he.sequencial AND |
| 511 | - substring(nm_serie,1,1) = 4) as escola_cidade_4serie, | 512 | + substring(nm_serie,1,1) = '4') as escola_cidade_4serie, |
| 512 | 513 | ||
| 513 | 514 | ||
| 514 | (select escola_uf | 515 | (select escola_uf |
| @@ -519,7 +520,7 @@ SELECT nm_disciplina, | @@ -519,7 +520,7 @@ SELECT nm_disciplina, | ||
| 519 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 520 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 520 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 521 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 521 | hd.ref_sequencial = he.sequencial AND | 522 | hd.ref_sequencial = he.sequencial AND |
| 522 | - substring(nm_serie,1,1) = 4) as escola_uf_4serie, | 523 | + substring(nm_serie,1,1) = '4') as escola_uf_4serie, |
| 523 | 524 | ||
| 524 | (select ano | 525 | (select ano |
| 525 | from pmieducar.historico_escolar he, | 526 | from pmieducar.historico_escolar he, |
| @@ -529,7 +530,7 @@ SELECT nm_disciplina, | @@ -529,7 +530,7 @@ SELECT nm_disciplina, | ||
| 529 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 530 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 530 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 531 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 531 | hd.ref_sequencial = he.sequencial AND | 532 | hd.ref_sequencial = he.sequencial AND |
| 532 | - substring(nm_serie,1,1) = 5) as ano_5serie, | 533 | + substring(nm_serie,1,1) = '5') as ano_5serie, |
| 533 | 534 | ||
| 534 | (select escola | 535 | (select escola |
| 535 | from pmieducar.historico_escolar he, | 536 | from pmieducar.historico_escolar he, |
| @@ -539,7 +540,7 @@ SELECT nm_disciplina, | @@ -539,7 +540,7 @@ SELECT nm_disciplina, | ||
| 539 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 540 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 540 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 541 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 541 | hd.ref_sequencial = he.sequencial AND | 542 | hd.ref_sequencial = he.sequencial AND |
| 542 | - substring(nm_serie,1,1) = 5) as escola_5serie, | 543 | + substring(nm_serie,1,1) = '5') as escola_5serie, |
| 543 | 544 | ||
| 544 | (select escola_cidade | 545 | (select escola_cidade |
| 545 | from pmieducar.historico_escolar he, | 546 | from pmieducar.historico_escolar he, |
| @@ -549,7 +550,7 @@ SELECT nm_disciplina, | @@ -549,7 +550,7 @@ SELECT nm_disciplina, | ||
| 549 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 550 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 550 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 551 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 551 | hd.ref_sequencial = he.sequencial AND | 552 | hd.ref_sequencial = he.sequencial AND |
| 552 | - substring(nm_serie,1,1) = 5) as escola_cidade_5serie, | 553 | + substring(nm_serie,1,1) = '5') as escola_cidade_5serie, |
| 553 | 554 | ||
| 554 | 555 | ||
| 555 | (select escola_uf | 556 | (select escola_uf |
| @@ -560,7 +561,7 @@ SELECT nm_disciplina, | @@ -560,7 +561,7 @@ SELECT nm_disciplina, | ||
| 560 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 561 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 561 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 562 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 562 | hd.ref_sequencial = he.sequencial AND | 563 | hd.ref_sequencial = he.sequencial AND |
| 563 | - substring(nm_serie,1,1) = 5) as escola_uf_5serie, | 564 | + substring(nm_serie,1,1) = '5') as escola_uf_5serie, |
| 564 | 565 | ||
| 565 | (select ano | 566 | (select ano |
| 566 | from pmieducar.historico_escolar he, | 567 | from pmieducar.historico_escolar he, |
| @@ -570,7 +571,7 @@ SELECT nm_disciplina, | @@ -570,7 +571,7 @@ SELECT nm_disciplina, | ||
| 570 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 571 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 571 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 572 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 572 | hd.ref_sequencial = he.sequencial AND | 573 | hd.ref_sequencial = he.sequencial AND |
| 573 | - substring(nm_serie,1,1) = 6) as ano_6serie, | 574 | + substring(nm_serie,1,1) = '6') as ano_6serie, |
| 574 | 575 | ||
| 575 | (select escola | 576 | (select escola |
| 576 | from pmieducar.historico_escolar he, | 577 | from pmieducar.historico_escolar he, |
| @@ -580,7 +581,7 @@ SELECT nm_disciplina, | @@ -580,7 +581,7 @@ SELECT nm_disciplina, | ||
| 580 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 581 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 581 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 582 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 582 | hd.ref_sequencial = he.sequencial AND | 583 | hd.ref_sequencial = he.sequencial AND |
| 583 | - substring(nm_serie,1,1) = 6) as escola_6serie, | 584 | + substring(nm_serie,1,1) = '6') as escola_6serie, |
| 584 | 585 | ||
| 585 | (select escola_cidade | 586 | (select escola_cidade |
| 586 | from pmieducar.historico_escolar he, | 587 | from pmieducar.historico_escolar he, |
| @@ -590,7 +591,7 @@ SELECT nm_disciplina, | @@ -590,7 +591,7 @@ SELECT nm_disciplina, | ||
| 590 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 591 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 591 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 592 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 592 | hd.ref_sequencial = he.sequencial AND | 593 | hd.ref_sequencial = he.sequencial AND |
| 593 | - substring(nm_serie,1,1) = 6) as escola_cidade_6serie, | 594 | + substring(nm_serie,1,1) = '6') as escola_cidade_6serie, |
| 594 | 595 | ||
| 595 | 596 | ||
| 596 | (select escola_uf | 597 | (select escola_uf |
| @@ -601,7 +602,7 @@ SELECT nm_disciplina, | @@ -601,7 +602,7 @@ SELECT nm_disciplina, | ||
| 601 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 602 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 602 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 603 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 603 | hd.ref_sequencial = he.sequencial AND | 604 | hd.ref_sequencial = he.sequencial AND |
| 604 | - substring(nm_serie,1,1) = 6) as escola_uf_6serie, | 605 | + substring(nm_serie,1,1) = '6') as escola_uf_6serie, |
| 605 | 606 | ||
| 606 | (select ano | 607 | (select ano |
| 607 | from pmieducar.historico_escolar he, | 608 | from pmieducar.historico_escolar he, |
| @@ -611,7 +612,7 @@ SELECT nm_disciplina, | @@ -611,7 +612,7 @@ SELECT nm_disciplina, | ||
| 611 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 612 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 612 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 613 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 613 | hd.ref_sequencial = he.sequencial AND | 614 | hd.ref_sequencial = he.sequencial AND |
| 614 | - substring(nm_serie,1,1) = 7) as ano_7serie, | 615 | + substring(nm_serie,1,1) = '7') as ano_7serie, |
| 615 | 616 | ||
| 616 | (select escola | 617 | (select escola |
| 617 | from pmieducar.historico_escolar he, | 618 | from pmieducar.historico_escolar he, |
| @@ -621,7 +622,7 @@ SELECT nm_disciplina, | @@ -621,7 +622,7 @@ SELECT nm_disciplina, | ||
| 621 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 622 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 622 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 623 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 623 | hd.ref_sequencial = he.sequencial AND | 624 | hd.ref_sequencial = he.sequencial AND |
| 624 | - substring(nm_serie,1,1) = 7) as escola_7serie, | 625 | + substring(nm_serie,1,1) = '7') as escola_7serie, |
| 625 | 626 | ||
| 626 | (select escola_cidade | 627 | (select escola_cidade |
| 627 | from pmieducar.historico_escolar he, | 628 | from pmieducar.historico_escolar he, |
| @@ -631,7 +632,7 @@ SELECT nm_disciplina, | @@ -631,7 +632,7 @@ SELECT nm_disciplina, | ||
| 631 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 632 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 632 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 633 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 633 | hd.ref_sequencial = he.sequencial AND | 634 | hd.ref_sequencial = he.sequencial AND |
| 634 | - substring(nm_serie,1,1) = 7) as escola_cidade_7serie, | 635 | + substring(nm_serie,1,1) = '7') as escola_cidade_7serie, |
| 635 | 636 | ||
| 636 | 637 | ||
| 637 | (select escola_uf | 638 | (select escola_uf |
| @@ -642,7 +643,7 @@ SELECT nm_disciplina, | @@ -642,7 +643,7 @@ SELECT nm_disciplina, | ||
| 642 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 643 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 643 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 644 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 644 | hd.ref_sequencial = he.sequencial AND | 645 | hd.ref_sequencial = he.sequencial AND |
| 645 | - substring(nm_serie,1,1) = 7) as escola_uf_7serie, | 646 | + substring(nm_serie,1,1) = '7') as escola_uf_7serie, |
| 646 | 647 | ||
| 647 | (select ano | 648 | (select ano |
| 648 | from pmieducar.historico_escolar he, | 649 | from pmieducar.historico_escolar he, |
| @@ -652,7 +653,7 @@ SELECT nm_disciplina, | @@ -652,7 +653,7 @@ SELECT nm_disciplina, | ||
| 652 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 653 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 653 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 654 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 654 | hd.ref_sequencial = he.sequencial AND | 655 | hd.ref_sequencial = he.sequencial AND |
| 655 | - substring(nm_serie,1,1) = 8) as ano_8serie, | 656 | + substring(nm_serie,1,1) = '8') as ano_8serie, |
| 656 | 657 | ||
| 657 | (select escola | 658 | (select escola |
| 658 | from pmieducar.historico_escolar he, | 659 | from pmieducar.historico_escolar he, |
| @@ -662,7 +663,7 @@ SELECT nm_disciplina, | @@ -662,7 +663,7 @@ SELECT nm_disciplina, | ||
| 662 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 663 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 663 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 664 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 664 | hd.ref_sequencial = he.sequencial AND | 665 | hd.ref_sequencial = he.sequencial AND |
| 665 | - substring(nm_serie,1,1) = 8) as escola_8serie, | 666 | + substring(nm_serie,1,1) = '8') as escola_8serie, |
| 666 | 667 | ||
| 667 | (select escola_cidade | 668 | (select escola_cidade |
| 668 | from pmieducar.historico_escolar he, | 669 | from pmieducar.historico_escolar he, |
| @@ -672,7 +673,7 @@ SELECT nm_disciplina, | @@ -672,7 +673,7 @@ SELECT nm_disciplina, | ||
| 672 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 673 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 673 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 674 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 674 | hd.ref_sequencial = he.sequencial AND | 675 | hd.ref_sequencial = he.sequencial AND |
| 675 | - substring(nm_serie,1,1) = 8) as escola_cidade_8serie, | 676 | + substring(nm_serie,1,1) = '8') as escola_cidade_8serie, |
| 676 | 677 | ||
| 677 | 678 | ||
| 678 | (select escola_uf | 679 | (select escola_uf |
| @@ -683,7 +684,7 @@ SELECT nm_disciplina, | @@ -683,7 +684,7 @@ SELECT nm_disciplina, | ||
| 683 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 684 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 684 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 685 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 685 | hd.ref_sequencial = he.sequencial AND | 686 | hd.ref_sequencial = he.sequencial AND |
| 686 | - substring(nm_serie,1,1) = 8) as escola_uf_8serie, | 687 | + substring(nm_serie,1,1) = '8') as escola_uf_8serie, |
| 687 | 688 | ||
| 688 | (select ano | 689 | (select ano |
| 689 | from pmieducar.historico_escolar he, | 690 | from pmieducar.historico_escolar he, |
| @@ -693,7 +694,7 @@ SELECT nm_disciplina, | @@ -693,7 +694,7 @@ SELECT nm_disciplina, | ||
| 693 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 694 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 694 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 695 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 695 | hd.ref_sequencial = he.sequencial AND | 696 | hd.ref_sequencial = he.sequencial AND |
| 696 | - substring(nm_serie,1,1) = 9) as ano_9serie, | 697 | + substring(nm_serie,1,1) = '9') as ano_9serie, |
| 697 | 698 | ||
| 698 | (select escola | 699 | (select escola |
| 699 | from pmieducar.historico_escolar he, | 700 | from pmieducar.historico_escolar he, |
| @@ -703,7 +704,7 @@ SELECT nm_disciplina, | @@ -703,7 +704,7 @@ SELECT nm_disciplina, | ||
| 703 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 704 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 704 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 705 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 705 | hd.ref_sequencial = he.sequencial AND | 706 | hd.ref_sequencial = he.sequencial AND |
| 706 | - substring(nm_serie,1,1) = 9) as escola_9serie, | 707 | + substring(nm_serie,1,1) = '9') as escola_9serie, |
| 707 | 708 | ||
| 708 | (select escola_cidade | 709 | (select escola_cidade |
| 709 | from pmieducar.historico_escolar he, | 710 | from pmieducar.historico_escolar he, |
| @@ -713,7 +714,7 @@ SELECT nm_disciplina, | @@ -713,7 +714,7 @@ SELECT nm_disciplina, | ||
| 713 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 714 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 714 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 715 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 715 | hd.ref_sequencial = he.sequencial AND | 716 | hd.ref_sequencial = he.sequencial AND |
| 716 | - substring(nm_serie,1,1) = 9) as escola_cidade_9serie, | 717 | + substring(nm_serie,1,1) = '9') as escola_cidade_9serie, |
| 717 | 718 | ||
| 718 | 719 | ||
| 719 | (select escola_uf | 720 | (select escola_uf |
| @@ -724,7 +725,7 @@ SELECT nm_disciplina, | @@ -724,7 +725,7 @@ SELECT nm_disciplina, | ||
| 724 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 725 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 725 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 726 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 726 | hd.ref_sequencial = he.sequencial AND | 727 | hd.ref_sequencial = he.sequencial AND |
| 727 | - substring(nm_serie,1,1) = 9) as escola_uf_9serie, | 728 | + substring(nm_serie,1,1) = '9') as escola_uf_9serie, |
| 728 | 729 | ||
| 729 | to_char(CURRENT_DATE,'dd/mm/yyyy') as data_atual, | 730 | to_char(CURRENT_DATE,'dd/mm/yyyy') as data_atual, |
| 730 | 731 | ||
| @@ -746,7 +747,7 @@ SELECT nm_disciplina, | @@ -746,7 +747,7 @@ SELECT nm_disciplina, | ||
| 746 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 747 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 747 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 748 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 748 | hd.ref_sequencial = he.sequencial AND | 749 | hd.ref_sequencial = he.sequencial AND |
| 749 | - substring(nm_serie,1,1) = 1) as obs1, | 750 | + substring(nm_serie,1,1) = '1') as obs1, |
| 750 | 751 | ||
| 751 | (select he.observacao | 752 | (select he.observacao |
| 752 | from pmieducar.historico_escolar he, | 753 | from pmieducar.historico_escolar he, |
| @@ -756,7 +757,7 @@ SELECT nm_disciplina, | @@ -756,7 +757,7 @@ SELECT nm_disciplina, | ||
| 756 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 757 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 757 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 758 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 758 | hd.ref_sequencial = he.sequencial AND | 759 | hd.ref_sequencial = he.sequencial AND |
| 759 | - substring(nm_serie,1,1) = 2) as obs2, | 760 | + substring(nm_serie,1,1) = '2') as obs2, |
| 760 | 761 | ||
| 761 | (select he.observacao | 762 | (select he.observacao |
| 762 | from pmieducar.historico_escolar he, | 763 | from pmieducar.historico_escolar he, |
| @@ -766,7 +767,7 @@ SELECT nm_disciplina, | @@ -766,7 +767,7 @@ SELECT nm_disciplina, | ||
| 766 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 767 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 767 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 768 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 768 | hd.ref_sequencial = he.sequencial AND | 769 | hd.ref_sequencial = he.sequencial AND |
| 769 | - substring(nm_serie,1,1) = 3) as obs3, | 770 | + substring(nm_serie,1,1) = '3') as obs3, |
| 770 | 771 | ||
| 771 | (select he.observacao | 772 | (select he.observacao |
| 772 | from pmieducar.historico_escolar he, | 773 | from pmieducar.historico_escolar he, |
| @@ -776,7 +777,7 @@ SELECT nm_disciplina, | @@ -776,7 +777,7 @@ SELECT nm_disciplina, | ||
| 776 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 777 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 777 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 778 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 778 | hd.ref_sequencial = he.sequencial AND | 779 | hd.ref_sequencial = he.sequencial AND |
| 779 | - substring(nm_serie,1,1) = 4) as obs4, | 780 | + substring(nm_serie,1,1) = '4') as obs4, |
| 780 | 781 | ||
| 781 | (select he.observacao | 782 | (select he.observacao |
| 782 | from pmieducar.historico_escolar he, | 783 | from pmieducar.historico_escolar he, |
| @@ -786,7 +787,7 @@ SELECT nm_disciplina, | @@ -786,7 +787,7 @@ SELECT nm_disciplina, | ||
| 786 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 787 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 787 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 788 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 788 | hd.ref_sequencial = he.sequencial AND | 789 | hd.ref_sequencial = he.sequencial AND |
| 789 | - substring(nm_serie,1,1) = 5) as obs5, | 790 | + substring(nm_serie,1,1) = '5') as obs5, |
| 790 | 791 | ||
| 791 | (select he.observacao | 792 | (select he.observacao |
| 792 | from pmieducar.historico_escolar he, | 793 | from pmieducar.historico_escolar he, |
| @@ -796,7 +797,7 @@ SELECT nm_disciplina, | @@ -796,7 +797,7 @@ SELECT nm_disciplina, | ||
| 796 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 797 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 797 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 798 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 798 | hd.ref_sequencial = he.sequencial AND | 799 | hd.ref_sequencial = he.sequencial AND |
| 799 | - substring(nm_serie,1,1) = 6) as obs6, | 800 | + substring(nm_serie,1,1) = '6') as obs6, |
| 800 | 801 | ||
| 801 | (select he.observacao | 802 | (select he.observacao |
| 802 | from pmieducar.historico_escolar he, | 803 | from pmieducar.historico_escolar he, |
| @@ -806,7 +807,7 @@ SELECT nm_disciplina, | @@ -806,7 +807,7 @@ SELECT nm_disciplina, | ||
| 806 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 807 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 807 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 808 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 808 | hd.ref_sequencial = he.sequencial AND | 809 | hd.ref_sequencial = he.sequencial AND |
| 809 | - substring(nm_serie,1,1) = 7) as obs7, | 810 | + substring(nm_serie,1,1) = '7') as obs7, |
| 810 | 811 | ||
| 811 | (select he.observacao | 812 | (select he.observacao |
| 812 | from pmieducar.historico_escolar he, | 813 | from pmieducar.historico_escolar he, |
| @@ -816,7 +817,7 @@ SELECT nm_disciplina, | @@ -816,7 +817,7 @@ SELECT nm_disciplina, | ||
| 816 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 817 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 817 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 818 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 818 | hd.ref_sequencial = he.sequencial AND | 819 | hd.ref_sequencial = he.sequencial AND |
| 819 | - substring(nm_serie,1,1) = 8) as obs8, | 820 | + substring(nm_serie,1,1) = '8') as obs8, |
| 820 | 821 | ||
| 821 | (select he.observacao | 822 | (select he.observacao |
| 822 | from pmieducar.historico_escolar he, | 823 | from pmieducar.historico_escolar he, |
| @@ -826,7 +827,7 @@ SELECT nm_disciplina, | @@ -826,7 +827,7 @@ SELECT nm_disciplina, | ||
| 826 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 827 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 827 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 828 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 828 | hd.ref_sequencial = he.sequencial AND | 829 | hd.ref_sequencial = he.sequencial AND |
| 829 | - substring(nm_serie,1,1) = 9) as obs9, | 830 | + substring(nm_serie,1,1) = '9') as obs9, |
| 830 | 831 | ||
| 831 | (select he.frequencia | 832 | (select he.frequencia |
| 832 | from pmieducar.historico_escolar he, | 833 | from pmieducar.historico_escolar he, |
| @@ -836,7 +837,7 @@ SELECT nm_disciplina, | @@ -836,7 +837,7 @@ SELECT nm_disciplina, | ||
| 836 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 837 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 837 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 838 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 838 | hd.ref_sequencial = he.sequencial AND | 839 | hd.ref_sequencial = he.sequencial AND |
| 839 | - substring(nm_serie,1,1) = 1) as freq1, | 840 | + substring(nm_serie,1,1) = '1') as freq1, |
| 840 | 841 | ||
| 841 | (select he.frequencia | 842 | (select he.frequencia |
| 842 | from pmieducar.historico_escolar he, | 843 | from pmieducar.historico_escolar he, |
| @@ -846,7 +847,7 @@ SELECT nm_disciplina, | @@ -846,7 +847,7 @@ SELECT nm_disciplina, | ||
| 846 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 847 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 847 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 848 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 848 | hd.ref_sequencial = he.sequencial AND | 849 | hd.ref_sequencial = he.sequencial AND |
| 849 | - substring(nm_serie,1,1) = 2) as freq2, | 850 | + substring(nm_serie,1,1) = '2') as freq2, |
| 850 | 851 | ||
| 851 | (select he.frequencia | 852 | (select he.frequencia |
| 852 | from pmieducar.historico_escolar he, | 853 | from pmieducar.historico_escolar he, |
| @@ -856,7 +857,7 @@ SELECT nm_disciplina, | @@ -856,7 +857,7 @@ SELECT nm_disciplina, | ||
| 856 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 857 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 857 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 858 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 858 | hd.ref_sequencial = he.sequencial AND | 859 | hd.ref_sequencial = he.sequencial AND |
| 859 | - substring(nm_serie,1,1) = 3) as freq3, | 860 | + substring(nm_serie,1,1) = '3') as freq3, |
| 860 | 861 | ||
| 861 | (select he.frequencia | 862 | (select he.frequencia |
| 862 | from pmieducar.historico_escolar he, | 863 | from pmieducar.historico_escolar he, |
| @@ -866,7 +867,7 @@ SELECT nm_disciplina, | @@ -866,7 +867,7 @@ SELECT nm_disciplina, | ||
| 866 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 867 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 867 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 868 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 868 | hd.ref_sequencial = he.sequencial AND | 869 | hd.ref_sequencial = he.sequencial AND |
| 869 | - substring(nm_serie,1,1) = 4) as freq4, | 870 | + substring(nm_serie,1,1) = '4') as freq4, |
| 870 | 871 | ||
| 871 | (select he.frequencia | 872 | (select he.frequencia |
| 872 | from pmieducar.historico_escolar he, | 873 | from pmieducar.historico_escolar he, |
| @@ -876,7 +877,7 @@ SELECT nm_disciplina, | @@ -876,7 +877,7 @@ SELECT nm_disciplina, | ||
| 876 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 877 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 877 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 878 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 878 | hd.ref_sequencial = he.sequencial AND | 879 | hd.ref_sequencial = he.sequencial AND |
| 879 | - substring(nm_serie,1,1) = 5) as freq5, | 880 | + substring(nm_serie,1,1) = '5') as freq5, |
| 880 | 881 | ||
| 881 | (select he.frequencia | 882 | (select he.frequencia |
| 882 | from pmieducar.historico_escolar he, | 883 | from pmieducar.historico_escolar he, |
| @@ -886,7 +887,7 @@ SELECT nm_disciplina, | @@ -886,7 +887,7 @@ SELECT nm_disciplina, | ||
| 886 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 887 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 887 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 888 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 888 | hd.ref_sequencial = he.sequencial AND | 889 | hd.ref_sequencial = he.sequencial AND |
| 889 | - substring(nm_serie,1,1) = 6) as freq6, | 890 | + substring(nm_serie,1,1) = '6') as freq6, |
| 890 | 891 | ||
| 891 | (select he.frequencia | 892 | (select he.frequencia |
| 892 | from pmieducar.historico_escolar he, | 893 | from pmieducar.historico_escolar he, |
| @@ -896,7 +897,7 @@ SELECT nm_disciplina, | @@ -896,7 +897,7 @@ SELECT nm_disciplina, | ||
| 896 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 897 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 897 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 898 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 898 | hd.ref_sequencial = he.sequencial AND | 899 | hd.ref_sequencial = he.sequencial AND |
| 899 | - substring(nm_serie,1,1) = 7) as freq7, | 900 | + substring(nm_serie,1,1) = '7') as freq7, |
| 900 | 901 | ||
| 901 | (select he.frequencia | 902 | (select he.frequencia |
| 902 | from pmieducar.historico_escolar he, | 903 | from pmieducar.historico_escolar he, |
| @@ -906,7 +907,7 @@ SELECT nm_disciplina, | @@ -906,7 +907,7 @@ SELECT nm_disciplina, | ||
| 906 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 907 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 907 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 908 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 908 | hd.ref_sequencial = he.sequencial AND | 909 | hd.ref_sequencial = he.sequencial AND |
| 909 | - substring(nm_serie,1,1) = 8) as freq8, | 910 | + substring(nm_serie,1,1) = '8') as freq8, |
| 910 | 911 | ||
| 911 | (select he.frequencia | 912 | (select he.frequencia |
| 912 | from pmieducar.historico_escolar he, | 913 | from pmieducar.historico_escolar he, |
| @@ -916,7 +917,7 @@ SELECT nm_disciplina, | @@ -916,7 +917,7 @@ SELECT nm_disciplina, | ||
| 916 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND | 917 | hd.ref_sequencial = historico_disciplinas.ref_sequencial AND |
| 917 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND | 918 | hd.ref_ref_cod_aluno = he.ref_cod_aluno AND |
| 918 | hd.ref_sequencial = he.sequencial AND | 919 | hd.ref_sequencial = he.sequencial AND |
| 919 | - substring(nm_serie,1,1) = 9) as freq9, | 920 | + substring(nm_serie,1,1) = '9') as freq9, |
| 920 | 921 | ||
| 921 | (SELECT distinct | 922 | (SELECT distinct |
| 922 | (CASE WHEN he.aceleracao = 1 THEN | 923 | (CASE WHEN he.aceleracao = 1 THEN |
| @@ -930,7 +931,7 @@ SELECT nm_disciplina, | @@ -930,7 +931,7 @@ SELECT nm_disciplina, | ||
| 930 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 931 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 931 | he.ativo = 1 AND | 932 | he.ativo = 1 AND |
| 932 | he.ano = historico_escolar.ano AND | 933 | he.ano = historico_escolar.ano AND |
| 933 | - substring(nm_serie,1,1) = 1 AND | 934 | + substring(nm_serie,1,1) = '1' AND |
| 934 | he.sequencial = historico_escolar.sequencial) as status_serie1, | 935 | he.sequencial = historico_escolar.sequencial) as status_serie1, |
| 935 | 936 | ||
| 936 | 937 | ||
| @@ -945,7 +946,7 @@ SELECT nm_disciplina, | @@ -945,7 +946,7 @@ SELECT nm_disciplina, | ||
| 945 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 946 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 946 | he.ativo = 1 AND | 947 | he.ativo = 1 AND |
| 947 | he.ano = historico_escolar.ano AND | 948 | he.ano = historico_escolar.ano AND |
| 948 | - substring(nm_serie,1,1) = 2 AND | 949 | + substring(nm_serie,1,1) = '2' AND |
| 949 | he.sequencial = historico_escolar.sequencial) as status_serie2, | 950 | he.sequencial = historico_escolar.sequencial) as status_serie2, |
| 950 | 951 | ||
| 951 | 952 | ||
| @@ -960,7 +961,7 @@ SELECT nm_disciplina, | @@ -960,7 +961,7 @@ SELECT nm_disciplina, | ||
| 960 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 961 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 961 | he.ativo = 1 AND | 962 | he.ativo = 1 AND |
| 962 | he.ano = historico_escolar.ano AND | 963 | he.ano = historico_escolar.ano AND |
| 963 | - substring(nm_serie,1,1) = 3 AND | 964 | + substring(nm_serie,1,1) = '3' AND |
| 964 | he.sequencial = historico_escolar.sequencial) as status_serie3, | 965 | he.sequencial = historico_escolar.sequencial) as status_serie3, |
| 965 | 966 | ||
| 966 | 967 | ||
| @@ -975,7 +976,7 @@ SELECT nm_disciplina, | @@ -975,7 +976,7 @@ SELECT nm_disciplina, | ||
| 975 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 976 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 976 | he.ativo = 1 AND | 977 | he.ativo = 1 AND |
| 977 | he.ano = historico_escolar.ano AND | 978 | he.ano = historico_escolar.ano AND |
| 978 | - substring(nm_serie,1,1) = 4 AND | 979 | + substring(nm_serie,1,1) = '4' AND |
| 979 | he.sequencial = historico_escolar.sequencial) as status_serie4, | 980 | he.sequencial = historico_escolar.sequencial) as status_serie4, |
| 980 | 981 | ||
| 981 | 982 | ||
| @@ -990,7 +991,7 @@ SELECT nm_disciplina, | @@ -990,7 +991,7 @@ SELECT nm_disciplina, | ||
| 990 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 991 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 991 | he.ativo = 1 AND | 992 | he.ativo = 1 AND |
| 992 | he.ano = historico_escolar.ano AND | 993 | he.ano = historico_escolar.ano AND |
| 993 | - substring(nm_serie,1,1) = 5 AND | 994 | + substring(nm_serie,1,1) = '5' AND |
| 994 | he.sequencial = historico_escolar.sequencial) as status_serie5, | 995 | he.sequencial = historico_escolar.sequencial) as status_serie5, |
| 995 | 996 | ||
| 996 | 997 | ||
| @@ -1005,7 +1006,7 @@ SELECT nm_disciplina, | @@ -1005,7 +1006,7 @@ SELECT nm_disciplina, | ||
| 1005 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 1006 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 1006 | he.ativo = 1 AND | 1007 | he.ativo = 1 AND |
| 1007 | he.ano = historico_escolar.ano AND | 1008 | he.ano = historico_escolar.ano AND |
| 1008 | - substring(nm_serie,1,1) = 6 AND | 1009 | + substring(nm_serie,1,1) = '6' AND |
| 1009 | he.sequencial = historico_escolar.sequencial) as status_serie6, | 1010 | he.sequencial = historico_escolar.sequencial) as status_serie6, |
| 1010 | 1011 | ||
| 1011 | 1012 | ||
| @@ -1020,7 +1021,7 @@ SELECT nm_disciplina, | @@ -1020,7 +1021,7 @@ SELECT nm_disciplina, | ||
| 1020 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 1021 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 1021 | he.ativo = 1 AND | 1022 | he.ativo = 1 AND |
| 1022 | he.ano = historico_escolar.ano AND | 1023 | he.ano = historico_escolar.ano AND |
| 1023 | - substring(nm_serie,1,1) = 7 AND | 1024 | + substring(nm_serie,1,1) = '7' AND |
| 1024 | he.sequencial = historico_escolar.sequencial) as status_serie7, | 1025 | he.sequencial = historico_escolar.sequencial) as status_serie7, |
| 1025 | 1026 | ||
| 1026 | 1027 | ||
| @@ -1035,7 +1036,7 @@ SELECT nm_disciplina, | @@ -1035,7 +1036,7 @@ SELECT nm_disciplina, | ||
| 1035 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 1036 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 1036 | he.ativo = 1 AND | 1037 | he.ativo = 1 AND |
| 1037 | he.ano = historico_escolar.ano AND | 1038 | he.ano = historico_escolar.ano AND |
| 1038 | - substring(nm_serie,1,1) = 8 AND | 1039 | + substring(nm_serie,1,1) = '8' AND |
| 1039 | he.sequencial = historico_escolar.sequencial) as status_serie8, | 1040 | he.sequencial = historico_escolar.sequencial) as status_serie8, |
| 1040 | 1041 | ||
| 1041 | 1042 | ||
| @@ -1050,7 +1051,7 @@ SELECT nm_disciplina, | @@ -1050,7 +1051,7 @@ SELECT nm_disciplina, | ||
| 1050 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND | 1051 | he.ref_cod_aluno = historico_escolar.ref_cod_aluno AND |
| 1051 | he.ativo = 1 AND | 1052 | he.ativo = 1 AND |
| 1052 | he.ano = historico_escolar.ano AND | 1053 | he.ano = historico_escolar.ano AND |
| 1053 | - substring(nm_serie,1,1) = 9 AND | 1054 | + substring(nm_serie,1,1) = '9' AND |
| 1054 | he.sequencial = historico_escolar.sequencial) as status_serie9, | 1055 | he.sequencial = historico_escolar.sequencial) as status_serie9, |
| 1055 | 1056 | ||
| 1056 | 1057 | ||
| @@ -1077,7 +1078,7 @@ SELECT nm_disciplina, | @@ -1077,7 +1078,7 @@ SELECT nm_disciplina, | ||
| 1077 | FROM pmieducar.historico_escolar he | 1078 | FROM pmieducar.historico_escolar he |
| 1078 | WHERE he.ref_cod_aluno = $P{aluno})) AS num_folha, | 1079 | WHERE he.ref_cod_aluno = $P{aluno})) AS num_folha, |
| 1079 | 1080 | ||
| 1080 | -( select CASE WHEN ((substring(nm_serie,1,1) = 8) or (substring(nm_serie,1,1) = 9)) THEN | 1081 | +( select CASE WHEN ((substring(nm_serie,1,1) = '8') or (substring(nm_serie,1,1) = '9')) THEN |
| 1081 | 'concluiu o ENSINO FUNDAMENTAL (8 ANOS)' | 1082 | 'concluiu o ENSINO FUNDAMENTAL (8 ANOS)' |
| 1082 | ELSE | 1083 | ELSE |
| 1083 | 'concluiu o ' || substring(nm_serie,1,1) || ' ano' | 1084 | 'concluiu o ' || substring(nm_serie,1,1) || ' ano' |