MBIConst.cs 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. /* ==============================================================================
  2. * 功能描述:MBIConst
  3. * 创 建 者:Garrett
  4. * 创建日期:2018/3/13 19:31:08
  5. * ==============================================================================*/
  6. using System;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using SAGA.DotNetUtils;
  13. using SAGA.DotNetUtils.Utilities;
  14. using SAGA.MBI.FileStream;
  15. namespace SAGA.MBI.Common
  16. {
  17. /// <summary>
  18. /// MBIConst
  19. /// </summary>
  20. public class MBIConst
  21. {
  22. public static readonly string ManageCur = "ManageCurLocalize.json";
  23. public static readonly string MBIAssistDBName = "MBIAssistData.db";
  24. public static readonly string MBISettingPath = Path.Combine(AppBaseInfo.AppTempFilePath, "MBI\\Settings");
  25. public static readonly string MBITempSettingPath = Path.Combine(AppBaseInfo.AppTempFilePath, "MBI\\SettingsTemp");
  26. public static readonly string MBIImagePath = AppBaseInfo.ImagePath;
  27. public static readonly string MBIResourcePath = Path.Combine(AppBaseInfo.AppRunPath, "MBIResource");
  28. public static readonly string MBIDataDictionaryPath = Path.Combine(MBIResourcePath, "DataDictionary");
  29. public static readonly string EmptyFilePath = Path.Combine(MBIResourcePath, "EmptyFile\\EmptyProject.rvt");
  30. public static readonly string BeaconFamilyFilePath = Path.Combine(AppBaseInfo.FamilyPath, "Beacon.rfa");
  31. public static readonly string SpaceTagFamilyFilePath = Path.Combine(AppBaseInfo.FamilyPath, "空间标记.rfa");
  32. //访问数据的地址
  33. public static string SaasLocalHost
  34. {
  35. get
  36. {
  37. string key = nameof(SaasLocalHost);
  38. string url = ProjectDirOperate.GetConfigureInfo(key);
  39. if (url.IsNullOrEmpty())
  40. {
  41. //url = "http://192.168.30.96:8080/";
  42. url = "http://mbi.sagacloud.cn:8080/";
  43. ProjectDirOperate.SaveConfigureInfo(key, url);
  44. }
  45. return url;
  46. }
  47. }
  48. public static string DataPlatformLocalHost
  49. {
  50. get
  51. {
  52. string key = nameof(DataPlatformLocalHost);
  53. string url = ProjectDirOperate.GetConfigureInfo(key);
  54. if (url.IsNullOrEmpty())
  55. {
  56. //url = "http://192.168.20.225:8080/";
  57. url = "http://service.sagacloud.cn:28888/";
  58. ProjectDirOperate.SaveConfigureInfo(key, url);
  59. }
  60. return url;
  61. }
  62. }
  63. /// <summary>
  64. /// 图片服务器,线上地址更新,
  65. /// 之前与DataPlatflorm一致 190123
  66. /// </summary>
  67. public static string ImageServiceLocalHost
  68. {
  69. get
  70. {
  71. string key = nameof(ImageServiceLocalHost);
  72. string url = ProjectDirOperate.GetConfigureInfo(key);
  73. if (url.IsNullOrEmpty())
  74. {
  75. //url = "http://192.168.20.225:8080/";
  76. url = "http://47.93.33.207:8889/";
  77. ProjectDirOperate.SaveConfigureInfo(key, url);
  78. }
  79. return url;
  80. }
  81. }
  82. public static string GoodHandLocalHost
  83. {
  84. get
  85. {
  86. string key = nameof(GoodHandLocalHost);
  87. string url = ProjectDirOperate.GetConfigureInfo(key);
  88. if (url.IsNullOrEmpty())
  89. {
  90. //url = "http://192.168.20.225:8080/godhand/";
  91. url = "http://101.200.32.13:28888/godhand/";
  92. ProjectDirOperate.SaveConfigureInfo(key, url);
  93. }
  94. return url;
  95. }
  96. }
  97. public static string ScanBuildingLocalHost
  98. {
  99. get
  100. {
  101. string key = nameof(ScanBuildingLocalHost);
  102. string url = ProjectDirOperate.GetConfigureInfo(key);
  103. if (url.IsNullOrEmpty())
  104. {
  105. // url = "http://172.16.3.12:8080/ScanBuilding/";
  106. url = "http://mbi.sagacloud.cn:8080/ScanBuilding/";
  107. ProjectDirOperate.SaveConfigureInfo(key, url);
  108. }
  109. return url;
  110. }
  111. }
  112. //html5的ulr地址,暂定
  113. public static string Html5DetailLocalHost
  114. {
  115. get
  116. {
  117. string key = nameof(Html5DetailLocalHost);
  118. string url = ProjectDirOperate.GetConfigureInfo(key);
  119. if (url.IsNullOrEmpty())
  120. {
  121. // url = "http://172.16.0.181:8889/#/";
  122. url = "http://mbi.sagacloud.cn:8889/#/";
  123. ProjectDirOperate.SaveConfigureInfo(key, url);
  124. }
  125. return url;
  126. }
  127. }
  128. public static string Html5ImageLocalHost
  129. {
  130. get
  131. {
  132. string key = nameof(Html5ImageLocalHost);
  133. string url = ProjectDirOperate.GetConfigureInfo(key);
  134. if (url.IsNullOrEmpty())
  135. {
  136. // url = "http://172.16.0.181:8890/";
  137. url = "http://mbi.sagacloud.cn:8890/";
  138. ProjectDirOperate.SaveConfigureInfo(key, url);
  139. }
  140. return url;
  141. }
  142. }
  143. public static string Html5ScanLocalHost
  144. {
  145. get
  146. {
  147. string key = nameof(Html5ScanLocalHost);
  148. string url = ProjectDirOperate.GetConfigureInfo(key);
  149. if (url.IsNullOrEmpty())
  150. {
  151. // url = "http://172.16.0.181:8888/#/";
  152. url = "http://mbi.sagacloud.cn:8888/#/";
  153. ProjectDirOperate.SaveConfigureInfo(key, url);
  154. }
  155. return url;
  156. }
  157. }
  158. /// <summary>
  159. /// 拓扑视图地址
  160. /// </summary>
  161. public static string GplotViewHost
  162. {
  163. get
  164. {
  165. string key = nameof(GplotViewHost);
  166. string url = ProjectDirOperate.GetConfigureInfo(key);
  167. if (url.IsNullOrEmpty())
  168. {
  169. url = "http://mbi.sagacloud.cn:8888/#/";
  170. ProjectDirOperate.SaveConfigureInfo(key, url);
  171. }
  172. return url;
  173. }
  174. }
  175. public static readonly string ProjectManageSecret = "A123456";
  176. public static readonly string ProjectSecret = MBIControl.ProjectCur.Password;
  177. //revit文件服务器id和密码
  178. public static readonly string RevitServiceId = "revit";
  179. public static readonly string RevitServiceSecret = "63afbef6906c342b";
  180. //图片服务器id和密码
  181. public static readonly string DevServiceId = "dataPlatform";
  182. public static readonly string DevServiceSecret = "9e0891a7a8c8e885";
  183. public static string AccessKeyId = "LTAIQVvCRivyl3Dd";
  184. public static string AccessKeySecret = "hkGLC7RgWUntbAS2Zw5rWOVS8Xhj0G";
  185. public static string Endpoint = "oss-cn-beijing.aliyuncs.com";
  186. public static string BucketName = "saga-data";
  187. /// <summary>
  188. /// 使用ossclient上传的文件地址(测试和线上地址不一样)
  189. /// </summary>
  190. public static string OssClientFileKey
  191. {
  192. get
  193. {
  194. string key = nameof(OssClientFileKey);
  195. string url = ProjectDirOperate.GetConfigureInfo(key);
  196. if (url.IsNullOrEmpty())
  197. {
  198. // url = "test/files/revit/";
  199. url = "files/revit/";
  200. ProjectDirOperate.SaveConfigureInfo(key, url);
  201. }
  202. return url;
  203. }
  204. }
  205. /// <summary>
  206. /// 拓扑图文件存放文件夹地址
  207. /// </summary>
  208. public static string OssGplotFilePrefix => $"test/files/revit/GplotData/{ IniOperator.GetData("CurProject", "ID")}";
  209. //信标族名称
  210. public static string BeaconFamilyName = "Beacon";
  211. //空间的code类型
  212. public static string SpaceCode = "ispace";
  213. }
  214. }