Commit 08bec35b1d04a76a3bf4f61703959ab9627388f9
Exists in
master
12-11-2016 - GeoSan 7.5.0 - Incorporada a geração de indicadores para o cadastro de
ligações de água. Agora é possível saber quem cadastrou uma nova ligação de água em um determinado ramal. Merge branch 'master' of http://softwarepublico.gov.br/gitlab/gsan/geosan # Conflicts: # trunk/GeoSan.exe # trunk/GeoSan.vbw
Showing
11 changed files
with
55 additions
and
33 deletions
Show diff stats
install/GeraSetupGeoSan/ArquivosInstGeoSan/GeoSan.exe
No preview for this file type
install/GeraSetupGeoSan/Codigo Gerador Instalador Geosan com TerraComponents.iss
No preview for this file type
sql/20161112081400-GeoSan 7.4.6 - insere colunas log cadastro ramais.sql
0 → 100644
... | ... | @@ -0,0 +1,5 @@ |
1 | +Insere novas colunas para poder registrar o indicador de produtividade de cadastro de novas ligações em um ramal novo ou existente. Registra quem cadastrou e quando cadastrou. | |
2 | + | |
3 | +alter table ramais_agua_ligacao add DATA_LOG varchar(45) null, USUARIO_LOG varchar(30) null | |
4 | + | |
5 | +alter table RAMAIS_ESGOTO_LIGACAO add DATA_LOG varchar(45) null, USUARIO_LOG varchar(30) null | |
0 | 6 | \ No newline at end of file | ... | ... |
trunk/Forms/frmCadastroRamal.frm
... | ... | @@ -1038,6 +1038,7 @@ Private Sub cmdConfirmar_Click() |
1038 | 1038 | Dim strHidr As String |
1039 | 1039 | Dim strNroLigaSel As String |
1040 | 1040 | Dim strAtualizaAtributosRamaisAgua As String |
1041 | + Dim dataCadastroLigacao As String | |
1041 | 1042 | |
1042 | 1043 | intlocalerro = 0 |
1043 | 1044 | Set rsCria = New ADODB.Recordset 'recordset utilizado para criar o regitro na tabela |
... | ... | @@ -1191,8 +1192,9 @@ Private Sub cmdConfirmar_Click() |
1191 | 1192 | Else |
1192 | 1193 | strHidr = "0" 'ARMAZENA EM LETRA MINÚSCULA |
1193 | 1194 | End If |
1194 | - str = "INSERT INTO " & TB_Ligacoes & " (OBJECT_ID_,NRO_LIGACAO,INSCRICAO_LOTE,TIPO,HIDROMETRADO,ECONOMIAS,CONSUMO_LPS) " | |
1195 | - str = str & "VALUES ('" & object_id_ramal & "','" & strNroL & "','" & strInsc & "','" & strTipo & "','" & strHidr & "'," & strEcon & ",0)" | |
1195 | + dataCadastroLigacao = Now | |
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 & "' )" | |
1196 | 1198 | Conn.execute (str) |
1197 | 1199 | rs.MoveNext |
1198 | 1200 | Loop |
... | ... | @@ -1292,8 +1294,9 @@ Private Sub cmdConfirmar_Click() |
1292 | 1294 | Else |
1293 | 1295 | strHidr = "" 'ARMAZENA EM LETRA MINÚSCULA |
1294 | 1296 | End If |
1295 | - str = "INSERT INTO " & TB_Ligacoes & " (OBJECT_ID_,NRO_LIGACAO,INSCRICAO_LOTE,TIPO,HIDROMETRADO,ECONOMIAS,CONSUMO_LPS) " | |
1296 | - str = str & "VALUES ('" & object_id_ramal & "','" & strNroL & "','" & strInsc & "','" & strTipo & "','" & strHidr & "','" & strEcon & "','0')" | |
1297 | + dataCadastroLigacao = Now | |
1298 | + str = "INSERT INTO " & TB_Ligacoes & " (OBJECT_ID_,NRO_LIGACAO,INSCRICAO_LOTE,TIPO,HIDROMETRADO,ECONOMIAS,CONSUMO_LPS, DATA_LOG, USUARIO_LOG) " | |
1299 | + str = str & "VALUES ('" & object_id_ramal & "','" & strNroL & "','" & strInsc & "','" & strTipo & "','" & strHidr & "','" & strEcon & "','0', '" & dataCadastroLigacao & "' , '" & strUser & "' )" | |
1297 | 1300 | Conn.execute (str) |
1298 | 1301 | rs.MoveNext |
1299 | 1302 | Loop | ... | ... |
trunk/Forms/frmCanvas.frm
... | ... | @@ -226,7 +226,7 @@ Private Sub InsereLigacaoNoRamalSelecionado(object_id_ramalSelecionado As Long, |
226 | 226 | Dim strApagaGeometriaDaLigacaoGpsCadastrada As String |
227 | 227 | Dim strInsereLigacao As String |
228 | 228 | Dim strApagaLigacaoGpsCadastrada As String |
229 | - On Error GoTo Trata_Erro | |
229 | + Dim dataCadastroLigacao As String | |
230 | 230 | |
231 | 231 | '1 - Insere em RAMAIS_AGUA_LIGACAO a ligação selecionada pelo usuário |
232 | 232 | On Error GoTo Transacao_Erro |
... | ... | @@ -236,13 +236,15 @@ Private Sub InsereLigacaoNoRamalSelecionado(object_id_ramalSelecionado As Long, |
236 | 236 | strAbreConexaoInsereRamaisAguaLigacao = "SELECT NRO_LIGACA, VOL_FATURA FROM NXGS_V_LIG_COMERCIAL_GPS WHERE object_id_331 = " + CStr(object_id_consumidoreSelecionado) |
237 | 237 | debugCodigoErro = "1 - Select: " & strAbreConexaoInsereRamaisAguaLigacao |
238 | 238 | rsInsereRamaisAguaLigacao.Open strAbreConexaoInsereRamaisAguaLigacao, Conn, adOpenKeyset, adLockOptimistic, adCmdText |
239 | - '2 - Inicia a atualização de RAMAIS_AGUA com todos os dados | |
239 | + | |
240 | + '2 - Inicia a atualização de RAMAIS_AGUA_LIGACAO com todos os dados | |
241 | + dataCadastroLigacao = Now | |
240 | 242 | If rsInsereRamaisAguaLigacao.EOF = False Then 'Tem que encontrar a linha em RAMAIS_AGUA que acabou de ser inserida |
241 | 243 | volumeFaturado = IIf(IsNull(rsInsereRamaisAguaLigacao!VOL_FATURA), 0, rsInsereRamaisAguaLigacao!VOL_FATURA) |
242 | 244 | numeroDaLigacaoComDV = rsInsereRamaisAguaLigacao!NRO_LIGACA |
243 | 245 | End If |
244 | - strInsereLigacao = "INSERT INTO RAMAIS_AGUA_LIGACAO (OBJECT_ID_,NRO_LIGACAO,CONSUMO_LPS) " | |
245 | - strInsereLigacao = strInsereLigacao & "VALUES ('" & object_id_ramalSelecionado & "','" & numeroDaLigacaoComDV & "', " & volumeFaturado & ")" | |
246 | + strInsereLigacao = "INSERT INTO RAMAIS_AGUA_LIGACAO (OBJECT_ID_,NRO_LIGACAO,CONSUMO_LPS, DATA_LOG, USUARIO_LOG) " | |
247 | + strInsereLigacao = strInsereLigacao & "VALUES ('" & object_id_ramalSelecionado & "','" & numeroDaLigacaoComDV & "', " & volumeFaturado & ", '" & dataCadastroLigacao & "' , '" & strUser & "' )" | |
246 | 248 | Conn.execute (strInsereLigacao) |
247 | 249 | rsInsereRamaisAguaLigacao.Close |
248 | 250 | |
... | ... | @@ -320,6 +322,7 @@ Private Sub InsereRamalLigacaoGPS(object_id_ligacaoGPS As Long, object_id_rede A |
320 | 322 | Dim geomIdRamal As Long |
321 | 323 | Dim volumeFaturado As Double |
322 | 324 | Dim numeroDaLigacaoComDV As String |
325 | + Dim dataCadastroLigacao As String | |
323 | 326 | |
324 | 327 | '1 - Adiciona linha a tabela de atributos de ramais de água |
325 | 328 | debugCodigoErro = "0" |
... | ... | @@ -369,21 +372,32 @@ Private Sub InsereRamalLigacaoGPS(object_id_ligacaoGPS As Long, object_id_rede A |
369 | 372 | TeDatabase1.getCenterGeometry 0, stringObject_id_ligacaoGPS, TypeGeometry.points, coordX_pontoGPS, coordY_pontoGPS |
370 | 373 | retornoPontoGPS = TeDatabase1.setCurrentLayer("WATERLINES") |
371 | 374 | retornoLinhaPerpendicular = TeDatabase1.getMinimumDistance(0, stringObject_id_rede, TypeGeometry.lines, coordX_pontoGPS, coordY_pontoGPS, comprimentoDoRamal, pontoSobreALinha, coord_x_NaLinha, coord_y_NaLinha) |
372 | - linhaRamalX(0) = coord_x_NaLinha | |
373 | - linhaRamalY(0) = coord_y_NaLinha | |
374 | - linhaRamalX(1) = coordX_pontoGPS | |
375 | - linhaRamalY(1) = coordY_pontoGPS | |
376 | - retornoPontoGPS = TeDatabase1.setCurrentLayer("RAMAIS_AGUA") | |
377 | - retornoAdicionaLinhaRamal = TeDatabase1.addLine(idUnicoRamaisAgua, linhaRamalX(0), linhaRamalY(0), 2) | |
375 | + If retornoLinhaPerpendicular = 1 And coordX_pontoGPS > 0 And coordY_pontoGPS > 0 Then | |
376 | + linhaRamalX(0) = coord_x_NaLinha | |
377 | + linhaRamalY(0) = coord_y_NaLinha | |
378 | + linhaRamalX(1) = coordX_pontoGPS | |
379 | + linhaRamalY(1) = coordY_pontoGPS | |
380 | + retornoPontoGPS = TeDatabase1.setCurrentLayer("RAMAIS_AGUA") | |
381 | + retornoAdicionaLinhaRamal = TeDatabase1.addLine(idUnicoRamaisAgua, linhaRamalX(0), linhaRamalY(0), 2) | |
382 | + Else | |
383 | + debugCodigoErro = "2 - stringObject_id_ligacaoGPS = " + stringObject_id_ligacaoGPS + " retornoPerpendicular = " + CStr(retornoLinhaPerpendicular) + " coordX_pontoGPS = " + CStr(coordX_pontoGPS) + " coordY_pontoGPS = " + CStr(coordY_pontoGPS) | |
384 | + GoTo Trata_Erro 'por algum motivo em poucos casos acontece de ele não pergar a coordenada do ponto do ramal (extremidade do mesmo) foi colocado isso para poder identificar o que está acontecendo | |
385 | + End If | |
378 | 386 | |
379 | 387 | '4 - Adiciona geometria do ponto ao ramail |
380 | 388 | debugCodigoErro = "3" |
381 | - retornoPontoDoRamalInserido = TeDatabase1.addPoint(idUnicoRamaisAgua, coordX_pontoGPS, coordY_pontoGPS) | |
389 | + If coordX_pontoGPS > 0 And coordY_pontoGPS > 0 Then 'só adiciona o ponto do ramal se existir a coordenada. Este if é para identificar o que pode estar acontecendo em poucos casos quando se cadastra o ramal automaticamente | |
390 | + retornoPontoDoRamalInserido = TeDatabase1.addPoint(idUnicoRamaisAgua, coordX_pontoGPS, coordY_pontoGPS) | |
391 | + Else | |
392 | + debugCodigoErro = "3 - stringObject_id_ligacaoGPS = " + stringObject_id_ligacaoGPS + " retornoPerpendicular = " + CStr(retornoLinhaPerpendicular) + " coordX_pontoGPS = " + CStr(coordX_pontoGPS) + " coordY_pontoGPS = " + CStr(coordY_pontoGPS) | |
393 | + GoTo Trata_Erro | |
394 | + End If | |
382 | 395 | |
383 | 396 | '5 - Insere em RAMAIS_AGUA_LIGACAO a ligação selecionada pelo usuário |
384 | 397 | On Error GoTo Transacao_Erro |
385 | 398 | Conn.BeginTrans |
386 | 399 | debugCodigoErro = "4" |
400 | + dataCadastroLigacao = Now | |
387 | 401 | Set rsInsereRamaisAguaLigacao = New ADODB.Recordset |
388 | 402 | strAbreConexaoInsereRamaisAguaLigacao = "SELECT NRO_LIGACA, VOL_FATURA FROM NXGS_V_LIG_COMERCIAL_GPS WHERE object_id_331 = " + CStr(object_id_consumidorSelecionado) |
389 | 403 | debugCodigoErro = "5 - Select: " & strAbreConexaoInsereRamaisAguaLigacao |
... | ... | @@ -393,8 +407,8 @@ Private Sub InsereRamalLigacaoGPS(object_id_ligacaoGPS As Long, object_id_rede A |
393 | 407 | volumeFaturado = IIf(IsNull(rsInsereRamaisAguaLigacao!VOL_FATURA), 0, rsInsereRamaisAguaLigacao!VOL_FATURA) |
394 | 408 | numeroDaLigacaoComDV = rsInsereRamaisAguaLigacao!NRO_LIGACA |
395 | 409 | End If |
396 | - strInsereLigacao = "INSERT INTO RAMAIS_AGUA_LIGACAO (OBJECT_ID_,NRO_LIGACAO,CONSUMO_LPS) " | |
397 | - strInsereLigacao = strInsereLigacao & "VALUES ('" & idUnicoRamaisAgua & "','" & numeroDaLigacaoComDV & "', " & volumeFaturado & ")" | |
410 | + strInsereLigacao = "INSERT INTO RAMAIS_AGUA_LIGACAO (OBJECT_ID_,NRO_LIGACAO,CONSUMO_LPS, DATA_LOG, USUARIO_LOG) " | |
411 | + strInsereLigacao = strInsereLigacao & "VALUES ('" & idUnicoRamaisAgua & "','" & numeroDaLigacaoComDV & "', " & volumeFaturado & ", '" & dataCadastroLigacao & "' , '" & strUser & "' )" | |
398 | 412 | Conn.execute (strInsereLigacao) |
399 | 413 | rsInsereRamaisAguaLigacao.Close |
400 | 414 | ... | ... |
trunk/Forms/frmMain.frm
... | ... | @@ -2,11 +2,11 @@ VERSION 5.00 |
2 | 2 | Object = "{9AB389E7-EAED-4DBF-941D-EB86ED1F9A76}#1.0#0"; "TeComConnection.dll" |
3 | 3 | Object = "{87AC6DA5-272D-40EB-B60A-F83246B1B8D7}#1.0#0"; "TeComDatabase.dll" |
4 | 4 | Object = "{C51C74EC-6107-4A01-8400-40B53BB20D42}#1.0#0"; "TeComExport.dll" |
5 | -Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX" | |
5 | +Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx" | |
6 | 6 | Object = "{1A397116-3057-40EE-9ECA-6FA4CC1E5FC3}#1.0#0"; "NexusPM4.ocx" |
7 | 7 | Object = "{2CCABA93-B681-4E7F-8047-BD4D623301BA}#1.0#0"; "TeComImport.dll" |
8 | 8 | Object = "{91488A85-7250-4842-8681-87818334B791}#1.0#0"; "NxViewManager2.ocx" |
9 | -Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "MSCOMCTL.OCX" | |
9 | +Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.1#0"; "mscomctl.ocx" | |
10 | 10 | Begin VB.MDIForm FrmMain |
11 | 11 | BackColor = &H8000000C& |
12 | 12 | Caption = " NEXUS - GeoSan - Tecnologia Terralib" |
... | ... | @@ -320,7 +320,7 @@ Begin VB.MDIForm FrmMain |
320 | 320 | AutoSize = 2 |
321 | 321 | Object.Width = 3519 |
322 | 322 | MinWidth = 3528 |
323 | - TextSave = "10:02" | |
323 | + TextSave = "20:16" | |
324 | 324 | EndProperty |
325 | 325 | BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} |
326 | 326 | AutoSize = 2 |
... | ... | @@ -1526,7 +1526,7 @@ Private Sub mnu_PatternCurves_Click() |
1526 | 1526 | |
1527 | 1527 | Dim frm As New frmEPANavegator |
1528 | 1528 | |
1529 | - frm.init | |
1529 | + frm.Init | |
1530 | 1530 | Set frm = Nothing |
1531 | 1531 | |
1532 | 1532 | End Sub |
... | ... | @@ -1867,7 +1867,7 @@ Private Sub mnuExpAutoCad_Click() |
1867 | 1867 | |
1868 | 1868 | 'Se nao houver canvas aberto não é possivel exportar nada... |
1869 | 1869 | If FrmMain.Tag > 0 Then |
1870 | - frm.init Conn, ActiveForm.TCanvas, Me | |
1870 | + frm.Init Conn, ActiveForm.TCanvas, Me | |
1871 | 1871 | Else |
1872 | 1872 | MsgBox "Não é possível exportar quando não existe uma área de trabalho do mapa.", vbInformation, "Atenção!" |
1873 | 1873 | End If |
... | ... | @@ -2002,7 +2002,7 @@ Dim frm As New frmImportDxf |
2002 | 2002 | Conecta |
2003 | 2003 | |
2004 | 2004 | |
2005 | - frm.init Conn, TeImport1, TeDatabase1 | |
2005 | + frm.Init Conn, TeImport1, TeDatabase1 | |
2006 | 2006 | Set frm = Nothing |
2007 | 2007 | 'changeSelIntersectionPoint |
2008 | 2008 | End Sub |
... | ... | @@ -2021,7 +2021,7 @@ Private Sub mnuImportSIG_Click() |
2021 | 2021 | Conecta |
2022 | 2022 | |
2023 | 2023 | |
2024 | - frm.init Conn, TeImport1, TeDatabase1 | |
2024 | + frm.Init Conn, TeImport1, TeDatabase1 | |
2025 | 2025 | Set frm = Nothing |
2026 | 2026 | |
2027 | 2027 | End Sub |
... | ... | @@ -2034,7 +2034,7 @@ End Sub |
2034 | 2034 | |
2035 | 2035 | Private Sub mnuInsertLabel_Click() |
2036 | 2036 | |
2037 | - FrmCreatTextForLayer.init | |
2037 | + FrmCreatTextForLayer.Init | |
2038 | 2038 | |
2039 | 2039 | End Sub |
2040 | 2040 | |
... | ... | @@ -2241,7 +2241,7 @@ End Sub |
2241 | 2241 | |
2242 | 2242 | Private Sub mnuTypes_Click() |
2243 | 2243 | |
2244 | - FrmSelectTypes.init | |
2244 | + FrmSelectTypes.Init | |
2245 | 2245 | |
2246 | 2246 | End Sub |
2247 | 2247 | |
... | ... | @@ -2534,7 +2534,7 @@ End Sub |
2534 | 2534 | ' |
2535 | 2535 | Private Sub mnuOpen_Click() |
2536 | 2536 | Set TCanvas = New frmCanvas |
2537 | - TCanvas.init Conn, usuario.UseName | |
2537 | + TCanvas.Init Conn, usuario.UseName | |
2538 | 2538 | End Sub |
2539 | 2539 | |
2540 | 2540 | |
... | ... | @@ -2669,7 +2669,7 @@ On Error GoTo Trata_Erro |
2669 | 2669 | |
2670 | 2670 | tbToolBar.Buttons("kselection").value = tbrPressed |
2671 | 2671 | |
2672 | - Me.ActiveForm.Caption = "ista: " & ViewName | |
2672 | + Me.ActiveForm.Caption = "Vista: " & ViewName | |
2673 | 2673 | sbStatusBar.Panels(1).Text = "Modo de seleção: Selecione um objeto do plano referente ao tema ativo" |
2674 | 2674 | |
2675 | 2675 | Trata_Erro: | ... | ... |
trunk/GeoSan.exe
No preview for this file type
trunk/GeoSan.vbp
... | ... | @@ -150,8 +150,8 @@ Name="GeoSan" |
150 | 150 | HelpContextID="0" |
151 | 151 | CompatibleMode="0" |
152 | 152 | MajorVer=7 |
153 | -MinorVer=4 | |
154 | -RevisionVer=4 | |
153 | +MinorVer=5 | |
154 | +RevisionVer=0 | |
155 | 155 | AutoIncrementVer=0 |
156 | 156 | ServerSupportFiles=0 |
157 | 157 | VersionCompanyName="NEXUS GeoEngenharia e Com. Ltda." | ... | ... |
trunk/GeoSan.vbw
... | ... | @@ -5,7 +5,7 @@ frmAbout = 0, 0, 0, 0, C, 154, 154, 1273, 886, C |
5 | 5 | FrmTypes = 0, 0, 0, 0, C, 176, 176, 1295, 908, C |
6 | 6 | FrmMain = 16, 71, 1246, 591, C, 139, 12, 1258, 744, C |
7 | 7 | FrmAssociation = 35, 68, 1273, 637, C, 220, 220, 1339, 952, C |
8 | -FrmCadastroRamal = 37, 133, 1427, 862, , 45, 39, 1164, 771, C | |
8 | +FrmCadastroRamal = 63, 13, 1453, 742, C, 45, 39, 1164, 771, C | |
9 | 9 | frmCadastroRamalFiltro = 100, 100, 1246, 731, C, 264, 264, 1383, 996, C |
10 | 10 | frmCanvas = 12, 33, 1452, 829, C, 110, 110, 1229, 842, C |
11 | 11 | frmConsumidoresDesabastecidos = 110, 110, 1229, 842, C, 308, 308, 1427, 1040, C | ... | ... |
trunk/Modules/Global.bas
... | ... | @@ -200,7 +200,7 @@ Public Sub Main() |
200 | 200 | End If |
201 | 201 | 'Configura a versão atual do GeoSan |
202 | 202 | Versao_Geo = App.Major & "." & App.Minor & "." & App.Revision |
203 | - Versao_Geo = "07.04.04" | |
203 | + Versao_Geo = "07.05.00" | |
204 | 204 | glo.diretorioGeoSan = App.path 'salva globalmente o caminho onde encontra-se o GeoSan.exe |
205 | 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 | 206 | connn = "" | ... | ... |