|
|
|
@ -1371,6 +1371,19 @@ def _missing_endpoint_label(sample, side):
|
|
|
|
return label
|
|
|
|
return label
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _missing_endpoint_side_summary(sample):
|
|
|
|
|
|
|
|
missing_sides = []
|
|
|
|
|
|
|
|
if sample.get("start_found") is False:
|
|
|
|
|
|
|
|
missing_sides.append("起点")
|
|
|
|
|
|
|
|
if sample.get("end_found") is False:
|
|
|
|
|
|
|
|
missing_sides.append("终点")
|
|
|
|
|
|
|
|
if not missing_sides:
|
|
|
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
if len(missing_sides) == 2:
|
|
|
|
|
|
|
|
return "(缺失:两端)"
|
|
|
|
|
|
|
|
return "(缺失:{0})".format(missing_sides[0])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def format_eplan_connection_route_report(report):
|
|
|
|
def format_eplan_connection_route_report(report):
|
|
|
|
message = "批量生成布线连接完成:routed={0}, collision_warnings={1}, missing_terminals={2}".format(
|
|
|
|
message = "批量生成布线连接完成:routed={0}, collision_warnings={1}, missing_terminals={2}".format(
|
|
|
|
report.get("routed", 0),
|
|
|
|
report.get("routed", 0),
|
|
|
|
@ -1457,9 +1470,10 @@ def format_eplan_connection_route_report(report):
|
|
|
|
message += " 请先从 QET 重新导入/更新工程端子,使端子 UUID 不再是 local:...。"
|
|
|
|
message += " 请先从 QET 重新导入/更新工程端子,使端子 UUID 不再是 local:...。"
|
|
|
|
sample = (report.get("missing_endpoint_samples") or [None])[0]
|
|
|
|
sample = (report.get("missing_endpoint_samples") or [None])[0]
|
|
|
|
if sample:
|
|
|
|
if sample:
|
|
|
|
message += "\n缺失示例:{0} -> {1}".format(
|
|
|
|
message += "\n缺失示例:{0} -> {1}{2}".format(
|
|
|
|
_missing_endpoint_label(sample, "start"),
|
|
|
|
_missing_endpoint_label(sample, "start"),
|
|
|
|
_missing_endpoint_label(sample, "end"),
|
|
|
|
_missing_endpoint_label(sample, "end"),
|
|
|
|
|
|
|
|
_missing_endpoint_side_summary(sample),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
return message
|
|
|
|
return message
|
|
|
|
|
|
|
|
|
|
|
|
|