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"
|
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 localProperties = new Properties()
|
||||||
def localPropertiesFile = rootProject.file("local.properties")
|
def localPropertiesFile = rootProject.file("local.properties")
|
||||||
if (localPropertiesFile.exists()) {
|
if (localPropertiesFile.exists()) {
|
||||||
@@ -24,7 +30,7 @@ if (flutterVersionName == null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.example.rkmmobile"
|
namespace = "com.ab.rkm.rkm"
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion = flutter.ndkVersion
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
@@ -35,7 +41,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// 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.
|
// 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.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdk = flutter.minSdkVersion
|
minSdk = flutter.minSdkVersion
|
||||||
@@ -44,11 +50,18 @@ android {
|
|||||||
versionName = flutterVersionName
|
versionName = flutterVersionName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
keyAlias keystoreProperties['keyAlias']
|
||||||
|
keyPassword keystoreProperties['keyPassword']
|
||||||
|
storeFile file(keystoreProperties['storeFile'])
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
// TODO: Add your own signing config for the release build.
|
signingConfig signingConfigs.release
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
||||||
signingConfig = signingConfigs.debug
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<application
|
<application
|
||||||
android:label="rkmmobile"
|
android:label="rkmmobile"
|
||||||
android:name="${applicationName}"
|
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: 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: 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: 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: 3546, nameCityApi: 'itapolis', nameCityFront: 'Itápolis', codState: 'SP', codCityIbge: 352270),
|
||||||
CityLoadModel(codCity: 3555, nameCityApi: 'itirapina', nameCityFront: 'Itirapina', codState: 'SP', codCityIbge: 352360),
|
CityLoadModel(codCity: 3555, nameCityApi: 'itirapina', nameCityFront: 'Itirapina', codState: 'SP', codCityIbge: 352360),
|
||||||
CityLoadModel(codCity: 3560, nameCityApi: 'ituverava', nameCityFront: 'Ituverava', codState: 'SP', codCityIbge: 352410),
|
CityLoadModel(codCity: 3560, nameCityApi: 'ituverava', nameCityFront: 'Ituverava', codState: 'SP', codCityIbge: 352410),
|
||||||
|
|||||||
@@ -50,312 +50,308 @@ class _LoadInitScreenState extends State<LoadInitScreen> {
|
|||||||
initLoading()async{
|
initLoading()async{
|
||||||
await ApiDataLoad().loadPerm(urlAPI,mode,nameCityApi,username).then((response)async{
|
await ApiDataLoad().loadPerm(urlAPI,mode,nameCityApi,username).then((response)async{
|
||||||
print(response);
|
print(response);
|
||||||
if(response['status'] == 0){
|
await ApiDataLoad().loadEtniasIndigenas(urlAPI, mode, nameCityApi, username).then((value)async{
|
||||||
AlertDialogDefault().alert(context, 'Erro', 'Permissão negada', 'Voltar');
|
List list = value;
|
||||||
} else if(response['status'] == 1 && response['load_perm'] == "S") {
|
List<Map<String, dynamic>> rows = [];
|
||||||
await ApiDataLoad().loadEtniasIndigenas(urlAPI, mode, nameCityApi, username).then((value)async{
|
if(list.length !=0) {
|
||||||
List list = value;
|
setState(() {
|
||||||
List<Map<String, dynamic>> rows = [];
|
messageSteps = "Etapa 1 de 12 - Gravando as Etnias Indigenas no Aplicativo";
|
||||||
if(list.length !=0) {
|
});
|
||||||
setState(() {
|
for (int i = 0; i < list.length; i++) {
|
||||||
messageSteps = "Etapa 1 de 12 - Gravando as Etnias Indigenas no Aplicativo";
|
Map<String, dynamic> row = {
|
||||||
});
|
'ID_ETNIA_INDIGENA': list[i]['idEtniaIndigena'].toString().trim(),
|
||||||
for (int i = 0; i < list.length; i++) {
|
'DESC_ETNIA_INDIGENA': list[i]['descEtniaIndigena'].toString().trim(),
|
||||||
Map<String, dynamic> row = {
|
};
|
||||||
'ID_ETNIA_INDIGENA': list[i]['idEtniaIndigena'].toString().trim(),
|
rows.add(row);
|
||||||
'DESC_ETNIA_INDIGENA': list[i]['descEtniaIndigena'].toString().trim(),
|
countProg = 0.05;
|
||||||
};
|
setState(() {});
|
||||||
rows.add(row);
|
|
||||||
countProg = 0.05;
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
await DbSqliteLoad().saveEtniasIndigenasDB(rows).then((value)async{
|
}
|
||||||
await ApiDataLoad().loadUnidades(urlAPI,mode,nameCityApi,username).then((value)async{
|
await DbSqliteLoad().saveEtniasIndigenasDB(rows).then((value)async{
|
||||||
List list = value;
|
await ApiDataLoad().loadUnidades(urlAPI,mode,nameCityApi,username).then((value)async{
|
||||||
List<Map<String, dynamic>> rows = [];
|
List list = value;
|
||||||
if(list.length !=0){
|
List<Map<String, dynamic>> rows = [];
|
||||||
setState(() {
|
if(list.length !=0){
|
||||||
messageSteps = "Etapa 2 de 12 - Gravando as Unidades no Aplicativo";
|
setState(() {
|
||||||
});
|
messageSteps = "Etapa 2 de 12 - Gravando as Unidades no Aplicativo";
|
||||||
for (int i = 0; i < list.length; i++) {
|
});
|
||||||
Map<String, dynamic> row = {
|
for (int i = 0; i < list.length; i++) {
|
||||||
'ID_UNIDADE': list[i]['idUnidade'],
|
Map<String, dynamic> row = {
|
||||||
'NOME_UNIDADE': list[i]['nomeFantasia'],
|
'ID_UNIDADE': list[i]['idUnidade'],
|
||||||
'CNES_UNIDADE': list[i]['nrCNES']
|
'NOME_UNIDADE': list[i]['nomeFantasia'],
|
||||||
};
|
'CNES_UNIDADE': list[i]['nrCNES']
|
||||||
rows.add(row);
|
};
|
||||||
// countProg = 0.1;
|
rows.add(row);
|
||||||
// setState(() {});
|
// 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().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 {
|
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(() {
|
setState(() {
|
||||||
error = 'Usuário bloqueado/senha incorreta';
|
loading = false;
|
||||||
});
|
});
|
||||||
}else if(response['status']==0) {
|
_prefService.createCacheSync(selectTeam!, citizenOutArea).then((value){
|
||||||
setState(() {
|
DbSqliteLoad().updateArgs(mode, inputUser.text, inputPassword.text).then((value) {
|
||||||
error = 'Usuário não encontrado';
|
Navigator.push(
|
||||||
});
|
context,
|
||||||
}else if(response['status']==1) {
|
MaterialPageRoute(builder: (context) => SyncInitScreen()),
|
||||||
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()),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -225,7 +225,16 @@ class _VisitaDomiciliarTelaState extends State<VisitaDomiciliarTela> {
|
|||||||
CBO_RESP_CADASTRO
|
CBO_RESP_CADASTRO
|
||||||
ok*/
|
ok*/
|
||||||
//salvar
|
//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');
|
print('erro principal');
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -79,114 +79,110 @@ class _SyncInitScreenState extends State<SyncInitScreen> {
|
|||||||
initSync()async{
|
initSync()async{
|
||||||
await DbSqliteSync().deleteSync().then((_)async{
|
await DbSqliteSync().deleteSync().then((_)async{
|
||||||
await ApiDataSync().syncPerm(urlAPI,mode,nameCityApi,user).then((response)async{
|
await ApiDataSync().syncPerm(urlAPI,mode,nameCityApi,user).then((response)async{
|
||||||
if(response['status'] == 0 || response['sync_perm'] != "S"){
|
countProg = 0.1;
|
||||||
AlertDialogDefault().alert(context, 'Erro', 'Usuário sem permissão para Sincronização de Unidade!', 'Voltar');
|
setState(()=> messageSteps = "Etapa 1 de 10 - Importando informações do CONECTASUS");
|
||||||
}else{
|
await ApiDataSync().syncBairros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||||
countProg = 0.1;
|
if(value.length == 0){
|
||||||
setState(()=> messageSteps = "Etapa 1 de 10 - Importando informações do CONECTASUS");
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Bairros - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncBairros(urlAPI,mode,nameCityApi,user).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 2 de 10 - Gravando os Bairros no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Bairros - Por favor, tente novamente!");
|
await DbSqliteSync().insertBairros(value).then((value)async{
|
||||||
}else{
|
countProg = 0.2;
|
||||||
setState(()=> messageSteps = "Etapa 2 de 10 - Gravando os Bairros no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertBairros(value).then((value)async{
|
await ApiDataSync().syncTiposLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||||
countProg = 0.2;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Tipos de Logradouros - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncTiposLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 3 de 10 - Gravando os Tipos de Logradouros no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Tipos de Logradouros - Por favor, tente novamente!");
|
await DbSqliteSync().insertTiposLogradouros(value).then((value)async{
|
||||||
}else{
|
countProg =0.3;
|
||||||
setState(()=> messageSteps = "Etapa 3 de 10 - Gravando os Tipos de Logradouros no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertTiposLogradouros(value).then((value)async{
|
await ApiDataSync().syncLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||||
countProg =0.3;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Logradouros - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncLogradouros(urlAPI,mode,nameCityApi,user).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 4 de 10 - Gravando os Logradouros no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Logradouros - Por favor, tente novamente!");
|
await DbSqliteSync().insertLogradouros(value).then((value)async{
|
||||||
}else{
|
countProg = 0.4;
|
||||||
setState(()=> messageSteps = "Etapa 4 de 10 - Gravando os Logradouros no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertLogradouros(value).then((value)async{
|
await ApiDataSync().syncLoteamentos(urlAPI,mode,nameCityApi,user).then((value)async{
|
||||||
countProg = 0.4;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Loteamentos - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncLoteamentos(urlAPI,mode,nameCityApi,user).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 5 de 10 - Gravando os Loteamentos no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Loteamentos - Por favor, tente novamente!");
|
await DbSqliteSync().insertLoteamentos(value).then((value)async{
|
||||||
}else{
|
countProg = 0.5;
|
||||||
setState(()=> messageSteps = "Etapa 5 de 10 - Gravando os Loteamentos no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertLoteamentos(value).then((value)async{
|
await ApiDataSync().syncProfissionais(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
||||||
countProg = 0.5;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Profissionais - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncProfissionais(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 6 de 10 - Gravando os Profissionais no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Profissionais - Por favor, tente novamente!");
|
await DbSqliteSync().insertProfissionais(value).then((value)async{
|
||||||
}else{
|
countProg = 0.6;
|
||||||
setState(()=> messageSteps = "Etapa 6 de 10 - Gravando os Profissionais no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertProfissionais(value).then((value)async{
|
await ApiDataSync().syncProfissionaisCBOs(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
||||||
countProg = 0.6;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os CBOs dos Profissionais - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncProfissionaisCBOs(urlAPI,mode,nameCityApi,user,idUnidade).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 7 de 10 - Gravando os CBO´s dos Profissionais no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os CBOs dos Profissionais - Por favor, tente novamente!");
|
}
|
||||||
}else{
|
await DbSqliteSync().insertProfissionaisCBOs(value).then((value)async{
|
||||||
setState(()=> messageSteps = "Etapa 7 de 10 - Gravando os CBO´s dos Profissionais no Aplicativo");
|
countProg = 0.7;
|
||||||
}
|
setState(() {});
|
||||||
await DbSqliteSync().insertProfissionaisCBOs(value).then((value)async{
|
await ApiDataSync().syncCidadaos(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||||
countProg = 0.7;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros dos Cidadãos - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncCidadaos(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 8 de 10 - Gravando os Cidadãos no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros dos Cidadãos - Por favor, tente novamente!");
|
await DbSqliteSync().insertCidadaos(value,'sync','').then((value)async{
|
||||||
}else{
|
countProg = 0.8;
|
||||||
setState(()=> messageSteps = "Etapa 8 de 10 - Gravando os Cidadãos no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertCidadaos(value,'sync','').then((value)async{
|
await ApiDataSync().syncCadastrosDomiciliares(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||||
countProg = 0.8;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Domiciliares - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncCadastrosDomiciliares(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 9 de 10 - Gravando os Cadastros Domiciliares no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Domiciliares - Por favor, tente novamente!");
|
await DbSqliteSync().insertCadastrosDomiciliares(value,'sync',0,0,'').then((value)async{
|
||||||
}else{
|
countProg = 0.9;
|
||||||
setState(()=> messageSteps = "Etapa 9 de 10 - Gravando os Cadastros Domiciliares no Aplicativo");
|
setState(() {});
|
||||||
await DbSqliteSync().insertCadastrosDomiciliares(value,'sync',0,0,'').then((value)async{
|
await ApiDataSync().syncCadastrosIndividuais(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
||||||
countProg = 0.9;
|
if(value.length == 0){
|
||||||
setState(() {});
|
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Individuais - Por favor, tente novamente!");
|
||||||
await ApiDataSync().syncCadastrosIndividuais(urlAPI,mode,nameCityApi,user,idUnidade,idArea,idMicroarea,foraArea).then((value)async{
|
}else{
|
||||||
if(value.length == 0){
|
setState(()=> messageSteps = "Etapa 10 de 10 - Gravando os Cadastros Individuais no Aplicativo");
|
||||||
setState(()=> messageSteps = "ERRO: Erro para carregar os Cadastros Individuais - Por favor, tente novamente!");
|
await DbSqliteSync().insertCadastrosIndividuais(value,'sync',0).then((value)async{
|
||||||
}else{
|
await DbSqliteSync().saveSync(codCity,codState,urlAPI,mode,nameCityApi,nameCityFront,codCityIbge,user,idUnidade,nomeUnidade,idArea,idMicroarea).then((value)async{
|
||||||
setState(()=> messageSteps = "Etapa 10 de 10 - Gravando os Cadastros Individuais no Aplicativo");
|
countProg = 1;
|
||||||
await DbSqliteSync().insertCadastrosIndividuais(value,'sync',0).then((value)async{
|
setState(() {});
|
||||||
await DbSqliteSync().saveSync(codCity,codState,urlAPI,mode,nameCityApi,nameCityFront,codCityIbge,user,idUnidade,nomeUnidade,idArea,idMicroarea).then((value)async{
|
Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=>HomeScreen(username: user)));
|
||||||
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
|
#versão 1.0.6+5 finalizada dia 18/03/2024
|
||||||
|
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 1.0.7+6
|
version: 1.0.9+8
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.2.3 <4.0.0'
|
sdk: '>=3.2.3 <4.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user