na tela visita_domiciliar_tela.dart não é mais obrigatório o campo procedimento.
This commit is contained in:
@@ -5,6 +5,12 @@ plugins {
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file("local.properties")
|
||||
if (localPropertiesFile.exists()) {
|
||||
@@ -24,7 +30,7 @@ if (flutterVersionName == null) {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.rkmmobile"
|
||||
namespace = "com.ab.rkm.rkm"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
@@ -35,7 +41,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.example.rkmmobile"
|
||||
applicationId = "com.ab.rkm.rkm"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdk = flutter.minSdkVersion
|
||||
@@ -44,11 +50,18 @@ android {
|
||||
versionName = flutterVersionName
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.debug
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="rkmmobile"
|
||||
android:name="${applicationName}"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.ab.rkm.rkm
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity()
|
||||
12
ios/RunnerTests/RunnerTests.swift
Normal file
12
ios/RunnerTests/RunnerTests.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -498,6 +498,7 @@ class ConstVariable{
|
||||
CityLoadModel(codCity: 3473, nameCityApi: 'francodarocha', nameCityFront: 'Franco da Rocha', codState: 'SP', codCityIbge: 351640),
|
||||
CityLoadModel(codCity: 3514, nameCityApi: 'igaracudotiete', nameCityFront: 'Igaraçu do Tietê', codState: 'SP', codCityIbge: 352000),
|
||||
CityLoadModel(codCity: 3531, nameCityApi: 'iracemapolis', nameCityFront: 'Iracemápolis', codState: 'SP', codCityIbge: 352140),
|
||||
CityLoadModel(codCity: 3542, nameCityApi: 'itapeva', nameCityFront: 'Itapeva', codState: 'SP', codCityIbge: 352240),
|
||||
CityLoadModel(codCity: 3546, nameCityApi: 'itapolis', nameCityFront: 'Itápolis', codState: 'SP', codCityIbge: 352270),
|
||||
CityLoadModel(codCity: 3555, nameCityApi: 'itirapina', nameCityFront: 'Itirapina', codState: 'SP', codCityIbge: 352360),
|
||||
CityLoadModel(codCity: 3560, nameCityApi: 'ituverava', nameCityFront: 'Ituverava', codState: 'SP', codCityIbge: 352410),
|
||||
|
||||
@@ -50,312 +50,308 @@ class _LoadInitScreenState extends State<LoadInitScreen> {
|
||||
initLoading()async{
|
||||
await ApiDataLoad().loadPerm(urlAPI,mode,nameCityApi,username).then((response)async{
|
||||
print(response);
|
||||
if(response['status'] == 0){
|
||||
AlertDialogDefault().alert(context, 'Erro', 'Permissão negada', 'Voltar');
|
||||
} else if(response['status'] == 1 && response['load_perm'] == "S") {
|
||||
await ApiDataLoad().loadEtniasIndigenas(urlAPI, mode, nameCityApi, username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0) {
|
||||
setState(() {
|
||||
messageSteps = "Etapa 1 de 12 - Gravando as Etnias Indigenas no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'ID_ETNIA_INDIGENA': list[i]['idEtniaIndigena'].toString().trim(),
|
||||
'DESC_ETNIA_INDIGENA': list[i]['descEtniaIndigena'].toString().trim(),
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.05;
|
||||
setState(() {});
|
||||
}
|
||||
await ApiDataLoad().loadEtniasIndigenas(urlAPI, mode, nameCityApi, username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0) {
|
||||
setState(() {
|
||||
messageSteps = "Etapa 1 de 12 - Gravando as Etnias Indigenas no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'ID_ETNIA_INDIGENA': list[i]['idEtniaIndigena'].toString().trim(),
|
||||
'DESC_ETNIA_INDIGENA': list[i]['descEtniaIndigena'].toString().trim(),
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.05;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveEtniasIndigenasDB(rows).then((value)async{
|
||||
await ApiDataLoad().loadUnidades(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 2 de 12 - Gravando as Unidades no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'ID_UNIDADE': list[i]['idUnidade'],
|
||||
'NOME_UNIDADE': list[i]['nomeFantasia'],
|
||||
'CNES_UNIDADE': list[i]['nrCNES']
|
||||
};
|
||||
rows.add(row);
|
||||
// countProg = 0.1;
|
||||
// setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveUnidadesDB(rows).then((value)async{
|
||||
await ApiDataLoad().loadProcedimentos(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 3 de 12 - Gravando os Procedimentos no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : list[i]['codProcedimento'],
|
||||
'DESC_PROC_SIGTAP' : list[i]['nome'],
|
||||
'GRUPO_PROC_SIGTAP' : list[i]['codGrupo'],
|
||||
'QTDE_MAXIMA' : list[i]['qtdeMax'],
|
||||
'IDADE_MIN' : list[i]['idadeMin'],
|
||||
'IDADE_MAX' : list[i]['idadeMax'],
|
||||
'SEXO' : list[i]['sexo'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.2;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresDB(rows).then((value)async{
|
||||
print('finalizou save Procedures');
|
||||
await ApiDataLoad().loadProcedimentosRegistros(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 4 de 12 - Gravando os Procedimentos Registros no Aplicativo";
|
||||
});
|
||||
print('finalizou saveProceduresRegisterDB');
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : list[i]['codProcedimento'],
|
||||
'CODIGO_REGISTRO' : list[i]['codRegistro'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.3;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresRegisterDB(rows).then((value)async{
|
||||
await ApiDataLoad().loadCID(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadCID');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 5 de 12 - Gravando os CIDs no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'CODIGO_CID' : list[i]['codCID'],
|
||||
'DESCRICAO_CID' : list[i]['descCID'],
|
||||
'RESTRICAO_SEXO' : list[i]['restSexo'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.4;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCID(rows).then((value)async{
|
||||
print('finalizou saveCID');
|
||||
await ApiDataLoad().loadProcedimentosCID(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadProcedimentosCID');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 6 de 12 - Gravando os Procedimentos CIDs no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : list[i]['codProcedimento'],
|
||||
'CODIGO_CID' : list[i]['codCID'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.5;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresCID(rows).then((value)async{
|
||||
print('finalizou saveProceduresCID');
|
||||
await ApiDataLoad().loadCBO(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadCBO');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 8 de 12 - Gravando os CBOs no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'CODIGO_CBO' : list[i]['codCBO'],
|
||||
'DESCRICAO_CBO' : list[i]['descCBO'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.6;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCBO(rows).then((value)async{
|
||||
print('finalizou saveCBO');
|
||||
await ApiDataLoad().loadProcedimentosCBO(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadProcedimentosCBO');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 8 de 12 - Gravando os Procedimentos CBO no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : value[i]['codProcedimento'],
|
||||
'CODIGO_CBO' : value[i]['codCBO'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.7;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresCBO(rows).then((value)async{
|
||||
print('finalizou saveProceduresCBO');
|
||||
await ApiDataLoad().loadCIAP(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadCIAP');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length != 0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 9 de 12 - Gravando os CIAPs no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'CODIGO_CIAP' : list[i]['codCIAP'],
|
||||
'DESC_CIAP' : list[i]['descCIAP'],
|
||||
'TIPO_CIAP' : list[i]['tipoCIAP'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.8;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCIAP(rows).then((value)async{
|
||||
print('finalizou saveCIAP');
|
||||
await ApiDataLoad().loadMunicipios(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadMunicipios');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length!=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 10 de 12 - Gravando os Municípios no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'ID_MUNICIPIO' : list[i]['idMunicipio'],
|
||||
'CODIGO_IBGE' : list[i]['codIBGE'],
|
||||
'NO_MUNICIPIO' : list[i]['nomeMunicipio'],
|
||||
'UF_ESTADO' : list[i]['UF'],
|
||||
'ID_PAIS' : list[i]['idPais'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.9;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCity(rows).then((value)async{
|
||||
await ApiDataLoad().loadEquipes(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadEquipes');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length!=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 11 de 12 - Gravando as Equipes no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'ID_EQUIPE' : list[i]['idEquipe'],
|
||||
'ID_UNIDADE' : list[i]['idUnidade'],
|
||||
'INE' : list[i]['INE'],
|
||||
'ID_ATB_AREA' : list[i]['idAtbArea'],
|
||||
'AREA' : list[i]['area'],
|
||||
'ID_ATB_MICROAREA': list[i]['idAtbMicroarea'],
|
||||
'MICROAREA' : list[i]['microarea'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.92;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveTeam(rows).then((value)async{
|
||||
countProg = 0.95;
|
||||
setState(() {});
|
||||
print('finalizou saveTeam');
|
||||
await ApiDataLoad().loadEquipeComponentes(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadEquipeComponentes');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length!=0) {
|
||||
setState(() {
|
||||
messageSteps ="Etapa 12 de 12 - Gravando os Profissionais das Equipes no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'ID_EQUIPE' : list[i]['idEquipe'],
|
||||
'ID_PROFISSIONAL' : list[i]['idProfissional'],
|
||||
'ATIVO' : list[i]['ativo'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.97;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveTeamComponents(rows).then((value)async{
|
||||
print('finalizou saveTeamComponents');
|
||||
setState(() {
|
||||
countProg = 1;
|
||||
finish = true;
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Profissionais Equipes não carregadas, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Equipes não carregadas, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Municípios não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'CIAPs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos CBOs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'CBOs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos CIDs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'CIDs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos Registros não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Unidades não carregadas, tente novamente!', 'Voltar');
|
||||
}
|
||||
await DbSqliteLoad().saveEtniasIndigenasDB(rows).then((value)async{
|
||||
await ApiDataLoad().loadUnidades(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 2 de 12 - Gravando as Unidades no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'ID_UNIDADE': list[i]['idUnidade'],
|
||||
'NOME_UNIDADE': list[i]['nomeFantasia'],
|
||||
'CNES_UNIDADE': list[i]['nrCNES']
|
||||
};
|
||||
rows.add(row);
|
||||
// countProg = 0.1;
|
||||
// setState(() {});
|
||||
}
|
||||
});
|
||||
await DbSqliteLoad().saveUnidadesDB(rows).then((value)async{
|
||||
await ApiDataLoad().loadProcedimentos(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 3 de 12 - Gravando os Procedimentos no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : list[i]['codProcedimento'],
|
||||
'DESC_PROC_SIGTAP' : list[i]['nome'],
|
||||
'GRUPO_PROC_SIGTAP' : list[i]['codGrupo'],
|
||||
'QTDE_MAXIMA' : list[i]['qtdeMax'],
|
||||
'IDADE_MIN' : list[i]['idadeMin'],
|
||||
'IDADE_MAX' : list[i]['idadeMax'],
|
||||
'SEXO' : list[i]['sexo'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.2;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresDB(rows).then((value)async{
|
||||
print('finalizou save Procedures');
|
||||
await ApiDataLoad().loadProcedimentosRegistros(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 4 de 12 - Gravando os Procedimentos Registros no Aplicativo";
|
||||
});
|
||||
print('finalizou saveProceduresRegisterDB');
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : list[i]['codProcedimento'],
|
||||
'CODIGO_REGISTRO' : list[i]['codRegistro'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.3;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresRegisterDB(rows).then((value)async{
|
||||
await ApiDataLoad().loadCID(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadCID');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 5 de 12 - Gravando os CIDs no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'CODIGO_CID' : list[i]['codCID'],
|
||||
'DESCRICAO_CID' : list[i]['descCID'],
|
||||
'RESTRICAO_SEXO' : list[i]['restSexo'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.4;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCID(rows).then((value)async{
|
||||
print('finalizou saveCID');
|
||||
await ApiDataLoad().loadProcedimentosCID(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadProcedimentosCID');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 6 de 12 - Gravando os Procedimentos CIDs no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : list[i]['codProcedimento'],
|
||||
'CODIGO_CID' : list[i]['codCID'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.5;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresCID(rows).then((value)async{
|
||||
print('finalizou saveProceduresCID');
|
||||
await ApiDataLoad().loadCBO(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadCBO');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 8 de 12 - Gravando os CBOs no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'CODIGO_CBO' : list[i]['codCBO'],
|
||||
'DESCRICAO_CBO' : list[i]['descCBO'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.6;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCBO(rows).then((value)async{
|
||||
print('finalizou saveCBO');
|
||||
await ApiDataLoad().loadProcedimentosCBO(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadProcedimentosCBO');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length !=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 8 de 12 - Gravando os Procedimentos CBO no Aplicativo";
|
||||
});
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
Map<String, dynamic> row = {
|
||||
'COD_PROC_SIGTAP' : value[i]['codProcedimento'],
|
||||
'CODIGO_CBO' : value[i]['codCBO'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.7;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveProceduresCBO(rows).then((value)async{
|
||||
print('finalizou saveProceduresCBO');
|
||||
await ApiDataLoad().loadCIAP(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadCIAP');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length != 0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 9 de 12 - Gravando os CIAPs no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'CODIGO_CIAP' : list[i]['codCIAP'],
|
||||
'DESC_CIAP' : list[i]['descCIAP'],
|
||||
'TIPO_CIAP' : list[i]['tipoCIAP'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.8;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCIAP(rows).then((value)async{
|
||||
print('finalizou saveCIAP');
|
||||
await ApiDataLoad().loadMunicipios(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadMunicipios');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length!=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 10 de 12 - Gravando os Municípios no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'ID_MUNICIPIO' : list[i]['idMunicipio'],
|
||||
'CODIGO_IBGE' : list[i]['codIBGE'],
|
||||
'NO_MUNICIPIO' : list[i]['nomeMunicipio'],
|
||||
'UF_ESTADO' : list[i]['UF'],
|
||||
'ID_PAIS' : list[i]['idPais'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.9;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveCity(rows).then((value)async{
|
||||
await ApiDataLoad().loadEquipes(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadEquipes');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length!=0){
|
||||
setState(() {
|
||||
messageSteps = "Etapa 11 de 12 - Gravando as Equipes no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'ID_EQUIPE' : list[i]['idEquipe'],
|
||||
'ID_UNIDADE' : list[i]['idUnidade'],
|
||||
'INE' : list[i]['INE'],
|
||||
'ID_ATB_AREA' : list[i]['idAtbArea'],
|
||||
'AREA' : list[i]['area'],
|
||||
'ID_ATB_MICROAREA': list[i]['idAtbMicroarea'],
|
||||
'MICROAREA' : list[i]['microarea'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.92;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveTeam(rows).then((value)async{
|
||||
countProg = 0.95;
|
||||
setState(() {});
|
||||
print('finalizou saveTeam');
|
||||
await ApiDataLoad().loadEquipeComponentes(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||
print('loadEquipeComponentes');
|
||||
List list = value;
|
||||
List<Map<String, dynamic>> rows = [];
|
||||
if(list.length!=0) {
|
||||
setState(() {
|
||||
messageSteps ="Etapa 12 de 12 - Gravando os Profissionais das Equipes no Aplicativo";
|
||||
});
|
||||
for(int i=0;list.length > i;i++){
|
||||
Map<String, dynamic> row = {
|
||||
'ID_EQUIPE' : list[i]['idEquipe'],
|
||||
'ID_PROFISSIONAL' : list[i]['idProfissional'],
|
||||
'ATIVO' : list[i]['ativo'],
|
||||
};
|
||||
rows.add(row);
|
||||
countProg = 0.97;
|
||||
setState(() {});
|
||||
}
|
||||
await DbSqliteLoad().saveTeamComponents(rows).then((value)async{
|
||||
print('finalizou saveTeamComponents');
|
||||
setState(() {
|
||||
countProg = 1;
|
||||
finish = true;
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Profissionais Equipes não carregadas, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Equipes não carregadas, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Municípios não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'CIAPs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos CBOs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'CBOs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos CIDs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'CIDs não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos Registros não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Procedimentos não carregados, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}else{
|
||||
AlertDialogDefault().alert(context, 'Error', 'Unidades não carregadas, tente novamente!', 'Voltar');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -68,31 +68,18 @@ class _SyncLoginScreenState extends State<SyncLoginScreen> {
|
||||
});
|
||||
|
||||
await ApiDataLoad().apiConect(urlAPI,mode,nameCityApi,inputUser.text).then((response) async {
|
||||
if(inputUser.text == inputPassword.text || response['bloqueio']==1){
|
||||
if(MainControllers().encrypt(inputPassword.text,response['userPass']) == response['userPass']){
|
||||
setState(() {
|
||||
error = 'Usuário bloqueado/senha incorreta';
|
||||
loading = false;
|
||||
});
|
||||
}else if(response['status']==0) {
|
||||
setState(() {
|
||||
error = 'Usuário não encontrado';
|
||||
});
|
||||
}else if(response['status']==1) {
|
||||
setState((){
|
||||
error = '';
|
||||
});
|
||||
if(MainControllers().encrypt(inputPassword.text,response['userPass']) == response['userPass']){
|
||||
setState(() {
|
||||
loading = false;
|
||||
_prefService.createCacheSync(selectTeam!, citizenOutArea).then((value){
|
||||
DbSqliteLoad().updateArgs(mode, inputUser.text, inputPassword.text).then((value) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => SyncInitScreen()),
|
||||
);
|
||||
});
|
||||
_prefService.createCacheSync(selectTeam!, citizenOutArea).then((value){
|
||||
DbSqliteLoad().updateArgs(mode, inputUser.text, inputPassword.text).then((value) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => SyncInitScreen()),
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}else{
|
||||
|
||||
@@ -225,7 +225,16 @@ class _VisitaDomiciliarTelaState extends State<VisitaDomiciliarTela> {
|
||||
CBO_RESP_CADASTRO
|
||||
ok*/
|
||||
//salvar
|
||||
if(date.isEmpty || dateDB.isEmpty || TIPO_IMOVEL_COD==0 || DESFECHO_COD ==0 || TURNO_COD == 0 || CBO_PROFISSIONAL == null || CBO_PROFISSIONAL == null || listProc.isEmpty
|
||||
|
||||
print('date $date');
|
||||
print('dateDB $dateDB');
|
||||
print('TIPO_IMOVEL_COD $TIPO_IMOVEL_COD');
|
||||
print('DESFECHO_COD $DESFECHO_COD');
|
||||
print('TURNO_COD $TURNO_COD');
|
||||
print('CBO_PROFISSIONAL $CBO_PROFISSIONAL');
|
||||
print('listProc $listProc');
|
||||
|
||||
if(date.isEmpty || dateDB.isEmpty || TIPO_IMOVEL_COD==0 || DESFECHO_COD ==0 || TURNO_COD == 0 || CBO_PROFISSIONAL == null
|
||||
){
|
||||
print('erro principal');
|
||||
setState(() {
|
||||
|
||||
@@ -79,114 +79,110 @@ class _SyncInitScreenState extends State<SyncInitScreen> {
|
||||
initSync()async{
|
||||
await DbSqliteSync().deleteSync().then((_)async{
|
||||
await ApiDataSync().syncPerm(urlAPI,mode,nameCityApi,user).then((response)async{
|
||||
if(response['status'] == 0 || response['sync_perm'] != "S"){
|
||||
AlertDialogDefault().alert(context, 'Erro', 'Usuário sem permissão para Sincronização de Unidade!', 'Voltar');
|
||||
}else{
|
||||
countProg = 0.1;
|
||||
setState(()=> messageSteps = "Etapa 1 de 10 - Importando informações do CONECTASUS");
|
||||
await ApiDataSync().syncBairros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Bairros - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 2 de 10 - Gravando os Bairros no Aplicativo");
|
||||
await DbSqliteSync().insertBairros(value).then((value)async{
|
||||
countProg = 0.2;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncTiposLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Tipos de Logradouros - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 3 de 10 - Gravando os Tipos de Logradouros no Aplicativo");
|
||||
await DbSqliteSync().insertTiposLogradouros(value).then((value)async{
|
||||
countProg =0.3;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Logradouros - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 4 de 10 - Gravando os Logradouros no Aplicativo");
|
||||
await DbSqliteSync().insertLogradouros(value).then((value)async{
|
||||
countProg = 0.4;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncLoteamentos(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Loteamentos - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 5 de 10 - Gravando os Loteamentos no Aplicativo");
|
||||
await DbSqliteSync().insertLoteamentos(value).then((value)async{
|
||||
countProg = 0.5;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncProfissionais(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Profissionais - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 6 de 10 - Gravando os Profissionais no Aplicativo");
|
||||
await DbSqliteSync().insertProfissionais(value).then((value)async{
|
||||
countProg = 0.6;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncProfissionaisCBOs(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os CBOs dos Profissionais - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 7 de 10 - Gravando os CBO´s dos Profissionais no Aplicativo");
|
||||
}
|
||||
await DbSqliteSync().insertProfissionaisCBOs(value).then((value)async{
|
||||
countProg = 0.7;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncCidadaos(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros dos Cidadãos - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 8 de 10 - Gravando os Cidadãos no Aplicativo");
|
||||
await DbSqliteSync().insertCidadaos(value,'sync','').then((value)async{
|
||||
countProg = 0.8;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncCadastrosDomiciliares(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Domiciliares - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 9 de 10 - Gravando os Cadastros Domiciliares no Aplicativo");
|
||||
await DbSqliteSync().insertCadastrosDomiciliares(value,'sync',0,0,'').then((value)async{
|
||||
countProg = 0.9;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncCadastrosIndividuais(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Individuais - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 10 de 10 - Gravando os Cadastros Individuais no Aplicativo");
|
||||
await DbSqliteSync().insertCadastrosIndividuais(value,'sync',0).then((value)async{
|
||||
await DbSqliteSync().saveSync(codCity,codState,urlAPI,mode,nameCityApi,nameCityFront,codCityIbge,user,idUnidade,nomeUnidade,idArea,idMicroarea).then((value)async{
|
||||
countProg = 1;
|
||||
setState(() {});
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=>HomeScreen(username: user)));
|
||||
});
|
||||
});
|
||||
}
|
||||
countProg = 0.1;
|
||||
setState(()=> messageSteps = "Etapa 1 de 10 - Importando informações do CONECTASUS");
|
||||
await ApiDataSync().syncBairros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Bairros - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 2 de 10 - Gravando os Bairros no Aplicativo");
|
||||
await DbSqliteSync().insertBairros(value).then((value)async{
|
||||
countProg = 0.2;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncTiposLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Tipos de Logradouros - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 3 de 10 - Gravando os Tipos de Logradouros no Aplicativo");
|
||||
await DbSqliteSync().insertTiposLogradouros(value).then((value)async{
|
||||
countProg =0.3;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Logradouros - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 4 de 10 - Gravando os Logradouros no Aplicativo");
|
||||
await DbSqliteSync().insertLogradouros(value).then((value)async{
|
||||
countProg = 0.4;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncLoteamentos(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Loteamentos - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 5 de 10 - Gravando os Loteamentos no Aplicativo");
|
||||
await DbSqliteSync().insertLoteamentos(value).then((value)async{
|
||||
countProg = 0.5;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncProfissionais(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Profissionais - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 6 de 10 - Gravando os Profissionais no Aplicativo");
|
||||
await DbSqliteSync().insertProfissionais(value).then((value)async{
|
||||
countProg = 0.6;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncProfissionaisCBOs(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os CBOs dos Profissionais - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 7 de 10 - Gravando os CBO´s dos Profissionais no Aplicativo");
|
||||
}
|
||||
await DbSqliteSync().insertProfissionaisCBOs(value).then((value)async{
|
||||
countProg = 0.7;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncCidadaos(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros dos Cidadãos - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 8 de 10 - Gravando os Cidadãos no Aplicativo");
|
||||
await DbSqliteSync().insertCidadaos(value,'sync','').then((value)async{
|
||||
countProg = 0.8;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncCadastrosDomiciliares(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Domiciliares - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 9 de 10 - Gravando os Cadastros Domiciliares no Aplicativo");
|
||||
await DbSqliteSync().insertCadastrosDomiciliares(value,'sync',0,0,'').then((value)async{
|
||||
countProg = 0.9;
|
||||
setState(() {});
|
||||
await ApiDataSync().syncCadastrosIndividuais(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||
if(value.length == 0){
|
||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Individuais - Por favor, tente novamente!");
|
||||
}else{
|
||||
setState(()=> messageSteps = "Etapa 10 de 10 - Gravando os Cadastros Individuais no Aplicativo");
|
||||
await DbSqliteSync().insertCadastrosIndividuais(value,'sync',0).then((value)async{
|
||||
await DbSqliteSync().saveSync(codCity,codState,urlAPI,mode,nameCityApi,nameCityFront,codCityIbge,user,idUnidade,nomeUnidade,idArea,idMicroarea).then((value)async{
|
||||
countProg = 1;
|
||||
setState(() {});
|
||||
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=>HomeScreen(username: user)));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
12
macos/RunnerTests/RunnerTests.swift
Normal file
12
macos/RunnerTests/RunnerTests.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
import Cocoa
|
||||
import FlutterMacOS
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ description: RKM AB 2.0.
|
||||
#versão 1.0.6+5 finalizada dia 18/03/2024
|
||||
|
||||
publish_to: 'none'
|
||||
version: 1.0.7+6
|
||||
version: 1.0.9+8
|
||||
|
||||
environment:
|
||||
sdk: '>=3.2.3 <4.0.0'
|
||||
|
||||
Reference in New Issue
Block a user