修改装置信息BUG
This commit is contained in:
parent
5a887bca90
commit
07042901ec
@ -104,20 +104,29 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
}
|
}
|
||||||
if (input.Id.HasValue)
|
if (input.Id.HasValue)
|
||||||
{
|
{
|
||||||
var entity = _boardCardInfoRepository.GetAll().FirstOrDefault(t => t.Id == input.Id);
|
InsertBoadHistory(input);
|
||||||
if (entity!=null)
|
|
||||||
{
|
|
||||||
entity.LastModificationTime = DateTime.Now;
|
|
||||||
entity.LastModifierUserId = base.GetCurrentUser().Id;
|
|
||||||
ObjectMapper.Map(input, entity);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var entity = ObjectMapper.Map<BoardCardInfo>(input);
|
var entity = ObjectMapper.Map<BoardCardInfo>(input);
|
||||||
entity.CreatorUserId = base.GetCurrentUser().Id;
|
entity.CreatorUserId = base.GetCurrentUser().Id;
|
||||||
entity.CreationTime = DateTime.Now;
|
entity.CreationTime = DateTime.Now;
|
||||||
await _boardCardInfoRepository.InsertAsync(entity);
|
entity = await _boardCardInfoRepository.InsertAsync(entity);
|
||||||
|
var boardHistory = new BoardCardHistory
|
||||||
|
{
|
||||||
|
ContentJson = JsonConvert.SerializeObject(entity),
|
||||||
|
CreationTime = DateTime.Now,
|
||||||
|
CreatorUserId = base.GetCurrentUser().Id,
|
||||||
|
Name = entity.BoardId,
|
||||||
|
RecodeDate = DateTime.Now,
|
||||||
|
BoardId = input.BoardId,
|
||||||
|
BoardCardInfoId = entity.Id,
|
||||||
|
ProtectionDeviceInfoId = input.ProtectionDeviceInfoId,
|
||||||
|
EventDescription ="新建板卡信息台账",
|
||||||
|
EventRecordType = EventRecordTypeEnum.Board,
|
||||||
|
SeqNo = 1
|
||||||
|
};
|
||||||
|
await _boardCardHistoryRepository.InsertAsync(boardHistory);
|
||||||
}
|
}
|
||||||
rst.Flag = true;
|
rst.Flag = true;
|
||||||
}
|
}
|
||||||
@ -131,6 +140,184 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
return rst;
|
return rst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void InsertBoadHistory(EditBoardCardInput input)
|
||||||
|
{
|
||||||
|
if (input.BoardId != null)
|
||||||
|
{
|
||||||
|
var entity = _boardCardInfoRepository.GetAllIncluding(t => t.ProtectionDeviceInfo)
|
||||||
|
.FirstOrDefault(t => t.Id == input.Id );
|
||||||
|
|
||||||
|
if (entity != null)
|
||||||
|
{
|
||||||
|
// 记录更新前的数据
|
||||||
|
var originalContent = JsonConvert.SerializeObject(entity);
|
||||||
|
|
||||||
|
// 初始化事件描述
|
||||||
|
StringBuilder eventDescription = new StringBuilder("板卡信息更新: ");
|
||||||
|
|
||||||
|
// 比较并更新字段
|
||||||
|
if (entity.SeqNo != input.SeqNo)
|
||||||
|
{
|
||||||
|
eventDescription.Append("顺序号更新, ");
|
||||||
|
entity.SeqNo = input.SeqNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.BoardType != input.BoardType)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"板卡类型更新为'{input.BoardType}', ");
|
||||||
|
entity.BoardType = input.BoardType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.HardwareVersion != input.HardwareVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"硬件版本更新为'{input.HardwareVersion}', ");
|
||||||
|
entity.HardwareVersion = input.HardwareVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.InterfaceVersion != input.InterfaceVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"接口程序版本更新为'{input.InterfaceVersion}', ");
|
||||||
|
entity.InterfaceVersion = input.InterfaceVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.InterfaceChecksum != input.InterfaceChecksum)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"接口程序校验码更新为'{input.InterfaceChecksum}', ");
|
||||||
|
entity.InterfaceChecksum = input.InterfaceChecksum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.ProtectionDatabaseVersion != input.ProtectionDatabaseVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"保护数据库版本更新为'{input.InterfaceDatabaseVersion}', ");
|
||||||
|
entity.ProtectionDatabaseVersion = input.ProtectionDatabaseVersion;
|
||||||
|
}
|
||||||
|
if (entity.InterfaceDatabaseVersion != input.InterfaceDatabaseVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"接口数据库版本更新为'{input.InterfaceDatabaseVersion}', ");
|
||||||
|
entity.InterfaceDatabaseVersion = input.InterfaceDatabaseVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (entity.ProtectionVersion != input.ProtectionVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"保护程序版本更新为'{input.ProtectionVersion}', ");
|
||||||
|
entity.ProtectionVersion = input.ProtectionVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.ProtectionChecksum != input.ProtectionChecksum)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"保护程序校验码更新为'{input.ProtectionChecksum}', ");
|
||||||
|
entity.ProtectionChecksum = input.ProtectionChecksum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.BootVersion != input.BootVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"BOOT 版本更新为'{input.BootVersion}', ");
|
||||||
|
entity.BootVersion = input.BootVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.Iec61850Version != input.Iec61850Version)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"IEC 61850 版本更新为'{input.Iec61850Version}', ");
|
||||||
|
entity.Iec61850Version = input.Iec61850Version;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.FpgaVersion != input.FpgaVersion)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"FPGA 版本更新为'{input.FpgaVersion}', ");
|
||||||
|
entity.FpgaVersion = input.FpgaVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.CidChecksum != input.CidChecksum)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"CID 校验码更新为'{input.CidChecksum}', ");
|
||||||
|
entity.CidChecksum = input.CidChecksum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.CcdChecksum != input.CcdChecksum)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"CCD 校验码更新为'{input.CcdChecksum}', ");
|
||||||
|
entity.CcdChecksum = input.CcdChecksum;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.InstallationDate != input.InstallationDate)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"安装时间更新为'{input.InstallationDate?.ToString()}', ");
|
||||||
|
entity.InstallationDate = input.InstallationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.ProductionDate != input.ProductionDate)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"生产日期更新为'{input.ProductionDate?.ToString()}', ");
|
||||||
|
entity.ProductionDate = input.ProductionDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.SerialNumber != input.SerialNumber)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"出厂编号更新为'{input.SerialNumber}', ");
|
||||||
|
entity.SerialNumber = input.SerialNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.VerificationPerson != input.VerificationPerson)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"检验人员更新为'{input.VerificationPerson}', ");
|
||||||
|
entity.VerificationPerson = input.VerificationPerson;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.VerificationDate != input.VerificationDate)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"检验日期更新为'{input.VerificationDate}', ");
|
||||||
|
entity.VerificationDate = input.VerificationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entity.VerificationRecords != input.VerificationRecords)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"检验记录更新为'{input.VerificationRecords}', ");
|
||||||
|
entity.VerificationRecords = input.VerificationRecords;
|
||||||
|
}
|
||||||
|
if (entity.MaintenanceRecord != input.MaintenanceRecord)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"维修记录更新为'{input.MaintenanceRecord}', ");
|
||||||
|
entity.MaintenanceRecord = input.MaintenanceRecord;
|
||||||
|
}
|
||||||
|
if (entity.IsActive != input.IsActive)
|
||||||
|
{
|
||||||
|
eventDescription.Append($"是否在用更新为'{input.IsActive}', ");
|
||||||
|
entity.IsActive = input.IsActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 检查是否有变化并记录历史
|
||||||
|
var updatedContent = JsonConvert.SerializeObject(entity);
|
||||||
|
|
||||||
|
// 如果数据发生了变化,则记录历史
|
||||||
|
if (originalContent != updatedContent)
|
||||||
|
{
|
||||||
|
var history = new BoardCardHistory
|
||||||
|
{
|
||||||
|
ProtectionDeviceInfoId = entity.ProtectionDeviceInfoId,
|
||||||
|
CreationTime = DateTime.Now,
|
||||||
|
BoardId = entity.BoardId,
|
||||||
|
SeqNo = 1,
|
||||||
|
Name = entity.BoardId,
|
||||||
|
BoardCardInfoId = entity.Id,
|
||||||
|
RecodeDate = DateTime.Now,
|
||||||
|
ContentJson = originalContent, // 记录更新前的内容
|
||||||
|
ContentNewJson = updatedContent, // 记录更新后的内容
|
||||||
|
EventDescription = eventDescription.ToString().TrimEnd(','),
|
||||||
|
EventRecordType = EventRecordTypeEnum.Board, // 假设更新为事件类型
|
||||||
|
Remark = "自动记录板卡信息更新",
|
||||||
|
IsSend = false // 如果不需要立即发送给主站
|
||||||
|
};
|
||||||
|
|
||||||
|
// 保存历史记录
|
||||||
|
_boardCardHistoryRepository.Insert(history);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 扫码枪输入设备信息
|
/// 扫码枪输入设备信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -200,37 +200,37 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
|
|
||||||
if (entity.Name != input.Name)
|
if (entity.Name != input.Name)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"设备名称更新为'{input.Name}', ");
|
eventDescription.Append($"设备名称更新:'{input.Name}', ");
|
||||||
entity.Name = input.Name;
|
entity.Name = input.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.Specification != input.Specification)
|
if (entity.Specification != input.Specification)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"规格更新为'{input.Specification}', ");
|
eventDescription.Append($"规格更新:'{input.Specification}', ");
|
||||||
entity.Specification = input.Specification;
|
entity.Specification = input.Specification;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.DeviceAddress != input.DeviceAddress)
|
if (entity.DeviceAddress != input.DeviceAddress)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"设备地址更新为'{input.DeviceAddress}', ");
|
eventDescription.Append($"设备地址更新:'{input.DeviceAddress}', ");
|
||||||
entity.DeviceAddress = input.DeviceAddress;
|
entity.DeviceAddress = input.DeviceAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.BaselineBoardVersion != input.BaselineBoardVersion)
|
if (entity.BaselineBoardVersion != input.BaselineBoardVersion)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"基板版本更新为'{input.BaselineBoardVersion}', ");
|
eventDescription.Append($"基板版本更新:'{input.BaselineBoardVersion}', ");
|
||||||
entity.BaselineBoardVersion = input.BaselineBoardVersion;
|
entity.BaselineBoardVersion = input.BaselineBoardVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.HardwareVersion != input.HardwareVersion)
|
if (entity.HardwareVersion != input.HardwareVersion)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"硬件版本更新为'{input.HardwareVersion}', ");
|
eventDescription.Append($"硬件版本更新:'{input.HardwareVersion}', ");
|
||||||
entity.HardwareVersion = input.HardwareVersion;
|
entity.HardwareVersion = input.HardwareVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.IsActive != input.IsActive)
|
if (entity.IsActive != input.IsActive)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"启用状态更新为'{input.IsActive}', ");
|
eventDescription.Append($"启用状态更新:'{input.IsActive}', ");
|
||||||
entity.IsActive = input.IsActive;
|
entity.IsActive = input.IsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,55 +239,55 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
{
|
{
|
||||||
if (entity.EquipmentInfo.ManufacturerInfoId != input.ManufacturerInfoId)
|
if (entity.EquipmentInfo.ManufacturerInfoId != input.ManufacturerInfoId)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"制造商ID更新为'{input.ManufacturerInfoId}', ");
|
eventDescription.Append($"制造商ID更新:'{input.ManufacturerInfoId}', ");
|
||||||
entity.EquipmentInfo.ManufacturerInfoId = input.ManufacturerInfoId;
|
entity.EquipmentInfo.ManufacturerInfoId = input.ManufacturerInfoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.Name != input.Name)
|
if (entity.EquipmentInfo.Name != input.Name)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"设备名称更新为'{input.Name}', ");
|
eventDescription.Append($"设备名称更新:'{input.Name}', ");
|
||||||
entity.EquipmentInfo.Name = input.Name;
|
entity.EquipmentInfo.Name = input.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.InstallationDate != input.InstallationDate)
|
if (entity.EquipmentInfo.InstallationDate != input.InstallationDate)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"安装日期更新为'{input.InstallationDate}', ");
|
eventDescription.Append($"安装日期更新:'{input.InstallationDate}', ");
|
||||||
entity.EquipmentInfo.InstallationDate = input.InstallationDate;
|
entity.EquipmentInfo.InstallationDate = input.InstallationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.ProductionDate != input.ProductionDate)
|
if (entity.EquipmentInfo.ProductionDate != input.ProductionDate)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"生产日期更新为'{input.ProductionDate}', ");
|
eventDescription.Append($"生产日期更新:'{input.ProductionDate}', ");
|
||||||
entity.EquipmentInfo.ProductionDate = input.ProductionDate;
|
entity.EquipmentInfo.ProductionDate = input.ProductionDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.FactorySerialNumber != input.FactorySerialNumber)
|
if (entity.EquipmentInfo.FactorySerialNumber != input.FactorySerialNumber)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"出厂序列号更新为'{input.FactorySerialNumber}', ");
|
eventDescription.Append($"出厂序列号更新:'{input.FactorySerialNumber}', ");
|
||||||
entity.EquipmentInfo.FactorySerialNumber = input.FactorySerialNumber;
|
entity.EquipmentInfo.FactorySerialNumber = input.FactorySerialNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.VerificationPerson != input.VerificationPerson)
|
if (entity.EquipmentInfo.VerificationPerson != input.VerificationPerson)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"验证人更新为'{input.VerificationPerson}', ");
|
eventDescription.Append($"验证人更新:'{input.VerificationPerson}', ");
|
||||||
entity.EquipmentInfo.VerificationPerson = input.VerificationPerson;
|
entity.EquipmentInfo.VerificationPerson = input.VerificationPerson;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.VerificationDate != input.VerificationDate)
|
if (entity.EquipmentInfo.VerificationDate != input.VerificationDate)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"验证日期更新为'{input.VerificationDate}', ");
|
eventDescription.Append($"验证日期更新:'{input.VerificationDate}', ");
|
||||||
entity.EquipmentInfo.VerificationDate = input.VerificationDate;
|
entity.EquipmentInfo.VerificationDate = input.VerificationDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.VerificationRecords != input.VerificationRecords)
|
if (entity.EquipmentInfo.VerificationRecords != input.VerificationRecords)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"验证记录更新为'{input.VerificationRecords}', ");
|
eventDescription.Append($"验证记录更新:'{input.VerificationRecords}', ");
|
||||||
entity.EquipmentInfo.VerificationRecords = input.VerificationRecords;
|
entity.EquipmentInfo.VerificationRecords = input.VerificationRecords;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity.EquipmentInfo.MaintenanceRecord != input.MaintenanceRecord)
|
if (entity.EquipmentInfo.MaintenanceRecord != input.MaintenanceRecord)
|
||||||
{
|
{
|
||||||
eventDescription.Append($"维护记录更新为'{input.MaintenanceRecord}', ");
|
eventDescription.Append($"维修记录更新:'{input.MaintenanceRecord}', ");
|
||||||
entity.EquipmentInfo.MaintenanceRecord = input.MaintenanceRecord;
|
entity.EquipmentInfo.MaintenanceRecord = input.MaintenanceRecord;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
ContentJson = originalContent, // 记录更新前的内容
|
ContentJson = originalContent, // 记录更新前的内容
|
||||||
ContentNewJson = updatedContent, // 记录更新后的内容
|
ContentNewJson = updatedContent, // 记录更新后的内容
|
||||||
EventDescription = eventDescription.ToString().TrimEnd(','),
|
EventDescription = eventDescription.ToString().TrimEnd(','),
|
||||||
EventRecordType = EventRecordTypeEnum.Device, // 假设更新为事件类型
|
EventRecordType = EventRecordTypeEnum.Device, // 假设更新:事件类型
|
||||||
Remark = "自动记录设备信息更新",
|
Remark = "自动记录设备信息更新",
|
||||||
IsSend = false // 如果不需要立即发送给主站
|
IsSend = false // 如果不需要立即发送给主站
|
||||||
};
|
};
|
||||||
@ -393,6 +393,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
{
|
{
|
||||||
eventDescription.AppendLine($"更改了设备的生产日期: {protectionDevice.EquipmentInfo.ProductionDate} -> {input.ProductionDate}");
|
eventDescription.AppendLine($"更改了设备的生产日期: {protectionDevice.EquipmentInfo.ProductionDate} -> {input.ProductionDate}");
|
||||||
}
|
}
|
||||||
|
deviceHistory.Name = protectionDevice.Name;
|
||||||
deviceHistory.EventDescription = eventDescription.ToString();
|
deviceHistory.EventDescription = eventDescription.ToString();
|
||||||
deviceHistory.EventRecordType = EventRecordTypeEnum.Device;
|
deviceHistory.EventRecordType = EventRecordTypeEnum.Device;
|
||||||
deviceHistory.Remark = input.Remark;
|
deviceHistory.Remark = input.Remark;
|
||||||
@ -582,7 +583,7 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
.Where(t => t.ProtectionDeviceInfoId == protectionDevice.Id)
|
.Where(t => t.ProtectionDeviceInfoId == protectionDevice.Id)
|
||||||
.OrderByDescending(t=>t.RecodeDate)
|
.OrderByDescending(t=>t.RecodeDate)
|
||||||
;
|
;
|
||||||
ObjectMapper.Map<List<ProtectionDeviceHistoryOutput>>(entitys);
|
historys = ObjectMapper.Map<List<ProtectionDeviceHistoryOutput>>(entitys);
|
||||||
rst.Flag = true;
|
rst.Flag = true;
|
||||||
rst.ResultData = historys;
|
rst.ResultData = historys;
|
||||||
}
|
}
|
||||||
@ -1290,12 +1291,12 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
data.BaselineBoardVersion = "v1.100.001";
|
data.BaselineBoardVersion = "v1.100.001";
|
||||||
data.Specification = "110V 1A";
|
data.Specification = "110V 1A";
|
||||||
data.EquipmentInfo.FactorySerialNumber = "210"+ random.Next(100000, 1000000).ToString();
|
data.EquipmentInfo.FactorySerialNumber = "210"+ random.Next(100000, 1000000).ToString();
|
||||||
// 设置出厂时间为当前日期的前一天(您可以根据需求调整时间)
|
// 设置出厂时间:当前日期的前一天(您可以根据需求调整时间)
|
||||||
data.EquipmentInfo.ProductionDate = DateTime.Now.AddDays(-100);
|
data.EquipmentInfo.ProductionDate = DateTime.Now.AddDays(-100);
|
||||||
// 设置检验人员
|
// 设置检验人员
|
||||||
data.EquipmentInfo.VerificationPerson = "贺严玲"; // 请替换为实际人员名称
|
data.EquipmentInfo.VerificationPerson = "贺严玲"; // 请替换:实际人员名称
|
||||||
// 设置检验日期为当前日期
|
// 设置检验日期:当前日期
|
||||||
data.EquipmentInfo.VerificationDate = DateTime.Now.AddDays(0).ToString("yyyy-MM-dd"); // 日期格式为 "yyyy-MM-dd"
|
data.EquipmentInfo.VerificationDate = DateTime.Now.AddDays(0).ToString("yyyy-MM-dd"); // 日期格式: "yyyy-MM-dd"
|
||||||
// 设置检验记录内容
|
// 设置检验记录内容
|
||||||
data.EquipmentInfo.VerificationRecords = "检验装置外观及功能,均符合要求";
|
data.EquipmentInfo.VerificationRecords = "检验装置外观及功能,均符合要求";
|
||||||
|
|
||||||
@ -1334,10 +1335,10 @@ namespace YunDa.ISAS.Application.GeneralInformation
|
|||||||
EditProtectionQrCodeDeviceInfoInput deviceInfo = new EditProtectionQrCodeDeviceInfoInput
|
EditProtectionQrCodeDeviceInfoInput deviceInfo = new EditProtectionQrCodeDeviceInfoInput
|
||||||
{
|
{
|
||||||
Name = data.Name, // 示例装置名称
|
Name = data.Name, // 示例装置名称
|
||||||
SerialNumber = "210" + random.Next(100000, 1000000).ToString(), // 出厂编号设为 "210" 开头 + 6 位随机数
|
SerialNumber = "210" + random.Next(100000, 1000000).ToString(), // 出厂编号设: "210" 开头 + 6 位随机数
|
||||||
ProductionDate = new DateTime(2023, 5, 15), // 示例生产日期
|
ProductionDate = new DateTime(2023, 5, 15), // 示例生产日期
|
||||||
VerificationPerson = "贺严玲", // 示例检验人员
|
VerificationPerson = "贺严玲", // 示例检验人员
|
||||||
VerificationDate = DateTime.Now.AddDays(-100+i).ToString("yyyy-MM-dd"), // 检验日期设为当前日期
|
VerificationDate = DateTime.Now.AddDays(-100+i).ToString("yyyy-MM-dd"), // 检验日期设:当前日期
|
||||||
VerificationRecords = "检验装置外观及功能,均符合要求" // 示例检验记录
|
VerificationRecords = "检验装置外观及功能,均符合要求" // 示例检验记录
|
||||||
};
|
};
|
||||||
using (var unitOfWork = _unitOfWorkManager.Begin())
|
using (var unitOfWork = _unitOfWorkManager.Begin())
|
||||||
|
@ -36,8 +36,14 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD
|
|||||||
|
|
||||||
public string InterfaceChecksum { get; set; } // 接口程序校验码
|
public string InterfaceChecksum { get; set; } // 接口程序校验码
|
||||||
|
|
||||||
public string DatabaseVersion { get; set; } // 数据库版本
|
/// <summary>
|
||||||
|
/// 接口数据库版本
|
||||||
|
/// </summary>
|
||||||
|
public string InterfaceDatabaseVersion { get; set; } // 数据库版本
|
||||||
|
/// <summary>
|
||||||
|
/// 保护数据库版本
|
||||||
|
/// </summary>
|
||||||
|
public string ProtectionDatabaseVersion { get; set; } // 数据库版本
|
||||||
public string ProtectionVersion { get; set; } // 保护程序版本
|
public string ProtectionVersion { get; set; } // 保护程序版本
|
||||||
|
|
||||||
public string ProtectionChecksum { get; set; } // 保护程序校验码
|
public string ProtectionChecksum { get; set; } // 保护程序校验码
|
||||||
@ -64,6 +70,15 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string VerificationDate { get; set; }
|
public virtual string VerificationDate { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 安装时间
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime? InstallationDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 出厂时间
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime? ProductionDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// 检验记录
|
/// 检验记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string VerificationRecords { get; set; }
|
public virtual string VerificationRecords { get; set; }
|
||||||
|
@ -31,7 +31,14 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD
|
|||||||
|
|
||||||
public string InterfaceChecksum { get; set; } // 接口程序校验码
|
public string InterfaceChecksum { get; set; } // 接口程序校验码
|
||||||
|
|
||||||
public string DatabaseVersion { get; set; } // 数据库版本
|
/// <summary>
|
||||||
|
/// 接口数据库版本
|
||||||
|
/// </summary>
|
||||||
|
public string InterfaceDatabaseVersion { get; set; } // 数据库版本
|
||||||
|
/// <summary>
|
||||||
|
/// 保护数据库版本
|
||||||
|
/// </summary>
|
||||||
|
public string ProtectionDatabaseVersion { get; set; } // 数据库版本
|
||||||
|
|
||||||
public string ProtectionVersion { get; set; } // 保护程序版本
|
public string ProtectionVersion { get; set; } // 保护程序版本
|
||||||
|
|
||||||
@ -71,7 +78,10 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD
|
|||||||
/// 检验记录
|
/// 检验记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string VerificationRecords { get; set; }
|
public virtual string VerificationRecords { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 维修记录
|
||||||
|
/// </summary>
|
||||||
|
public virtual string MaintenanceRecord { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using YunDa.ISAS.Entities.AuditCommon;
|
using YunDa.ISAS.Entities.AuditCommon;
|
||||||
using YunDa.SOMS.Entities.GeneralInformation;
|
using YunDa.SOMS.Entities.GeneralInformation;
|
||||||
@ -27,7 +28,7 @@ namespace YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoD
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Guid? ProtectionDeviceInfoId { get; set; }
|
public virtual Guid? ProtectionDeviceInfoId { get; set; }
|
||||||
[ForeignKey(nameof(ProtectionDeviceInfoId))]
|
[ForeignKey(nameof(ProtectionDeviceInfoId))]
|
||||||
public virtual ProtectionDeviceInfo ProtectionDeviceInfo { get; set; }
|
[JsonIgnore]public virtual ProtectionDeviceInfo ProtectionDeviceInfo { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 记录时间
|
/// 记录时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -14467,6 +14467,16 @@
|
|||||||
顺序号
|
顺序号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.InterfaceDatabaseVersion">
|
||||||
|
<summary>
|
||||||
|
接口数据库版本
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.ProtectionDatabaseVersion">
|
||||||
|
<summary>
|
||||||
|
保护数据库版本
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.SerialNumber">
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.SerialNumber">
|
||||||
<summary>
|
<summary>
|
||||||
出厂编号
|
出厂编号
|
||||||
@ -14482,6 +14492,16 @@
|
|||||||
检验日期
|
检验日期
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.InstallationDate">
|
||||||
|
<summary>
|
||||||
|
安装时间
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.ProductionDate">
|
||||||
|
<summary>
|
||||||
|
出厂时间
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.VerificationRecords">
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.BoardCardInfoOutput.VerificationRecords">
|
||||||
<summary>
|
<summary>
|
||||||
检验记录
|
检验记录
|
||||||
@ -14512,6 +14532,16 @@
|
|||||||
顺序号
|
顺序号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.InterfaceDatabaseVersion">
|
||||||
|
<summary>
|
||||||
|
接口数据库版本
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.ProtectionDatabaseVersion">
|
||||||
|
<summary>
|
||||||
|
保护数据库版本
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.InstallationDate">
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.InstallationDate">
|
||||||
<summary>
|
<summary>
|
||||||
安装时间
|
安装时间
|
||||||
@ -14542,6 +14572,11 @@
|
|||||||
检验记录
|
检验记录
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.MaintenanceRecord">
|
||||||
|
<summary>
|
||||||
|
维修记录
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.Remark">
|
<member name="P:YunDa.SOMS.DataTransferObject.GeneralInformation.ProtectionDeviceInfoDto.EditBoardCardInput.Remark">
|
||||||
<summary>
|
<summary>
|
||||||
备注
|
备注
|
||||||
|
@ -310,11 +310,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label class="col-sm-3 control-label">数据库版本:</label>
|
<label class="col-sm-3 control-label">接口数据库版本:</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" placeholder="请输入数据库版本" v-model="databaseVersion" name="databaseVersion">
|
<input type="text" class="form-control" placeholder="请输入数据库版本" v-model="interfaceDatabaseVersion" name="interfaceDatabaseVersion">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="col-sm-3 control-label">保护数据库版本:</label>
|
||||||
|
<div class="col-sm-9">
|
||||||
|
<input type="text" class="form-control" placeholder="请输入数据库版本" v-model="protectionDatabaseVersion" name="protectionDatabaseVersion">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-sm-6">
|
<div class="form-group col-sm-6">
|
||||||
<label class="col-sm-3 control-label">保护程序版本:</label>
|
<label class="col-sm-3 control-label">保护程序版本:</label>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
protectionDeviceList.initListFunc();
|
protectionDeviceList.initListFunc();
|
||||||
|
boardCardInfoList.initEditModalValue();
|
||||||
substationTree.isShowEquipment = false;
|
substationTree.isShowEquipment = false;
|
||||||
substationTree.initTree(subTreeChanged);
|
substationTree.initTree(subTreeChanged);
|
||||||
protectionDeviceList.boardCardItemHtml = $('#boardCardItemDetail').html();
|
protectionDeviceList.boardCardItemHtml = $('#boardCardItemDetail').html();
|
||||||
@ -431,6 +432,7 @@ var protectionDeviceList = {
|
|||||||
protectionDeviceList.editModalVue.verificationPerson = rowData.equipmentInfo.verificationPerson;
|
protectionDeviceList.editModalVue.verificationPerson = rowData.equipmentInfo.verificationPerson;
|
||||||
protectionDeviceList.editModalVue.verificationDate = (new Date(rowData.equipmentInfo.verificationDate)).Format("yyyy-MM-dd");
|
protectionDeviceList.editModalVue.verificationDate = (new Date(rowData.equipmentInfo.verificationDate)).Format("yyyy-MM-dd");
|
||||||
protectionDeviceList.editModalVue.verificationRecords = rowData.equipmentInfo.verificationRecords;
|
protectionDeviceList.editModalVue.verificationRecords = rowData.equipmentInfo.verificationRecords;
|
||||||
|
protectionDeviceList.editModalVue.maintenanceRecord = rowData.equipmentInfo.maintenanceRecord;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
protectionDeviceList.editModalVue.id =null;
|
protectionDeviceList.editModalVue.id =null;
|
||||||
@ -490,7 +492,7 @@ var boardCardInfoList = {
|
|||||||
//初始化任务单
|
//初始化任务单
|
||||||
initboardCardInfoList: function () {
|
initboardCardInfoList: function () {
|
||||||
boardCardInfoList.initComponent();
|
boardCardInfoList.initComponent();
|
||||||
boardCardInfoList.initEditModalValue();
|
|
||||||
},
|
},
|
||||||
//初始化任务单个按钮事件
|
//初始化任务单个按钮事件
|
||||||
initComponent: function () {
|
initComponent: function () {
|
||||||
@ -498,6 +500,7 @@ var boardCardInfoList = {
|
|||||||
boardCardInfoList.refreshTable();
|
boardCardInfoList.refreshTable();
|
||||||
});
|
});
|
||||||
$("#addItemBtn").click(function () {
|
$("#addItemBtn").click(function () {
|
||||||
|
//boardCardInfoList.initEditModalValue();
|
||||||
boardCardInfoList.initEditFormValidate();
|
boardCardInfoList.initEditFormValidate();
|
||||||
boardCardInfoList.initEditModalValues();
|
boardCardInfoList.initEditModalValues();
|
||||||
$('#' + boardCardInfoList.editModalId).modal('show');
|
$('#' + boardCardInfoList.editModalId).modal('show');
|
||||||
@ -592,12 +595,20 @@ var boardCardInfoList = {
|
|||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'databaseVersion', // 数据库版本
|
field: 'interfaceDatabaseVersion', // 数据库版本
|
||||||
title: '数据库版本',
|
title: '接口数据库版本',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valign: 'middle',
|
valign: 'middle',
|
||||||
visible: false
|
visible: false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'protectionDatabaseVersion', // 数据库版本
|
||||||
|
title: '接口数据库版本',
|
||||||
|
align: 'center',
|
||||||
|
valign: 'middle',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'protectionVersion', // 保护程序版本
|
field: 'protectionVersion', // 保护程序版本
|
||||||
title: '保护程序版本',
|
title: '保护程序版本',
|
||||||
@ -678,9 +689,7 @@ var boardCardInfoList = {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
valign: 'middle',
|
valign: 'middle',
|
||||||
visible: true,
|
visible: true,
|
||||||
formatter: function (value, row, index) {
|
|
||||||
return value ? value : "-";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'maintenanceRecord', // 检验记录
|
field: 'maintenanceRecord', // 检验记录
|
||||||
@ -688,9 +697,7 @@ var boardCardInfoList = {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
valign: 'middle',
|
valign: 'middle',
|
||||||
visible: true,
|
visible: true,
|
||||||
formatter: function (value, row, index) {
|
|
||||||
return value ? value : "-";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'remark', // 备注
|
field: 'remark', // 备注
|
||||||
@ -698,9 +705,7 @@ var boardCardInfoList = {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
valign: 'middle',
|
valign: 'middle',
|
||||||
visible: true,
|
visible: true,
|
||||||
formatter: function (value, row, index) {
|
|
||||||
return value ? value : "-";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'operation', // 操作
|
field: 'operation', // 操作
|
||||||
@ -731,7 +736,9 @@ var boardCardInfoList = {
|
|||||||
hardwareVersion: '',
|
hardwareVersion: '',
|
||||||
interfaceVersion: '',
|
interfaceVersion: '',
|
||||||
interfaceChecksum: '',
|
interfaceChecksum: '',
|
||||||
databaseVersion: '',
|
interfaceVersion: '',
|
||||||
|
protectionDatabaseVersion: '',
|
||||||
|
interfaceDatabaseVersion:'',
|
||||||
protectionVersion: '',
|
protectionVersion: '',
|
||||||
protectionChecksum: '',
|
protectionChecksum: '',
|
||||||
bootVersion: '',
|
bootVersion: '',
|
||||||
@ -767,8 +774,8 @@ var boardCardInfoList = {
|
|||||||
hardwareVersion: this.hardwareVersion,
|
hardwareVersion: this.hardwareVersion,
|
||||||
interfaceVersion: this.interfaceVersion,
|
interfaceVersion: this.interfaceVersion,
|
||||||
interfaceChecksum: this.interfaceChecksum,
|
interfaceChecksum: this.interfaceChecksum,
|
||||||
databaseVersion: this.databaseVersion,
|
interfaceDatabaseVersion: this.interfaceDatabaseVersion,
|
||||||
protectionVersion: this.protectionVersion,
|
protectionDatabaseVersion: this.protectionDatabaseVersion,
|
||||||
protectionChecksum: this.protectionChecksum,
|
protectionChecksum: this.protectionChecksum,
|
||||||
bootVersion: this.bootVersion,
|
bootVersion: this.bootVersion,
|
||||||
iec61850Version: this.iec61850Version,
|
iec61850Version: this.iec61850Version,
|
||||||
@ -834,7 +841,8 @@ var boardCardInfoList = {
|
|||||||
boardCardInfoList.editModalVue.hardwareVersion = rowData.hardwareVersion;
|
boardCardInfoList.editModalVue.hardwareVersion = rowData.hardwareVersion;
|
||||||
boardCardInfoList.editModalVue.interfaceVersion = rowData.interfaceVersion;
|
boardCardInfoList.editModalVue.interfaceVersion = rowData.interfaceVersion;
|
||||||
boardCardInfoList.editModalVue.interfaceChecksum = rowData.interfaceChecksum;
|
boardCardInfoList.editModalVue.interfaceChecksum = rowData.interfaceChecksum;
|
||||||
boardCardInfoList.editModalVue.databaseVersion = rowData.databaseVersion;
|
boardCardInfoList.editModalVue.interfaceDatabaseVersion = rowData.interfaceDatabaseVersion;
|
||||||
|
boardCardInfoList.editModalVue.protectionDatabaseVersion = rowData.protectionDatabaseVersion;
|
||||||
boardCardInfoList.editModalVue.protectionVersion = rowData.protectionVersion;
|
boardCardInfoList.editModalVue.protectionVersion = rowData.protectionVersion;
|
||||||
boardCardInfoList.editModalVue.protectionChecksum = rowData.protectionChecksum;
|
boardCardInfoList.editModalVue.protectionChecksum = rowData.protectionChecksum;
|
||||||
boardCardInfoList.editModalVue.bootVersion = rowData.bootVersion;
|
boardCardInfoList.editModalVue.bootVersion = rowData.bootVersion;
|
||||||
@ -851,6 +859,7 @@ var boardCardInfoList = {
|
|||||||
boardCardInfoList.editModalVue.remark = rowData.remark;
|
boardCardInfoList.editModalVue.remark = rowData.remark;
|
||||||
boardCardInfoList.editModalVue.isActive = rowData.isActive;
|
boardCardInfoList.editModalVue.isActive = rowData.isActive;
|
||||||
boardCardInfoList.editModalVue.protectionDeviceInfoId = rowData.protectionDeviceInfoId;
|
boardCardInfoList.editModalVue.protectionDeviceInfoId = rowData.protectionDeviceInfoId;
|
||||||
|
boardCardInfoList.editModalVue.maintenanceRecord = rowData.maintenanceRecord;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
boardCardInfoList.editModalVue.id = null;
|
boardCardInfoList.editModalVue.id = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user