项目人员信息档案新增、导入补充:机构划分、组织单元、人员分类、员工子组、备注信息

This commit is contained in:
2025-08-08 17:54:10 +08:00
parent fd849d42e1
commit 8e4dec9037
212 changed files with 2489 additions and 617 deletions
@@ -1,4 +1,5 @@
using BLL;
using FineUIPro.Web.SysManage;
using System;
using System.Collections.Generic;
using System.Data;
@@ -155,7 +156,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 38);
AddDatasetToSQL(ds.Tables[0], 43);
}
catch (Exception ex)
{
@@ -201,6 +202,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
select x;
var positions = from x in Funs.DB.Base_Position select x;
var postTitles = from x in Funs.DB.Base_PostTitle select x;
var institutionalDivisions = from x in Funs.DB.Base_InstitutionalDivision select x;
var departs = from x in Funs.DB.Base_Depart select x;
var employeeCategorys = from x in Funs.DB.Base_EmployeeCategory select x;
var employeeSubgroups = from x in Funs.DB.Base_EmployeeSubgroup select x;
for (int i = 0; i < ir; i++)
{
string col1 = pds.Rows[i][1].ToString().Trim();
@@ -394,97 +399,137 @@ namespace FineUIPro.Web.HSSE.SitePerson
string col14 = pds.Rows[i][14].ToString().Trim();
if (!string.IsNullOrEmpty(col14))
{
var position = positions.FirstOrDefault(e => e.PositionName == col14);
if (position == null)
var institutionalDivision = institutionalDivisions.FirstOrDefault(e => e.Name == col14);
if (institutionalDivision == null)
{
result += "第" + (i + 2).ToString() + "行," + "所属职务" + "," + "[" + col14 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "机构划分" + "," + "[" + col14 + "]错误!" + "|";
}
}
string col15 = pds.Rows[i][15].ToString().Trim();
if (!string.IsNullOrEmpty(col15))
{
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col15);
if (postTitle == null)
var depart = departs.FirstOrDefault(e => e.DepartName == col15);
if (depart == null)
{
result += "第" + (i + 2).ToString() + "行," + "所属职称" + "," + "[" + col15 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "组织单元" + "," + "[" + col15 + "]错误!" + "|";
}
}
string col16 = pds.Rows[i][16].ToString().Trim();
if (!string.IsNullOrEmpty(col16))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col16);
if (basicData == null)
var employeeCategory = employeeCategorys.FirstOrDefault(e => e.CategoryName == col16);
if (employeeCategory == null)
{
result += "第" + (i + 2).ToString() + "行," + "文化程度" + "," + "[" + col16 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "人员分类" + "," + "[" + col16 + "]错误!" + "|";
}
}
string col17 = pds.Rows[i][17].ToString().Trim();
if (!string.IsNullOrEmpty(col17))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col17);
if (basicData == null)
var employeeSubgroup = employeeSubgroups.FirstOrDefault(e => e.SubgroupName == col17);
if (employeeSubgroup == null)
{
result += "第" + (i + 2).ToString() + "行," + "婚姻状况" + "," + "[" + col17 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "员工子组" + "," + "[" + col17 + "]错误!" + "|";
}
}
string col18 = pds.Rows[i][18].ToString().Trim();
if (!string.IsNullOrEmpty(col18))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col18);
if (basicData == null)
var position = positions.FirstOrDefault(e => e.PositionName == col18);
if (position == null)
{
result += "第" + (i + 2).ToString() + "行," + "政治面貌" + "," + "[" + col18 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "所属职务" + "," + "[" + col18 + "]错误!" + "|";
}
}
string col19 = pds.Rows[i][19].ToString().Trim();
if (!string.IsNullOrEmpty(col19))
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col19);
if (basicData == null)
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col19);
if (postTitle == null)
{
result += "第" + (i + 2).ToString() + "行," + "民族" + "," + "[" + col19 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "所属职称" + "," + "[" + col19 + "]错误!" + "|";
}
}
string col20 = pds.Rows[i][20].ToString().Trim();
if (!string.IsNullOrEmpty(col20))
{
var country = countrys.FirstOrDefault(e => e.Cname == col20);
if (country == null)
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col20);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "国家" + "," + "[" + col20 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "文化程度" + "," + "[" + col20 + "]错误!" + "|";
}
}
string col21 = pds.Rows[i][21].ToString().Trim();
if (!string.IsNullOrEmpty(col21))
{
var city = citys.FirstOrDefault(e => e.Cname == col21);
if (city == null)
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col21);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "省或地区" + "," + "[" + col21 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "婚姻状况" + "," + "[" + col21 + "]错误!" + "|";
}
}
string col22 = pds.Rows[i][22].ToString().Trim();
if (!string.IsNullOrEmpty(col22))
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col22);
if (cnProfessional == null)
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col22);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "主专业" + "," + "[" + col22 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "政治面貌" + "," + "[" + col22 + "]错误!" + "|";
}
}
string col23 = pds.Rows[i][23].ToString().Trim();
if (!string.IsNullOrEmpty(col23))
{
string[] strs = col23.Split('');
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col23);
if (basicData == null)
{
result += "第" + (i + 2).ToString() + "行," + "民族" + "," + "[" + col23 + "]错误!" + "|";
}
}
string col24 = pds.Rows[i][24].ToString().Trim();
if (!string.IsNullOrEmpty(col24))
{
var country = countrys.FirstOrDefault(e => e.Cname == col24);
if (country == null)
{
result += "第" + (i + 2).ToString() + "行," + "国家" + "," + "[" + col24 + "]错误!" + "|";
}
}
string col25 = pds.Rows[i][25].ToString().Trim();
if (!string.IsNullOrEmpty(col25))
{
var city = citys.FirstOrDefault(e => e.Cname == col25);
if (city == null)
{
result += "第" + (i + 2).ToString() + "行," + "省或地区" + "," + "[" + col25 + "]错误!" + "|";
}
}
string col26 = pds.Rows[i][26].ToString().Trim();
if (!string.IsNullOrEmpty(col26))
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col26);
if (cnProfessional == null)
{
result += "第" + (i + 2).ToString() + "行," + "主专业" + "," + "[" + col26 + "]错误!" + "|";
}
}
string col27 = pds.Rows[i][27].ToString().Trim();
if (!string.IsNullOrEmpty(col27))
{
string[] strs = col27.Split('');
foreach (var item in strs)
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == item);
@@ -495,54 +540,28 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
}
string col24 = pds.Rows[i][24].ToString().Trim();
if (!string.IsNullOrEmpty(col24))
{
var certificate = certificates.FirstOrDefault(e => e.CertificateName == col24);
if (certificate == null)
{
result += "第" + (i + 2).ToString() + "行," + "特岗证书" + "," + "[" + col24 + "]错误!" + "|";
}
}
string col27 = pds.Rows[i][27].ToString().Trim();
if (!string.IsNullOrEmpty(col27))
{
try
{
DateTime date = Convert.ToDateTime(col27);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "发证日期" + "," + "[" + col27 + "]错误!" + "|";
}
}
string col28 = pds.Rows[i][28].ToString().Trim();
if (!string.IsNullOrEmpty(col28))
{
try
var certificate = certificates.FirstOrDefault(e => e.CertificateName == col28);
if (certificate == null)
{
DateTime date = Convert.ToDateTime(col28);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "证书有效期" + "," + "[" + col28 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "特岗证书" + "," + "[" + col28 + "]错误!" + "|";
}
}
string col29 = pds.Rows[i][29].ToString().Trim();
if (!string.IsNullOrEmpty(col29))
string col31 = pds.Rows[i][31].ToString().Trim();
if (!string.IsNullOrEmpty(col31))
{
try
{
DateTime date = Convert.ToDateTime(col29);
DateTime date = Convert.ToDateTime(col31);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "出生日期" + "," + "[" + col29 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "发证日期" + "," + "[" + col31 + "]错误!" + "|";
}
}
string col32 = pds.Rows[i][32].ToString().Trim();
if (!string.IsNullOrEmpty(col32))
{
@@ -552,34 +571,60 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "出场时间" + "," + "[" + col32 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "证书有效期" + "," + "[" + col32 + "]错误!" + "|";
}
}
string col34 = pds.Rows[i][34].ToString().Trim();
if (!string.IsNullOrEmpty(col34))
string col33 = pds.Rows[i][33].ToString().Trim();
if (!string.IsNullOrEmpty(col33))
{
if (col34 != "是" && col34 != "否")
try
{
result += "第" + (i + 2).ToString() + "行," + "外籍" + "," + "[" + col34 + "]错误!" + "|";
DateTime date = Convert.ToDateTime(col33);
}
}
string col35 = pds.Rows[i][35].ToString().Trim();
if (!string.IsNullOrEmpty(col35))
{
if (col35 != "是" && col35 != "否")
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "外聘" + "," + "[" + col35 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "出生日期" + "," + "[" + col33 + "]错误!" + "|";
}
}
string col36 = pds.Rows[i][36].ToString().Trim();
if (!string.IsNullOrEmpty(col36))
{
if (col36 != "是" && col36 != "否")
try
{
result += "第" + (i + 2).ToString() + "行," + "人员是否在场" + "," + "[" + col36 + "]错误!" + "|";
DateTime date = Convert.ToDateTime(col36);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "出场时间" + "," + "[" + col36 + "]错误!" + "|";
}
}
string col38 = pds.Rows[i][38].ToString().Trim();
if (!string.IsNullOrEmpty(col38))
{
if (col38 != "是" && col38 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "外籍" + "," + "[" + col38 + "]错误!" + "|";
}
}
string col39 = pds.Rows[i][39].ToString().Trim();
if (!string.IsNullOrEmpty(col39))
{
if (col39 != "是" && col39 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "外聘" + "," + "[" + col39 + "]错误!" + "|";
}
}
string col40 = pds.Rows[i][40].ToString().Trim();
if (!string.IsNullOrEmpty(col40))
{
if (col40 != "是" && col40 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "人员是否在场" + "," + "[" + col40 + "]错误!" + "|";
}
}
else
@@ -587,12 +632,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
result += "第" + (i + 2).ToString() + "行," + "人员是否在场" + "," + "此项为必填项!" + "|";
}
string col37 = pds.Rows[i][37].ToString().Trim();
if (!string.IsNullOrEmpty(col37))
string col41 = pds.Rows[i][41].ToString().Trim();
if (!string.IsNullOrEmpty(col41))
{
if (col37 != "是" && col37 != "否")
if (col41 != "是" && col41 != "否")
{
result += "第" + (i + 2).ToString() + "行," + "考勤卡是否启用" + "," + "[" + col37 + "]错误!" + "|";
result += "第" + (i + 2).ToString() + "行," + "考勤卡是否启用" + "," + "[" + col41 + "]错误!" + "|";
}
}
//else
@@ -694,7 +739,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 38);
AddDatasetToSQL2(ds.Tables[0], 43);
}
catch (Exception ex)
{
@@ -741,6 +786,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
select x;
var positions = from x in Funs.DB.Base_Position select x;
var postTitles = from x in Funs.DB.Base_PostTitle select x;
var institutionalDivisions = from x in Funs.DB.Base_InstitutionalDivision select x;
var departs = from x in Funs.DB.Base_Depart select x;
var employeeCategorys = from x in Funs.DB.Base_EmployeeCategory select x;
var employeeSubgroups = from x in Funs.DB.Base_EmployeeSubgroup select x;
for (int i = 0; i < ir; i++)
{
string col1 = pds.Rows[i][1].ToString().Trim();
@@ -786,6 +835,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
string col35 = pds.Rows[i][35].ToString().Trim();
string col36 = pds.Rows[i][36].ToString().Trim();
string col37 = pds.Rows[i][37].ToString().Trim();
string col38 = pds.Rows[i][38].ToString().Trim();
string col39 = pds.Rows[i][39].ToString().Trim();
string col40 = pds.Rows[i][40].ToString().Trim();
string col41 = pds.Rows[i][41].ToString().Trim();
string col42 = pds.Rows[i][42].ToString().Trim();
if (!string.IsNullOrEmpty(col0))//卡号
{
@@ -878,92 +932,129 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
person.InTime = Funs.GetNewDateTime(col13);
}
if (!string.IsNullOrEmpty(col14))//所属职务
if (!string.IsNullOrEmpty(col14))//机构划分
{
var position = positions.FirstOrDefault(e => e.PositionName == col14);
var institutionalDivision = institutionalDivisions.FirstOrDefault(e => e.Name == col14);
if (institutionalDivision != null)
{
person.InstitutionalDivisionId = institutionalDivision.Id;
person.InstitutionalDivisionName = institutionalDivision.Name;
}
}
if (!string.IsNullOrEmpty(col15))//组织单元
{
var depart = departs.FirstOrDefault(e => e.DepartName == col15);
if (depart != null)
{
person.DepartId = depart.DepartId;
person.DepartName = depart.DepartName;
}
}
if (!string.IsNullOrEmpty(col16))//人员分类
{
var employeeCategory = employeeCategorys.FirstOrDefault(e => e.CategoryName == col16);
if (employeeCategory != null)
{
person.EmployeeCategoryId = employeeCategory.CategoryId;
person.EmployeeCategoryName = employeeCategory.CategoryName;
}
}
if (!string.IsNullOrEmpty(col17))//员工子组
{
var employeeSubgroup = employeeSubgroups.FirstOrDefault(e => e.SubgroupName == col17);
if (employeeSubgroup != null)
{
person.EmployeeSubgroupId = employeeSubgroup.SubgroupId;
person.EmployeeSubgroupName = employeeSubgroup.SubgroupName;
}
}
if (!string.IsNullOrEmpty(col18))//所属职务
{
var position = positions.FirstOrDefault(e => e.PositionName == col18);
if (position != null)
{
person.PositionId = position.PositionId;
person.PositionName = position.PositionName;
}
}
if (!string.IsNullOrEmpty(col15))//所属职称
if (!string.IsNullOrEmpty(col19))//所属职称
{
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col15);
var postTitle = postTitles.FirstOrDefault(e => e.PostTitleName == col19);
if (postTitle != null)
{
person.PostTitleId = postTitle.PostTitleId;
person.PostTitleName = postTitle.PostTitleName;
}
}
if (!string.IsNullOrEmpty(col16))//文化程度
if (!string.IsNullOrEmpty(col20))//文化程度
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col16);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col20);
if (basicData != null)
{
person.EduLevel = basicData.DictCode;
person.EduLevelName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col17))//婚姻状况
if (!string.IsNullOrEmpty(col21))//婚姻状况
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col17);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col21);
if (basicData != null)
{
person.MaritalStatus = basicData.DictCode;
person.MaritalStatusName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col18))//政治面貌
if (!string.IsNullOrEmpty(col22))//政治面貌
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col18);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col22);
if (basicData != null)
{
person.PoliticsStatus = basicData.DictCode;
person.PoliticsStatusName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col19))//民族
if (!string.IsNullOrEmpty(col23))//民族
{
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col19);
var basicData = basicDatas.FirstOrDefault(e => e.DictName == col23);
if (basicData != null)
{
person.Nation = basicData.DictCode;
person.NationName = basicData.DictName;
}
}
if (!string.IsNullOrEmpty(col20))//国家
if (!string.IsNullOrEmpty(col24))//国家
{
var country = countrys.FirstOrDefault(e => e.Cname == col20);
var country = countrys.FirstOrDefault(e => e.Cname == col24);
if (country != null)
{
person.CountryCode = country.CountryId;
person.CountryName = country.Cname;
}
}
if (!string.IsNullOrEmpty(col21))//省或地区
if (!string.IsNullOrEmpty(col25))//省或地区
{
var city = citys.FirstOrDefault(e => e.Cname == col21);
var city = citys.FirstOrDefault(e => e.Cname == col25);
if (city != null)
{
person.ProvinceCode = city.ProvinceCode;
person.ProvinceName = city.Cname;
}
}
if (!string.IsNullOrEmpty(col22))//主专业
if (!string.IsNullOrEmpty(col26))//主专业
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col22);
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == col26);
if (cnProfessional != null)
{
person.MainCNProfessionalId = cnProfessional.CNProfessionalId;
person.MainCNProfessionalName = cnProfessional.ProfessionalName;
}
}
if (!string.IsNullOrEmpty(col23))//副专业
if (!string.IsNullOrEmpty(col27))//副专业
{
person.ViceCNProfessionalName = col23;
person.ViceCNProfessionalName = col27;
string ids = string.Empty;
string[] strs = col23.Split('');
string[] strs = col27.Split('');
foreach (var item in strs)
{
var cnProfessional = cnProfessionals.FirstOrDefault(e => e.ProfessionalName == item);
@@ -978,63 +1069,67 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
person.ViceCNProfessionalId = ids;
}
if (!string.IsNullOrEmpty(col24))//特岗证书
if (!string.IsNullOrEmpty(col28))//特岗证书
{
personQuality.CertificateName = col24;
personQuality.CertificateName = col28;
}
if (!string.IsNullOrEmpty(col25))//证书编号
if (!string.IsNullOrEmpty(col29))//证书编号
{
personQuality.CertificateNo = col25;
personQuality.CertificateNo = col29;
}
if (!string.IsNullOrEmpty(col26))//发证单位
if (!string.IsNullOrEmpty(col30))//发证单位
{
personQuality.SendUnit = col26;
personQuality.SendUnit = col30;
}
if (!string.IsNullOrEmpty(col27))//发证日期
if (!string.IsNullOrEmpty(col31))//发证日期
{
personQuality.SendDate = Funs.GetNewDateTime(col27);
personQuality.SendDate = Funs.GetNewDateTime(col31);
}
if (!string.IsNullOrEmpty(col28))//证书有效期
if (!string.IsNullOrEmpty(col32))//证书有效期
{
personQuality.LimitDate = Funs.GetNewDateTime(col28);
personQuality.LimitDate = Funs.GetNewDateTime(col32);
}
if (!string.IsNullOrEmpty(col29))//出生日期
if (!string.IsNullOrEmpty(col33))//出生日期
{
person.Birthday = Funs.GetNewDateTime(col29);
person.Birthday = Funs.GetNewDateTime(col33);
}
if (!string.IsNullOrEmpty(col30))//电话
if (!string.IsNullOrEmpty(col34))//电话
{
person.Telephone = col30;
person.Telephone = col34;
}
if (!string.IsNullOrEmpty(col31))//家庭地址
if (!string.IsNullOrEmpty(col35))//家庭地址
{
person.Address = col31;
person.Address = col35;
}
if (!string.IsNullOrEmpty(col32))//出场时间
if (!string.IsNullOrEmpty(col36))//出场时间
{
person.OutTime = Funs.GetNewDateTime(col32);
person.OutTime = Funs.GetNewDateTime(col36);
}
if (!string.IsNullOrEmpty(col33))//出场原因
if (!string.IsNullOrEmpty(col37))//出场原因
{
person.OutResult = col33;
person.OutResult = col37;
}
if (!string.IsNullOrEmpty(col34))//外籍
if (!string.IsNullOrEmpty(col38))//外籍
{
person.IsForeignStr = col34;
person.IsForeign = col34 == "是" ? true : false;
person.IsForeignStr = col38;
person.IsForeign = col38 == "是" ? true : false;
}
if (!string.IsNullOrEmpty(col35))//外聘
if (!string.IsNullOrEmpty(col39))//外聘
{
person.IsOutsideStr = col35;
person.IsOutside = col35 == "是" ? true : false;
person.IsOutsideStr = col39;
person.IsOutside = col39 == "是" ? true : false;
}
if (!string.IsNullOrEmpty(col36))//人员是否在场
if (!string.IsNullOrEmpty(col40))//人员是否在场
{
person.IsUsedName = col36;
person.IsUsedName = col40;
}
if (!string.IsNullOrEmpty(col37))//考勤卡是否启用
if (!string.IsNullOrEmpty(col41))//考勤卡是否启用
{
person.IsCardUsedName = col37;
person.IsCardUsedName = col41;
}
if (!string.IsNullOrEmpty(col42))//备注
{
person.Remarks = col42;
}
person.PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
persons.Add(person);
@@ -1095,9 +1190,17 @@ namespace FineUIPro.Web.HSSE.SitePerson
newPerson.WorkPostId = persons[i].WorkPostId;
newPerson.TeamGroupId = persons[i].TeamGroupId;
newPerson.WorkAreaId = persons[i].WorkAreaId;
newPerson.InTime = persons[i].InTime;
newPerson.InTime = persons[i].InTime;
newPerson.PositionId = persons[i].PositionId;
newPerson.PostTitleId = persons[i].PostTitleId;
newPerson.DepartId = persons[i].DepartId;
newPerson.EmployeeCategoryId = persons[i].EmployeeCategoryId;
newPerson.EmployeeSubgroupId = persons[i].EmployeeSubgroupId;
newPerson.InstitutionalDivisionId = persons[i].InstitutionalDivisionId;
newPerson.DepartName = persons[i].DepartName;
newPerson.EmployeeCategoryName = persons[i].EmployeeCategoryName;
newPerson.EmployeeSubgroupName = persons[i].EmployeeSubgroupName;
newPerson.InstitutionalDivisionName = persons[i].InstitutionalDivisionName;
newPerson.EduLevel = persons[i].EduLevel;
newPerson.MaritalStatus = persons[i].MaritalStatus;
newPerson.PoliticsStatus = persons[i].PoliticsStatus;