From 4d00499b03cd495b8d85ed7489e9e8f657f31583 Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 24 Jul 2025 11:08:29 +0800 Subject: [PATCH] 1 --- .../HSSE/SitePerson/PersonIn.aspx.cs | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs index c27992d6..5ea2b913 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs @@ -1060,13 +1060,50 @@ namespace FineUIPro.Web.HSSE.SitePerson int a = persons.Count(); for (int i = 0; i < a; i++) { + var person = Person_PersonsService.GetPerson_PersonsByIdCard(persons[i].IdentityCard); + if (person == null) + { + string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); + person = new Model.Person_Persons + { + PersonId = newKeyID, + PersonName = persons[i].PersonName, + UnitId = persons[i].UnitId, + WorkPostId = persons[i].WorkPostId, + PersonType = "1", + IdcardType = persons[i].IdcardType, + IdentityCard = persons[i].IdentityCard, + IdcardForever = persons[i].IdcardForever, + IdcardStartDate = persons[i].IdcardStartDate, + IdcardEndDate = persons[i].IdcardEndDate, + IdcardAddress = persons[i].IdcardAddress, + Telephone = persons[i].Telephone, + Sex = persons[i].SexName == "男" ? "1" : "2", + Birthday = persons[i].Birthday, + //Major = this.txtMajor.Text.Trim(), + //ForeignLanguage = this.txtForeignLanguage.Text.Trim(), + CountryCode = persons[i].CountryCode, + ProvinceCode = persons[i].ProvinceCode, + Nation = persons[i].Nation, + PoliticsStatus = persons[i].PoliticsStatus, + EduLevel = persons[i].EduLevel, + MaritalStatus = persons[i].MaritalStatus, + //RelativeName = this.txtRelativeName.Text.Trim(), + //RelativeTel = this.txtRelativeTel.Text.Trim(), + Address = persons[i].Address, + //RoleIds = Funs.GetStringByArray(this.drpProjectRole.SelectedValueArray), + }; + BLL.Person_PersonsService.AddPerson(person); + } + + var getPerson = SitePerson_PersonService.GetSitePersonByProjectIdIdentityCard(Request.Params["ProjectId"], persons[i].IdentityCard); //!BLL.PersonService.IsExistPersonByUnit(persons[i].UnitId, persons[i].IdentityCard, Request.Params["ProjectId"]) && if (getPerson == null) { Model.SitePerson_Person newPerson = new Model.SitePerson_Person(); - string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - newPerson.PersonId = newKeyID; + newPerson.SitePersonId = SQLHelper.GetNewID(); + newPerson.PersonId = person.PersonId; newPerson.ProjectId = Request.Params["ProjectId"]; newPerson.CardNo = persons[i].CardNo; newPerson.PersonName = persons[i].PersonName;