ajustes do historico escolar e carteirinha

This commit is contained in:
Reginaldo
2023-09-15 11:42:30 -03:00
parent 967ff57471
commit ad183d0f18
6 changed files with 72 additions and 30 deletions

View File

@@ -33,11 +33,13 @@ class _TelaPasseState extends State<TelaPasse> {
bool carregando = true;
String dataNasc = '';
String dataEmissao = '';
double borda = 1.0;
getPasse()async{
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
String passe = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
final url = '${widget.alunos[widget.indiceAluno].URL}/passe?CD_ALUNO=${passe}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
//aqui
// 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);
final response = await http.get(Uri.parse(url));
var map = json.decode(response.body);
@@ -63,7 +65,8 @@ class _TelaPasseState extends State<TelaPasse> {
carregando = false;
setState(() {});
}else{
getFrequencia(passe);
//aqui
getFrequencia(teste_passe);
}
}
}
@@ -122,8 +125,9 @@ class _TelaPasseState extends State<TelaPasse> {
carregando = true;
setState(() {});
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
String CD_ALUNO = widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['CD_ALUNO'];
final url = '${widget.alunos[widget.indiceAluno].URL}/carteira?CD_ALUNO=${CD_ALUNO}&CIDADE=${widget.alunos[widget.indiceAluno].cidade}';
//aqui
// 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);
final response = await http.get(Uri.parse(url));
var map = json.decode(response.body);
@@ -146,9 +150,9 @@ class _TelaPasseState extends State<TelaPasse> {
Container(
alignment: Alignment.topCenter,
width: 378,
height: 270,
height: 268,
decoration: BoxDecoration(
border: Border.all(width: 2.0)
border: Border.all(width: borda)
),
child: Column(
children: [
@@ -160,18 +164,18 @@ class _TelaPasseState extends State<TelaPasse> {
height: 159,
alignment: Alignment.center,
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,),
),
Column(
children: [
Container(
width: 235,
width: 237,
height: 65,
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border.all(width: 2.0)
border: Border.all(width: borda)
),
child: Row(
children: [
@@ -185,26 +189,26 @@ class _TelaPasseState extends State<TelaPasse> {
),
),
Container(
width: 235,
width: 237,
height: 20,
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,),
),
Container(
width: 235,
width: 237,
height: 20,
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,),
),
Container(
width: 235,
width: 237,
height: 54,
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),
),
@@ -216,7 +220,7 @@ class _TelaPasseState extends State<TelaPasse> {
width: 373,
height: 27.5,
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,),
),
@@ -224,7 +228,7 @@ class _TelaPasseState extends State<TelaPasse> {
width: 373,
height: 26.5,
decoration: BoxDecoration(
border: Border.all(width: 2.0)
border: Border.all(width: borda)
),
child: TextCustom(
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,
height: 26.5,
decoration: BoxDecoration(
border: Border.all(width: 2.0)
border: Border.all(width: borda)
),
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'}',
@@ -244,7 +248,7 @@ class _TelaPasseState extends State<TelaPasse> {
width: 373,
height: 26.5,
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,),
),
@@ -255,7 +259,7 @@ class _TelaPasseState extends State<TelaPasse> {
width: 378,
height: 270,
decoration: BoxDecoration(
border: Border.all(width: 4.0)
border: Border.all(width: borda*2)
),
child: Row(
children: [