make
This commit is contained in:
parent
88140f8ab9
commit
cae9c8a596
|
|
@ -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<OdfPortsMDtot> row = new List<OdfPortsMDtot>();
|
||||
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))
|
||||
|
|
|
|||
|
|
@ -96,6 +96,17 @@ namespace ZR.Model.Business.Dto
|
|||
public string Tips { get; set; }
|
||||
|
||||
public string OpticalAttenuation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备型号
|
||||
/// </summary>
|
||||
|
||||
public string EquipmentModel { get; set; }
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备型号
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "设备型号")]
|
||||
[ExcelColumnName("设备型号")]
|
||||
public string EquipmentModel { get; set; }
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备型号
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "设备型号")]
|
||||
[ExcelColumnName("设备型号")]
|
||||
public string EquipmentModel { get; set; }
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
[ExcelColumn(Name = "业务类型")]
|
||||
[ExcelColumnName("业务类型")]
|
||||
public string BusinessType { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -103,5 +103,14 @@ namespace ZR.Model.Business
|
|||
/// </summary>
|
||||
public string OpticalCableOffRemarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备型号
|
||||
/// </summary>
|
||||
public string EquipmentModel { get; set; }
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user