From c8ebeb55f88e35dc543a178334b9dddb713d63f0 Mon Sep 17 00:00:00 2001 From: lihanbo Date: Mon, 24 Mar 2025 10:10:35 +0800 Subject: [PATCH] =?UTF-8?q?105040=20=E7=94=B5=E6=9C=BA=E5=9E=8B=E5=8F=B7?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=97=B6=EF=BC=8C=E4=B8=8D=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=97=A7=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Utils/LectotypeManager.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Sinvo.EplanHpD.Plugin.WPFUI/Utils/LectotypeManager.cs b/Sinvo.EplanHpD.Plugin.WPFUI/Utils/LectotypeManager.cs index a9cee06..80b2e12 100644 --- a/Sinvo.EplanHpD.Plugin.WPFUI/Utils/LectotypeManager.cs +++ b/Sinvo.EplanHpD.Plugin.WPFUI/Utils/LectotypeManager.cs @@ -39,9 +39,16 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils var data = service.GetMotorLectotypeData(motor.GetUniqueFlag()); if (data != null) { - viewModel = data; - // 更新电机ID数据,每次导入后可能会刷新这个ID,所以从抓取的数据中更新 - viewModel.Motor.OccPartId = motor.OccPartId; + if(motor.MotorModelStr == data.Motor.MotorModelStr) + { + viewModel = data; + // 更新电机ID数据,每次导入后可能会刷新这个ID,所以从抓取的数据中更新 + viewModel.Motor.OccPartId = motor.OccPartId; + } + else + { + viewModel = null; + } } }).Wait();