|
|
|
@ -36,23 +36,39 @@ namespace Rs.MotionPlat.Entitys
|
|
|
|
|
{
|
|
|
|
|
for(int i=1;i<rowNum; i++)
|
|
|
|
|
{
|
|
|
|
|
AlarmEntity entity = new AlarmEntity();
|
|
|
|
|
IRow row = sheet.GetRow(i);
|
|
|
|
|
ICell cell = row.GetCell(0);
|
|
|
|
|
entity.AlartID = int.Parse(cell.NumericCellValue.ToString().Trim());
|
|
|
|
|
cell = row.GetCell(2);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
entity.CN = cell.StringCellValue;
|
|
|
|
|
cell = row.GetCell(3);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
entity.EN = cell.StringCellValue;
|
|
|
|
|
cell = row.GetCell(4);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
entity.KO = cell.StringCellValue;
|
|
|
|
|
if(!alarmDic.ContainsKey(entity.AlartID))
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
alarmDic.Add(entity.AlartID, entity);
|
|
|
|
|
AlarmEntity entity = new AlarmEntity();
|
|
|
|
|
IRow row = sheet.GetRow(i);
|
|
|
|
|
ICell cell = row.GetCell(0);
|
|
|
|
|
if(cell.CellType== CellType.Numeric)
|
|
|
|
|
{
|
|
|
|
|
entity.AlartID = int.Parse(cell.NumericCellValue.ToString().Trim());
|
|
|
|
|
}
|
|
|
|
|
else if(cell.CellType== CellType.String)
|
|
|
|
|
{
|
|
|
|
|
entity.AlartID = int.Parse(cell.StringCellValue.ToString().Trim());
|
|
|
|
|
}
|
|
|
|
|
cell = row.GetCell(2);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
entity.CN = cell.StringCellValue;
|
|
|
|
|
cell = row.GetCell(3);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
entity.EN = cell.StringCellValue;
|
|
|
|
|
cell = row.GetCell(4);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
entity.KO = cell.StringCellValue;
|
|
|
|
|
if (!alarmDic.ContainsKey(entity.AlartID))
|
|
|
|
|
{
|
|
|
|
|
alarmDic.Add(entity.AlartID, entity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|