Fix for admissibility date on some procedures
This commit is contained in:
parent
08521b77fc
commit
ca8aa167ce
|
@ -291,8 +291,6 @@
|
||||||
.formdef-suivi-dossier-pa ul#evolutions div.NAS {
|
.formdef-suivi-dossier-pa ul#evolutions div.NAS {
|
||||||
height: 15px;
|
height: 15px;
|
||||||
}
|
}
|
||||||
.formdef-suivi-dossier-ph ul#evolutions div.Accord:before,
|
|
||||||
.formdef-suivi-dossier-pa ul#evolutions div.Accord:before,
|
|
||||||
.formdef-suivi-dossier-ph ul#evolutions div.Attribution:before,
|
.formdef-suivi-dossier-ph ul#evolutions div.Attribution:before,
|
||||||
.formdef-suivi-dossier-pa ul#evolutions div.Attribution:before {
|
.formdef-suivi-dossier-pa ul#evolutions div.Attribution:before {
|
||||||
content: "✔";
|
content: "✔";
|
||||||
|
@ -347,6 +345,14 @@
|
||||||
height: 10px;
|
height: 10px;
|
||||||
color:#ff782a;
|
color:#ff782a;
|
||||||
}
|
}
|
||||||
|
.formdef-suivi-dossier-ph ul#evolutions div.Accord:before,
|
||||||
|
.formdef-suivi-dossier-pa ul#evolutions div.Accord:before {
|
||||||
|
content: "✔";
|
||||||
|
border: solid 1px #48b24e;
|
||||||
|
width: 11px;
|
||||||
|
height: 8px;
|
||||||
|
color: #48b24e;
|
||||||
|
}
|
||||||
.formdef-suivi-dossier-ph ul#evolutions span.noOpinion,
|
.formdef-suivi-dossier-ph ul#evolutions span.noOpinion,
|
||||||
.formdef-suivi-dossier-pa ul#evolutions span.noOpinion {
|
.formdef-suivi-dossier-pa ul#evolutions span.noOpinion {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
|
|
@ -107,46 +107,7 @@ class grandlyonIodas(BaseResource):
|
||||||
'libl': data['procedures']['procedures']['procedure'][nbProc]['libl'] if 'procedures' in data else '',
|
'libl': data['procedures']['procedures']['procedure'][nbProc]['libl'] if 'procedures' in data else '',
|
||||||
'etapes': sorted(data['procedures']['procedures']['procedure'][nbProc]['etapes']['etape'], key=lambda x: x['id'], reverse=True) if 'procedures' in data else '',
|
'etapes': sorted(data['procedures']['procedures']['procedure'][nbProc]['etapes']['etape'], key=lambda x: x['id'], reverse=True) if 'procedures' in data else '',
|
||||||
'droits': droits,
|
'droits': droits,
|
||||||
'recevabilite': data['procedures']['procedures']['procedure'][nbProc]['recevabilite'] if 'recevabilite' in data['procedures']['procedures']['procedure'][nbProc] else '',
|
'recevabilite': data['procedures']['procedures']['procedure'][nbProc]['recevabilite'] if 'procedures' in data and 'recevabilite' in data['procedures']['procedures']['procedure'][nbProc] else '',
|
||||||
'found': 1 if 'procedures' in data else 0}
|
|
||||||
|
|
||||||
@endpoint(perm='can_access')
|
|
||||||
def getProceduresInt(self, request, nom, pren, datenais, dpap, typepro):
|
|
||||||
|
|
||||||
# Tests
|
|
||||||
#print >> open('/home/grandlyon/marln/debug.test', 'a+'), " * * * * * "
|
|
||||||
#resp1 = self.get_client().service.ODA_getProcedures(dpap, typepro, datenais, nom, pren)
|
|
||||||
#resp2 = self.get_client().service.ODA_getProceduresInt(dpap, typepro, datenais, nom, pren)
|
|
||||||
#if resp1 :
|
|
||||||
#print >> open('/home/grandlyon/marln/debug.test', 'a+'), "resp1"
|
|
||||||
#if resp2 :
|
|
||||||
#print >> open('/home/grandlyon/marln/debug.test', 'a+'), "resp2"
|
|
||||||
#data1 = sudsobject_to_dict(resp1)
|
|
||||||
#data2 = sudsobject_to_dict(resp2)
|
|
||||||
|
|
||||||
|
|
||||||
# Params in the order required by the WSDL from stambia
|
|
||||||
resp = self.get_client().service.ODA_getProceduresInt(dpap, typepro, datenais, nom, pren)
|
|
||||||
data = sudsobject_to_dict(resp)
|
|
||||||
# Counts procedures to get the last procedure
|
|
||||||
nbProc = (len(data['procedures']['procedures']['procedure']) - 1) if 'procedures' in data else ''
|
|
||||||
# recupere la liste des droits en cours de toutes les procedures d'un individu
|
|
||||||
droits = []
|
|
||||||
if 'procedures' in data :
|
|
||||||
for procedure in data['procedures']['procedures']['procedure'] :
|
|
||||||
for etape in procedure['etapes']['etape'] :
|
|
||||||
if 'taches' in etape :
|
|
||||||
for tache in etape['taches']['tache'] :
|
|
||||||
if tache['idtypetache'] == 2 and datetime.strptime(tache['datearret'], "%d/%m/%Y") > datetime.now():
|
|
||||||
for nb in [3,6] :
|
|
||||||
deltafindroit = nb if (datetime.strptime(tache['datearret'], "%d/%m/%Y") - dateutil.relativedelta.relativedelta(months=nb)) == datetime.now().replace(hour=0, minute=0, second=0, microsecond=0) else 0
|
|
||||||
droits.append({"libl":tache['produit']['libl'], "dateproposition":tache['dateproposition'], "datearret":tache['datearret'], "dateeffet":tache['dateeffet'], "deltafindroit":deltafindroit})
|
|
||||||
return {'hash': hashlib.sha224(json.dumps(data)).hexdigest(),
|
|
||||||
#'libl': data['procedures']['procedures']['procedure'][nbProc]['libl'] if 'procedures' in data else '',
|
|
||||||
'libl': data['procedures']['procedures']['procedure'][nbProc]['libl'] if 'procedures' in data else '',
|
|
||||||
'etapes': sorted(data['procedures']['procedures']['procedure'][nbProc]['etapes']['etape'], key=lambda x: x['id'], reverse=True) if 'procedures' in data else '',
|
|
||||||
'droits': droits,
|
|
||||||
#'test': data['procedures']['procedures']['procedure'][0],
|
|
||||||
'found': 1 if 'procedures' in data else 0}
|
'found': 1 if 'procedures' in data else 0}
|
||||||
|
|
||||||
@endpoint(perm='can_access')
|
@endpoint(perm='can_access')
|
||||||
|
|
Loading…
Reference in New Issue