diff --git a/Model/Mapper/EntityMapper.cs b/Model/Mapper/EntityMapper.cs index 983bf3d..5acb5c1 100644 --- a/Model/Mapper/EntityMapper.cs +++ b/Model/Mapper/EntityMapper.cs @@ -321,116 +321,6 @@ namespace Model.Mapper /// /// EquipmentDto → EquipmentEntity /// - public static EquipmentEntity ToEntity(this EquipmentDto dto) - { - if (dto == null) return null; - return new EquipmentEntity - { - Id = ParseId(dto.Id), - IsDel = dto.IsDel, - CreateTime = dto.CreateTime, - Code = dto.Code, - Name = dto.Name, - CategoryId = dto.CategoryId, - Type = dto.Type, - Brand = dto.Brand, - Model = dto.Model, - Specifications = dto.Specifications, - Manufacturer = dto.Manufacturer, - Supplier = dto.Supplier, - ImageUrl = dto.ImageUrl, - QrCode = dto.QrCode, - Description = dto.Description, - Department = dto.Department, - Location = dto.Location, - ResponsiblePerson = dto.ResponsiblePerson, - ContactPhone = dto.ContactPhone, - Custodian = dto.Custodian, - PurchaseDate = dto.PurchaseDate, - PurchasePrice = dto.PurchasePrice, - WarrantyExpireDate = dto.WarrantyExpireDate, - AcceptanceDate = dto.AcceptanceDate, - EnableDate = dto.EnableDate, - ServiceLifeYears = dto.ServiceLifeYears, - ScrapDate = dto.ScrapDate, - Status = dto.Status, - CalibrationStatus = dto.CalibrationStatus, - LastCalibrationDate = dto.LastCalibrationDate, - NextCalibrationDate = dto.NextCalibrationDate, - InspectionDate = dto.InspectionDate, - NextInspectionDate = dto.NextInspectionDate, - MaintenanceStatus = dto.MaintenanceStatus, - LastMaintenanceDate = dto.LastMaintenanceDate, - NextMaintenanceDate = dto.NextMaintenanceDate, - Remark = dto.Remark, - CreateBy = dto.CreateBy, - UpdateBy = dto.UpdateBy, - UpdateTime = dto.UpdateTime - }; - } - - /// - /// EquipmentAttachmentDto → EquipmentAttachmentEntity - /// - public static EquipmentAttachmentEntity ToEntity(this EquipmentAttachmentDto dto) - { - if (dto == null) return null; - return new EquipmentAttachmentEntity - { - Id = ParseId(dto.Id), - IsDel = dto.IsDel, - CreateTime = dto.CreateTime, - EquipmentId = dto.EquipmentId, - FileName = dto.FileName, - FileType = dto.FileType, - FileExt = dto.FileExt, - FileUrl = dto.FileUrl, - FileSize = dto.FileSize, - Uploader = dto.Uploader, - Remark = dto.Remark - }; - } - - /// - /// EquipmentCategoryDto → EquipmentCategoryEntity - /// - public static EquipmentCategoryEntity ToEntity(this EquipmentCategoryDto dto) - { - if (dto == null) return null; - return new EquipmentCategoryEntity - { - Id = ParseId(dto.Id), - IsDel = dto.IsDel, - CreateTime = dto.CreateTime, - ParentId = dto.ParentId, - Name = dto.Name, - Code = dto.Code, - Level = dto.Level, - Sort = dto.Sort, - Remark = dto.Remark - }; - } - - /// - /// EquipmentStatusRecordDto → EquipmentStatusRecordEntity - /// - public static EquipmentStatusRecordEntity ToEntity(this EquipmentStatusRecordDto dto) - { - if (dto == null) return null; - return new EquipmentStatusRecordEntity - { - Id = ParseId(dto.Id), - IsDel = dto.IsDel, - CreateTime = dto.CreateTime, - EquipmentId = dto.EquipmentId, - FromStatus = dto.FromStatus, - ToStatus = dto.ToStatus, - ChangeTime = dto.ChangeTime, - Operator = dto.Operator, - Remark = dto.Remark - }; - } - /// /// TemperatureBoxDataDto → TemperatureBoxDataEntity ///