MBIConst.cs 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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 EmptyFilePath = Path.Combine(MBIResourcePath, "EmptyFile\\EmptyProject.rvt");
  29. public static readonly string ChangesRelationship = 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. public static string GoodHandLocalHost
  64. {
  65. get
  66. {
  67. string key = nameof(GoodHandLocalHost);
  68. string url = ProjectDirOperate.GetConfigureInfo(key);
  69. if (url.IsNullOrEmpty())
  70. {
  71. //url = "http://192.168.20.225:8080/godhand/";
  72. url = "http://101.200.32.13:28888/godhand/";
  73. ProjectDirOperate.SaveConfigureInfo(key, url);
  74. }
  75. return url;
  76. }
  77. }
  78. public static string ScanBuildingLocalHost
  79. {
  80. get
  81. {
  82. string key = nameof(ScanBuildingLocalHost);
  83. string url = ProjectDirOperate.GetConfigureInfo(key);
  84. if (url.IsNullOrEmpty())
  85. {
  86. // url = "http://172.16.3.12:8080/ScanBuilding/";
  87. url = "http://mbi.sagacloud.cn:8080/ScanBuilding/";
  88. ProjectDirOperate.SaveConfigureInfo(key, url);
  89. }
  90. return url;
  91. }
  92. }
  93. //html5的ulr地址,暂定
  94. public static string Html5DetailLocalHost
  95. {
  96. get
  97. {
  98. string key = nameof(Html5DetailLocalHost);
  99. string url = ProjectDirOperate.GetConfigureInfo(key);
  100. if (url.IsNullOrEmpty())
  101. {
  102. // url = "http://172.16.0.181:8889/#/";
  103. url = "http://mbi.sagacloud.cn:8889/#/";
  104. ProjectDirOperate.SaveConfigureInfo(key, url);
  105. }
  106. return url;
  107. }
  108. }
  109. public static string Html5ImageLocalHost
  110. {
  111. get
  112. {
  113. string key = nameof(Html5ImageLocalHost);
  114. string url = ProjectDirOperate.GetConfigureInfo(key);
  115. if (url.IsNullOrEmpty())
  116. {
  117. // url = "http://172.16.0.181:8890/";
  118. url = "http://mbi.sagacloud.cn:8890/";
  119. ProjectDirOperate.SaveConfigureInfo(key, url);
  120. }
  121. return url;
  122. }
  123. }
  124. public static string Html5ScanLocalHost
  125. {
  126. get
  127. {
  128. string key = nameof(Html5ScanLocalHost);
  129. string url = ProjectDirOperate.GetConfigureInfo(key);
  130. if (url.IsNullOrEmpty())
  131. {
  132. // url = "http://172.16.0.181:8888/#/";
  133. url = "http://mbi.sagacloud.cn:8888/#/";
  134. ProjectDirOperate.SaveConfigureInfo(key, url);
  135. }
  136. return url;
  137. }
  138. }
  139. /// <summary>
  140. /// 拓扑视图地址
  141. /// </summary>
  142. public static string GplotViewHost
  143. {
  144. get
  145. {
  146. string key = nameof(GplotViewHost);
  147. string url = ProjectDirOperate.GetConfigureInfo(key);
  148. if (url.IsNullOrEmpty())
  149. {
  150. url = "http://172.16.0.181:8888/#/";
  151. ProjectDirOperate.SaveConfigureInfo(key, url);
  152. }
  153. return url;
  154. }
  155. }
  156. public static readonly string ProjectManageSecret = "A123456";
  157. public static readonly string ProjectSecret = MBIControl.ProjectCur.Password;
  158. //revit文件服务器id和密码
  159. public static readonly string RevitServiceId = "revit";
  160. public static readonly string RevitServiceSecret = "63afbef6906c342b";
  161. //图片服务器id和密码
  162. public static readonly string DevServiceId = "dataPlatform";
  163. public static readonly string DevServiceSecret = "9e0891a7a8c8e885";
  164. public static string AccessKeyId = "LTAIHLlfCwmMRbV4";
  165. public static string AccessKeySecret = "TixG1tTpeNnM96FPVC33fumK8QAUsv";
  166. public static string Endpoint = "oss-cn-beijing.aliyuncs.com";
  167. /// <summary>
  168. /// 使用ossclient上传的文件地址(测试和线上地址不一样)
  169. /// </summary>
  170. public static string OssClientFileKey
  171. {
  172. get
  173. {
  174. string key = nameof(OssClientFileKey);
  175. string url = ProjectDirOperate.GetConfigureInfo(key);
  176. if (url.IsNullOrEmpty())
  177. {
  178. // url = "test/files/revit/";
  179. url = "files/revit/";
  180. ProjectDirOperate.SaveConfigureInfo(key, url);
  181. }
  182. return url;
  183. }
  184. }
  185. /// <summary>
  186. /// 拓扑图文件存放文件夹地址
  187. /// </summary>
  188. public static string OssGplotFilePrefix => $"test/files/revit/GplotData/{ IniOperator.GetData("CurProject", "ID")}";
  189. //信标族名称
  190. public static string BeaconFamilyName = "Beacon";
  191. //空间的code类型
  192. public static string SpaceCode = "ispace";
  193. }
  194. }