tsilva

Members
  • Content count

    6
  • Joined

  • Last visited

  • Days Won

    1

tsilva last won the day on February 16 2020

tsilva had the most liked content!

Community Reputation

3 Neutral

About tsilva

  • Rank
    Soldier
  1. Resolvido Pessoal, estava mal o codigo HExecuteSQLQuery(dsQl,SysRadar01,hQueryWithoutCorrection,sCMD) ai nao estava declarando a conexao . O Paulo Viana deu o toque la no grupo do skype. ficou assim : dsQl is Data Source sCMD is string = [ SELECT tc_minutos2.desc_geofences AS desc_geofences, SEC_TO_TIME( SUM(time_to_sec(tc_minutos2.min_caidos))) AS TotalMInutos, tc_devices.name AS name FROM tc_devices, tc_minutos2 WHERE tc_devices.ID = tc_minutos2.device_id AND ( tc_minutos2.min_caidos >= '000100' AND tc_minutos2.Fecha BETWEEN [%EDT_Desde%] AND [%EDT_Hatsa%] ) GROUP BY tc_minutos2.desc_geofences, tc_devices.name ] IF NOT HExecuteSQLQuery(dsQl,SysRadar01,hQueryWithoutCorrection,sCMD)THEN Error(HErrorInfo()) ELSE FOR EACH dsQl tminutos is Time = dsQl.TotalMInutos TABLE_reporter.AddLine(dsQl.name,dsQl.desc_geofences,tminutos) END TableSort(TABLE_reporter,"+COL_NombreUnidad") END
  2. Pessoal, Estou tentando executar um sql aqui. com o codigo abaixo , porem ele me salta uma mensagen de erro que esta na imagem adjunta, o que nao entendo e por que ele esta mudando o nome do data source de DsQl para _SOURCE_dsQl_1 . obrigado pela ajuda desde logo... dsQl is Data Source sCMD is string = [ SELECT tc_minutos2.desc_geofences AS desc_geofences, SEC_TO_TIME( SUM(time_to_sec(tc_minutos2.min_caidos))) AS TotalMInutos, tc_devices.name AS name FROM tc_devices, tc_minutos2 WHERE tc_devices.ID = tc_minutos2.device_id AND ( tc_minutos2.min_caidos >= '000100' AND tc_minutos2.Fecha BETWEEN '20200209' AND '20200215' AND tc_minutos2.device_id = 56 ) GROUP BY tc_minutos2.desc_geofences, tc_devices.name ] IF NOT HExecuteQuery(dsQl,hQueryDefault,sCMD)THEN FOR EACH dsQl TABLE_reporter.AddLine(dsQl.name,dsQl.desc_geofences,dsQl.TotalMInutos) END ELSE Error(HErrorInfo()) END
  3. Pessoal estou consumindo um webservice, onde ele me tras um excel em buffer, e preciso ler esse excel e tratarlo para mostrar em tela. adjunto imagem de como chega a resposta no rest.
  4. Aqui um exemplo de rest metodo GET para mandar push. oRequest is httpRequest oResponse is httpResponse oRequest..URL = "https://fcm.googleapis.com/fcm/send" oRequest..Method = httpPost oRequest..Header["Authorization"] = "key=AAAACvU7oQQ:chave firebase" oRequest..Header["Content-Type"] = "application/json" oRequest..ContentType = "application/json" // Request content oRequest..Content = [ { "to" : "token cell 1", "to": "token cell 1", "collapse_key" : "type_a", "notification" : { "body" : "New announcement assigned", "OrganizationId":"2", "content_available" : true, "priority" : "high", "subtitle":"Elementary School", "Title":"hello" }, "data" : { "priority" : "high", "sound":"app_sound.wav", "content_available" : true, "bodyText" : "New Announcement assigned", "organization" :"Elementary school" } } ] // Runs the request and retrieves the response oResponse = HTTPSend(oRequest)
  5. imagino que vc deve ter muitas querys por casa de parametros, si for isso , vc pode criar uma so query com toso os parametros, que precisa, e quando chamar enviar null nos parametros que nao vai usar... assim a query assume somente os parametros que tem valores.
  6. Boas com todos, Tenho o seguinte problema, tenho um codigo em PHP que abre uma seesao em uma pagina de terceiros, logo que ele faz a abertura da sessao, ele gera um cookie para essa pagina eredirecciona para la sem precisar de colocar usuario e senha . anexo os dois arquivos, a parte de abrir a sessao e receber o retorno ja consegui migrar o codigo. request is httpRequest response is httpResponse request.URL ="http://192.99.25.204:2502/api/session/" request.Method = httpPost request.ContentType = "application/x-www-form-urlencoded" request.UserAgent = "Webdev 24" HTTPCreateForm("FORM") HTTPAddParameter("FORM", "email" ,"admin") HTTPAddParameter("FORM", "password" ,"1456325") response = HTTPSendForm("FORM",request) a resposta do response.content e essa {"id":1,"attributes":{"master":"false","readonly":"false","admin":"1","language":"en","speedUnit":"kmh","distanceUnit":"km","document":"","address":"","neighborhood":"","city":"","state":"","postal_code":"","phone":"","gasoline":"0","alcohol":"0","gnv":"0","diesel":"0","created_at":"2019-09-03 11:53:32","updated_at":"2019-09-03 11:53:32","last_login":"2019-10-28 07:47:53","count_login":"46","panel":"map","profile_photo":"assets/img/user.png","notificationTokens":"d6zhGJog1Qc:APA91bEy8UxMWFCYA00SzisQYY-7PkmrpXy_t30gXy6DBqgwEhXaswAkEJEsEm076Bi_C4pr9SGqVZmSmE-ficvYIv6k6kcY2T9Szfo1Cc6F0n9PtbD3VCyfDtF2my2KCfBcigPmNt0v,cD9o88mfXug:APA91bFAg_n5B3Md4ErY-uzt1gEthN_P-W3Ik2Vo_iI_SwyejZFqqoWCnYfPbWb6CtUM2L1rJBXUSzyk759t-XeWQDBculbHSZjknaGCFXJcikt78HW9ue6tr4n4K2rsNiODt3yqzDlj,da7c8MdEytE:APA91bENbfe-Y8E3I0xmrjAbR1n2tb2cIVcv4Wo9It2WIE2R6X515_KqlxY6eu3vefDsk10H9yo0dtJU0otUP1mX2OomvlZNtU-rvJLfxZQqp4ZYWOvYUjCr5jLXBbKKI-cXv9Gmdn4Y,cLPbvBoRBHM:APA91bG2-nQw2pW1OYgP_5G7zzRMM89Wt6fcjov3dzOllgD5px9x0-9d8Wb3N37bgRVgIW2N8Ix6VOvjF6L3aXiTW0PizjVO59w55Kx53zorRWUR8DjnM0KcTHpJohGv1Yj-V3_YaCNE,dkBGjlgkOtk:APA91bFYxf28FKxyYjgddaoHqOk0d8wXhmGtyALdmd9y9D1e3tXzipj36V-GZHCR0bFHJXsEjZeGGRRfeQRtrggvcsiBGRvvUpZRrJtnmgMM8rfkAg7qXTn6fr_lb3Q3cQB-AXJPSVNr,eyJfHKsqPc4:APA91bHSG2fztZiOS_cuUe2GCH94buGQjZEytOMQVp8KGQQO0cs7BiH63y6f7RbFfrbSthyfE7NHaqTPaXGwBnR3Hpmz85EgegvbbH0flWJaTdv3MoQ4lvN8C3SedrbW-lwcmQAPiPts,fnXWQGVf9bM:APA91bEWP01zo0j1vR43GVaAiItI8bJUZrLQuhDaXrN4Lrry3Ko7HOYkbRVHqp5-V1JzcNC4B9vKaq0rKPR7UTCkrIUGiSuSXDXZgziG4vCvyxqh9XyhYCIltiErGMPvmy0pLZbXLsDxadS"},"name":"admin","login":null,"email":"admin","phone":null,"readonly":false,"administrator":true,"map":"null","latitude":0.0,"longitude":0.0,"zoom":16,"twelveHourFormat":false,"coordinateFormat":"null","disabled":false,"expirationTime":null,"deviceLimit":-1,"userLimit":0,"deviceReadonly":false,"token":null,"limitCommands":false,"poiLayer":null,"password":null} me falta gerar o cookie e dar o pagedisplay para a outra pagina. desde logo obrigado pela ajuda login.php traccarApi.php