|
|
|
@ -1,9 +1,7 @@
|
|
|
|
|
import time
|
|
|
|
|
from os.path import exists
|
|
|
|
|
|
|
|
|
|
from ipe_fetcher.model import AreaCoordinates, Building, FAIEligibilityStatus
|
|
|
|
|
from ipe_fetcher.sqlite_connector.cursor import getCursorWithSpatialite, getBasicCursor
|
|
|
|
|
from os.path import exists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AXIONE_ETAT_DEPLOYE = "DEPLOYE"
|
|
|
|
|
AXIONE_ETAT_DEPLOIEMENT = "EN COURS DE DEPLOIEMENT"
|
|
|
|
@ -33,6 +31,19 @@ class Axione:
|
|
|
|
|
if cur.fetchone()[0] == 1:
|
|
|
|
|
self.db_name_refimm = AXIONE_REFIMM_TABLE_NAME
|
|
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
def _get_etat_priority(etat_imm):
|
|
|
|
|
if etat_imm == AXIONE_ETAT_DEPLOYE:
|
|
|
|
|
return 0
|
|
|
|
|
elif etat_imm == AXIONE_ETAT_DEPLOIEMENT:
|
|
|
|
|
return 1
|
|
|
|
|
elif etat_imm == AXIONE_ETAT_RAD_DEPLOIEMENT:
|
|
|
|
|
return 2
|
|
|
|
|
elif etat_imm != AXIONE_ETAT_ABANDONNE:
|
|
|
|
|
return 3
|
|
|
|
|
else:
|
|
|
|
|
return 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getAreaBuildings(
|
|
|
|
|
self, areaCoordinates: AreaCoordinates, existing_buildings: dict
|
|
|
|
@ -89,8 +100,10 @@ class Axione:
|
|
|
|
|
ftthStatus=etatImm,
|
|
|
|
|
reasonNotEligible="" if isEligible else "Pas encore deploye",
|
|
|
|
|
)
|
|
|
|
|
etat_priority = self._get_etat_priority(etatImm)
|
|
|
|
|
if buildings.get(idImm):
|
|
|
|
|
buildings[idImm]["aquilenetEligStatus"] = aquilenetEligStatus
|
|
|
|
|
buildings[idImm]['etat_imm_priority'] = etat_priority
|
|
|
|
|
if buildings[idImm].get('found_in'):
|
|
|
|
|
buildings[idImm]['found_in'].append("axione")
|
|
|
|
|
else:
|
|
|
|
@ -108,6 +121,7 @@ class Axione:
|
|
|
|
|
commune=b[8],
|
|
|
|
|
bat_info="",
|
|
|
|
|
found_in = ["axione"],
|
|
|
|
|
etat_imm_priority=etat_priority,
|
|
|
|
|
aquilenetEligStatus=aquilenetEligStatus,
|
|
|
|
|
fdnEligStatus=FAIEligibilityStatus(isEligible=False, reasonNotEligible="", ftthStatus=""),
|
|
|
|
|
othersEligStatus=FAIEligibilityStatus(isEligible=False, reasonNotEligible="", ftthStatus=""),
|
|
|
|
|