Commit 230a925a012d37709fc0d6607e5cd54275392589
1 parent
b69536c6
Exists in
master
-Correção de bugs.
Showing
4 changed files
with
15 additions
and
13 deletions
Show diff stats
MapaTesteProj/MapaTeste.dcu
No preview for this file type
MapaTesteProj/MapaTeste.pas
| @@ -292,7 +292,8 @@ end; | @@ -292,7 +292,8 @@ end; | ||
| 292 | //------------------------------------------------------------------------------ | 292 | //------------------------------------------------------------------------------ |
| 293 | 293 | ||
| 294 | function TfrmMapaCacic.getConfigs : String; | 294 | function TfrmMapaCacic.getConfigs : String; |
| 295 | - | 295 | +var |
| 296 | + teste : string; | ||
| 296 | Begin | 297 | Begin |
| 297 | btCombosUpdate.Enabled := false; | 298 | btCombosUpdate.Enabled := false; |
| 298 | 299 | ||
| @@ -411,8 +412,7 @@ if edTeInfoPatrimonio5.text <> '' then | @@ -411,8 +412,7 @@ if edTeInfoPatrimonio5.text <> '' then | ||
| 411 | Finalizar(true); | 412 | Finalizar(true); |
| 412 | end | 413 | end |
| 413 | else | 414 | else |
| 414 | - ShowMessage(#13#10+'Atenção!'+ #13#10 + 'É necessário digitar seu nome.' | ||
| 415 | - + #13#10); | 415 | + Application.messagebox(Pchar('Por favor, é necessário digitar seu nome!'), 'Atenção!',MB_ICONEXCLAMATION + mb_ok); |
| 416 | end; | 416 | end; |
| 417 | 417 | ||
| 418 | 418 |
gercols/gercols.dpr
| @@ -245,6 +245,9 @@ Begin | @@ -245,6 +245,9 @@ Begin | ||
| 245 | objCacic.setValueToFile('Configs','ConexaoOK','S', strGerColsInfFileName); | 245 | objCacic.setValueToFile('Configs','ConexaoOK','S', strGerColsInfFileName); |
| 246 | if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then | 246 | if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then |
| 247 | Begin | 247 | Begin |
| 248 | + objCacic.setValueToFile('Configs','forca_coleta', | ||
| 249 | + objCacic.getValueFromTags('ForcaColeta', strRetorno, '<>'), | ||
| 250 | + strGerColsInfFileName); | ||
| 248 | objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName); | 251 | objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName); |
| 249 | objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName); | 252 | objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName); |
| 250 | objCacic.setWebManagerAddress(objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>')); | 253 | objCacic.setWebManagerAddress(objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>')); |
| @@ -333,6 +336,7 @@ Begin | @@ -333,6 +336,7 @@ Begin | ||
| 333 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 336 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 334 | //Gravação no DatFileName dos valores de REDE, COMPUTADOR e EXECUÇÃO obtidos, para consulta pelos outros módulos... | 337 | //Gravação no DatFileName dos valores de REDE, COMPUTADOR e EXECUÇÃO obtidos, para consulta pelos outros módulos... |
| 335 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 338 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 339 | + objCacic.setValueToFile('Configs' ,'modulo_patr' ,objCacic.getValueFromTags('modPatrimonio' , strRetorno, '<>'), strGerColsInfFileName); | ||
| 336 | objCacic.setValueToFile('Configs' ,'CollectsDefinitions' ,objCacic.getValueFromTags('CollectsDefinitions' , strRetorno, '<>'), strGerColsInfFileName); | 340 | objCacic.setValueToFile('Configs' ,'CollectsDefinitions' ,objCacic.getValueFromTags('CollectsDefinitions' , strRetorno, '<>'), strGerColsInfFileName); |
| 337 | objCacic.setValueToFile('Configs' ,'TeServUpdates' ,objCacic.getValueFromTags('te_serv_updates' , strRetorno, '<>'), strChkSisInfFileName); | 341 | objCacic.setValueToFile('Configs' ,'TeServUpdates' ,objCacic.getValueFromTags('te_serv_updates' , strRetorno, '<>'), strChkSisInfFileName); |
| 338 | objCacic.setValueToFile('Configs' ,'NuPortaServUpdates' ,objCacic.getValueFromTags('nu_porta_serv_updates' , strRetorno, '<>'), strChkSisInfFileName); | 342 | objCacic.setValueToFile('Configs' ,'NuPortaServUpdates' ,objCacic.getValueFromTags('nu_porta_serv_updates' , strRetorno, '<>'), strChkSisInfFileName); |
| @@ -367,10 +371,7 @@ Begin | @@ -367,10 +371,7 @@ Begin | ||
| 367 | end; | 371 | end; |
| 368 | 372 | ||
| 369 | procedure getTest(); | 373 | procedure getTest(); |
| 370 | -var strRetorno, | ||
| 371 | - v_mensagem_log, | ||
| 372 | - strKeyWord : string; | ||
| 373 | - textfileKeyWord : TextFile; | 374 | +var strRetorno: string; |
| 374 | Begin | 375 | Begin |
| 375 | Try | 376 | Try |
| 376 | // Verifico comunicação com o Módulo Gerente WEB. | 377 | // Verifico comunicação com o Módulo Gerente WEB. |
| @@ -391,7 +392,7 @@ Begin | @@ -391,7 +392,7 @@ Begin | ||
| 391 | if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then | 392 | if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then |
| 392 | Begin | 393 | Begin |
| 393 | objCacic.setValueToFile('Configs','forca_coleta', | 394 | objCacic.setValueToFile('Configs','forca_coleta', |
| 394 | - objCacic.getValueFromTags('forca_coleta', strRetorno), | 395 | + objCacic.getValueFromTags('ForcaColeta', strRetorno, '<>'), |
| 395 | strGerColsInfFileName); | 396 | strGerColsInfFileName); |
| 396 | objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName); | 397 | objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName); |
| 397 | objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName); | 398 | objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName); |
main.pas
| @@ -1225,8 +1225,10 @@ end; | @@ -1225,8 +1225,10 @@ end; | ||
| 1225 | 1225 | ||
| 1226 | procedure TFormularioGeral.InvocaMapa1Click(Sender: TObject); | 1226 | procedure TFormularioGeral.InvocaMapa1Click(Sender: TObject); |
| 1227 | begin | 1227 | begin |
| 1228 | - if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'ativo') then | ||
| 1229 | - Invoca_MapaCacic; | 1228 | + if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'N') then |
| 1229 | + Invoca_MapaCacic | ||
| 1230 | + else | ||
| 1231 | + MessageDlg(#13#13+'Módulo desabilitado!',mtError, [mbOK], 0); | ||
| 1230 | end; | 1232 | end; |
| 1231 | 1233 | ||
| 1232 | //////////////////////////////////////////////////////////////////////////////// | 1234 | //////////////////////////////////////////////////////////////////////////////// |
| @@ -1296,7 +1298,7 @@ begin | @@ -1296,7 +1298,7 @@ begin | ||
| 1296 | //////////////////////////////////////////////////////////////////////////////// | 1298 | //////////////////////////////////////////////////////////////////////////////// |
| 1297 | if (trim(objCACIC.getValueFromFile('Configs','col_patr_exe', strGerColsInfFileName))<>'s') | 1299 | if (trim(objCACIC.getValueFromFile('Configs','col_patr_exe', strGerColsInfFileName))<>'s') |
| 1298 | and (ActualActivity<>4) | 1300 | and (ActualActivity<>4) |
| 1299 | - and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'ativo') then begin | 1301 | + and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'N') then begin |
| 1300 | objCACIC.writeDebugLog('ExecutaCACIC: Executa chamada ao Mapa Cacic...'); | 1302 | objCACIC.writeDebugLog('ExecutaCACIC: Executa chamada ao Mapa Cacic...'); |
| 1301 | Invoca_MapaCacic; | 1303 | Invoca_MapaCacic; |
| 1302 | end; | 1304 | end; |
| @@ -1336,8 +1338,7 @@ begin | @@ -1336,8 +1338,7 @@ begin | ||
| 1336 | // Serão 4 tentativas por minuto | 1338 | // Serão 4 tentativas por minuto |
| 1337 | // Serão 30 minutos no máximo de tentativas, totalizando 120 | 1339 | // Serão 30 minutos no máximo de tentativas, totalizando 120 |
| 1338 | intTentativas := 0; | 1340 | intTentativas := 0; |
| 1339 | - while (not Pode_Coletar and (intTentativas < 121)) and | ||
| 1340 | - (objCACIC.getValueFromFile('Configs', 'forca_coleta',strGercolsInfFileName) <> 'S') do | 1341 | + while (not Pode_Coletar and (intTentativas < 121)) do |
| 1341 | Begin | 1342 | Begin |
| 1342 | objCACIC.writeDebugLog('ExecutaCACIC: Aguardando 15 segundos...'); | 1343 | objCACIC.writeDebugLog('ExecutaCACIC: Aguardando 15 segundos...'); |
| 1343 | Application.ProcessMessages; | 1344 | Application.ProcessMessages; |