设备管理模块Entity添加和controller
This commit is contained in:
@@ -0,0 +1,229 @@
|
||||
using SqlSugar;
|
||||
|
||||
namespace Model.Entity.Asset
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备台账(资产台账)
|
||||
/// </summary>
|
||||
public class EquipmentEntity : BaseEntity
|
||||
{
|
||||
#region 基础信息(设备信息录入)
|
||||
/// <summary>
|
||||
/// 设备编号(唯一)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备分类Id(关联 EquipmentCategoryEntity.Id)
|
||||
/// </summary>
|
||||
public long CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备类型(实验室/楼层/部门/位置/产品/自定义等分类维度下的类型名称,冗余便于展示)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备品牌
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Brand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备型号
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Model { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格参数
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 200)]
|
||||
public string? Specifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 制造商(设备制造商)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Manufacturer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 供应商(资产供应商)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Supplier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备图片地址(图片上传后存储的相对路径)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 200)]
|
||||
public string? ImageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二维码编号(一物一码)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string? QrCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备描述
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDataType = "text")]
|
||||
public string? Description { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 权属与使用信息(设备分类管理:实验室/楼层/部门/位置)
|
||||
/// <summary>
|
||||
/// 使用部门名称(资产使用部门)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 100)]
|
||||
public string? Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 存放位置(实验室/楼层/房间等位置信息)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 200)]
|
||||
public string? Location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 责任人(资产责任人)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string? ResponsiblePerson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 责任人联系电话(资产责任人电话)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 30)]
|
||||
public string? ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保管人
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string? Custodian { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 购置与财务信息(资产全生命周期:采购阶段)
|
||||
/// <summary>
|
||||
/// 购置日期
|
||||
/// </summary>
|
||||
public DateTime? PurchaseDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 购置价格(资产购置价格)
|
||||
/// </summary>
|
||||
[SugarColumn(DecimalDigits = 2, Length = 18)]
|
||||
public decimal? PurchasePrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保修到期日期(资产保修到期)
|
||||
/// </summary>
|
||||
public DateTime? WarrantyExpireDate { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 生命周期信息(资产全生命周期:验收/使用/报废阶段)
|
||||
/// <summary>
|
||||
/// 验收日期(资产验收日期)
|
||||
/// </summary>
|
||||
public DateTime? AcceptanceDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 启用日期(资产启用日期)
|
||||
/// </summary>
|
||||
public DateTime? EnableDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 使用年限(资产使用年限,单位:年)
|
||||
/// </summary>
|
||||
public int? ServiceLifeYears { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报废日期(资产报废日期)
|
||||
/// </summary>
|
||||
public DateTime? ScrapDate { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 状态信息(设备状态管理:待验收→使用中→已借出→闲置→维修中→已停用→待处置→已处置→入库)
|
||||
/// <summary>
|
||||
/// 设备当前状态(状态流转记录见 EquipmentStatusRecordEntity)
|
||||
/// </summary>
|
||||
public EquipmentStatusEnum Status { get; set; } = EquipmentStatusEnum.PendingAcceptance;
|
||||
#endregion
|
||||
|
||||
#region 合规信息(设备合规管理:校准/检定/保养)
|
||||
/// <summary>
|
||||
/// 校准状态(正常/超期)
|
||||
/// </summary>
|
||||
public ComplianceStatusEnum CalibrationStatus { get; set; } = ComplianceStatusEnum.Normal;
|
||||
|
||||
/// <summary>
|
||||
/// 上次校准日期(校准日期)
|
||||
/// </summary>
|
||||
public DateTime? LastCalibrationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下次校准到期日期(用于判断是否超期)
|
||||
/// </summary>
|
||||
public DateTime? NextCalibrationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检定日期
|
||||
/// </summary>
|
||||
public DateTime? InspectionDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下次检定到期日期(用于判断是否超期)
|
||||
/// </summary>
|
||||
public DateTime? NextInspectionDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 保养状态(正常/超期)
|
||||
/// </summary>
|
||||
public ComplianceStatusEnum MaintenanceStatus { get; set; } = ComplianceStatusEnum.Normal;
|
||||
|
||||
/// <summary>
|
||||
/// 上次保养日期(保养日期)
|
||||
/// </summary>
|
||||
public DateTime? LastMaintenanceDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 下次保养到期日期(保养周期到期,用于判断是否超期)
|
||||
/// </summary>
|
||||
public DateTime? NextMaintenanceDate { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 审计信息
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 500)]
|
||||
public string? Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string? CreateBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人(修改人)
|
||||
/// </summary>
|
||||
[SugarColumn(Length = 50)]
|
||||
public string? UpdateBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间(修改时间)
|
||||
/// </summary>
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user