瀏覽代碼

xls:配置文件更新

xulisong 6 年之前
父節點
當前提交
a85ee122f9

+ 24 - 21
MBI/FirmLib/Com.FirmLib/Bll/EquipmentInfoPointBll.cs

@@ -3,6 +3,8 @@ using Com.FirmLib.Entity;
 using FirmHttpDao;
 using FWindSoft.Net.Http;
 using Newtonsoft.Json.Linq;
+using SAGA.DotNetUtils.Service;
+using SAGA.RevitUtils.Service;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -33,20 +35,20 @@ namespace Com.FirmLib.Bll
         public List<EquipmentInfoPointItem> SaasSysOrEqInfos(string code, string type = "equip")
         {
             List<EquipmentInfoPointItem> items = new List<EquipmentInfoPointItem>();
-            string url = BllHttpSetting.Instance.SaasUri + $"service/dict/infocode_query";
-          //  string url = MBIConst.ScanBuildingLocalHost + $"service/dict/infocode_query";
-            string app_type = "godhand";
-            JObject jObject = new JObject();
-            jObject.Add("user_id", "default");
-            jObject.Add("code", code);
-            jObject.Add("type", type);
-            jObject.Add("app_type", app_type);
-            //获取所有的信息点
-            jObject.Add("is_all", "1");
+            string url = BllHttpSetting.Instance.EquipmentUri + $"/infocode/query_property?type=" + code;
+            //string app_type = "godhand";
+            //JObject jObject = new JObject();
+            //jObject.Add("user_id", "default");
+            //jObject.Add("code", code);
+            //jObject.Add("type", type);
+            //jObject.Add("app_type", app_type);
+            ////获取所有的信息点
+            //jObject.Add("is_all", "1");
             HttpClient client = HttpClientManager.CreateClient();
-            var result = client.PostJosnAsync(new Uri(url, UriKind.RelativeOrAbsolute), jObject);
-            var stringResult = HandlerTaskResponse(result, new RequestInfo(url,jObject));
-            var flag = HandlerResult(stringResult, 
+            var result = client.GetAsync(new Uri(url, UriKind.RelativeOrAbsolute));
+            var stringResult = HandlerTaskResponse(result, new RequestInfo(url));
+            IInputService inputService = ServiceLocator.Current.GetService<IInputService>();
+            var flag = HandlerResult(stringResult,
                 (jo) => {
                     var content = jo["Content"];
                     foreach (JObject subj in content)
@@ -54,30 +56,31 @@ namespace Com.FirmLib.Bll
                         EquipmentInfoPointItem item = new EquipmentInfoPointItem();
                         item.Category = (string)subj["firstTag"];
                         item.SubCategory = (string)subj["secondTag"];
-                        item.Name = (string)subj["info_point_code"];
-                        item.CodeName = (string)subj["infopoint_code"];
+                        item.Name = (string)subj["infoPointName"];
+                        item.CodeName = (string)subj["infoPointCode"];
                         item.Unit = (string)subj["unit"];
                         item.Type = (string)subj["dataType"];
-                        item.InputType = (string)subj["base_cmpt_code"];
+                        item.InputType = (string)subj["inputMode"];
                         item.EnumSource = subj.GetCheckValue("dataSource");
                         item.Remark = (string)subj["note"];
                         item.Classification = (string)subj["classification"];
-                        item.IsShow = (string)subj["is_mapped"] == "1";
-                        item.CollectionCmptCode = (string)subj["collection_cmpt_code"];
+                        item.IsShow = true;// (string)subj["is_mapped"] == "1";
+                        item.CollectionCmptCode = inputService?.GetInputCode(item.InputType) ?? item.InputType;//(string)subj["collection_cmpt_code"];
                         items.Add(item);
                     }
-                 
+
                 }
             , (jo) => { this.ErrorMessage = jo["ResultMsg"].ToString(); });
 
             return items;//.Where(i=>i.Classification== "4").ToList();
 
+
         }
         /// <summary>
         /// 获取自定义信息点
         /// </summary>
         /// <returns></returns>
-        public  List<EquipmentInfoPointItem> UserDefineSysOrEqInfos(string projectId,string code)
+        public List<EquipmentInfoPointItem> UserDefineSysOrEqInfos(string projectId, string code)
         {
             List<EquipmentInfoPointItem> items = new List<EquipmentInfoPointItem>();
             //由于使用了相关的项目,是不是可以不过滤这个
@@ -85,7 +88,7 @@ namespace Com.FirmLib.Bll
 
             HttpClient client = HttpClientManager.CreateClient();
             var result = client.GetAsync(new Uri(url, UriKind.RelativeOrAbsolute));
-             var stringResult = HandlerTaskResponse(result, new RequestInfo(url));
+            var stringResult = HandlerTaskResponse(result, new RequestInfo(url));
             var flag = HandlerResult(stringResult,
                 (jo) => {
                     var content = jo["Content"];

二進制
MBI/MBIResource/Config/HttpSetting.xml


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

@@ -261,6 +261,10 @@ namespace SAGA.GplotRelationComputerManage
         #endregion
 
         #region 解析立管
+        /*
+         * 1、解析立管需要考虑,竖直风管,水管,空间的情况;
+         *2、将各层数据汇总,才能统一计算立管的相关关系数据
+         */
         private void ComputerVerticalPipes(Level refLevel, List<Pipe> pipes, SystemComputerContext context)
         {
             var result = new List<VerticalPipe>();