Browse Source

mxg:修改跟据信息点查询接口

mengxiangge 6 năm trước cách đây
mục cha
commit
641674186e

+ 28 - 2
MBI/SAGA.MBI/App.xaml.cs

@@ -5,7 +5,10 @@
  * ==============================================================================*/
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
 using System.Linq;
+using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
@@ -24,13 +27,36 @@ namespace SAGA.MBI
     class App
     {
         [STAThread]
-        static void Main()
+        static void Main(string[] args)
         {
-
+#if DEBUG
             WinLogin win = new WinLogin();
             Application myAp = new Application();
             myAp.ShutdownMode = ShutdownMode.OnExplicitShutdown;
             myAp.Run(win);
+#else
+//有参数时直接启动
+            if (args != null && args.Length > 0)
+            {
+                WinLogin win = new WinLogin();
+                Application myAp = new Application();
+                myAp.ShutdownMode = ShutdownMode.OnExplicitShutdown;
+                myAp.Run(win);
+            }
+            else
+            {
+                //无参数可看做双击启动,启动前检测版本
+                string fullPath = Path.Combine(Directory.GetCurrentDirectory(), "Update.exe");
+                Process process = new Process();
+                process.StartInfo.FileName = fullPath;
+                process.StartInfo.Arguments = Assembly.GetExecutingAssembly().Location;
+                process.StartInfo.UseShellExecute = false;
+                process.StartInfo.RedirectStandardOutput = true;
+                process.StartInfo.CreateNoWindow = true;
+                process.Start();
+            }
+#endif
+
         }
     }
 }

+ 2 - 2
MBI/SAGA.MBI/Properties/AssemblyInfo.cs

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
 //通过使用 "*",如下所示:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.0.1")]
+[assembly: AssemblyFileVersion("1.0.0.1")]

+ 2 - 2
MBI/SAGA.MBI/RequestData/CommonRequest.cs

@@ -56,7 +56,7 @@ namespace SAGA.MBI.RequestData
         /// 缺点是:首次查询速度慢,大概6000ms,更新信息点值后,再次查询也相当于首次查询,大概6000ms
         /// </summary>
         /// <returns></returns>
-        public static string QueryObjectByInfos(string floorId, JObject infoJObject, string[] type = null)
+        public static string QueryObjectByInfos2(string floorId, JObject infoJObject, string[] type = null)
         {
             string url = MBIConst.DataPlatformLocalHost + $"data-platform-3/fast/object/in_query?secret={MBIControl.ProjectCur.Password}&projectId={MBIControl.ProjectCur.Id}";
 
@@ -97,7 +97,7 @@ namespace SAGA.MBI.RequestData
         /// 优点缺点:稳定,每次查询都是2000ms;
         /// </summary>
         /// <returns></returns>
-        public static string QueryObjectByInfos2(string floorId, JObject infosJObject, string[] type = null)
+        public static string QueryObjectByInfos(string floorId, JObject infosJObject, string[] type = null)
         {
             if (infosJObject.Count == 0) return "";
             string url = MBIConst.DataPlatformLocalHost + $"data-platform-3/object/query_by_info?secret={MBIControl.ProjectCur.Password}&projectId={MBIControl.ProjectCur.Id}";

+ 0 - 1
MBI/SAGA.MBI/SAGA.MBI.csproj

@@ -1012,7 +1012,6 @@
   <ItemGroup>
     <None Include="app.config" />
     <None Include="packages.config" />
-    <None Include="SAGA.MBI_TemporaryKey.pfx" />
     <None Include="WinView\Space\README.md" />
   </ItemGroup>
   <ItemGroup>

+ 2 - 2
MBI/SAGA.MBI/ToolsData/ModeCheck/EquipReferSystemCheck.cs

@@ -138,11 +138,11 @@ namespace SAGA.MBI.ToolsData.ModeCheck
                     var type = fi.Document.GetElement(elementId);
                     if (!referSystems.Contains(type.Name))
                     {
-                        unpassList.Add(mepSystem.Name);
+                        unpassList.Add(type.Name);
                     }
                     else
                     {
-                        passList.Add(mepSystem.Name);
+                        passList.Add(type.Name);
                     }
                 }
                 catch (Exception e)