Kaynağa Gözat

feat(电磁检测): 工频电场磁场检测结果中线高为空时默认为1.5

Co-authored-by: Cursor <cursoragent@cursor.com>
何文松 2 hafta önce
ebeveyn
işleme
3e01997cc1

+ 4 - 0
pdf_converter_v2/parser/electromagnetic_parser.py

@@ -430,6 +430,10 @@ def parse_electromagnetic_detection_record(markdown_content: str) -> Electromagn
                 if monitor_at_idx >= 0 and monitor_at_idx < len(row):
                     em.monitorAt = row[monitor_at_idx].strip()
                 
+                # 工频电场磁场检测结果中线高为空时默认为 1.5
+                if not em.height or not em.height.strip():
+                    em.height = "1.5"
+                
                 # 数据列从时间列之后开始,如果时间列未找到,从高度列之后开始
                 # 如果高度列也未找到,从地址列之后开始,如果地址列也未找到,从第4列开始
                 if monitor_at_idx >= 0: