From ebc19098b4bed1b32a2f9171156b169734fa7cb6 Mon Sep 17 00:00:00 2001 From: lsm Date: Wed, 4 Sep 2024 16:44:41 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=90=8D=E5=8D=95=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E5=A4=87=E6=B3=A8=EF=BC=8C=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=98=BE=E7=A4=BA=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/Utils/ExcelHelper.cs | 6 ++++++ PEIS/View/Base/PatientImportForm.cs | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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,