1、名单导入读取备注,导入失败显示原因

dhzzyy
lsm 9 months ago
parent 12ec6fc94f
commit e43b859adb
  1. 6
      PEIS/Utils/ExcelHelper.cs
  2. 5
      PEIS/View/Base/PatientImportForm.cs

@ -63,6 +63,9 @@ namespace PEIS.Utils
if (!isBasePatient || SuccessList.Any(p => p.CardNo == readPatient.CardNo))
{
continuousEmpty++;
if (!string.IsNullOrEmpty(dataRow.GetCell(4)?.ToString())){
dataRow.GetCell(9).SetCellValue("身份证检验错误!");
}
ErrorList.Add(new ExcelRowModel(row, dataRow));
continue;
}
@ -97,6 +100,8 @@ namespace PEIS.Utils
Address1 = dataRow.GetCell(6)?.ToString(),
Tel1 = dataRow.GetCell(7)?.ToString(),
DeptName = dataRow.GetCell(8)?.ToString(),
Description = dataRow.GetCell(9)?.ToString(),
SpellCode = PingYinHelper.GetTotalPingYin(dataRow.GetCell(1)?.ToString().Replace(" ", "")).FirstPingYin.Count == 0 ? null : PingYinHelper.GetTotalPingYin(dataRow.GetCell(1)?.ToString().Replace(" ", "")).FirstPingYin[0]
};
}
}
@ -144,6 +149,7 @@ namespace PEIS.Utils
ColumnG = p.Address1;
ColumnH = p.Tel1;
ColumnI = p.DeptName;
ColumnJ = p.Description;
}
}
}

@ -109,7 +109,7 @@ namespace PEIS.View.Base
}
}
succeedCount++;
var sql =
$@"SELECT ID,Name,Sex,CardNo, CardType, Birthday, Education, Nation, Tel1, Tel2,Marriage,Address1
FROM Base_Patient WHERE Name='{basePatient.Name}' AND CardNo = '{basePatient.CardNo}' ";
@ -117,10 +117,13 @@ FROM Base_Patient WHERE Name='{basePatient.Name}' AND CardNo = '{basePatient.Car
if (add == null)
{
item.Description = "导入名单中的姓名和证件号与基础信息中不匹配!";
errorList.Add(new ExcelRowModel(item));
continue;
}
succeedCount++;
_lstPatient?.Add(new BaseOrgPatient
{
OID = _org.ID,

Loading…
Cancel
Save