-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2913 from prefeiturasp/release/9.4.0
Release/9.4.0
- Loading branch information
Showing
40 changed files
with
2,178 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = "9.3.2" | ||
__version__ = "9.4.0" | ||
|
||
__version_info__ = tuple( | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from django.db.models import Count | ||
from sme_ptrf_apps.core.models import ProcessoAssociacao # Ajuste 'seu_app' para o nome real do seu app | ||
|
||
|
||
def verificar_numeros_processo_duplicados(): | ||
# Agrega os números de processo, contando quantas vezes cada um aparece | ||
duplicados = ProcessoAssociacao.objects.values('numero_processo')\ | ||
.annotate(num_count=Count('numero_processo'))\ | ||
.filter(num_count__gt=1) | ||
|
||
total_duplicados = 0 | ||
|
||
if duplicados: | ||
print("Encontrados números de processo duplicados:") | ||
for item in duplicados: | ||
print(f"Numero de Processo: {item['numero_processo']}, Contagem: {item['num_count']}") | ||
total_duplicados += item['num_count'] - 1 # Contando apenas as entradas extras como duplicadas | ||
|
||
# Listando as instâncias específicas que têm números duplicados | ||
processos = ProcessoAssociacao.objects.filter(numero_processo=item['numero_processo']) | ||
for processo in processos: | ||
print(f" - ID: {processo.id}, Ano: {processo.ano}, UE: {processo.associacao.unidade.codigo_eol}-{processo.associacao.unidade.nome}") | ||
else: | ||
print("Não foram encontrados números de processo duplicados.") | ||
|
||
print(f"Total de casos de duplicidade: {total_duplicados}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
sme_ptrf_apps/sme/migrations/0005_alter_parametrossme_valida_unidades_login.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 4.2.11 on 2024-04-22 07:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("sme", "0004_remove_parametrossme_tipos_unidade_adm_da_sme"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="parametrossme", | ||
name="valida_unidades_login", | ||
field=models.BooleanField( | ||
default=False, | ||
help_text="Remove definitivamente os acessos indevidos.", | ||
verbose_name="Valida unidades ao logar", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.