diff --git a/PEIS/Utils/ExcelHelper.cs b/PEIS/Utils/ExcelHelper.cs index b03edd4..c74b680 100644 --- a/PEIS/Utils/ExcelHelper.cs +++ b/PEIS/Utils/ExcelHelper.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; } } } \ No newline at end of file diff --git a/PEIS/View/Base/PatientImportForm.cs b/PEIS/View/Base/PatientImportForm.cs index b946734..6ef40f9 100644 --- a/PEIS/View/Base/PatientImportForm.cs +++ b/PEIS/View/Base/PatientImportForm.cs @@ -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,