xulisong преди 6 години
родител
ревизия
287be2da70
променени са 40 файла, в които са добавени 256 реда и са изтрити 809 реда
  1. BIN
      MBI/Dlls/FirmLibDll/FWindSoft.Wpf.dll
  2. BIN
      MBI/Dlls/FirmLibDll/FWindSoft.dll
  3. 3 2
      MBI/FirmLib/Com.FirmLib.UI/BllCommon/AssetManager.cs
  4. 16 4
      MBI/FirmLib/Com.FirmLib.UI/Common/Model/VenderItem.cs
  5. 9 2
      MBI/FirmLib/Com.FirmLib.UI/Insuer/VmInsuerAssetSelector.cs
  6. 4 4
      MBI/FirmLib/Com.FirmLib.UI/Insuer/WinInsuerAssetSelector.xaml
  7. 3 2
      MBI/FirmLib/Com.FirmLib.UI/Insuer/WinInsuerProjectInfo.xaml
  8. 14 0
      MBI/FirmLib/Com.FirmLib.UI/Insuer/WinInsuerProjectInfo.xaml.cs
  9. 9 2
      MBI/FirmLib/Com.FirmLib.UI/Maintainer/VmMaintainerAssetSelector.cs
  10. 3 2
      MBI/FirmLib/Com.FirmLib.UI/Maintainer/VmMaintainerBaseInfo.cs
  11. 4 4
      MBI/FirmLib/Com.FirmLib.UI/Maintainer/WinMaintainerAssetSelector.xaml
  12. 1 1
      MBI/FirmLib/Com.FirmLib.UI/Maintainer/WinMaintainerProjectAsset.xaml
  13. 3 3
      MBI/FirmLib/Com.FirmLib.UI/Maintainer/WinManitainerProjectInfo.xaml
  14. 3 2
      MBI/FirmLib/Com.FirmLib.UI/Seller/VmSellerBaseInfo.cs
  15. 4 2
      MBI/FirmLib/Com.FirmLib.UI/Seller/VmSupplyAssetSelector.cs
  16. 3 3
      MBI/FirmLib/Com.FirmLib.UI/Seller/WinSellerProjectContract.xaml
  17. 4 4
      MBI/FirmLib/Com.FirmLib.UI/Seller/WinSellerProjectInfo.xaml
  18. 3 3
      MBI/FirmLib/Com.FirmLib.UI/Seller/WinSupplyAssetSelector.xaml
  19. 0 1
      MBI/FirmLib/Com.FirmLib.UI/Seller/WinSupplyAssetSelector.xaml.cs
  20. 4 3
      MBI/FirmLib/Com.FirmLib/Bll/PlatformBll/PlatformBll.cs
  21. 10 0
      MBI/FirmLib/Com.FirmLib/Entity/MaintainerItem.cs
  22. 9 1
      MBI/FirmLib/Com.FirmLib/Entity/SellerItem.cs
  23. 0 462
      MBI/SAGA.GplotManage/ClassDiagram1.cd
  24. 0 72
      MBI/SAGA.GplotManage/GplotCommand.cs
  25. 0 11
      MBI/SAGA.GplotManage/SAGA.GplotManage.csproj
  26. 1 1
      MBI/SAGA.GplotManage/SAGA.GplotManage.csproj.user
  27. 0 3
      MBI/SAGA.GplotManage/UploadRelated/ElementSpNeighborhood.cs
  28. 4 13
      MBI/SAGA.GplotRelationComputerManage/Command.cs
  29. 14 195
      MBI/SAGA.GplotRelationComputerManage/ReadSpaceCommand.cs
  30. 3 1
      MBI/SAGA.GplotRelationComputerManage/SAGA.GplotRelationComputerManage.csproj
  31. 51 0
      MBI/SAGA.GplotRelationComputerManage/SpaceRelation/SpaceComputerContext.cs
  32. 28 0
      MBI/SAGA.GplotRelationComputerManage/SpaceRelation/SpaceComputerHandler.cs
  33. 30 0
      MBI/SAGA.GplotRelationComputerManage/SpaceRelation/SpaceComputerManager.cs
  34. 1 1
      MBI/SAGA.MBI/WinView/Space/WinConfirm.xaml
  35. 2 1
      MBI/SAGA.MBI/WinView/Space/WinCreateSpace.xaml.cs
  36. 1 1
      MBI/SAGA.MBI/WinView/Upload/VMUploadModeManage.cs
  37. 1 0
      MBI/SAGA.Models/MBIItem/Builder/RoomItemBuilder.cs
  38. 4 1
      MBI/SAGA.Models/MBIItem/Entity/RoomItem.cs
  39. 5 0
      MBI/SAGA.Models/MBIItem/MBIBuiltInParameter.cs
  40. 2 2
      MBI/SAGA.RevitUtils/Log/DocumentLogManager.cs

BIN
MBI/Dlls/FirmLibDll/FWindSoft.Wpf.dll


BIN
MBI/Dlls/FirmLibDll/FWindSoft.dll


+ 3 - 2
MBI/FirmLib/Com.FirmLib.UI/BllCommon/AssetManager.cs

@@ -249,7 +249,8 @@ namespace Com.FirmLib.UI.BllCommon
         {
             SearchResultList<AssetShowItem> items = new SearchResultList<AssetShowItem>();
             ProjectSetting ps = new ProjectSetting(projectId);
-            SearchLimit limit = new SearchLimit() { SkipCount = startIndex, GetCount = PerPageCount+1 };
+            //SearchLimit limit = new SearchLimit() { SkipCount = startIndex, GetCount = PerPageCount+1 };
+            SearchLimit limit = new SearchLimit() { SkipCount = startIndex, GetCount = PerPageCount };
             SearchFilter filter = new SearchFilter();
             filter.AttachObject = new JObject();
             if (!string.IsNullOrEmpty(localName))
@@ -258,7 +259,7 @@ namespace Com.FirmLib.UI.BllCommon
             }
             SearchCriteria criteria = new SearchCriteria();
             criteria.AttachObject = new JObject();
-            criteria.AttachObject.Add("projectId", projectId);
+            criteria.AttachObject.Add("venderId", item.Id);
             criteria.AttachObject.Add("venderType", item.Type);
             criteria.AttachObject.Add("venderName", item.Name);
             var originItems = BllFactory<PlatformBll>.Instance.GetRecomendAssetItems(ps, limit, filter, criteria);

+ 16 - 4
MBI/FirmLib/Com.FirmLib.UI/Common/Model/VenderItem.cs

@@ -14,17 +14,29 @@ namespace Com.FirmLib.UI
 
         public static VenderItem CreateSupplierItem(string name)
         {
-            return CreateSupplierItem("supplier", name);
+            return CreateItem("supplier", name);
         }
         public static VenderItem CreateInsuerItem(string name)
         {
-            return CreateSupplierItem("insurer", name);
+            return CreateItem("insurer", name);
         }
         public static VenderItem CreateMaintainerItem(string name)
         {
-            return CreateSupplierItem("maintainer", name);
+            return CreateItem("maintainer", name);
         }
-        private static VenderItem CreateSupplierItem(string type,string name)
+        /// <summary>
+        /// 根据id获取厂商信息【内部未实现,接口不友好,暂时不适用】
+        /// </summary>
+        /// <param name="venderId"></param>
+        /// <returns></returns>
+        public static VenderItem CreateItem(string venderId)
+        {
+            var item = new VenderItem();
+            item.Id = venderId;
+            return item;
+        }
+
+        private static VenderItem CreateItem(string type,string name)
         {
             return new VenderItem(){Type=type,Name=name};
         }

+ 9 - 2
MBI/FirmLib/Com.FirmLib.UI/Insuer/VmInsuerAssetSelector.cs

@@ -45,6 +45,7 @@ namespace Com.FirmLib.UI.Insuer
                 return;
             Context = context;
             ProjectId = context.ProjectId;
+            VenderId = context.VenderId;
             VenderName =BllFactory<InsuerBll>.Instance.GetItem(context.VenderId)?.Name??string.Empty;
             ExistAssets = new List<string>(context.ContainIds);
             InitSelector();
@@ -56,6 +57,10 @@ namespace Com.FirmLib.UI.Insuer
         /// </summary>
         private string VenderName { get; set; }
         /// <summary>
+        /// 厂商id
+        /// </summary>
+        public string VenderId { get; set; }
+        /// <summary>
         /// 关联项目信息
         /// </summary>
         private string ProjectId { get; set; }
@@ -238,7 +243,7 @@ namespace Com.FirmLib.UI.Insuer
             AllAssetSelecter = new AssetSelector();
             RecommendAssetSelecter.Refresh = (selector) =>
             {
-                LoadRecommendAssets(selector, ProjectId, VenderName);
+                LoadRecommendAssets(selector, ProjectId, VenderId);
             };
             AllAssetSelecter.Refresh = (selector) =>
             {
@@ -251,7 +256,9 @@ namespace Com.FirmLib.UI.Insuer
         {
             string prefix = selector.FilterControl.FilterSetting["LocalName"].ToString();
             int startIndex = Math.Max((selector.CurrentPageIndex - 1), 0) * AssetManager.PerPageCount;
-            SearchResultList<AssetShowItem> items = AssetManager.GetRecommendShowItems(projectId, prefix, startIndex, VenderItem.CreateInsuerItem(venderId)); ;
+            var venderItem = VenderItem.CreateInsuerItem(VenderName);
+            venderItem.Id = venderId;
+            SearchResultList<AssetShowItem> items = AssetManager.GetRecommendShowItems(projectId, prefix, startIndex, venderItem); ;
             foreach (var item in items)
             {
                 item.IsChecked = ExistInOrigin(item.Id);

+ 4 - 4
MBI/FirmLib/Com.FirmLib.UI/Insuer/WinInsuerAssetSelector.xaml

@@ -78,14 +78,14 @@
 
                             <fw:TDataGridTextColumn Header="型号"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Type}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="供应商名称"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerName}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
 
 
                         </DataGrid.Columns>
                        
                     </DataGrid>
 
-                    <fw:NavigationPager Margin="5"  CurrentPageIndex="{Binding CurrentPageIndex,Mode=TwoWay}" TotalPageCount="{Binding PageCount,Mode=OneWay}" Grid.Row="2" PageIndexChanged="NavigationPager_OnPageIndexChanged" HorizontalAlignment="Right" TotalPageVisible="False">
+                    <fw:NavigationPager Margin="5"  CurrentPageIndex="{Binding CurrentPageIndex,Mode=TwoWay}" TotalPageCount="{Binding PageCount,Mode=OneWay}" Grid.Row="2" PageIndexChanged="NavigationPager_OnPageIndexChanged" HorizontalAlignment="Right">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="PageIndexChanged">
                                 <i:InvokeCommandAction Command="{Binding Commands.PageIndexChangedCommand}" CommandParameter="{Binding Path=CurrentPageIndex}"/>
@@ -149,14 +149,14 @@
                             </DataGridTemplateColumn>
                             <fw:TDataGridTextColumn Header="资产本地名称" Width="120" IsReadOnly="True"  Binding="{Binding Path=LocalName}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="资产本地编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=LocalCode}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="资产编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=LocalCode}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="资产编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=AssetNo}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="品牌"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Brand}"></fw:TDataGridTextColumn>
 
                             <fw:TDataGridTextColumn Header="产品名"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Product}"></fw:TDataGridTextColumn>
 
                             <fw:TDataGridTextColumn Header="型号"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Type}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="供应商名称"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerName}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
 
 
                         </DataGrid.Columns>

+ 3 - 2
MBI/FirmLib/Com.FirmLib.UI/Insuer/WinInsuerProjectInfo.xaml

@@ -15,6 +15,7 @@
                  Width="{Binding Width,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UIElement}}">
     <fw:NChildWindow.Resources>
         <wpf:BindingProxy x:Key="DATA" Data="{Binding}"></wpf:BindingProxy>
+        <insuer:CopyHandle x:Key="CopyHandle" ></insuer:CopyHandle>
         <fw:EmptyDataTemplateSelector  x:Key="Selector">
             <fw:EmptyDataTemplateSelector.Checker>
                 <insuer:DownLoadTemplateChecker></insuer:DownLoadTemplateChecker>
@@ -128,7 +129,7 @@
                                 <DataGridTemplateColumn Header="保险单号" fw:DataGridDragCopyOptions.CanColumnDragCopy="True">
                                     <DataGridTemplateColumn.CellTemplate>
                                         <DataTemplate>
-                                            <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=InsurancePolicyNo,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
+                                            <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=InsurancePolicyNo,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" fw:ElementCopyOptions.CopyHandle="{StaticResource ResourceKey=CopyHandle}">
                                                 <TextBlock Text="{Binding Path=InsurancePolicyNo,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"></TextBlock>
                                             </Border>
 
@@ -136,7 +137,7 @@
                                     </DataGridTemplateColumn.CellTemplate>
                                     <DataGridTemplateColumn.CellEditingTemplate>
                                         <DataTemplate>
-                                            <Border >
+                                            <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=InsurancePolicyNo,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
                                                 <Grid>
                                                     <Grid.ColumnDefinitions>
                                                         <ColumnDefinition></ColumnDefinition>

+ 14 - 0
MBI/FirmLib/Com.FirmLib.UI/Insuer/WinInsuerProjectInfo.xaml.cs

@@ -136,5 +136,19 @@ namespace Com.FirmLib.UI.Insuer
             return true;
         }
     }
+
+    public class CopyHandle : ICopy
+    {
+        public void CopyValue(object baseItem, object targetItem)
+        {
+            var useBase = baseItem as AssetShowItem;
+            var targetBase = targetItem as AssetShowItem;
+            if (useBase == null || targetBase == null)
+                return;
+            targetBase.InsurancePolicyNo=useBase.InsurancePolicyNo;
+            targetBase.PolicyFile=useBase.PolicyFile;
+            targetBase.EndDate=useBase.EndDate;
+        }
+    }
     #endregion
 }

+ 9 - 2
MBI/FirmLib/Com.FirmLib.UI/Maintainer/VmMaintainerAssetSelector.cs

@@ -44,6 +44,7 @@ namespace Com.FirmLib.UI.Maintainer
                 return;
             Context = context;
             ProjectId = context.ProjectId;
+            VenderId = context.VenderId;
             VenderName = BllFactory<MaintainerBll>.Instance.GetItem(context.VenderId)?.Name ?? string.Empty;
             ExistAssets = new List<string>(context.ContainIds);
              InitSelector();
@@ -55,6 +56,10 @@ namespace Com.FirmLib.UI.Maintainer
         /// </summary>
         private string VenderName { get; set; }
         /// <summary>
+        /// 厂商id
+        /// </summary>
+        public string VenderId { get; set; }
+        /// <summary>
         /// 项目id
         /// </summary>
         private string ProjectId { get; set; }
@@ -237,7 +242,7 @@ namespace Com.FirmLib.UI.Maintainer
             AllAssetSelecter = new AssetSelector();
             RecommendAssetSelecter.Refresh = (selector) =>
             {
-                LoadRecommendAssets(selector, ProjectId, VenderName);
+                LoadRecommendAssets(selector, ProjectId, VenderId);
             };
             AllAssetSelecter.Refresh = (selector) =>
             {
@@ -250,7 +255,9 @@ namespace Com.FirmLib.UI.Maintainer
         {
             string prefix = selector.FilterControl.FilterSetting["LocalName"].ToString();
             int startIndex = Math.Max((selector.CurrentPageIndex - 1), 0) * AssetManager.PerPageCount;
-            SearchResultList<AssetShowItem> items = AssetManager.GetRecommendShowItems(projectId, prefix, startIndex, VenderItem.CreateMaintainerItem(venderId)); ;
+            var venderItem = VenderItem.CreateMaintainerItem(VenderName);
+            venderItem.Id = venderId;
+            SearchResultList<AssetShowItem> items = AssetManager.GetRecommendShowItems(projectId, prefix, startIndex,venderItem); ;
             foreach (var item in items)
             {
                 item.IsChecked = ExistInOrigin(item.Id);

+ 3 - 2
MBI/FirmLib/Com.FirmLib.UI/Maintainer/VmMaintainerBaseInfo.cs

@@ -15,6 +15,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
 using Com.FirmLib.Bll;
+using Com.FirmLib.UI.BllCommon;
 using FWindSoft.DataFramework;
 using FWindSoft.MVVM;
 using FWindSoft.Wpf;
@@ -165,8 +166,8 @@ namespace Com.FirmLib.UI.Maintainer
                 tempItem.Id = maintainerItem.Id;
                 tempItem.Name = maintainerItem.Name;
                 tempItem.Url = maintainerItem.Website;
-                //tempItem.BrandNames = maintainerItem..Select(b => b.Name).ToList();
-                //tempItem.FamilyNames = maintainerItem.Familys.Select(f => f.Name).ToList();
+                tempItem.BrandNames = maintainerItem.Brands.Select(b => b).ToList();
+                tempItem.FamilyNames = maintainerItem.Familys.Select(f => EquipmentFamilyManager.GetFamilyName(f)).ToList();
                 tempItem.RefProjectCount = maintainerItem.ProjectCount;
                 Manitainers.Add(tempItem);
             }

+ 4 - 4
MBI/FirmLib/Com.FirmLib.UI/Maintainer/WinMaintainerAssetSelector.xaml

@@ -80,14 +80,14 @@
 
                             <fw:TDataGridTextColumn Header="型号"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Type}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="供应商名称"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerName}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
 
 
                         </DataGrid.Columns>
 
                     </DataGrid>
 
-                    <fw:NavigationPager Margin="5"  CurrentPageIndex="{Binding CurrentPageIndex,Mode=TwoWay}" TotalPageCount="{Binding PageCount,Mode=OneWay}" Grid.Row="2"  HorizontalAlignment="Right" TotalPageVisible="False">
+                    <fw:NavigationPager Margin="5"  CurrentPageIndex="{Binding CurrentPageIndex,Mode=TwoWay}" TotalPageCount="{Binding PageCount,Mode=OneWay}" Grid.Row="2"  HorizontalAlignment="Right">
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="PageIndexChanged">
                                 <i:InvokeCommandAction Command="{Binding Commands.PageIndexChangedCommand}" CommandParameter="{Binding Path=CurrentPageIndex}"/>
@@ -151,14 +151,14 @@
                             </DataGridTemplateColumn>
                             <fw:TDataGridTextColumn Header="资产本地名称" Width="120" IsReadOnly="True"  Binding="{Binding Path=LocalName}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="资产本地编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=LocalCode}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="资产编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=LocalCode}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="资产编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=AssetNo}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="品牌"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Brand}"></fw:TDataGridTextColumn>
 
                             <fw:TDataGridTextColumn Header="产品名"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Product}"></fw:TDataGridTextColumn>
 
                             <fw:TDataGridTextColumn Header="型号"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Type}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="供应商名称"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerName}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
 
 
                         </DataGrid.Columns>

+ 1 - 1
MBI/FirmLib/Com.FirmLib.UI/Maintainer/WinMaintainerProjectAsset.xaml

@@ -128,7 +128,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <Border >
+                                    <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=MaintainPeriod,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
                                         <fw:DescriptionDecorator  Description="天"  Background="Black">
                                             <fw:TTextBox Text="{Binding MaintainPeriod, UpdateSourceTrigger=PropertyChanged}" BorderThickness="0">
                                                 <fw:TTextBox.TextControl>

Файловите разлики са ограничени, защото са твърде много
+ 3 - 3
MBI/FirmLib/Com.FirmLib.UI/Maintainer/WinManitainerProjectInfo.xaml


+ 3 - 2
MBI/FirmLib/Com.FirmLib.UI/Seller/VmSellerBaseInfo.cs

@@ -15,6 +15,7 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows;
 using Com.FirmLib.Bll;
+using Com.FirmLib.UI.BllCommon;
 using Com.FirmLib.UI.Seller.Model;
 using FWindSoft.DataFramework;
 using FWindSoft.MVVM;
@@ -167,8 +168,8 @@ namespace Com.FirmLib.UI.Seller
                 tempItem.Id = sellerItem.Id;
                 tempItem.Name = sellerItem.Name;
                 tempItem.Url = sellerItem.Website;
-                //tempItem.BrandNames = maintainerItem..Select(b => b.Name).ToList();
-                //tempItem.FamilyNames = maintainerItem.Familys.Select(f => f.Name).ToList();
+                tempItem.BrandNames = sellerItem.Brands.Select(b => b).ToList();
+                tempItem.FamilyNames = sellerItem.Familys.Select(f => EquipmentFamilyManager.GetFamilyName(f)).ToList();
                 tempItem.RefProjectCount = sellerItem.ProjectCount;
                 Sellers.Add(tempItem);
             }

+ 4 - 2
MBI/FirmLib/Com.FirmLib.UI/Seller/VmSupplyAssetSelector.cs

@@ -236,7 +236,7 @@ namespace Com.FirmLib.UI.Seller
             AllAssetSelecter = new AssetSelector();
             RecommendAssetSelecter.Refresh = (selector) =>
             {
-                LoadRecommendAssets(selector, ProjectId, VenderName);
+                LoadRecommendAssets(selector, ProjectId, VenderId);
             };
             AllAssetSelecter.Refresh = (selector) =>
             {
@@ -249,7 +249,9 @@ namespace Com.FirmLib.UI.Seller
         {
             string prefix = selector.FilterControl.FilterSetting["LocalName"].ToString();
             int startIndex = Math.Max((selector.CurrentPageIndex - 1), 0) * AssetManager.PerPageCount;
-            SearchResultList<AssetShowItem> items = AssetManager.GetRecommendShowItems(projectId, prefix, startIndex,VenderItem.CreateSupplierItem(venderId)); ;
+            var venderItem = VenderItem.CreateSupplierItem(VenderName);
+            venderItem.Id = venderId;
+            SearchResultList<AssetShowItem> items = AssetManager.GetRecommendShowItems(projectId, prefix, startIndex,venderItem); ;
             foreach (var item in items)
             {
                 item.IsChecked = ExistInOrigin(item.Id);

+ 3 - 3
MBI/FirmLib/Com.FirmLib.UI/Seller/WinSellerProjectContract.xaml

@@ -142,7 +142,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <Border >
+                                    <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=ProcurementPrice,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
                                         <fw:DescriptionDecorator  Description="元"  Background="Black">
                                             <fw:TTextBox Text="{Binding ProcurementPrice, UpdateSourceTrigger=PropertyChanged}" BorderThickness="0">
                                                 <fw:TTextBox.TextControl>
@@ -166,7 +166,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <Border >
+                                    <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=Warranty,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
                                         <fw:DescriptionDecorator  Description="天"  Background="Black">
                                             <fw:TTextBox Text="{Binding Warranty, UpdateSourceTrigger=PropertyChanged}" BorderThickness="0">
                                                 <fw:TTextBox.TextControl>
@@ -190,7 +190,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <DatePicker SelectedDate="{Binding Path=ProductionDate,Converter={x:Static fw:DateTimeConverter.Date}}" VerticalAlignment="Center"></DatePicker>
+                                    <DatePicker fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=ProductionDate,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" SelectedDate="{Binding Path=ProductionDate,Converter={x:Static fw:DateTimeConverter.Date}}" VerticalAlignment="Center"></DatePicker>
                                 </DataTemplate>
                             </DataGridTemplateColumn.CellEditingTemplate>
                         </DataGridTemplateColumn>

+ 4 - 4
MBI/FirmLib/Com.FirmLib.UI/Seller/WinSellerProjectInfo.xaml

@@ -118,7 +118,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <Border >
+                                    <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=ProcurementPrice,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" >
                                         <fw:DescriptionDecorator  Description="元"  Background="Black">
                                             <fw:TTextBox Text="{Binding ProcurementPrice, UpdateSourceTrigger=PropertyChanged}" BorderThickness="0">
                                                 <fw:TTextBox.TextControl>
@@ -142,7 +142,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <Border >
+                                    <Border fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=Warranty,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
                                         <fw:DescriptionDecorator  Description="天"  Background="Black">
                                             <fw:TTextBox Text="{Binding Warranty, UpdateSourceTrigger=PropertyChanged}" BorderThickness="0">
                                                 <fw:TTextBox.TextControl>
@@ -166,7 +166,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <DatePicker SelectedDate="{Binding Path=ProductionDate,Converter={x:Static wpf:DateTimeConverter.Date}}" VerticalAlignment="Center"></DatePicker>
+                                    <DatePicker fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=ProductionDate,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" SelectedDate="{Binding Path=ProductionDate,Converter={x:Static wpf:DateTimeConverter.Date}}" VerticalAlignment="Center"></DatePicker>
                                 </DataTemplate>
                             </DataGridTemplateColumn.CellEditingTemplate>
                         </DataGridTemplateColumn>
@@ -183,7 +183,7 @@
                             </DataGridTemplateColumn.CellTemplate>
                             <DataGridTemplateColumn.CellEditingTemplate>
                                 <DataTemplate>
-                                    <Grid>
+                                    <Grid fw:ElementCopyOptions.UseCopy="True" fw:ElementCopyOptions.CopyValue="{Binding Path=SellerContractNo,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}">
                                         <Grid.ColumnDefinitions>
                                             <ColumnDefinition></ColumnDefinition>
                                             <ColumnDefinition Width="30"></ColumnDefinition>

+ 3 - 3
MBI/FirmLib/Com.FirmLib.UI/Seller/WinSupplyAssetSelector.xaml

@@ -80,14 +80,14 @@
 
                             <fw:TDataGridTextColumn Header="型号"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Type}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn Header="供应商名称"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerName}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn Header="所属合同编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
 
 
                         </DataGrid.Columns>
 
                     </DataGrid>
 
-                    <fw:NavigationPager Margin="5"  CurrentPageIndex="{Binding CurrentPageIndex,Mode=TwoWay}" TotalPageCount="{Binding PageCount,Mode=OneWay}" Grid.Row="2"  HorizontalAlignment="Right" TotalPageVisible="False">
+                    <fw:NavigationPager Margin="5"  CurrentPageIndex="{Binding CurrentPageIndex,Mode=TwoWay}" TotalPageCount="{Binding PageCount,Mode=OneWay}" Grid.Row="2"  HorizontalAlignment="Right" >
                         <i:Interaction.Triggers>
                             <i:EventTrigger EventName="PageIndexChanged">
                                 <i:InvokeCommandAction Command="{Binding Commands.PageIndexChangedCommand}" CommandParameter="{Binding Path=CurrentPageIndex}"/>
@@ -159,7 +159,7 @@
 
                             <fw:TDataGridTextColumn  Header="型号"  Width="100" IsReadOnly="True"  Binding="{Binding Path=Type}"></fw:TDataGridTextColumn>
                             <fw:TDataGridTextColumn  Header="供应商名称"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerName}"></fw:TDataGridTextColumn>
-                            <fw:TDataGridTextColumn  Header="所属合同编码"  Width="100" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
+                            <fw:TDataGridTextColumn  Header="所属合同编码"  Width="120" IsReadOnly="True"  Binding="{Binding Path=SellerContractNo}"></fw:TDataGridTextColumn>
 
 
                         </DataGrid.Columns>

+ 0 - 1
MBI/FirmLib/Com.FirmLib.UI/Seller/WinSupplyAssetSelector.xaml.cs

@@ -23,7 +23,6 @@ namespace Com.FirmLib.UI.Seller
         public WinSupplyAssetSelector() : this(new VmSupplyAssetSelector())
         {
             InitializeComponent();
-           
         }
         public WinSupplyAssetSelector(VmSupplyAssetSelector vm)
         {

+ 4 - 3
MBI/FirmLib/Com.FirmLib/Bll/PlatformBll/PlatformBll.cs

@@ -55,7 +55,7 @@ namespace Com.FirmLib.Bll
             {
                 total = Convert.ToInt32(jo["TotalCount"]?.ToString() ?? "0");
                 var listStr = jo["Content"].ToString();
-                JArray array = JArray.Parse(listStr);
+               // JArray array = JArray.Parse(listStr);
                 items = JsonConvert.DeserializeObject<SearchResultList<TdAssetItem>>(listStr);
             }, (jo) => { this.ErrorMessage = jo["ResultMsg"].ToString(); });
             items.TotalCount = total;
@@ -133,7 +133,7 @@ namespace Com.FirmLib.Bll
         /// <summary>
         /// 获取资产信息
         /// </summary>
-        /// <param name="projectId"></param>
+        /// <param name="projectSetting"></param>
         /// <param name="limit"></param>
         /// <param name="filter"></param>
         /// <param name="criteria"></param>
@@ -152,7 +152,8 @@ namespace Com.FirmLib.Bll
             int total = 0;
             HandlerResult(result, (jo) =>
             {
-                if(jo.TryGetValue("content",out JToken token))
+                  total = Convert.ToInt32(jo["TotalCount"]?.ToString() ?? "0");
+                if(jo.TryGetValue("Content",out JToken token))
                 {
                     var listStr = token.ToString();
                     items = JsonConvert.DeserializeObject<SearchResultList<TdAssetItem>>(listStr);

+ 10 - 0
MBI/FirmLib/Com.FirmLib/Entity/MaintainerItem.cs

@@ -12,6 +12,12 @@ namespace Com.FirmLib.Entity
     /// </summary>
     public class MaintainerItem
     {
+        public MaintainerItem()
+        {
+            Brands = new List<string>();
+            Familys = new List<string>();
+        }
+
         [JsonProperty("venderId")]
         public string Id { get; set; }
         [JsonProperty("name")]
@@ -19,6 +25,10 @@ namespace Com.FirmLib.Entity
         [JsonProperty("website")]
         public string Website { get; set; }
 
+        [JsonProperty("brandList")]
+        public List<string> Brands { get; set; }
+        [JsonProperty("eqFamilyList")]
+        public List<string> Familys { get; set; }
         /// <summary>
         /// 关联项目数量
         /// </summary>

+ 9 - 1
MBI/FirmLib/Com.FirmLib/Entity/SellerItem.cs

@@ -12,13 +12,21 @@ namespace Com.FirmLib.Entity
     /// </summary>
     public class SellerItem
     {
+        public SellerItem()
+        {
+            Brands = new List<string>();
+            Familys = new List<string>();
+        }
         [JsonProperty("venderId")]
         public string Id { get; set; }
         [JsonProperty("name")]
         public string Name { get; set; }
         [JsonProperty("website")]
         public string Website { get; set; }
-
+        [JsonProperty("brandList")]
+        public List<string> Brands { get; set; }
+        [JsonProperty("eqFamilyList")]
+        public List<string> Familys { get; set; }
         /// <summary>
         /// 关联项目数量
         /// </summary>

+ 0 - 462
MBI/SAGA.GplotManage/ClassDiagram1.cd

@@ -1,462 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<ClassDiagram MajorVersion="1" MinorVersion="1">
-  <Class Name="SAGA.GplotManage.App" Collapsed="true">
-    <Position X="35.25" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>App.xaml.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.CheckAndKeepGplotLaster" Collapsed="true" BaseTypeListCollapsed="true">
-    <Position X="37" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AEAAAAAIAAAAAACBAAACAAABAACAAAAEAAAAAAAAAAA=</HashCode>
-      <FileName>CheckAndKeepGplotLaster.cs</FileName>
-    </TypeIdentifier>
-    <Lollipop Position="0.2" Collapsed="true" />
-  </Class>
-  <Class Name="SAGA.GplotManage.ColdRoomSystemCompute" Collapsed="true">
-    <Position X="9.5" Y="4.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAA=</HashCode>
-      <FileName>Command\ColdGplot\ColdRoomSystemCompute.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.ColdRoomSystemParse" Collapsed="true">
-    <Position X="6.5" Y="7.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>Command\ColdGplot\ColdRoomSystemParse.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.ColdRoomSystemView" Collapsed="true">
-    <Position X="3.5" Y="7.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>Command\ColdGplot\ColdRoomSystemView.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotUtil" Collapsed="true">
-    <Position X="40.5" Y="2.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAEAQAAAAAAABAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>Command\GplotUtil.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.MethodExtension" Collapsed="true">
-    <Position X="38.75" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAA=</HashCode>
-      <FileName>Command\MethodExtension.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.SpaceComputerGraph" Collapsed="true">
-    <Position X="38.75" Y="4.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode>
-      <FileName>GplotCommand.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.SpaceComputerVGraph" Collapsed="true">
-    <Position X="40.5" Y="4.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode>
-      <FileName>GplotCommand.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.ChillWaterLoopComputerSupplyGraph" Collapsed="true">
-    <Position X="40.5" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode>
-      <FileName>GplotCommand.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.ChillWaterLoopComputerBackGraph" Collapsed="true">
-    <Position X="38.75" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode>
-      <FileName>GplotCommand.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.ChillWaterLoopComputerVGraph" Collapsed="true">
-    <Position X="42.25" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode>
-      <FileName>GplotCommand.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GraphUploadTest" Collapsed="true">
-    <Position X="42.25" Y="2.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAgAA=</HashCode>
-      <FileName>GplotCommand.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotFactory" Collapsed="true">
-    <Position X="38.75" Y="2.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotFactory.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotClient" Collapsed="true">
-    <Position X="40.5" Y="1.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAABABAgAAgAABAAAAAAAIBAAAAAAIAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotClient.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotClientContext" Collapsed="true">
-    <Position X="42.25" Y="1.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAEACAIAAAAAABAAAAAACAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotClientContext.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotCompute" Collapsed="true">
-    <Position X="9.5" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>IEAAAAAFgACAAAAAAEAAEAgIABAAAAAAEAAAAAAAAQA=</HashCode>
-      <FileName>GplotManage\GplotCompute\GplotCompute.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotComputeData" Collapsed="true">
-    <Position X="0.75" Y="4.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AABAAAAAAACAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotCompute\GplotComputeData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GNode" Collapsed="true">
-    <Position X="37" Y="1.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAACAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotCompute\GplotComputeData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GNodeRelation" Collapsed="true">
-    <Position X="38.75" Y="1.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAABAAAEAAAggAAAAAAAAAAAAQAAAIAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotCompute\GplotComputeData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotData" Collapsed="true">
-    <Position X="3" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AABAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAA=</HashCode>
-      <FileName>GplotManage\GplotData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotDataExtension" Collapsed="true">
-    <Position X="33.5" Y="2.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotDefinitionType" Collapsed="true">
-    <Position X="0.5" Y="10.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAIA=</HashCode>
-      <FileName>GplotManage\GplotDefinition\GplotDefinitionType.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.BaseGetDefinition" Collapsed="true">
-    <Position X="0.5" Y="9.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA=</HashCode>
-      <FileName>GplotManage\GplotDefinition\IGetDefinition.cs</FileName>
-    </TypeIdentifier>
-    <Lollipop Position="0.2" />
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotDefinition" Collapsed="true">
-    <Position X="35.25" Y="2.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AQAAAAAABAAAAAAAAAAAAAQAAAAAAAQAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotDefinition.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotEdgeItem" Collapsed="true">
-    <Position X="37" Y="2.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAACAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotEdgeItem.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotParse" Collapsed="true">
-    <Position X="6.5" Y="6.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>IAAgAAAAgAAACAAAAAAQAAgIAAAAAAAAAAAAAAAAAQA=</HashCode>
-      <FileName>GplotManage\GplotParse\GplotParse.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotParseData" Collapsed="true">
-    <Position X="3" Y="4.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAEAAAAAAAAAAAAQAAAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotParse\GplotParseData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotView" Collapsed="true">
-    <Position X="3.5" Y="6.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>IAAAAAQAgAAAAAAAAGAAAAgIAAAEAAAAEAAAAAAAAQA=</HashCode>
-      <FileName>GplotManage\GplotView\GplotView.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.GplotViewData" Collapsed="true">
-    <Position X="5.25" Y="4.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>GplotManage\GplotView\GplotViewData.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.LocalDataUtil" Collapsed="true">
-    <Position X="35.25" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAIAAAAAAgCAAAAAAAAAAAAAEAAAA=</HashCode>
-      <FileName>GplotManage\LocalDataUtil.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.MainWindow" Collapsed="true" BaseTypeListCollapsed="true">
-    <Position X="37" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAEBAAAAAAAAAAEAIAAAQAAAEAAAIAAAAAA=</HashCode>
-      <FileName>MainWindow.xaml.cs</FileName>
-    </TypeIdentifier>
-    <Lollipop Position="0.2" Collapsed="true" />
-  </Class>
-  <Class Name="SAGA.GplotManage.ResultRequest" Collapsed="true">
-    <Position X="35.25" Y="4.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAABAAAAAAAA=</HashCode>
-      <FileName>MainWindow.xaml.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.RelatedDataUpload" Collapsed="true">
-    <Position X="40.5" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>IAAAAAAABAAAAAAAAAAAAAAAAgAAAAggAAQAAIAAAAA=</HashCode>
-      <FileName>RelatedDataUpload.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.DescriptionRelatedAttribute" Collapsed="true">
-    <Position X="35.25" Y="1.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>RelatedDataUpload.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.ReleateData" Collapsed="true">
-    <Position X="42.25" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>BEAAACAAAAAEAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>RelatedDataUpload.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.Criteria" Collapsed="true">
-    <Position X="33.5" Y="1.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>RelatedDataUpload.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.Info" Collapsed="true">
-    <Position X="33.5" Y="3.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AQAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>RelatedDataUpload.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UcUploadRelated" Collapsed="true" BaseTypeListCollapsed="true">
-    <Position X="42.25" Y="4.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>UcUploadRelated.xaml.cs</FileName>
-    </TypeIdentifier>
-    <Lollipop Position="0.2" Collapsed="true" />
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadSetting" Collapsed="true">
-    <Position X="33.5" Y="5.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAACAAAACAAAAAAAAAAAAAQAAAAAAAQAAAEAAAAAIAA=</HashCode>
-      <FileName>UploadSetting.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.Window1" Collapsed="true" BaseTypeListCollapsed="true">
-    <Position X="35.25" Y="5.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAACAAAAAA=</HashCode>
-      <FileName>Window1.xaml.cs</FileName>
-    </TypeIdentifier>
-    <Lollipop Position="0.2" Collapsed="true" />
-  </Class>
-  <Class Name="SAGA.GplotManage.Command.ColdRommFactory" Collapsed="true">
-    <Position X="0.5" Y="7.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAA=</HashCode>
-      <FileName>Command\ColdRommFactory.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.Command.GplotClientFactory" Collapsed="true">
-    <Position X="0.5" Y="6.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAA=</HashCode>
-      <FileName>Command\GplotClientFactory.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.Properties.Resources" Collapsed="true">
-    <Position X="33.5" Y="4.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAABEAAAAQAAAAAAAAAAAAAAAIA=</HashCode>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.Properties.Settings" Collapsed="true">
-    <Position X="37" Y="4.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAIAAAAAABAAAAAAAAAAAAAAA=</HashCode>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.FreshAirNetwork" Collapsed="true">
-    <Position X="26.5" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAEAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\AirNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.AcAirNetwork" Collapsed="true">
-    <Position X="1.75" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAEAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\AirNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.ChillWaterLoop" Collapsed="true">
-    <Position X="4" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AABAAAAAAIIAAAAAAAQQAAACAAAEABABAAAAAAAAAAQ=</HashCode>
-      <FileName>UploadRelated\ChillWaterLoop.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.AcElement" Collapsed="true">
-    <Position X="33.5" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AABAAAAAAAACBCAAAAAAAAAAAAAAAQAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\ChillWaterLoop.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.ControlRelation" Collapsed="true">
-    <Position X="10.75" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAACAAEABAAAAAAAAAAAAI=</HashCode>
-      <FileName>UploadRelated\ControlRelation.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.ConvectionNetwork" Collapsed="true">
-    <Position X="15.25" Y="3.25" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\ConvectionNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.CoolingWaterLoop" Collapsed="true">
-    <Position X="22" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEAFAABAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\CoolingWaterLoop.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.ChillWaterLoop_V" Collapsed="true">
-    <Position X="24.25" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\CoolingWaterLoop.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.EquipPower" Collapsed="true">
-    <Position X="28.75" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAACAAEABAAAAAAAAAAAAI=</HashCode>
-      <FileName>UploadRelated\EquipPower.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.Gplot" Collapsed="true">
-    <Position X="16.5" Y="0.5" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AIQCAECEKAIAAAAAABQQAAwDAEAEABABACABAAAkIAA=</HashCode>
-      <FileName>UploadRelated\Gplot.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.LuDistribution" Collapsed="true">
-    <Position X="6.25" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAACAAEABAAAAAAAAAAAAI=</HashCode>
-      <FileName>UploadRelated\LuDistribution.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.NoGplot" Collapsed="true">
-    <Position X="8.5" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\NoGplot.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.RadiationNetwork" Collapsed="true">
-    <Position X="13" Y="3.25" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\RadiationNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.SpaceRelated" Collapsed="true">
-    <Position X="16.5" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\SpaceNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.ElementSpNeighborhood">
-    <Position X="18" Y="3.5" Width="1.5" />
-    <NestedTypes>
-      <Enum Name="SAGA.GplotManage.UploadRelated.ElementSpNeighborhood.SpaceRelationType" Collapsed="true">
-        <TypeIdentifier>
-          <NewMemberFileName>UploadRelated\SpaceNetwork.cs</NewMemberFileName>
-        </TypeIdentifier>
-      </Enum>
-    </NestedTypes>
-    <TypeIdentifier>
-      <HashCode>AAAAAAAABAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\SpaceNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.TrafficNetwork" Collapsed="true">
-    <Position X="19.75" Y="3.25" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\TrafficNetwork.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Class Name="SAGA.GplotManage.UploadRelated.WallGplot" Collapsed="true">
-    <Position X="31" Y="1.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAIAAAAAAAQQAAAAAAAEABAAAAAAAAAAAAA=</HashCode>
-      <FileName>UploadRelated\WallGplot.cs</FileName>
-    </TypeIdentifier>
-  </Class>
-  <Interface Name="SAGA.GplotManage.IGetDefinition" Collapsed="true">
-    <Position X="33.5" Y="6.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA=</HashCode>
-      <FileName>GplotManage\GplotDefinition\IGetDefinition.cs</FileName>
-    </TypeIdentifier>
-  </Interface>
-  <Enum Name="SAGA.GplotManage.GraphTypeEnum" Collapsed="true">
-    <Position X="33.5" Y="7.75" Width="1.5" />
-    <TypeIdentifier>
-      <HashCode>AAAAAAAECAgAAAAACgBAAACAAQAAQAABAAAAACCAAMg=</HashCode>
-      <FileName>GraphTypeEnum.cs</FileName>
-    </TypeIdentifier>
-  </Enum>
-  <Font Name="Microsoft YaHei UI" Size="9" />
-</ClassDiagram>

+ 0 - 72
MBI/SAGA.GplotManage/GplotCommand.cs

@@ -131,78 +131,6 @@ namespace SAGA.GplotManage
             return true;
         }
     }
-    //    /// <summary>
-    //    /// 计算所有关系
-    //    /// </summary>
-    //    [Transaction(TransactionMode.Manual)]
-    //    [Regeneration(RegenerationOption.Manual)]
-    //    public class ComputerGraph : ExternalCommand
-    //    {
-    //        public ComputerGraph()
-    //        {
-    //            IsShowNoDocument = true;
-    //        }
-
-    //        public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
-    //        {
-    //            //using (Transaction trans = new Transaction(ExternalDataWrapper.Current.Doc, "读取冷却水系统")) {
-    //            //    trans.Start();
-    //            try
-    //            {
-    //                var uiApp = ExternalDataWrapper.Current.UiApp;
-    //                //打开所有楼层数据
-    //                var fileInfos = GetAllRevitFiles();
-    //                ReadSpaceCommand space = new ReadSpaceCommand();
-
-    //                foreach (var tPath in fileInfos)
-    //                {
-    //                    if (File.Exists(tPath))
-    //                    {
-    //                        Document linkDoc = uiApp.Application.OpenDocumentFile(tPath);
-    //                        // List<Element> linkElements = linkDoc.GetAllElements(false);
-    //                        space.ComputerSpace(linkDoc);
-    //                    }
-    //                }
-    //            }
-    //            catch (Exception e)
-    //            {
-    //                // trans.RollBack();
-    //                MessageShow.Show(e);
-    //            }
-
-    //            return Result.Succeeded;
-    //        }
-
-    //        private List<string> GetAllRevitFiles()
-    //        {
-    //            var files = new List<string>();
-    //            List<TreeNodeItem> projectFloors = DalModeFileManange.GetMissFileFloors(false);
-
-    //            projectFloors.ForEach((tni) => GetFilePaths(tni, files));
-    //            return files;
-    //        }
-
-    //        /// <summary>
-    //        /// 获取所有楼层信息
-    //        /// </summary>
-    //        /// <param name="tni"></param>
-    //        /// <param name="files"></param>
-    //        private void GetFilePaths(TreeNodeItem tni, List<string> files)
-    //        {
-    //            if (tni.Item is MFloor floor)
-    //            {
-    //                files.Add(floor.FullPath);
-    //            }
-    //            else
-    //            {
-    //                foreach (TreeNodeItem t in tni.Children)
-    //                {
-    //                    GetFilePaths(t, files);
-    //                }
-    //            }
-    //        }
-    //    }
-
     /// <summary>
     /// 冷战测试
     /// </summary>

+ 0 - 11
MBI/SAGA.GplotManage/SAGA.GplotManage.csproj

@@ -119,8 +119,6 @@
     <Compile Include="GplotManage\GplotView\GplotView.cs" />
     <Compile Include="Command\GplotUtil.cs" />
     <Compile Include="GraphTypeEnum.cs" />
-    <Compile Include="OssHelper.cs" />
-    <Compile Include="UploadGplotDatas.cs" />
     <Compile Include="UploadRelated\AirNetwork.cs" />
     <Compile Include="UploadRelated\ControlRelation.cs" />
     <Compile Include="UploadRelated\ConvectionNetwork.cs" />
@@ -134,19 +132,10 @@
     <Compile Include="UploadRelated\ElementSpNeighborhood.cs" />
     <Compile Include="UploadRelated\TrafficNetwork.cs" />
     <Compile Include="UploadRelated\WallGplot.cs" />
-    <Compile Include="UploadSetting.cs" />
-    <Page Include="MainWindow.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
     <Compile Include="App.xaml.cs">
       <DependentUpon>App.xaml</DependentUpon>
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="MainWindow.xaml.cs">
-      <DependentUpon>MainWindow.xaml</DependentUpon>
-      <SubType>Code</SubType>
-    </Compile>
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs">

+ 1 - 1
MBI/SAGA.GplotManage/SAGA.GplotManage.csproj.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <ProjectView>ShowAllFiles</ProjectView>
+    <ProjectView>ProjectFiles</ProjectView>
   </PropertyGroup>
 </Project>

+ 0 - 3
MBI/SAGA.GplotManage/UploadRelated/ElementSpNeighborhood.cs

@@ -7,9 +7,6 @@ using SAGA.Models;
 using SAGA.RevitUtils.Extends;
 using SAGA.RevitUtils.Windows;
 
-/// <summary>
-/// 空间计算管理
-/// </summary>
 namespace SAGA.GplotManage.UploadRelated
 {
     public abstract class SpaceRelated : Gplot

+ 4 - 13
MBI/SAGA.GplotRelationComputerManage/Command.cs

@@ -1,22 +1,13 @@
-using Autodesk.Revit.Attributes;
+using DrawData;
+using System;
+using System.Linq;
+using Autodesk.Revit.Attributes;
 using Autodesk.Revit.DB;
-using Autodesk.Revit.DB.Mechanical;
 using Autodesk.Revit.UI;
-
-using DrawData;
-using Newtonsoft.Json.Linq;
 using SAGA.GplotDrawData;
 using SAGA.GplotRelationComputerManage.PumpEnd;
-using SAGA.MBI.DataArrange;
-using SAGA.MBI.RequestData;
-using SAGA.Models;
 using SAGA.RevitUtils;
 using SAGA.RevitUtils.Extends;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows;
-using SAGA.GplotRelationComputerManage;
 using MainWindow = SAGA.GplotDrawData.MainWindow;
 
 namespace SAGA.GplotRelationComputerManage

+ 14 - 195
MBI/SAGA.GplotRelationComputerManage/ReadSpaceCommand.cs

@@ -8,9 +8,7 @@ using System.Threading;
 using Autodesk.Revit.DB;
 using Autodesk.Revit.DB.Mechanical;
 using Newtonsoft.Json.Linq;
-
 using SAGA.DotNetUtils.Extend;
-
 using SAGA.MBI.DataArrange;
 using SAGA.MBI.Model;
 using SAGA.MBI.RequestData;
@@ -47,16 +45,12 @@ namespace SAGA.GplotRelationComputerManage
         private bool m_isDraw = false;
         List<SgSpace> m_sgSpaces;
         private Dictionary<string /*bimId*/, JObject /*类型*/> m_dicServerSpace;
-        Dictionary<string, List<LvSpace>> vSpaceDirectory = new Dictionary<string, List<LvSpace>>();
         List<List<Point>> m_connectionLine = new List<List<Point>>();
 
         private Document m_doc;
 
         //需要进行上下比较房间类型
-        private List<string> roomFunCtype = new List<string>() { "140","150","1A0","1B0" };
-        public ReadSpaceCommand()
-        {
-        }
+        private List<string> roomFunCtype = new List<string>() { "140","150","1A0","1B0" };    
         /// <summary>
         /// 初始化数据集合
         /// </summary>
@@ -88,27 +82,19 @@ namespace SAGA.GplotRelationComputerManage
         public void Computer()
         {
             //缓存所有空间数据
-            bool isFinish = false;
             //查询所有设备
-           // ThreadPool.QueueUserWorkItem((state) =>
-            //{
-                var str = new string[] { "Si" };//元空间为Si
-                List<JObject> datas = CommonConvert.QueryObjectInfoByTypes(str);
-                m_dicServerSpace = new Dictionary<string, JObject>();
-                datas.ForEach(t =>
+             var str = new string[] { "Si" };//元空间为Si
+            List<JObject> datas = CommonConvert.QueryObjectInfoByTypes(str);
+            m_dicServerSpace = new Dictionary<string, JObject>();
+            datas.ForEach(t =>
+            {
+                var bimId = GetValue(t, "BIMID");
+                if (!string.IsNullOrEmpty(bimId))
                 {
-                    var bimId = GetValue(t, "BIMID");
-                    //if (!m_dicServerSpace.ContainsKey(bimId))
-                    //    m_dicServerSpace.Add(bimId, GetValue(t, "RoomFuncType"));
-                    if (!string.IsNullOrEmpty(bimId))
-                    {
-                        m_dicServerSpace[bimId] = t;
-                    }
-                   
-                });
-                isFinish = true;
-          //  });
-            
+                    m_dicServerSpace[bimId] = t;
+                }
+
+            });
             //打开所有楼层数据
             var fileInfos = RevitModelPath.GetAllRevitFiles();//.Where(t => t.IndexOf("71062c") > -1);
             foreach (var fileInfo in fileInfos)
@@ -222,11 +208,10 @@ namespace SAGA.GplotRelationComputerManage
         {
             m_doc = doc;
             Init();
-
             m_doors = doc.GetElements<FamilyInstance>(BuiltInCategory.OST_Doors);
             m_windows = doc.GetElements<FamilyInstance>(BuiltInCategory.OST_Windows);
 
-            List<Space> spaces = GetSpaces(doc);
+            List<Space>  spaces = GetSpaces(doc);
 
             #region 计算平面拓扑
             System.Diagnostics.Debug.WriteLine(DateTime.Now + "平面计算开始");
@@ -238,11 +223,7 @@ namespace SAGA.GplotRelationComputerManage
             //合并公共构建,如果是面层墙则进行合并
             var datas = CombinElement(groupSpaces);
             foreach (var groupSpace in datas)
-            {
-                if (groupSpace.Key == 3506004)
-                {
-
-                }
+            {        
                 var lSpaces = groupSpace.Value;
                 var count = lSpaces.Count;
                 if (count > 1)
@@ -592,38 +573,6 @@ namespace SAGA.GplotRelationComputerManage
         }
 
         /// <summary>
-        /// 计算上层相关联的空间
-        /// </summary>
-        /// <param name="space"></param>
-        /// <param name="upSpaces"></param>
-        void ComputerUpDownRelationship(Space space, Dictionary<Space, List<BoundarySegment>> upSpaces)
-        {
-            var mySegments = space.GetBoundarySegments(new SpatialElementBoundaryOptions());
-            var curves = mySegments.FirstOrDefault()?.Select(t => t.GetCurve()).ToList();
-            SgSpace sgSpace = m_sgSpaces.FirstOrDefault(t => t.Id == space.Id.ToString());
-            if (sgSpace == null) return;
-            foreach (var upSpace in upSpaces)
-            {
-                if (ClosedIntersect(upSpace.Value.Select(t => t.GetCurve()).ToList(), curves))
-                {
-                    var s = new SgSpace(upSpace.Key.Id.ToString(), upSpace.Key.Name)
-                    {
-                        Point = upSpace.Key.GetLocationPoint().ToW2DPoint()
-                    };
-                    //判断上下关系
-                    var related = upSpace.Value.Any(t => m_doc.GetElement(t.ElementId) is Autodesk.Revit.DB.Floor)
-                        ? SpaceRelatedEnum.Adjacent
-                        : SpaceRelatedEnum.Radiation | SpaceRelatedEnum.Ventilation;
-                    sgSpace.UpElements.Add(new AdjacentSpace()
-                    {
-                        Space = s,
-                        RelatedEnum = related
-                    });
-                }
-            }
-        }
-
-        /// <summary>
         /// 判断两个区域是否相交或者相互包含
         /// </summary>
         /// <param name="closed1"></param>
@@ -654,7 +603,6 @@ namespace SAGA.GplotRelationComputerManage
         MFloor GetUpFloorKey(string key)
         {
             var modelName = System.IO.Path.GetFileNameWithoutExtension(key);
-
             MFloor floor = DalProjectTree.GetUpperFloor(modelName);
             return floor;
         }
@@ -714,135 +662,6 @@ namespace SAGA.GplotRelationComputerManage
 
             return lSpaces;
         }
-
-        public List<SpaceEdgeInfo> ConvertSpace(Space space)
-        {
-            var doc = space.Document;
-            var lSpaces = new List<SpaceEdgeInfo>();
-
-            //如果空间内有多个柱子,每个柱子相当于一个封闭区域,也是一个List<BoundarySegment>,如果一个空间分隔符或者墙上有一个柱子,所在的空间轮廓就会多出两个边分别是柱子左边,柱子,柱子右边,他们三个的ElementId相同,getCurve不同
-            IList<IList<BoundarySegment>> segments = space.GetBoundarySegments(new SpatialElementBoundaryOptions());
-            foreach (IList<BoundarySegment> boundarySegments in segments)
-            {
-                foreach (var segment in boundarySegments)
-                {
-                    if (segment.ElementId.IntegerValue != -1)
-                    {
-                        Curve wallLine = null;
-
-                        var elem = doc.GetElement(segment.ElementId);
-                        Curve segCurve1 = segment.GetCurve();
-                        var type = typeof(object);
-                        //这里只处理墙和分隔符
-                        if (elem is Wall wall)
-                        {
-                            wallLine = wall.Location.GetCurve();
-                            type = typeof(Wall);
-                        }
-                        else if (elem is ModelCurve modelCurve)
-                        {
-                            wallLine = modelCurve.GetCurve();
-                            type = typeof(ModelCurve);
-                        }
-                        else if (elem is FamilyInstance fi)
-                        {
-                            wallLine = segCurve1;
-                            type = typeof(ModelCurve);
-                        }
-                        else
-                        {
-                            continue;
-                        }
-                        //Curve segCurve1 = segment.GetCurve();
-                        lSpaces.Add(new SpaceEdgeInfo()
-                        {
-                            Space = space,
-                            Edge = wallLine,
-                            SegEdge = segCurve1,
-                            EdgeElement = elem,
-                            EType = type
-                        });
-                    }
-                }
-            }
-            var lSpace = new List<SpaceEdgeInfo>();
-            lSpace.AddRange(lSpaces);
-            CombinLine(lSpace);
-
-
-            return lSpace;
-        }
-
-        /// <summary>
-        /// 合并轮廓线
-        /// </summary>
-        /// <param name="lSpace"></param>
-        private void CombinLine(List<SpaceEdgeInfo> lSpace)
-        {//根据推测所有的轮廓线都是首尾相接的,顺时针或者逆时针走向
-            //部分合并
-            for (int i = lSpace.Count - 1; i >= 0; i--)
-            {
-                var edgeInfo = lSpace[i];
-                var start = edgeInfo.SegEdge.StartPoint();
-                var end = edgeInfo.SegEdge.EndPoint();
-                for (int j = lSpace.Count - 1; j >= 0; j--)
-                {
-                    var edgeInfo1 = lSpace[j];
-                    var edge = edgeInfo1.SegEdge;
-                    //正方向找
-                    if (edge.StartPoint().IsEqual(end))
-                    {
-                        //合并轮廓线
-                        if (IsSameLine(edgeInfo, edgeInfo1))
-                        {
-                            end = edge.EndPoint();
-                            edgeInfo.SegEdge = start.NewLine(end);
-                            lSpace.Remove(edgeInfo1);
-                            break;
-                        }
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// 判断轮廓边是否为同一条边
-        /// </summary>
-        /// <param name="segEdgeInfo1"></param>
-        /// <param name="segEdgeInfo2"></param>
-        /// <returns></returns>
-        bool IsSameLine(SpaceEdgeInfo segEdgeInfo1, SpaceEdgeInfo segEdgeInfo2)
-        {
-            Curve curve1 = segEdgeInfo1.SegEdge;
-            Curve curve2 = segEdgeInfo2.SegEdge;
-            //不是同类型的
-            if (segEdgeInfo1.EdgeElement.GetType().Name != segEdgeInfo2.EdgeElement.GetType().Name) return false;
-            if (curve1.IsEqual(curve2)) return false;
-            return curve1.IsParallel(curve2);
-        }
-
-        /// <summary>
-        /// 两条直线是否共线
-        /// </summary>
-        /// <param name="curve1"></param>
-        /// <param name="curve2"></param>
-        /// <returns></returns>
-        bool IsCollineation(Curve curve1, Curve curve2)
-        {
-            if (curve1.IsParallel(curve2))
-            {
-                if (curve1.IsContain(curve2.StartPoint()) || curve1.IsContain(curve2.EndPoint()))
-                {
-                    return true;
-                }
-                if (curve2.IsContain(curve1.StartPoint()) || curve2.IsContain(curve1.EndPoint()))
-                {
-                    return true;
-                }
-            }
-
-            return false;
-        }
     }
 
     /// <summary>

+ 3 - 1
MBI/SAGA.GplotRelationComputerManage/SAGA.GplotRelationComputerManage.csproj

@@ -79,7 +79,6 @@
     <Compile Include="Command.cs" />
     <Compile Include="Common\MBIInfoUtil.cs" />
     <Compile Include="ComputerPipes.cs" />
-    <Compile Include="ComputerRelationFromPhysicalWorld.cs" />
     <Compile Include="ComputerVerticalPipe.cs" />
     <Compile Include="ComputerWalls\ComputerWallsData.cs" />
     <Compile Include="ComputerWalls\LogicWall.cs" />
@@ -105,6 +104,9 @@
     <Compile Include="RevitSystemParse\Handler\SystemParseSetting.cs" />
     <Compile Include="RevitSystemParse\StartElementsManager.cs" />
     <Compile Include="SpaceEdgeInfo.cs" />
+    <Compile Include="SpaceRelation\SpaceComputerContext.cs" />
+    <Compile Include="SpaceRelation\SpaceComputerHandler.cs" />
+    <Compile Include="SpaceRelation\SpaceComputerManager.cs" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\SAGA.GplotDrawData\SAGA.GplotDrawData.csproj">

+ 51 - 0
MBI/SAGA.GplotRelationComputerManage/SpaceRelation/SpaceComputerContext.cs

@@ -0,0 +1,51 @@
+/*-------------------------------------------------------------------------
+ * 功能描述:SpaceComputerContext
+ * 作者:xulisong
+ * 创建时间: 2018/12/12 14:54:23
+ * 版本号:v1.0
+ *  -------------------------------------------------------------------------*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Newtonsoft.Json.Linq;
+using SAGA.MBI.RequestData;
+using SAGA.Models;
+
+namespace SAGA.GplotRelationComputerManage
+{
+    public class SpaceComputerContext
+    {
+        #region 空间信息
+        /// <summary>
+        /// 缓存空间对象
+        /// </summary>
+        private Dictionary<string, RoomItem> m_Rooms = null;
+        /// <summary>
+        /// 获取根据指定bimId,获取空间信息
+        /// </summary>
+        /// <param name="bimId"></param>
+        /// <returns></returns>
+        public RoomItem GetRoomItem(string bimId)
+        {
+            if (m_Rooms == null)
+            {
+                m_Rooms = new Dictionary<string, RoomItem>();
+                 var str = new string[] { MBIBuiltInCategory.Si };//元空间为Si
+                 List<JObject> datas = CommonConvert.QueryObjectInfoByTypes(str);
+                foreach (var data in datas)
+                {
+                    var roomItem = MBIItemFactory.Create<RoomItem>(data);
+                    m_Rooms[roomItem.BimId] = roomItem;
+                }
+            }
+
+            m_Rooms.TryGetValue(bimId, out RoomItem resultItem);
+            return resultItem;
+        }
+
+        #endregion
+    }
+}

+ 28 - 0
MBI/SAGA.GplotRelationComputerManage/SpaceRelation/SpaceComputerHandler.cs

@@ -0,0 +1,28 @@
+/*-------------------------------------------------------------------------
+ * 功能描述:SpaceComputerHandler
+ * 作者:xulisong
+ * 创建时间: 2018/12/12 15:19:40
+ * 版本号:v1.0
+ *  -------------------------------------------------------------------------*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SAGA.GplotRelationComputerManage
+{
+    /// <summary>
+    /// 空间计算相关
+    /// </summary>
+    public class SpaceComputerHandler
+    {
+        public List<object> GetParseData(SpaceComputerContext context)
+        {
+            List<object> items = new List<object>();
+          
+            return items;
+        }
+    }
+}

+ 30 - 0
MBI/SAGA.GplotRelationComputerManage/SpaceRelation/SpaceComputerManager.cs

@@ -0,0 +1,30 @@
+/*-------------------------------------------------------------------------
+ * 功能描述:SpaceComputerManager
+ * 作者:xulisong
+ * 创建时间: 2018/12/12 15:24:16
+ * 版本号:v1.0
+ *  -------------------------------------------------------------------------*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SAGA.GplotRelationComputerManage
+{
+    /// <summary>
+    /// 空间计算管理
+    /// </summary>
+    public class SpaceComputerManager
+    {
+        /// <summary>
+        /// 获取计算上下关系的空间类型
+        /// </summary>
+        /// <returns></returns>
+        public static List<string> GetUpSpaceFunTypes()
+        {
+            return new List<string>() { "140","150","1A0","1B0" };  
+        }
+    }
+}

+ 1 - 1
MBI/SAGA.MBI/WinView/Space/WinConfirm.xaml

@@ -6,7 +6,7 @@
              xmlns:local="clr-namespace:SAGA.MBI.WinView.Space"
              xmlns:windows="clr-namespace:SAGA.RevitUtils.Windows;assembly=SAGA.RevitUtils"
              mc:Ignorable="d" 
-              Width="400" Height="220" Title="{Binding TTitle}">
+              Width="400" Height="220" Title="{Binding TTitle}" WindowStartupLocation="CenterOwner">
    <windows:WinBase.Resources>
        <Style TargetType="Button">
            <Setter Property="Width" Value="100"/>

+ 2 - 1
MBI/SAGA.MBI/WinView/Space/WinCreateSpace.xaml.cs

@@ -617,7 +617,8 @@ namespace SAGA.MBI.WinView.Space
                     ShowMessage = "空间已发生变化,是否现在就上传模型并计算空间?",
                     TTitle = "空间计算确认",
                     BtnSure = "上传模型并计算空间",
-                    BtnCancel = "暂不计算"
+                    BtnCancel = "暂不计算",
+                    Owner=this,
                 };
 
                 var result = confirm.ShowDialog();

+ 1 - 1
MBI/SAGA.MBI/WinView/Upload/VMUploadModeManage.cs

@@ -119,7 +119,7 @@ namespace SAGA.MBI.WinView.Upload
                             CalcContext context = ufloor.CalcContext;
 
                             Log4Net.Debug($"开始上传楼层 {ufloor.MFloor} 数据");
-                            if (context != null && !context.Upload())
+                            if (context == null || !context.Upload())
                             {
                                 continue;
                             }

+ 1 - 0
MBI/SAGA.Models/MBIItem/Builder/RoomItemBuilder.cs

@@ -21,6 +21,7 @@ namespace SAGA.Models
             item.LocalName = infos.GetValueEx(MBIBuiltInParameter.RoomLocalName);
             item.CTM_MainPower = infos.GetValueEx(MBIBuiltInParameter.CTM_MainPower);
             item.CTM_StandbyPower = infos.GetValueEx(MBIBuiltInParameter.CTM_StandbyPower);
+            item.RoomFuncType = infos.GetValueEx(MBIBuiltInParameter.RoomFuncType);
             return item;
         }
     }

+ 4 - 1
MBI/SAGA.Models/MBIItem/Entity/RoomItem.cs

@@ -12,6 +12,9 @@ namespace SAGA.Models
     /// </summary>
     public class RoomItem : MBIItem
     {
-       
+        /// <summary>
+        /// 空间使用类型
+        /// </summary>
+       public string RoomFuncType { get; set; }
     }
 }

+ 5 - 0
MBI/SAGA.Models/MBIItem/MBIBuiltInParameter.cs

@@ -131,6 +131,11 @@ namespace SAGA.Models
          public readonly static string RoomLocalName = "RoomLocalName";
 
         /// <summary>
+        /// 空间使用类型
+        /// </summary>
+        public readonly static string RoomFuncType = "RoomFuncType";
+        
+        /// <summary>
         /// BimId
         /// </summary>
         public readonly static string BIMID = "BIMID";

+ 2 - 2
MBI/SAGA.RevitUtils/Log/DocumentLogManager.cs

@@ -35,7 +35,7 @@ namespace SAGA.RevitUtils.Log
         /// <summary>
         /// 写入日志文件key值
         /// </summary>
-        /// <param name="projectInfo"></param>
+        /// <param name="document"></param>
         /// <param name="fileKey"></param>
         public static void SetLogFileKey(Document document, string fileKey)
         {
@@ -44,7 +44,7 @@ namespace SAGA.RevitUtils.Log
         /// <summary>
         /// 获取日志文件key值
         /// </summary>
-        /// <param name="projectInfo"></param>
+        /// <param name="document"></param>
         /// <returns></returns>
         public static string GetLogFileKey(Document document)
         {