Commit 5b37e7cbcefa6ab9bd1164c66f5bc912c8df6fb2
1 parent
27fbbf18
Exists in
master
correção de tratamento de nº 64bits
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@14 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
4 changed files
with
49 additions
and
14 deletions
Show diff stats
ger_cols/ger_cols.dof
... | ... | @@ -115,7 +115,7 @@ AutoIncBuild=0 |
115 | 115 | MajorVer=2 |
116 | 116 | MinorVer=2 |
117 | 117 | Release=0 |
118 | -Build=3 | |
118 | +Build=8 | |
119 | 119 | Debug=0 |
120 | 120 | PreRelease=0 |
121 | 121 | Special=0 |
... | ... | @@ -126,7 +126,7 @@ CodePage=1252 |
126 | 126 | [Version Info Keys] |
127 | 127 | CompanyName=Dataprev-ES |
128 | 128 | FileDescription=Módulo Gerente de Coletas do Sistema CACIC |
129 | -FileVersion=2.2.0.3 | |
129 | +FileVersion=2.2.0.8 | |
130 | 130 | InternalName= |
131 | 131 | LegalCopyright= |
132 | 132 | LegalTrademarks= | ... | ... |
ger_cols/ger_cols.dpr
... | ... | @@ -1270,7 +1270,7 @@ Begin |
1270 | 1270 | Begin |
1271 | 1271 | intHoje := StrToInt(FormatDateTime('yyyymmdd', Date)); |
1272 | 1272 | strIntervaloRenovacaoPatrimonio := GetValorDatMemoria('Configs.NU_INTERVALO_RENOVACAO_PATRIMONIO', v_tstrCipherOpened); |
1273 | - if ((strUltimaRedeObtida <> '') and (strIntervaloRenovacaoPatrimonio <> '') and ((intHoje - StrToInt(strDt_ultima_renovacao_patrim)) >= strtoint(strIntervaloRenovacaoPatrimonio))) or | |
1273 | + if ((strUltimaRedeObtida <> '') and (strIntervaloRenovacaoPatrimonio <> '') and ((intHoje - StrToInt64(strDt_ultima_renovacao_patrim)) >= strtoint(strIntervaloRenovacaoPatrimonio))) or | |
1274 | 1274 | (GetValorDatMemoria('Configs.IN_COLETA_FORCADA_PATR', v_tstrCipherOpened) = 'S') Then |
1275 | 1275 | Begin |
1276 | 1276 | // E neste caso seto como "S" o valor de Renovação de Informações para ser lido pelo módulo de Coleta de Informações Patrimoniais. |
... | ... | @@ -2452,6 +2452,8 @@ Begin |
2452 | 2452 | end; |
2453 | 2453 | |
2454 | 2454 | procedure Executa_Ger_Cols; |
2455 | +var strDtHrColetaForcada, | |
2456 | + strDtHrUltimaColeta : String; | |
2455 | 2457 | Begin |
2456 | 2458 | Try |
2457 | 2459 | // Parâmetros possíveis (aceitos) |
... | ... | @@ -2587,15 +2589,26 @@ Begin |
2587 | 2589 | (GetValorDatMemoria('Configs.CS_COLETA_UNID_DISC' , v_tstrCipherOpened) = 'S')) and |
2588 | 2590 | not FileExists(p_path_cacic + 'Temp\ger_cols.exe') then |
2589 | 2591 | begin |
2590 | - | |
2592 | + v_acao_gercols := 'Montando script de coletas'; | |
2591 | 2593 | // Monto o batch de coletas de acordo com as configurações |
2592 | 2594 | log_diario('Verificando novas versões para Coletores de Informações.'); |
2593 | 2595 | intMontaBatch := 0; |
2594 | 2596 | v_ModulosOpcoes := ''; |
2597 | + strDtHrUltimaColeta := '0'; | |
2598 | + Try | |
2599 | + strDtHrUltimaColeta := GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened); | |
2600 | + Except | |
2601 | + End; | |
2602 | + if (strDtHrUltimaColeta = '') then | |
2603 | + strDtHrUltimaColeta := '0'; | |
2595 | 2604 | |
2596 | 2605 | if (GetValorDatMemoria('Configs.CS_COLETA_PATRIMONIO', v_tstrCipherOpened) = 'S') then |
2597 | 2606 | begin |
2598 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_PATR', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2607 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_PATR', v_tstrCipherOpened); | |
2608 | + log_DEBUG('Data/Hora Coleta Forçada PATR: '+strDtHrColetaForcada); | |
2609 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2610 | + | |
2611 | + if (strDtHrColetaForcada <> '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2599 | 2612 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_PATR','S', v_tstrCipherOpened) |
2600 | 2613 | else |
2601 | 2614 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_PATR','N', v_tstrCipherOpened); |
... | ... | @@ -2621,9 +2634,11 @@ Begin |
2621 | 2634 | |
2622 | 2635 | if (GetValorDatMemoria('Configs.CS_COLETA_OFFICESCAN' , v_tstrCipherOpened) = 'S') then |
2623 | 2636 | begin |
2624 | - log_DEBUG('GetValorDatMemoria(Configs.DT_HR_COLETA_FORCADA_ANVI,v_tstrCipherOpened)='+GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_ANVI', v_tstrCipherOpened)); | |
2625 | - log_DEBUG('GetValorDatMemoria(Configs.DT_HR_ULTIMA_COLETA, v_tstrCipherOpened)='+GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened)); | |
2626 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_ANVI', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2637 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_ANVI', v_tstrCipherOpened); | |
2638 | + log_DEBUG('Data/Hora Coleta Forçada ANVI: '+strDtHrColetaForcada); | |
2639 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2640 | + | |
2641 | + if (strDtHrColetaForcada <> '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2627 | 2642 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_ANVI','S', v_tstrCipherOpened) |
2628 | 2643 | else |
2629 | 2644 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_ANVI','N', v_tstrCipherOpened); |
... | ... | @@ -2640,10 +2655,14 @@ Begin |
2640 | 2655 | |
2641 | 2656 | if (GetValorDatMemoria('Configs.CS_COLETA_COMPARTILHAMENTOS', v_tstrCipherOpened) = 'S') then |
2642 | 2657 | begin |
2643 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_COMP', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2658 | + | |
2659 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_COMP', v_tstrCipherOpened); | |
2660 | + log_DEBUG('Data/Hora Coleta Forçada COMP: '+strDtHrColetaForcada); | |
2661 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2662 | + if not(strDtHrColetaForcada = '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2644 | 2663 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_COMP','S', v_tstrCipherOpened) |
2645 | 2664 | else |
2646 | - SetValorDatMemoria('Configs.IN_COLETA_FORCADA_COMP','N', v_tstrCipherOpened); | |
2665 | + SetValorDatMemoria('Configs.IN_COLETA_FORCADA_COMP','N', v_tstrCipherOpened); | |
2647 | 2666 | |
2648 | 2667 | if (v_CS_AUTO_UPDATE) then Ver_UPD('col_comp','Coletor de Informações de Compartilhamentos',p_path_cacic + 'modulos\','',false); |
2649 | 2668 | if (FileExists(p_path_cacic + 'Modulos\col_comp.exe')) then |
... | ... | @@ -2658,7 +2677,11 @@ Begin |
2658 | 2677 | |
2659 | 2678 | if (GetValorDatMemoria('Configs.CS_COLETA_HARDWARE', v_tstrCipherOpened) = 'S') then |
2660 | 2679 | begin |
2661 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_HARD', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2680 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_HARD', v_tstrCipherOpened); | |
2681 | + log_DEBUG('Data/Hora Coleta Forçada HARD: '+strDtHrColetaForcada); | |
2682 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2683 | + | |
2684 | + if (strDtHrColetaForcada <> '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2662 | 2685 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_HARD','S', v_tstrCipherOpened) |
2663 | 2686 | else |
2664 | 2687 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_HARD','N', v_tstrCipherOpened); |
... | ... | @@ -2677,7 +2700,11 @@ Begin |
2677 | 2700 | |
2678 | 2701 | if (GetValorDatMemoria('Configs.CS_COLETA_MONITORADO', v_tstrCipherOpened) = 'S') then |
2679 | 2702 | begin |
2680 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_MONI', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2703 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_MONI', v_tstrCipherOpened); | |
2704 | + log_DEBUG('Data/Hora Coleta Forçada MONI: '+strDtHrColetaForcada); | |
2705 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2706 | + | |
2707 | + if (strDtHrColetaForcada <> '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2681 | 2708 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_MONI','S', v_tstrCipherOpened) |
2682 | 2709 | else |
2683 | 2710 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_MONI','N', v_tstrCipherOpened); |
... | ... | @@ -2695,7 +2722,11 @@ Begin |
2695 | 2722 | |
2696 | 2723 | if (GetValorDatMemoria('Configs.CS_COLETA_SOFTWARE', v_tstrCipherOpened) = 'S') then |
2697 | 2724 | begin |
2698 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_SOFT', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2725 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_SOFT', v_tstrCipherOpened); | |
2726 | + log_DEBUG('Data/Hora Coleta Forçada SOFT: '+strDtHrColetaForcada); | |
2727 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2728 | + | |
2729 | + if (strDtHrColetaForcada <> '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2699 | 2730 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_SOFT','S', v_tstrCipherOpened) |
2700 | 2731 | else |
2701 | 2732 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_SOFT','N', v_tstrCipherOpened); |
... | ... | @@ -2713,7 +2744,11 @@ Begin |
2713 | 2744 | |
2714 | 2745 | if (GetValorDatMemoria('Configs.CS_COLETA_UNID_DISC', v_tstrCipherOpened) = 'S') then |
2715 | 2746 | begin |
2716 | - if (StrToInt(GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_UNDI', v_tstrCipherOpened)) > StrToInt(GetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA', v_tstrCipherOpened))) then | |
2747 | + strDtHrColetaForcada := GetValorDatMemoria('Configs.DT_HR_COLETA_FORCADA_UNDI', v_tstrCipherOpened); | |
2748 | + log_DEBUG('Data/Hora Coleta Forçada UNDI: '+strDtHrColetaForcada); | |
2749 | + log_DEBUG('Data/Hora Última Coleta GERAL: '+strDtHrUltimaColeta); | |
2750 | + | |
2751 | + if (strDtHrColetaForcada <> '') and (StrToInt64(strDtHrColetaForcada) > StrToInt64(strDtHrUltimaColeta)) then | |
2717 | 2752 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_UNDI','S', v_tstrCipherOpened) |
2718 | 2753 | else |
2719 | 2754 | SetValorDatMemoria('Configs.IN_COLETA_FORCADA_UNDI','N', v_tstrCipherOpened); | ... | ... |
ger_cols/ger_cols.exe
No preview for this file type
ger_cols/ger_cols.res
No preview for this file type