Przeglądaj źródła

xls:修改数据过滤信息

xulisong 6 lat temu
rodzic
commit
eb370021e9

+ 5 - 3
MBI/CEFSharpWPF/ModifyResponseFilter.cs

@@ -28,7 +28,7 @@ namespace CEFSharpWPF
         {
 
         }
-        private int bufferLength = 2048*10;
+        private int bufferLength = 2048*50;
         private BinaryReader r;      
         public FilterStatus Filter(Stream dataIn, out long dataInRead, Stream dataOut, out long dataOutWritten)
         {
@@ -62,8 +62,10 @@ namespace CEFSharpWPF
 
 
                 int size = 0;
-                byte[] buffer = new byte[bufferLength];
-                size = r.Read(buffer, 0, bufferLength);
+                //dataOut.SetLength(bufferLength);
+                var useLength = dataOut.Length;
+                byte[] buffer = new byte[useLength];
+                size = r.Read(buffer, 0, (int)useLength);
                 dataOut.Write(buffer, 0, size);
 
                 dataOutWritten = size;

+ 1 - 1
MBI/SAGA.GplotDrawData/View/WinMachineRoom.xaml

@@ -29,7 +29,7 @@
                 </Style>
             </TreeView.ItemContainerStyle>
             <TreeView.ItemTemplate>
-                <HierarchicalDataTemplate ItemsSource="{Binding Path=Children}">
+                <HierarchicalDataTemplate ItemsSource="{Binding Path=Childrens}">
                     <TextBlock Name="Block" Text="{Binding EName}"></TextBlock>
 
                     <HierarchicalDataTemplate.Triggers>

+ 10 - 2
MBI/SAGA.GplotDrawData/View/WinMachineRoom.xaml.cs

@@ -63,9 +63,17 @@ namespace SAGA.GplotDrawData.View
             {
                 foreach (var drawRecord in drawData)
                 {
-                    var recordNode= new DataNode(drawRecord.RelationName);
+                    if (drawRecord.DrawIems.IsEmpty)
+                        continue;
+                    var relationNode = treeDataSource.FirstOrDefault(d => d.EName == drawRecord.RelationName);
+                    if (relationNode == null)
+                    {
+                        relationNode= new DataNode(drawRecord.RelationName);
+                        treeDataSource.Add(relationNode);
+                    }
+                    var recordNode= new DataNode(drawRecord.FloorName);
                     recordNode.SetData(drawRecord);
-                    treeDataSource.Add(recordNode);
+                    relationNode.Childrens.Add(recordNode);
                 }
             }
            this.TreeRootNode.ItemsSource = treeDataSource;

+ 1 - 1
MBI/SAGA.GplotRelationComputerManage/RevitSystemParse/Handler/SystemParseSetting.cs

@@ -147,7 +147,7 @@ namespace SAGA.GplotRelationComputerManage
                 }
                 if (SystemCalcUtil.IsStartValve(owner))
                 {
-                    result = Regex.IsMatch(connector.Description, AppSetting.EndFlag);// connector.Description != GplotOptions.ValveConnectorDescription;
+                    result = Regex.IsMatch(connector.Description, AppSetting.SourceFlag);// connector.Description != GplotOptions.ValveConnectorDescription;
                     break;
                 } 
                 #endregion

+ 9 - 1
MBI/SAGA.GplotRelationComputerManage/SystemRelation/Data/SystemDrawItems.cs

@@ -25,6 +25,14 @@ namespace SAGA.GplotRelationComputerManage
         /// <summary>
         /// 关联点集合
         /// </summary>
-        public List<SystemPointItem> Points { get; set; }   
+        public List<SystemPointItem> Points { get; set; }
+
+        /// <summary>
+        /// 判断数据是否为空
+        /// </summary>
+        public bool IsEmpty
+        {
+            get { return (Curves == null || !Curves.Any()) && (Points == null || Points.Any()); }
+        }
     }
 }

+ 5 - 0
MBI/SAGA.GplotRelationComputerManage/SystemRelation/FloorSystemItem.cs

@@ -236,6 +236,10 @@ namespace SAGA.GplotRelationComputerManage
 
                 var tempIds = SystemParseManager.BuildSystemNode(startNode.Instance, useDomain,
                     (m => !startNode.Flag.Equals(m.GetSystemTypeName())));
+                if (tempIds.Any(d => d == 534844|| d == 534845))
+                {
+
+                }
                 startNode.Instance.PipeSystemTypeName = startNode.Flag;
                 BuildElementNodeData(context, startNode.Instance);
                 useIds.AddRange(tempIds);
@@ -555,6 +559,7 @@ namespace SAGA.GplotRelationComputerManage
             var drawData = SystemParseManager.CreateRoomDrawing(doc);
             MachineRoomDrawRecord record = new MachineRoomDrawRecord();
             record.RelationName = relationSetting.RelationItem.Name;
+            record.FloorName = MBIInfoUtil.GetFloorNameByLevel(UseLevel.Name);
             record.DrawIems = drawData;
             context[relationType].MachineRoomDrawRecords.Add(record);
             #endregion

+ 5 - 0
MBI/SAGA.GplotRelationComputerManage/SystemRelation/ServerData/MachineRoomDrawRecord.cs

@@ -23,6 +23,10 @@ namespace SAGA.GplotRelationComputerManage
             DrawIems = new SystemDrawItems();
         }
         /// <summary>
+        /// 楼层名称
+        /// </summary>
+        public string FloorName { get; set; }
+        /// <summary>
         /// 关系名称
         /// </summary>
         public string RelationName { get; set; }
@@ -30,5 +34,6 @@ namespace SAGA.GplotRelationComputerManage
         /// 绘图数据
         /// </summary>
         public SystemDrawItems DrawIems { get; set; }
+      
     }
 }

+ 4 - 4
MBI/SAGA.GplotRelationComputerManage/SystemRelation/SystemComputerHandler.cs

@@ -31,10 +31,10 @@ namespace SAGA.GplotRelationComputerManage
             {
                 if (File.Exists(fileInfo))
                 {
-                    //if (testFiles.All(f=>!fileInfo.Contains(f)))
-                    //{
-                    //    continue;
-                    //}
+                    if (testFiles.All(f => !fileInfo.Contains(f)))
+                    {
+                        continue;
+                    }
                     FloorSystemItem floorItems = context.FloorItems.GetItem(fileInfo);
                     floorItems.Parse(context);
                     floorItems.Document.CloseDocSimple();

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

@@ -164,7 +164,10 @@
   </PropertyGroup>
   <PropertyGroup />
   <PropertyGroup>
-    <SignManifests>true</SignManifests>
+    <SignManifests>false</SignManifests>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>false</SignAssembly>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Aliyun.OSS">