ajustes do historico escolar e carteirinha
This commit is contained in:
@@ -72,12 +72,12 @@ class DrawerCustom extends StatelessWidget {
|
|||||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
icone: LineIcons.clipboardList,
|
icone: LineIcons.clipboardList,
|
||||||
texto: 'Boletim Escolar',
|
texto: 'Boletim Escolar ${DateTime.now().year}',
|
||||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(
|
onPressed: ()=>Navigator.push(context, MaterialPageRoute(
|
||||||
builder: (context)=>
|
builder: (context)=>
|
||||||
TelaBoletim(
|
TelaBoletim(
|
||||||
estudanteModelo: alunos[indiceFilhos],
|
estudanteModelo: alunos[indiceFilhos],
|
||||||
ano: '2023',
|
ano: '${DateTime.now().year}',
|
||||||
turma: "${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['DESC_SERIE']} ${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['TURMA']}",
|
turma: "${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['DESC_SERIE']} ${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['TURMA']}",
|
||||||
matricula: alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['CD_MATRICULA'].toString()
|
matricula: alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['CD_MATRICULA'].toString()
|
||||||
)
|
)
|
||||||
@@ -87,8 +87,17 @@ class DrawerCustom extends StatelessWidget {
|
|||||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
icone: LineIcons.fileContract,
|
icone: LineIcons.fileContract,
|
||||||
texto: 'Histórico Escolar',
|
texto: 'Boletim Escolar ${DateTime.now().year-1}',
|
||||||
onPressed: ()=>Navigator.push(context, MaterialPageRoute(builder: (context)=>TelaHistorico(alunos: alunos,indiceAluno: indiceFilhos))),
|
onPressed: ()=> Navigator.push(context,
|
||||||
|
MaterialPageRoute(builder: (context)=>
|
||||||
|
TelaBoletim(
|
||||||
|
estudanteModelo: alunos[indiceFilhos],
|
||||||
|
ano: '${DateTime.now().year-1}',
|
||||||
|
turma: "${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['DESC_SERIE']} ${alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['TURMA']}",
|
||||||
|
matricula: alunos[indiceFilhos].dados[alunos[indiceFilhos].nroAluno]['CD_MATRICULA'].toString()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
Container(height: 1,color: PaletaCores.divider,margin: EdgeInsets.symmetric(horizontal: 20),),
|
||||||
ItemDrawer(
|
ItemDrawer(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:rkm_educa_app/telas/tela_splash.dart';
|
import 'package:rkm_educa_app/telas/tela_splash.dart';
|
||||||
|
|
||||||
@@ -12,6 +13,8 @@ class PostHttpOverrides extends HttpOverrides{
|
|||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
|
||||||
HttpOverrides.global = new PostHttpOverrides();
|
HttpOverrides.global = new PostHttpOverrides();
|
||||||
runApp(MyApp());
|
runApp(MyApp());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,31 @@ class _TelaBoletimState extends State<TelaBoletim> {
|
|||||||
List <ItemDisciplina> listDisciplinas3 = [];
|
List <ItemDisciplina> listDisciplinas3 = [];
|
||||||
List <ItemDisciplina> listDisciplinas4 = [];
|
List <ItemDisciplina> listDisciplinas4 = [];
|
||||||
bool carregando = true;
|
bool carregando = true;
|
||||||
|
String matricula = '';
|
||||||
|
|
||||||
|
getMatriculas()async{
|
||||||
|
String cd = widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['CD_ALUNO'];
|
||||||
|
final url = '${widget.estudanteModelo.URL}/matriculas_aluno?CD_ALUNO=$cd&CIDADE=${widget.estudanteModelo.cidade}';
|
||||||
|
print(url);
|
||||||
|
final response = await http.get(Uri.parse(url));
|
||||||
|
var map = json.decode(response.body);
|
||||||
|
List list0 = map;
|
||||||
|
List list = list0.reversed.toList();
|
||||||
|
print(map);
|
||||||
|
if(list.length!=0){
|
||||||
|
for(int i=0; list.length>i;i++){
|
||||||
|
if('${list[i]['ANO_FREQ']}'.toString().trim() == widget.ano){
|
||||||
|
widget.matricula = list[i]['CD_MATRICULA'].toString();
|
||||||
|
widget.turma = '${list[i]['DESC_SERIE']} ${list[i]['TURMA']}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buscarNotas();
|
||||||
|
}else{
|
||||||
|
showSnackBar(context, 'Notas não encontradas!', Colors.red);
|
||||||
|
carregando = false;
|
||||||
|
setState((){});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buscarNotas()async{
|
buscarNotas()async{
|
||||||
|
|
||||||
@@ -146,14 +171,14 @@ class _TelaBoletimState extends State<TelaBoletim> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
buscarNotas();
|
getMatriculas();
|
||||||
MainControllers().salvarLog(widget.estudanteModelo, 'BOLETIM');
|
MainControllers().salvarLog(widget.estudanteModelo, 'BOLETIM');
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBarCustom().appbar(context, 'BOLETIM ESCOLAR'),
|
appBar: AppBarCustom().appbar(context, 'BOLETIM ESCOLAR ${widget.ano}'),
|
||||||
// drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
// drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
|
||||||
body: carregando?Center(
|
body: carregando?Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class _TelaCadastroState extends State<TelaCadastro> {
|
|||||||
|
|
||||||
criarNumero(){
|
criarNumero(){
|
||||||
var random = Random();
|
var random = Random();
|
||||||
nroSMS = (random.nextInt(9000) + 1000).toString();
|
nroSMS = (random.nextInt(900000) + 100000).toString();
|
||||||
apiSMS();
|
apiSMS();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +116,8 @@ class _TelaCadastroState extends State<TelaCadastro> {
|
|||||||
final String authToken = '6nPV7rkTncLaugyoEBHQklHrvD5-GzDVMCeI';
|
final String authToken = '6nPV7rkTncLaugyoEBHQklHrvD5-GzDVMCeI';
|
||||||
final headers = {
|
final headers = {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Authorization':'Y2FicmV1dmEucmVzdDo0U0lmYktjUTgy',
|
'Authorization':'cmttc2lzdGVtYXMucmVzdDp5Nkc5TnNlNDVV',
|
||||||
|
// 'Authorization':'Y2FicmV1dmEucmVzdDo0U0lmYktjUTgy',
|
||||||
'Cache-Control': 'no-cache'
|
'Cache-Control': 'no-cache'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class _TelaHistoricoState extends State<TelaHistorico> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBarCustom().appbar(context, 'HISTÓRICO ESCOLAR'),
|
appBar: AppBarCustom().appbar(context, 'BOLETIM ESCOLAR ${DateTime.now().year-1}'),
|
||||||
drawer: DrawerCustom(alunos:widget.alunos,indiceFilhos: widget.indiceAluno),
|
drawer: DrawerCustom(alunos:widget.alunos,indiceFilhos: widget.indiceAluno),
|
||||||
body: carregando?Center(
|
body: carregando?Center(
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|||||||
@@ -33,11 +33,13 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
bool carregando = true;
|
bool carregando = true;
|
||||||
String dataNasc = '';
|
String dataNasc = '';
|
||||||
String dataEmissao = '';
|
String dataEmissao = '';
|
||||||
|
double borda = 1.0;
|
||||||
|
|
||||||
getPasse()async{
|
getPasse()async{
|
||||||
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
||||||
String passe = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
//aqui
|
||||||
final url = '${widget.alunos[widget.indiceAluno].URL}/passe?CD_ALUNO=${passe}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
// String passe = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
||||||
|
final url = '${widget.alunos[widget.indiceAluno].URL}/passe?CD_ALUNO=${teste_passe}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||||
print(url);
|
print(url);
|
||||||
final response = await http.get(Uri.parse(url));
|
final response = await http.get(Uri.parse(url));
|
||||||
var map = json.decode(response.body);
|
var map = json.decode(response.body);
|
||||||
@@ -63,7 +65,8 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
carregando = false;
|
carregando = false;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
}else{
|
}else{
|
||||||
getFrequencia(passe);
|
//aqui
|
||||||
|
getFrequencia(teste_passe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,8 +125,9 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
carregando = true;
|
carregando = true;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
||||||
String CD_ALUNO = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
//aqui
|
||||||
final url = '${widget.alunos[widget.indiceAluno].URL}/carteira?CD_ALUNO=${CD_ALUNO}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
// String CD_ALUNO = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
|
||||||
|
final url = '${widget.alunos[widget.indiceAluno].URL}/carteira?CD_ALUNO=${teste_passe}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
|
||||||
print(url);
|
print(url);
|
||||||
final response = await http.get(Uri.parse(url));
|
final response = await http.get(Uri.parse(url));
|
||||||
var map = json.decode(response.body);
|
var map = json.decode(response.body);
|
||||||
@@ -146,9 +150,9 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
Container(
|
Container(
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
width: 378,
|
width: 378,
|
||||||
height: 270,
|
height: 268,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@@ -160,18 +164,18 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
height: 159,
|
height: 159,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(text: '3x4',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
child: TextCustom(text: '3x4',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 235,
|
width: 237,
|
||||||
height: 65,
|
height: 65,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
@@ -185,26 +189,26 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 235,
|
width: 237,
|
||||||
height: 20,
|
height: 20,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(text: '1ª Via - Transporte Escolar',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
child: TextCustom(text: '1ª Via - Transporte Escolar',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 235,
|
width: 237,
|
||||||
height: 20,
|
height: 20,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(text: 'RA: ${dadosCarteira[0]['NR_RA']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
child: TextCustom(text: 'RA: ${dadosCarteira[0]['NR_RA']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: 235,
|
width: 237,
|
||||||
height: 54,
|
height: 54,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(text: 'Nome: ${dadosCarteira[0]['NO_ALUNO']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black),
|
child: TextCustom(text: 'Nome: ${dadosCarteira[0]['NO_ALUNO']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black),
|
||||||
),
|
),
|
||||||
@@ -216,7 +220,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
width: 373,
|
width: 373,
|
||||||
height: 27.5,
|
height: 27.5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(text: ' Endereço: ${dadosCarteira[0]['NO_LOGRADOURO']}, ${dadosCarteira[0]['NR_LOGRADOURO']}, ${dadosCarteira[0]['DESC_BAIRRO']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
child: TextCustom(text: ' Endereço: ${dadosCarteira[0]['NO_LOGRADOURO']}, ${dadosCarteira[0]['NR_LOGRADOURO']}, ${dadosCarteira[0]['DESC_BAIRRO']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
),
|
),
|
||||||
@@ -224,7 +228,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
width: 373,
|
width: 373,
|
||||||
height: 26.5,
|
height: 26.5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(
|
child: TextCustom(
|
||||||
text: ' Fone: (${dadosCarteira[0]['NR_DDD_TELEFONE']}) ${dadosCarteira[0]['NR_TELEFONE']} Escola: ${dadosCarteira[0]['NO_FANTASIA']}',
|
text: ' Fone: (${dadosCarteira[0]['NR_DDD_TELEFONE']}) ${dadosCarteira[0]['NR_TELEFONE']} Escola: ${dadosCarteira[0]['NO_FANTASIA']}',
|
||||||
@@ -234,7 +238,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
width: 373,
|
width: 373,
|
||||||
height: 26.5,
|
height: 26.5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(
|
child: TextCustom(
|
||||||
text: ' Celular: (${dadosCarteira[0]['NR_DDD_CELULAR']}) ${dadosCarteira[0]['NR_CELULAR']} Validade: ${dadosCarteira[0]['VALIDADE_CARTEIRINHA']} CEAC: ${dadosCarteira[0]['CEAC'].toString().trim()=='N'?'NÃO':'SIM'}',
|
text: ' Celular: (${dadosCarteira[0]['NR_DDD_CELULAR']}) ${dadosCarteira[0]['NR_CELULAR']} Validade: ${dadosCarteira[0]['VALIDADE_CARTEIRINHA']} CEAC: ${dadosCarteira[0]['CEAC'].toString().trim()=='N'?'NÃO':'SIM'}',
|
||||||
@@ -244,7 +248,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
width: 373,
|
width: 373,
|
||||||
height: 26.5,
|
height: 26.5,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 2.0)
|
border: Border.all(width: borda)
|
||||||
),
|
),
|
||||||
child: TextCustom(text: ' Tipo Transp.: ${dadosCarteira[0]['FL_TIPO_TRANSPORTE'].toString().trim()=='R'?'TRANSPORTE MUNICIPAL':'TRANSPORTE INTERMUNICIPAL'}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
child: TextCustom(text: ' Tipo Transp.: ${dadosCarteira[0]['FL_TIPO_TRANSPORTE'].toString().trim()=='R'?'TRANSPORTE MUNICIPAL':'TRANSPORTE INTERMUNICIPAL'}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
),
|
),
|
||||||
@@ -255,7 +259,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
width: 378,
|
width: 378,
|
||||||
height: 270,
|
height: 270,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(width: 4.0)
|
border: Border.all(width: borda*2)
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
Reference in New Issue
Block a user