diff --git a/ZR.Admin.WebApi/Controllers/Business/OdfPortsController.cs b/ZR.Admin.WebApi/Controllers/Business/OdfPortsController.cs index a7fc27f..ac88a2a 100644 --- a/ZR.Admin.WebApi/Controllers/Business/OdfPortsController.cs +++ b/ZR.Admin.WebApi/Controllers/Business/OdfPortsController.cs @@ -129,7 +129,9 @@ namespace ZR.Admin.WebApi.Controllers.Business PortNumber = it.PortNumber, RowNumber = it.RowNumber, Tips = it.Remarks, - OpticalAttenuation = it.OpticalAttenuation + OpticalAttenuation = it.OpticalAttenuation, + EquipmentModel = it.EquipmentModel, + BusinessType = it.BusinessType, }).ToListAsync(); List row = new List(); l.GroupBy(it => it.RowNumber).ToList().ForEach(g => @@ -143,17 +145,9 @@ namespace ZR.Admin.WebApi.Controllers.Business } else { - if (!string.IsNullOrEmpty(it.Tips)) + if (!string.IsNullOrEmpty(it.BusinessType)) { - var t = it.Tips.Split(" "); - if (t.Length > 0 && t.Length > 2 && t[2].Length > 0) - { - tips = t[2].Substring(0, 1); - } - else - { - tips = it.Tips.Substring(0, 1); - } + tips = it.BusinessType.Substring(0, 1); } } return new OdfPortsMDto { Id = it.Id, Name = it.Name, Status = it.Status, Tips = tips }; @@ -641,7 +635,9 @@ namespace ZR.Admin.WebApi.Controllers.Business Remarks = excelItem.Remarks?.Trim(), OpticalAttenuation = excelItem.OpticalAttenuation?.Trim(), HistoryRemarks = excelItem.HistoryRemarks?.Trim(), - OpticalCableOffRemarks = excelItem.OpticalCableOffRemarks + OpticalCableOffRemarks = excelItem.OpticalCableOffRemarks, + BusinessType = excelItem.BusinessType, + EquipmentModel = excelItem.EquipmentModel, }; port = _OdfPortsService.AddOdfPorts(port); addPortCount++; @@ -655,6 +651,8 @@ namespace ZR.Admin.WebApi.Controllers.Business port.Status = excelItem.Status; port.OpticalCableOffRemarks = excelItem.OpticalCableOffRemarks; port.UpdatedAt = DateTime.Now; + port.BusinessType = excelItem.BusinessType; + port.EquipmentModel = excelItem.EquipmentModel; await _OdfPortsService.UpdateAsync(port); } if (string.IsNullOrEmpty(port.HistoryRemarks)) diff --git a/ZR.Model/Business/Dto/OdfPortsDto.cs b/ZR.Model/Business/Dto/OdfPortsDto.cs index 41c2fd0..e4d39e0 100644 --- a/ZR.Model/Business/Dto/OdfPortsDto.cs +++ b/ZR.Model/Business/Dto/OdfPortsDto.cs @@ -96,6 +96,17 @@ namespace ZR.Model.Business.Dto public string Tips { get; set; } public string OpticalAttenuation { get; set; } + + /// + /// 设备型号 + /// + + public string EquipmentModel { get; set; } + /// + /// 业务类型 + /// + + public string BusinessType { get; set; } } public class OdfPortsMDtoc : OdfPortsMDto { @@ -408,6 +419,19 @@ namespace ZR.Model.Business.Dto [ExcelColumn(Name = "光缆断信息")] [ExcelColumnName("光缆断信息")] public string OpticalCableOffRemarks { get; set; } + + /// + /// 设备型号 + /// + [ExcelColumn(Name = "设备型号")] + [ExcelColumnName("设备型号")] + public string EquipmentModel { get; set; } + /// + /// 业务类型 + /// + [ExcelColumn(Name = "业务类型")] + [ExcelColumnName("业务类型")] + public string BusinessType { get; set; } } @@ -490,6 +514,21 @@ namespace ZR.Model.Business.Dto public string HistoryRemarks { get; set; } public string Address { get; set; } + + + + /// + /// 设备型号 + /// + [ExcelColumn(Name = "设备型号")] + [ExcelColumnName("设备型号")] + public string EquipmentModel { get; set; } + /// + /// 业务类型 + /// + [ExcelColumn(Name = "业务类型")] + [ExcelColumnName("业务类型")] + public string BusinessType { get; set; } } diff --git a/ZR.Model/Business/OdfPorts.cs b/ZR.Model/Business/OdfPorts.cs index 1ba710c..063d2bb 100644 --- a/ZR.Model/Business/OdfPorts.cs +++ b/ZR.Model/Business/OdfPorts.cs @@ -103,5 +103,14 @@ namespace ZR.Model.Business /// public string OpticalCableOffRemarks { get; set; } + /// + /// 设备型号 + /// + public string EquipmentModel { get; set; } + /// + /// 业务类型 + /// + public string BusinessType { get; set; } + } } \ No newline at end of file