Commit 4530e92170fdd24b2189f7dbc0eb1202446a9acb

Authored by José Maria Villac Pinheiro
1 parent 84174701
Exists in master

04-12-2016 - GeoSan 7.5.4 - Corrigido bug que não salvava uma nova ligação

Retirada mensagem de ao cancelar um ramal onde aparecia se queria fechar mesmo.
Colocadas mensagens de log ao exportar shapes
install/GeraSetupGeoSan/ArquivosInstGeoSan/GeoSan.exe
No preview for this file type
install/GeraSetupGeoSan/Codigo Gerador Instalador Geosan com TerraComponents.iss
1 #define SetupBaseName "SetupGeoSan-v." 1 #define SetupBaseName "SetupGeoSan-v."
2 -#define AppVersionFile "07.05.02" 2 +#define AppVersionFile "07.05.04"
3 3
4 [Setup] 4 [Setup]
5 AppName=GeoSan 5 AppName=GeoSan
install/GeraSetupGeoSan/Output/SetupGeoSan-v.07.05.04.exe 0 → 100644
No preview for this file type
trunk/Forms/frmCadastroRamal.frm
@@ -1194,7 +1194,7 @@ Private Sub cmdConfirmar_Click() @@ -1194,7 +1194,7 @@ Private Sub cmdConfirmar_Click()
1194 End If 1194 End If
1195 dataCadastroLigacao = Now 1195 dataCadastroLigacao = Now
1196 str = "INSERT INTO " & TB_Ligacoes & " (OBJECT_ID_,NRO_LIGACAO,INSCRICAO_LOTE,TIPO,HIDROMETRADO,ECONOMIAS,CONSUMO_LPS, DATA_LOG, USUARIO_LOG) " 1196 str = "INSERT INTO " & TB_Ligacoes & " (OBJECT_ID_,NRO_LIGACAO,INSCRICAO_LOTE,TIPO,HIDROMETRADO,ECONOMIAS,CONSUMO_LPS, DATA_LOG, USUARIO_LOG) "
1197 - str = str & "VALUES ('" & object_id_ramal & "','" & strNroL & "','" & strInsc & "','" & strTipo & "','" & strHidr & "'," & strEcon & ",0 , " & ", '" & dataCadastroLigacao & "' , '" & strUser & "' )" 1197 + str = str & "VALUES ('" & object_id_ramal & "','" & strNroL & "','" & strInsc & "','" & strTipo & "','" & strHidr & "'," & strEcon & ",0 , " & " '" & dataCadastroLigacao & "' , '" & strUser & "' )"
1198 Conn.execute (str) 1198 Conn.execute (str)
1199 rs.MoveNext 1199 rs.MoveNext
1200 Loop 1200 Loop
@@ -1618,13 +1618,7 @@ Private Sub cmdFechar_Click() @@ -1618,13 +1618,7 @@ Private Sub cmdFechar_Click()
1618 End If 1618 End If
1619 Unload Me 1619 Unload Me
1620 Else 1620 Else
1621 - If MsgBox("Deseja cancelar as alterações realizadas?", vbQuestion + vbDefaultButton2 + vbYesNo, "Cancelar") = vbYes Then  
1622 - If object_id_ramal = "" Then  
1623 - tcs.Normal  
1624 - tcs.Select  
1625 - End If  
1626 - Unload Me  
1627 - End If 1621 + Unload Me
1628 End If 1622 End If
1629 1623
1630 End Sub 1624 End Sub
trunk/GeoSan.exe
No preview for this file type
trunk/GeoSan.vbp
@@ -152,7 +152,7 @@ HelpContextID="0" @@ -152,7 +152,7 @@ HelpContextID="0"
152 CompatibleMode="0" 152 CompatibleMode="0"
153 MajorVer=7 153 MajorVer=7
154 MinorVer=5 154 MinorVer=5
155 -RevisionVer=3 155 +RevisionVer=4
156 AutoIncrementVer=0 156 AutoIncrementVer=0
157 ServerSupportFiles=0 157 ServerSupportFiles=0
158 VersionCompanyName="NEXUS GeoEngenharia e Com. Ltda." 158 VersionCompanyName="NEXUS GeoEngenharia e Com. Ltda."
trunk/GeoSan.vbw
@@ -3,9 +3,9 @@ calcDetecta = 0, 0, 0, 0, C @@ -3,9 +3,9 @@ calcDetecta = 0, 0, 0, 0, C
3 FrmCreatTextForLayer = 0, 0, 0, 0, C, 132, 132, 1251, 864, C 3 FrmCreatTextForLayer = 0, 0, 0, 0, C, 132, 132, 1251, 864, C
4 frmAbout = 0, 0, 0, 0, C, 154, 154, 1273, 886, C 4 frmAbout = 0, 0, 0, 0, C, 154, 154, 1273, 886, C
5 FrmTypes = 0, 0, 0, 0, C, 176, 176, 1295, 908, C 5 FrmTypes = 0, 0, 0, 0, C, 176, 176, 1295, 908, C
6 -FrmMain = 16, 71, 1246, 591, C, 139, 12, 1258, 744, C 6 +FrmMain = 16, 71, 1497, 969, C, 139, 12, 1258, 744, C
7 FrmAssociation = 35, 68, 1273, 637, C, 220, 220, 1339, 952, C 7 FrmAssociation = 35, 68, 1273, 637, C, 220, 220, 1339, 952, C
8 -FrmCadastroRamal = 63, 13, 1453, 742, C, 45, 39, 1164, 771, C 8 +FrmCadastroRamal = 63, 13, 1453, 868, C, 45, 39, 1164, 771, C
9 frmCadastroRamalFiltro = 100, 100, 1246, 731, C, 264, 264, 1383, 996, C 9 frmCadastroRamalFiltro = 100, 100, 1246, 731, C, 264, 264, 1383, 996, C
10 frmCanvas = 12, 33, 1452, 829, C, 110, 110, 1229, 842, C 10 frmCanvas = 12, 33, 1452, 829, C, 110, 110, 1229, 842, C
11 frmConsumidoresDesabastecidos = 110, 110, 1229, 842, C, 308, 308, 1427, 1040, C 11 frmConsumidoresDesabastecidos = 110, 110, 1229, 842, C, 308, 308, 1427, 1040, C
@@ -24,7 +24,7 @@ FrmMsg = 0, 0, 0, 0, C, 198, 198, 1317, 930, C @@ -24,7 +24,7 @@ FrmMsg = 0, 0, 0, 0, C, 198, 198, 1317, 930, C
24 frmNetWorkLegth = 50, 50, 1009, 463, C, 220, 220, 1339, 952, C 24 frmNetWorkLegth = 50, 50, 1009, 463, C, 220, 220, 1339, 952, C
25 FrmPesquisaCliente = -302, 86, 844, 717, C, 242, 242, 1361, 974, C 25 FrmPesquisaCliente = -302, 86, 844, 717, C, 242, 242, 1361, 974, C
26 FrmProcess = 0, 0, 842, 450, C, 264, 264, 1383, 996, C 26 FrmProcess = 0, 0, 842, 450, C, 264, 264, 1383, 996, C
27 -frmProgressBar = 0, 0, 0, 0, C, 286, 286, 1405, 1018, C 27 +frmProgressBar = 50, 50, 1270, 719, C, 286, 286, 1405, 1018, C
28 frmProjection = 0, 0, 0, 0, C, 308, 308, 1427, 1040, C 28 frmProjection = 0, 0, 0, 0, C, 308, 308, 1427, 1040, C
29 FrmRemoverPlano = 0, 0, 0, 0, C, 330, 330, 1449, 1062, C 29 FrmRemoverPlano = 0, 0, 0, 0, C, 330, 330, 1449, 1062, C
30 frmResultadosDetecta = 0, 0, 0, 0, C, 352, 352, 1471, 1084, C 30 frmResultadosDetecta = 0, 0, 0, 0, C, 352, 352, 1471, 1084, C
@@ -65,7 +65,7 @@ frmEncontraConsumidor = 125, 125, 967, 575, C, 154, 154, 1273, 886, C @@ -65,7 +65,7 @@ frmEncontraConsumidor = 125, 125, 967, 575, C, 154, 154, 1273, 886, C
65 clsTeCanvas = 44, 44, 1163, 776, C 65 clsTeCanvas = 44, 44, 1163, 776, C
66 frmCadastroRamalAutoLote = 0, 0, 0, 0, C, 176, 176, 1295, 908, C 66 frmCadastroRamalAutoLote = 0, 0, 0, 0, C, 176, 176, 1295, 908, C
67 frmRelAvanComando = 0, 0, 0, 0, C, 198, 198, 1317, 930, C 67 frmRelAvanComando = 0, 0, 0, 0, C, 198, 198, 1317, 930, C
68 -GeosanExport = 50, 50, 1196, 681, C 68 +GeosanExport = 3, 8, 1458, 983, C
69 Header = 250, 250, 1396, 881, C 69 Header = 250, 250, 1396, 881, C
70 clsAbreArquivo = 0, 0, 0, 0, C 70 clsAbreArquivo = 0, 0, 0, 0, C
71 CCoordIniFinLinha = 0, 0, 0, 0, C 71 CCoordIniFinLinha = 0, 0, 0, 0, C
@@ -89,7 +89,7 @@ CIntBilinear = 0, 0, 0, 0, C @@ -89,7 +89,7 @@ CIntBilinear = 0, 0, 0, 0, C
89 CObtemZdoNo = 0, 0, 0, 0, C 89 CObtemZdoNo = 0, 0, 0, 0, C
90 CAcertaZsDosNos = 0, 0, 0, 0, C 90 CAcertaZsDosNos = 0, 0, 0, 0, C
91 CDatabaseNexus = 0, 0, 0, 0, C 91 CDatabaseNexus = 0, 0, 0, 0, C
92 -frmExportaConsumos = 0, 0, 0, 0, C, 220, 220, 1339, 952, C 92 +frmExportaConsumos = 100, 100, 1320, 769, C, 220, 220, 1339, 952, C
93 CConsumo = 0, 0, 0, 0, C 93 CConsumo = 0, 0, 0, 0, C
94 CObtemObjIdsNos = 0, 0, 0, 0, C 94 CObtemObjIdsNos = 0, 0, 0, 0, C
95 CEncontraDiretorio = 0, 0, 0, 0, C 95 CEncontraDiretorio = 0, 0, 0, 0, C
trunk/Modules/Global.bas
@@ -200,7 +200,7 @@ Public Sub Main() @@ -200,7 +200,7 @@ Public Sub Main()
200 End If 200 End If
201 'Configura a versão atual do GeoSan 201 'Configura a versão atual do GeoSan
202 Versao_Geo = App.Major & "." & App.Minor & "." & App.Revision 202 Versao_Geo = App.Major & "." & App.Minor & "." & App.Revision
203 - Versao_Geo = "07.05.03" 203 + Versao_Geo = "07.05.04"
204 glo.diretorioGeoSan = App.path 'salva globalmente o caminho onde encontra-se o GeoSan.exe 204 glo.diretorioGeoSan = App.path 'salva globalmente o caminho onde encontra-se o GeoSan.exe
205 SaveLoadGlobalData glo.diretorioGeoSan + "/controles/variaveisGlobais.txt", True 'salva em um arquivo todas as variáveis globais para poderem ser acessadas por outras aplicações 205 SaveLoadGlobalData glo.diretorioGeoSan + "/controles/variaveisGlobais.txt", True 'salva em um arquivo todas as variáveis globais para poderem ser acessadas por outras aplicações
206 connn = "" 206 connn = ""
trunk/classes/GeosanExport.cls
@@ -336,6 +336,9 @@ Public Function InsereConsumidores() As Boolean @@ -336,6 +336,9 @@ Public Function InsereConsumidores() As Boolean
336 Dim COMPLLOG, BAIRRO, HIDROM, COD_CONS, CODCONSDV, CONSUM, TEL_RES As String 336 Dim COMPLLOG, BAIRRO, HIDROM, COD_CONS, CODCONSDV, CONSUM, TEL_RES As String
337 Dim TEL_COM, ECONOM, DATAIMP, DATAIMPE, ROTALEIT, GRUPOL, ROTLEIT, SEQLEI As String 337 Dim TEL_COM, ECONOM, DATAIMP, DATAIMPE, ROTALEIT, GRUPOL, ROTLEIT, SEQLEI As String
338 Dim AUTOC, CONSUFAT, CONMED, MESC, Ano, CONSFAT As String 'Não utilizados no momento 338 Dim AUTOC, CONSUFAT, CONMED, MESC, Ano, CONSFAT As String 'Não utilizados no momento
  339 + Dim logErro As String
  340 +
  341 + Dim testeValor As Long
339 342
340 InsereConsumidores = True 343 InsereConsumidores = True
341 If ExisteConexaoBancoComercial = False Then 'não localizou a tabela comercial de consumidores 344 If ExisteConexaoBancoComercial = False Then 'não localizou a tabela comercial de consumidores
@@ -346,15 +349,17 @@ Public Function InsereConsumidores() As Boolean @@ -346,15 +349,17 @@ Public Function InsereConsumidores() As Boolean
346 frm.ProgressBar1.Min = 0 349 frm.ProgressBar1.Min = 0
347 str = "SELECT COUNT(*) FROM RAMAIS_AGUA_LIGACAO" 350 str = "SELECT COUNT(*) FROM RAMAIS_AGUA_LIGACAO"
348 rs.Open str, Conn, adOpenDynamic, adLockOptimistic 'abre a conexão 351 rs.Open str, Conn, adOpenDynamic, adLockOptimistic 'abre a conexão
349 - frm.ProgressBar1.Max = rs.Fields(0) 352 + frm.ProgressBar1.Max = rs.Fields(0) + 1000
350 rs.Close 353 rs.Close
351 354
352 'prepara a querie para ler todos os dados de um trecho de rede de água 355 'prepara a querie para ler todos os dados de um trecho de rede de água
353 str = "select * from RAMAIS_AGUA_LIGACAO " 356 str = "select * from RAMAIS_AGUA_LIGACAO "
354 - str = str + "inner join NXGS_V_LIG_COMERCIAL on RAMAIS_AGUA_LIGACAO.NRO_LIGACAO / 10 = NXGS_V_LIG_COMERCIAL.NRO_LIGACAO_SEM_DV " 357 + str = str + "inner join NXGS_V_LIG_COMERCIAL on Convert(varchar, Convert(bigint,RAMAIS_AGUA_LIGACAO.NRO_LIGACAO) / 10) = NXGS_V_LIG_COMERCIAL.NRO_LIGACAO_SEM_DV "
355 'str = str + "inner join NXGS_V_LIG_COM_CONSUMO_MEDIO on NXGS_V_LIG_COM_CONSUMO_MEDIO.NRO_LIGACAO_SEM_DV = RAMAIS_AGUA_LIGACAO.NRO_LIGACAO /10" 358 'str = str + "inner join NXGS_V_LIG_COM_CONSUMO_MEDIO on NXGS_V_LIG_COM_CONSUMO_MEDIO.NRO_LIGACAO_SEM_DV = RAMAIS_AGUA_LIGACAO.NRO_LIGACAO /10"
  359 + logErro = "1 - " + str
356 rs.Open str, Conn, adOpenDynamic, adLockOptimistic 'abre a conexão 360 rs.Open str, Conn, adOpenDynamic, adLockOptimistic 'abre a conexão
357 Do While Not rs.EOF 361 Do While Not rs.EOF
  362 + logErro = "6 - moveu para o próximo, object_id:" + rs.Fields("Object_id_").value
358 DoEvents 'para o VB poder escutar o timer e poder parar o processamento caso a tecla ESC tenha sido pressionada 363 DoEvents 'para o VB poder escutar o timer e poder parar o processamento caso a tecla ESC tenha sido pressionada
359 If varGlobais.pararExecucao = True Then 364 If varGlobais.pararExecucao = True Then
360 Screen.MousePointer = vbNormal 365 Screen.MousePointer = vbNormal
@@ -394,6 +399,7 @@ Public Function InsereConsumidores() As Boolean @@ -394,6 +399,7 @@ Public Function InsereConsumidores() As Boolean
394 CONMED = "" 399 CONMED = ""
395 MESC = "" 400 MESC = ""
396 Ano = "" 401 Ano = ""
  402 + logErro = "2 - configuração de variáveis"
397 'prepara insert com todos os dados da querie acima 403 'prepara insert com todos os dados da querie acima
398 str = "INSERT INTO GS_CONSUMIDORES (OBJECT_ID_, NRO_LIG,NROL_SDV, INSCLOTE," 404 str = "INSERT INTO GS_CONSUMIDORES (OBJECT_ID_, NRO_LIG,NROL_SDV, INSCLOTE,"
399 str = str + " AUTO, CONS_LPS, TIPO," 405 str = str + " AUTO, CONS_LPS, TIPO,"
@@ -414,10 +420,20 @@ Public Function InsereConsumidores() As Boolean @@ -414,10 +420,20 @@ Public Function InsereConsumidores() As Boolean
414 str = str + "' , '" + DATAIMP + "' , '" + DATAIMPE + "' , '" + ROTALEIT 420 str = str + "' , '" + DATAIMP + "' , '" + DATAIMPE + "' , '" + ROTALEIT
415 str = str + "' , '" + GRUPOL + "' , '" + ROTLEIT + "' , '" + SEQLEI 421 str = str + "' , '" + GRUPOL + "' , '" + ROTLEIT + "' , '" + SEQLEI
416 str = str + "' , '" + CONSFAT + "' , '" + CONMED + "' , '" + MESC + "' , '" + Ano + "' )" 422 str = str + "' , '" + CONSFAT + "' , '" + CONMED + "' , '" + MESC + "' , '" + Ano + "' )"
  423 + logErro = "3 - " + str
417 Conn.execute (str) 'insere a linha 424 Conn.execute (str) 'insere a linha
  425 + logErro = "4 - " + str
418 rs.MoveNext 'próxima 426 rs.MoveNext 'próxima
  427 + logErro = "5 - " + str
  428 +
  429 + testeValor = frm.ProgressBar1
  430 +' If testeValor >= 101702 Then
  431 +' MsgBox ("Chegou:" + CStr(testeValor))
  432 +' End If
419 frm.ProgressBar1.value = frm.ProgressBar1.value + 1 433 frm.ProgressBar1.value = frm.ProgressBar1.value + 1
  434 + logErro = "8 - " + str
420 Loop 435 Loop
  436 + logErro = "7 - Finalizou - " + str
421 rs.Close 437 rs.Close
422 Unload frm 438 Unload frm
423 InsereConsumidores = True 439 InsereConsumidores = True
@@ -428,7 +444,7 @@ Trata_Erro: @@ -428,7 +444,7 @@ Trata_Erro:
428 Resume Next 444 Resume Next
429 Else 445 Else
430 InsereConsumidores = False 446 InsereConsumidores = False
431 - ErroUsuario.Registra "GeosanExport", "InsereConsumidores - sql: " & str & " - ", CStr(Err.Number), CStr(Err.Description), True, glo.enviaEmails 447 + ErroUsuario.Registra "GeosanExport", "InsereConsumidores - " & logErro & " - ", CStr(Err.Number), CStr(Err.Description), True, glo.enviaEmails
432 End If 448 End If
433 End Function 449 End Function
434 'Insere todos dos dados de todas as redes na tabela de atributos de redes GS_REDES 450 'Insere todos dos dados de todas as redes na tabela de atributos de redes GS_REDES