162 lines
5.1 KiB
C#
162 lines
5.1 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Collections.ObjectModel;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Runtime.CompilerServices;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
using Autodesk.Revit.DB;
|
|||
|
|
|
|||
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|||
|
|
|
|||
|
|
using EPPlus.Core.Extensions.Attributes;
|
|||
|
|
|
|||
|
|
namespace Szmedi.RvKits.InfoManager.EAMTools
|
|||
|
|
{
|
|||
|
|
internal partial class FacilityInformation : ObservableObject
|
|||
|
|
{
|
|||
|
|
[ExcelTableColumn("序号", isOptional: true)]
|
|||
|
|
public string Id { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("期别", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Period { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("线路", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string LineNumber { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("工点", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string WorkPoint { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("专业", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Major { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("设备编码", isOptional: true)]
|
|||
|
|
public string FacilityCode { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("资产编号", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string AssetNumber { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("设备名称", isOptional: true)]
|
|||
|
|
public string Name { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("功能位置", isOptional: true)]
|
|||
|
|
public string FunctionCode { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("设备系统代码", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string MajorSystemCode { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("设备分类代码", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string MajorCategoryCode { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("设备子类代码", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string MajorSubCategoryCode { get; set; }
|
|||
|
|
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("固定资产名称", isOptional: true)]
|
|||
|
|
public string AssetName { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("规格型号", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Specification { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("数量", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Count { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("单位", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Unit { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("责任部门编码", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string ResponsibleDepartmentCode { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("责任部门", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string ResponsibleDepartment { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("地理位置编码", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Geocoding { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("存放地点", isOptional: true)]
|
|||
|
|
public string Location { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("存放地点(盘点使用)", isOptional: true)]
|
|||
|
|
public string LocationDetail { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("责任人", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string ResponsiblePerson { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("房间编号", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string RoomNumber { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("设备编号", isOptional: true)]
|
|||
|
|
public string FacilityNumber { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("楼层", isOptional: true)]
|
|||
|
|
public string Floor { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("班组", isOptional: true)]
|
|||
|
|
[DoNotAutoGeneratColumn]
|
|||
|
|
public string Team { get; set; }
|
|||
|
|
|
|||
|
|
[ExcelTableColumn("备注", isOptional: true)]
|
|||
|
|
[ObservableProperty]
|
|||
|
|
[ReadOnly(false)]
|
|||
|
|
public partial string Comments { get; set; }
|
|||
|
|
|
|||
|
|
partial void OnCommentsChanged(string value)
|
|||
|
|
{
|
|||
|
|
var shouldBeChecked = value?.Contains("已填写") == true;
|
|||
|
|
if (IsChecked != shouldBeChecked)
|
|||
|
|
{
|
|||
|
|
IsChecked = shouldBeChecked;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
public FacilityInformation()
|
|||
|
|
{
|
|||
|
|
IsChecked = Comments?.Contains("已填写") == true;
|
|||
|
|
}
|
|||
|
|
[ObservableProperty]
|
|||
|
|
public partial bool IsChecked { get; set; }
|
|||
|
|
|
|||
|
|
partial void OnIsCheckedChanged(bool value)
|
|||
|
|
{
|
|||
|
|
if (value)
|
|||
|
|
{
|
|||
|
|
if (string.IsNullOrEmpty(Comments))
|
|||
|
|
{
|
|||
|
|
Comments = "已填写";
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (!Comments.Contains("已填写"))
|
|||
|
|
{
|
|||
|
|
Comments = "已填写";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if (!string.IsNullOrEmpty(Comments) && Comments.Contains("已填写"))
|
|||
|
|
{
|
|||
|
|
Comments = "未填写";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|