MBIConst.cs 8.2 KB

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