From ec0d0b6f8e3ac7791c736ae8aad69c4a1587cad9 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 11 九月 2024 10:14:44 +0800 Subject: [PATCH] xhs 和 bimface vmo改造 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs | 128 ++++++++++++++++++++++++++++++++++++------ 1 files changed, 110 insertions(+), 18 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs index 24adeb0..20df790 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/03-mgr/XhsProjectMgrViewModel.cs @@ -1,5 +1,6 @@ 锘縰sing DevExpress.Pdf.Native; using HStation.Service.Xhs; +using HStation.Vmo; namespace HStation.WinFrmUI { @@ -14,10 +15,85 @@ public XhsProjectMgrViewModel() { } - /// <summary> - /// - /// </summary> - public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project) + public enum eFileStatus + { + /// <summary> + /// 涓婁紶涓� + /// </summary> + [Display(Name = "涓婁紶涓�")] + Uploading, + + /// <summary> + /// 涓婁紶鎴愬姛 + /// </summary> + [Display(Name = "涓婁紶鎴愬姛")] + UploadSucceed, + + /// <summary> + /// 杞崲涓� + /// </summary> + [Display(Name = "杞崲涓�")] + Converting, + + /// <summary> + /// 杞崲鎴愬姛 + /// </summary> + [Display(Name = "杞崲鎴愬姛")] + ConvertSucceed, + + /// <summary> + /// 瀵规瘮涓� + /// </summary> + [Display(Name = "瀵规瘮涓�")] + Comparing, + + /// <summary> + /// 瀵规瘮鎴愬姛 + /// </summary> + [Display(Name = "瀵规瘮鎴愬姛")] + CompareSucceed, + + /// <summary> + /// 闆嗘垚涓� + /// </summary> + [Display(Name = "闆嗘垚涓�")] + Integrating, + + /// <summary> + /// 闆嗘垚鎴愬姛 + /// </summary> + [Display(Name = "闆嗘垚鎴愬姛")] + IntegrateSucceed, + + /// <summary> + /// 鏈笂浼� + /// </summary> + [Display(Name = "鏈笂浼�")] + Noupload, + } + + public XhsProjectMgrViewModel(XhsProjectExtensionsVmo project, bool IsHaveBimface, int BimfaceState, Yw.Vmo.Map.MapInfo mapInfo) + { + this.ID = project.ID; + this.ParentID = project.ParentID; + this.NO = project.NO; + this.Name = project.Name; + if (mapInfo != null) + { + this.Address = Yw.Model.Map.Marker.ToModel(mapInfo.Position).Address; + } + this.CreateTime = project.NO.Substring(4, 10); + + this.Customer = project.Customer; + this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags); + this.TagName = project.TagName; + this.SortCode = project.SortCode; + this.Description = project.Description; + this.IsHaveBimface = IsHaveBimface; + this.ModelState = (eFileStatus)BimfaceState; + } + + public void Reset(XhsProjectExtensionsVmo project) { this.ID = project.ID; this.ParentID = project.ParentID; @@ -31,15 +107,7 @@ this.Description = project.Description; } - /// <summary> - /// - /// </summary> - public XhsProjectMgrViewModel(Vmo.Xhs.XhsProjectExtensions project, bool hasLocation) : this(project) - { - this.HasLocation = hasLocation; - } - - public void Reset(Vmo.Xhs.XhsProjectExtensions project) + public void Reset(XhsProjectMgrViewModel project, int BimfaceState) { this.ID = project.ID; this.ParentID = project.ParentID; @@ -47,9 +115,22 @@ this.Name = project.Name; this.Address = project.Address; this.Customer = project.Customer; - this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags); this.TagName = project.TagName; this.SortCode = project.SortCode; + this.Description = project.Description; + this.ModelState = (eFileStatus)BimfaceState; + } + + public XhsProjectMgrViewModel(HStation.WinFrmUI.ImportXhsProjectViewModel project, int BimfaceState) + { + this.ID = (long)project.ProjectID; + this.NO = project.NO; + this.CreateTime = project.NO.Substring(4, 10); + this.Name = project.Name; + this.Address = project.Address; + this.Customer = project.Customer; + this.Flags = Yw.Untity.FlagsHelper.ToString(project.Flags); + this.TagName = project.TagName; this.Description = project.Description; } @@ -102,6 +183,12 @@ public string Address { get; set; } /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + [Display(Name = "鍒涘缓鏃堕棿")] + public string CreateTime { get; set; } + + /// <summary> /// 瀹㈡埛 /// </summary> [Display(Name = "瀹㈡埛鍚嶇О")] @@ -111,7 +198,7 @@ /// 妯″瀷鐘舵�� /// </summary> [Display(Name = "妯″瀷鐘舵��")] - public int ModelState { get; set; } + public eFileStatus? ModelState { get; set; } /// <summary> /// 鏍囩 @@ -137,10 +224,15 @@ [Display(Name = "璇存槑")] public string Description { get; set; } + /* /// <summary> + /// 瀹氫綅 + /// </summary> + [Display(Name = "瀹氫綅")] + public bool HasLocation { get; set; }*/ + /// <summary> - /// 瀹氫綅 + /// 鏄惁瀛樺湪涓夌淮妯″瀷 /// </summary> - [Display(Name = "瀹氫綅")] - public bool HasLocation { get; set; } + public bool IsHaveBimface { get; set; } } } \ No newline at end of file -- Gitblit v1.9.3