mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-08 11:17:29 +00:00
finsihed lighting
This commit is contained in:
parent
677ba42f2c
commit
48eb492bdf
2 changed files with 14 additions and 4 deletions
|
|
@ -2,7 +2,8 @@ from etl.pdfReader.reportType import ReportType
|
|||
from transform.types import (
|
||||
CompanyInfo, SurverySummaryInfo, AssessorInfo,
|
||||
PropertyDescription, PropertyDetail, Dimension,
|
||||
Walls, Roofs, Floors, Door, VentilationAndCooling
|
||||
Walls, Roofs, Floors, Door, VentilationAndCooling,
|
||||
Lighting
|
||||
)
|
||||
from datetime import datetime
|
||||
|
||||
|
|
@ -212,6 +213,8 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
# Section 12
|
||||
ventilationAndCooling = self.get_ventilation_and_cooling()
|
||||
|
||||
lighting = self.get_lighting()
|
||||
|
||||
self.property_description = PropertyDescription(
|
||||
built_form = get_value("Built Form"),
|
||||
detachment_or_position = get_value("Detachment/Position"),
|
||||
|
|
@ -257,6 +260,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
conservatory=conservatory,
|
||||
door=door,
|
||||
ventilationAndCooling=ventilationAndCooling,
|
||||
lighting=lighting,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -609,7 +613,7 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
space_cooling_system_present=True if dict_.get("space_cooling_system_present").upper() == "YES" else False
|
||||
)
|
||||
|
||||
def get_section_13(self):
|
||||
def get_lighting(self):
|
||||
data = self.raw_data[self.raw_data.index('13.0 Lighting'): self.raw_data.index('14.0 Main Heating1')]
|
||||
avoid = [
|
||||
"13.0 Lighting",
|
||||
|
|
@ -619,7 +623,12 @@ class QuidosSiteNotesExtractor(SiteNotesExtractor):
|
|||
"Total number of light fittings",
|
||||
"Total number of L.E.L. fittings",
|
||||
]
|
||||
self.two_columns_processor(data, sub_titles, avoid = avoid, section=13)
|
||||
dict_ = self.two_columns_processor(data, sub_titles, avoid = avoid)
|
||||
print(dict_)
|
||||
return Lighting(
|
||||
total_no_of_light_fittings=int(dict_["total_number_of_light_fittings"]),
|
||||
total_no_of_lel_fittings=int(dict_["total_number_of_l.e.l._fittings"]),
|
||||
)
|
||||
|
||||
def get_section_14(self):
|
||||
data = self.raw_data[self.raw_data.index('14.0 Main Heating1'): self.raw_data.index('14.1 Main Heating2')]
|
||||
|
|
|
|||
|
|
@ -138,4 +138,5 @@ class PropertyDescription(BaseModel):
|
|||
ex4_property: Optional[PropertyDetail] = None
|
||||
conservatory: bool
|
||||
door: Optional[Door]
|
||||
ventilationAndCooling: Optional[VentilationAndCooling]
|
||||
ventilationAndCooling: Optional[VentilationAndCooling]
|
||||
lighting: Optional[Lighting]
|
||||
Loading…
Add table
Reference in a new issue