|
|
@ -14,7 +14,8 @@ module Imports |
|
|
|
private |
|
|
|
private |
|
|
|
|
|
|
|
|
|
|
|
def update_major_repairs(xml_doc) |
|
|
|
def update_major_repairs(xml_doc) |
|
|
|
record = log(xml_doc) |
|
|
|
old_id = field_value(xml_doc, "meta", "document-id") |
|
|
|
|
|
|
|
record = CaseLog.find_by(old_id:) |
|
|
|
|
|
|
|
|
|
|
|
if record.present? |
|
|
|
if record.present? |
|
|
|
previous_status = field_value(xml_doc, "meta", "status") |
|
|
|
previous_status = field_value(xml_doc, "meta", "status") |
|
|
@ -36,7 +37,8 @@ module Imports |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def update_tenant_code(xml_doc) |
|
|
|
def update_tenant_code(xml_doc) |
|
|
|
record = log(xml_doc) |
|
|
|
old_id = field_value(xml_doc, "meta", "document-id") |
|
|
|
|
|
|
|
record = CaseLog.find_by(old_id:) |
|
|
|
|
|
|
|
|
|
|
|
if record.present? |
|
|
|
if record.present? |
|
|
|
tenant_code = string_or_nil(xml_doc, "_2bTenCode") |
|
|
|
tenant_code = string_or_nil(xml_doc, "_2bTenCode") |
|
|
@ -50,11 +52,6 @@ module Imports |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def log(xml_doc) |
|
|
|
|
|
|
|
old_id = field_value(xml_doc, "meta", "document-id") |
|
|
|
|
|
|
|
CaseLog.find_by(old_id:) |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def compose_date(xml_doc, day_str, month_str, year_str) |
|
|
|
def compose_date(xml_doc, day_str, month_str, year_str) |
|
|
|
day = Integer(field_value(xml_doc, "xmlns", day_str), exception: false) |
|
|
|
day = Integer(field_value(xml_doc, "xmlns", day_str), exception: false) |
|
|
|
month = Integer(field_value(xml_doc, "xmlns", month_str), exception: false) |
|
|
|
month = Integer(field_value(xml_doc, "xmlns", month_str), exception: false) |
|
|
|