no para inclusão dos paises
This commit is contained in:
@@ -6,7 +6,7 @@ class ApiDataLoad{
|
||||
//http://192.168.0.42:8010/api/atb/desenvolvimento/corumbatai/pass/admin
|
||||
//https://app0.rkmsistemas.com.br/api/atb/homologacao/cabreuva/pass/admin
|
||||
final url = '${urlAPI}${mode}/${nameCityApi}/pass/${user}';
|
||||
// print(url);
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map;
|
||||
print(response.statusCode);
|
||||
|
||||
@@ -9,6 +9,7 @@ class ApiDataPost{
|
||||
// print('sinc');
|
||||
// print(map);
|
||||
final url = '${urlAPI}${mode}/${nameCityApi}/sincronizacao';
|
||||
print(url);
|
||||
var response = await http.post(
|
||||
Uri.parse(url),
|
||||
body: jsonEncode(map),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
class UrlApiConst{
|
||||
static const String ApiUrlOnline = 'https://saude.rkmsistemas.com.br/api/atb/';
|
||||
static const String ApiUrlHomologacao = 'https://app0.rkmsistemas.com.br/api/atb/';
|
||||
static const String ApiUrlDesenvolvimento = 'http://192.168.0.42:8010/api/atb/';
|
||||
// static const String ApiUrlDesenvolvimento = 'http://192.168.0.42:8010/api/atb/';
|
||||
static const String ApiUrlDesenvolvimento = 'http://192.168.0.42:8061/api/atb/';
|
||||
static const String ModeDesenvolvimento = 'desenvolvimento';
|
||||
static const String ModeHomologacao = 'homologacao';
|
||||
static const String ModeOnline = 'online';
|
||||
|
||||
@@ -72,6 +72,17 @@ class DBQuerys{
|
||||
return list[0]['NOME_UNIDADE'];
|
||||
}
|
||||
}
|
||||
cnesUnidade(int ID_UNIDADE)async{
|
||||
Database db = await DbSqliteLoad().intialDB();
|
||||
var query = "SELECT * FROM UNIDADES WHERE ID_UNIDADE = $ID_UNIDADE";
|
||||
List list = await db.rawQuery(query);
|
||||
if(list.isEmpty){
|
||||
return '';
|
||||
}else{
|
||||
// print(list);
|
||||
return list[0]['CNES_UNIDADE'];
|
||||
}
|
||||
}
|
||||
buscaBairro(nomeBairro)async{
|
||||
Database db = await DbSqliteLoad().intialDB();
|
||||
List list = await db.rawQuery("SELECT * FROM BAIRROS WHERE NO_BAIRRO = '$nomeBairro'");
|
||||
@@ -216,7 +227,6 @@ class DBQuerys{
|
||||
Database db = await DbSqliteLoad().intialDB();
|
||||
var query = "SELECT * FROM CIDADAOS WHERE ORIGEM = 'A' AND SINCRONIZADO = 'N'";
|
||||
List<Map<String, dynamic>> maps = await db.rawQuery(query);
|
||||
// print(list);
|
||||
return List.generate(maps.length, (i) {
|
||||
return maps[i];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user