Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

wangh 1 year ago
parent
commit
4d0575874a

+ 404 - 0
OASystem/OASystem.Api/Controllers/AuthController.cs

@@ -13,6 +13,7 @@ using OASystem.API.OAMethodLib.QiYeWeChatAPI;
 using OASystem.Domain.Dtos.QiYeWeChat;
 using OASystem.Domain.Entities.System;
 using TinyPinyin;
+using System.Globalization;
 
 namespace OASystem.API.Controllers
 {
@@ -284,6 +285,409 @@ namespace OASystem.API.Controllers
                 Token = authorId + ":" + userToken
             };
 
+            return Ok(JsonView(view));
+        }
+
+        /// <summary>
+        /// 员工信息 迁移
+        /// Old OA To New OA
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("UpdateUserDataOldOAToNewOA")]
+        [ProducesResponseType(typeof(LoginView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> UpdateUserDataOldOAToNewOA()
+        {
+            dynamic view = null;
+
+            try
+            {
+                var _sqlSuar = _loginRep._sqlSugar;
+
+                var oldOaUsersData = await _sqlSuar.Queryable<OA2014UsersView>().AS("OA2014.dbo.Users").ToListAsync();
+                var newOaCompanyData = await _sqlSuar.Queryable<Sys_Company>().ToListAsync();
+                var newOaDepartmentData = await _sqlSuar.Queryable<Sys_Department>().ToListAsync();
+                var newOaJobPostData = await _sqlSuar.Queryable<Sys_JobPost>().ToListAsync();
+                List<Sys_Users> newOaUserDatas = new List<Sys_Users>();
+
+                foreach (var oldUser in oldOaUsersData)
+                {
+                    int depId = 0, postId = 0;
+                    #region 处理部门岗位
+
+                    int did = oldUser.Did;
+                    string post = oldUser.Post;
+                    switch (did)
+                    {
+                        case 1 : //信息部
+                            depId = 2;
+                            if (post.Equals("信息部经理")) postId = 4;
+                            else if (post.Equals("美工")) { depId = 5; postId = 18; }
+                            else if(post.Equals("网络推广")) postId = 46;
+                            else if (post.Equals("软件开发")) postId = 5;
+                            else if (post.Equals("平面设计师")) { depId = 5; postId = 18; }
+                            else if (post.Equals("平面设计")) { depId = 5; postId = 18; }
+                            else if (post.Equals("平面设计师")) { depId = 5; postId = 18; }
+                            else if (post.Equals("软件工程师")) postId = 5;
+                            else if (post.Equals("OP操作")) { depId = 7; postId = 28; }
+                            else if (post.Equals("软件工程师.")) postId = 5;
+                            else if (post.Equals(".net工程师")) postId = 5;
+                            else if (post.Equals("安卓开发工程师")) postId = 7;
+                            else if (post.Equals("web前端")) postId = 6;
+                            else if (post.Equals("Web后端开发")) postId = 5;
+                            break; 
+                        case 2 : //财务部
+                            depId=3;
+                            if (post.Equals("主管")) postId = 47;
+                            else if (post.Equals("财务总监")) { postId = 9; }
+                            else if (post.Equals("会计")) { postId = 10; }
+                            else if (post.Equals("财务经理")) { postId = 47; }
+                            else if (post.Equals("财务助理")) { postId = 50; }
+                            else if (post.Equals("出纳")) { postId = 48; }
+                            else { postId = 10; }
+
+                            break;
+                        case 3: //人事部
+                            depId = 4;
+                            if (post.Equals("主管")) postId = 51;
+                            else if (post.Equals("人事部主管")) { postId = 51; }
+                            else if (post.Equals("人事行政主管")) { postId = 51; }
+                            else if (post.Equals("行政人事助理")) { postId = 52; }
+                            else if (post.Equals("人事助理")) { postId = 52; }
+                            else if (post.Equals("人事主管")) { postId = 51; }
+                            else if (post.Equals("行政人事专员")) { postId = 12; }
+                            else if (post.Equals("行政司机")) { postId = 14; }
+                            else if (post.Equals("司机")) { postId = 14; }
+                            else if (post.Equals("统筹执行")) { postId = 12; }
+                            else if (post.Equals("培训专员")) { postId = 13; }
+                            else if (post.Equals("人事经理")) { postId = 11; }
+                            else if (post.Equals("前台")) { postId = 33; }
+                            else if (post.Equals("人事行政经理")) { postId = 11; }
+                            else if (post.Equals("人事部经理")) { postId = 11; }
+                            else if (post.Equals("人事专员")) { postId = 12; }
+                            else if (post.Equals("人事经理")) { postId = 11; }
+                            else postId = 12;
+
+                            break;
+                        case 4: //国交部
+                            //22   7   主管
+                            //23   7   计调
+                            //24   7   机票
+                            //25   7   酒店
+                            //26   7   签证
+                            //27   7   商邀
+                            //28   7   OP
+                            //32   7   经理
+                            depId = 7;
+                            if (post.Equals("酒店")) postId = 25;
+                            else if (post.Equals("经理")) { postId = 32; }
+                            else if (post.Equals("OP专员")) { postId = 28; }
+                            else if (post.Equals("酒店预订")) { postId = 25; }
+                            else if (post.Equals("商务邀请")) { postId = 27; }
+                            else if (post.Equals("-")) { postId = 0; }
+                            else if (post.Equals("签证专员")) { postId = 26; }
+                            else if (post.Equals("OP操作")) { postId = 28; }
+                            else if (post.Equals("司机")) { postId = 14; }
+                            else if (post.Equals("国际交流部经理")) { postId = 32; }
+                            else if (post.Equals("机票酒店")) { postId = 24; }
+                            else if (post.Equals("签证")) { postId = 26; }
+                            else if (post.Equals("票房")) { postId = 24; }
+                            else if (post.Equals("票务专员")) { postId = 24; }
+                            else if (post.Equals("酒店/机票")) { postId = 24; }
+                            else if (post.Equals("OP")) { postId = 28; }
+                            else if (post.Equals("主管")) { postId = 22; }
+                            else if (post.Equals("订票专员")) { postId = 24; }
+                            else if (post.Equals("机票")) { postId = 24; }
+                            else if (post.Equals("国交部经理")) { postId = 32; }
+                            else if (post.Equals("计调")) { postId = 23; }
+                            else if (post.Equals("票务")) { postId = 24; }
+                            else if (post.Equals("国交部主管")) { postId = 22; }
+                            else if (post.Equals("暂无")) { postId = 22; }
+                            else if (post.Equals("初级OP")) { postId = 28; }
+                            else if (post.Equals("计调")) { postId = 23; }
+                            else { postId = 0; }
+                                break;
+                        case 5: //会展部
+                            //15   5   经理
+                            //16   5   文案策划
+                            //17   5   活动执行
+                            //18   5   平面设计师
+                            //19   5   3D设计师
+                            depId = 5;
+                            if (post.Equals("-")) postId = 16;
+                            break;
+                        case 6: //市场销售部
+                            //20   6   经理
+                            //21   6   市场专员
+                            //53   6   主管
+                            depId = 6;
+                            if (post.Equals("主管")) postId = 53;
+                            else if (post.Equals("-")) postId = 21;
+                            else if (post.Equals("销售总监")) postId = 53;
+                            else if (post.Equals("市场专员")) postId = 21;
+                            else if (post.Equals("销售专员")) postId = 54;
+                            else if (post.Equals("市场助理")) postId = 55;
+                            else if (post.Equals("销售")) postId = 54;
+                            break;
+                        case 99: //总经办
+                                 //1    1   总经理
+                                 //2    1   副总经理
+                                 //3    1   总经理助理
+
+                            depId = 1;
+                            if (post.Equals("总经理")) postId = 1;
+                            else if (post.Equals("副总")) postId = 2;
+                            break;
+                        case 107: //会议会展策划部
+                            //15   5   经理
+                            //16   5   文案策划
+                            //17   5   活动执行
+                            //18   5   平面设计师
+                            //19   5   3D设计师
+                            //56   5   销售
+                            //46   5   网络推广
+                            //57   5   市场推广
+                            depId = 5;
+                            if (post.Equals("销售")) postId = 56;
+                            else if (post.Equals("策划执行")) postId = 16;
+                            else if (post.Equals("策活动划")) postId = 16;
+                            else if (post.Equals("活动执行")) postId = 17;
+                            else if (post.Equals("网络媒介推广")) postId = 46;
+                            else if (post.Equals("媒介主任")) postId = 46;
+                            else if (post.Equals("公关部经理")) postId = 15;
+                            else if (post.Equals("项目执行")) postId = 17;
+                            else if (post.Equals("市场推广")) postId = 57;
+                            else if (post.Equals("策划")) postId = 16;
+                            else if (post.Equals("3D设计师")) postId = 19;
+                            else if (post.Equals("平面设计")) postId = 18;
+                            else if (post.Equals("设计")) postId = 18;
+                            else if (post.Equals("活动策划")) postId = 16;
+                            else if (post.Equals("活动策划执行")) postId = 17;
+                            else if (post.Equals("高级活动策划")) postId = 16;
+                            else postId = 0;
+                            break;
+                        case 115:
+                            if (post.Equals("系统管理员")) { depId = 9; postId = 31; }
+                            else if (post.Equals("后勤专员")) { depId = 5; postId = 58; }
+
+                            break;
+                        case 287: //会展部
+                                  //59  2   17  经理
+                                  //60  2   17  主管
+                                  //61  2   17  会展专员
+                                  //62  2   17  会展销售
+                                  //63  2   17  会展策划
+                                  //64  2   17  招商专员
+                                  //65  2   17  媒介专员
+                            depId = 17;
+                            if (post.Equals("会展部经理")) postId = 59;
+                            else if (post.Equals("会展专员")) postId = 61;
+                            else if (post.Equals("会展销售")) postId = 62;
+                            else if (post.Equals("招商招展")) postId = 63;
+                            else if (post.Equals("会展部主管")) postId = 60;
+                            else if (post.Equals("媒介专员")) postId = 65;
+                            else if (post.Equals("会展策划")) postId = 63;
+                            else if (post.Equals("招商专员")) postId = 64;
+                            else postId = 61;
+                            break;
+                        case 304: //总经理助理
+                                  //1    1   总经理
+                                  //2    1   副总经理
+                                  //3    1   总经理助理
+
+                            depId = 1;
+                            postId = 3;
+                            break;
+                        case 323: //海外游学部
+                            //66	3	19	游学顾问
+                            depId = 19;
+                            postId = 66;
+                            break;
+                        case 335: //会议会展策划部
+                                  //15   5   经理
+                                  //16   5   文案策划
+                                  //17   5   活动执行
+                                  //18   5   平面设计师
+                                  //19   5   3D设计师
+                                  //56   5   销售
+                                  //46   5   网络推广
+                                  //57   5   市场推广
+                                  //67   5   策划主管 
+                            depId = 5;
+                            if (post.Equals("会展专员")) { depId = 17; postId = 61; }
+                            else if (post.Equals("策划执行")) postId = 16;
+                            else if (post.Equals("策划主管")) postId = 67;
+                            else if (post.Equals("策划")) postId = 16;
+                            else if (post.Equals("文案")) postId = 16;
+                            else if (post.Equals("策划执行")) postId = 17;
+                            else if (post.Equals("执行专员 ")) postId = 17;
+                            break;
+                        case 761://项目部
+                                 //20   6   经理
+                                 //21   6   市场专员
+                                 //53   6   主管
+
+                            if (post.Equals("销售主管")) { depId = 6; postId = 20; }
+                            else if (post.Equals("场站经理")) { depId = 6; postId = 53; }
+                            else if (post.Equals("暂无")) { depId = 5; postId = 58; }
+                            else
+                            {
+                                if (oldUser.CnName.Equals("许婷"))
+                                {
+                                    depId = 5; postId = 16;
+                                }
+                                else if (oldUser.CnName.Equals("陈雪"))
+                                {
+                                    depId = 5; postId = 17;
+                                }
+                            }
+                            break;
+                        default:
+                            break;
+                    }
+                    #endregion
+
+                    string idCrad = string.Empty;
+                    string idCradNumber = string.Empty;
+                    DateTime? birthday = null;
+                    if (!string.IsNullOrEmpty(oldUser.IDCard))
+                    {
+                        idCrad = oldUser.IDCard.Trim();
+                        
+                        #region 处理身份证Number 出生日期
+                        if (idCrad.ValidateIdNumber())
+                        {
+                            idCradNumber = idCrad.ToString();
+                            string birthDate = idCrad.Substring(6, 8);  // 提取从第6位开始的8个字符,即出生日期部分
+                            birthday = new DateTime(int.Parse(birthDate.Substring(0, 4)), int.Parse(birthDate.Substring(4, 2)), int.Parse(birthDate.Substring(6, 2)));
+
+                        }
+                        #endregion
+                    }
+
+
+
+                    DateTime? startWorkDate = null;
+                    #region 判断是否是日期格式的字符串
+                    string format = "yyyy-MM-dd";     // 日期格式
+                    DateTime date;
+                    bool isParsed = DateTime.TryParseExact(oldUser.StartWorkDate, format, CultureInfo.InvariantCulture, DateTimeStyles.None, out date);
+
+                    if (isParsed)
+                    {
+                        startWorkDate = date;
+                    }
+
+                    #endregion
+
+                    int education = 0;
+                    #region 处理学历
+
+                    if (!string.IsNullOrEmpty(oldUser.Education))
+                    {
+                        //0 未设置 1 小学、2 初中、3 高中、4 专科、5 本科、6 研究生
+                        if (oldUser.Education.Equals("本科")) education = 5;
+                        else if (oldUser.Education.Equals("大学专科")) education = 4;
+                        else if (oldUser.Education.Equals("大专")) education = 4;
+                        else if (oldUser.Education.Equals("全日制本科")) education = 5;
+                        else if (oldUser.Education.Equals("硕士")) education = 6;
+                        else if (oldUser.Education.Equals("硕士研究生")) education = 6;
+                        else if (oldUser.Education.Equals("学士")) education = 6;
+                        else if (oldUser.Education.Equals("研究生")) education = 6;
+                        else if (oldUser.Education.Equals("专科")) education = 4;
+                    }
+                    #endregion
+
+                    int theOrAdultEducation = 0;
+                    #region 处理统招/成人
+
+                    if (!string.IsNullOrEmpty(oldUser.TheOrAdultEducation))
+                    {
+                        //0 未设置 1 成教 2 统招 3 留学
+                        if (oldUser.TheOrAdultEducation.Equals("成教")) theOrAdultEducation = 1;
+                        if (oldUser.TheOrAdultEducation.Equals("自考")) theOrAdultEducation = 1;
+                        else if (oldUser.TheOrAdultEducation.Equals("统招")) theOrAdultEducation = 2;
+                        else if (oldUser.TheOrAdultEducation.Equals("留学")) theOrAdultEducation = 3;
+
+                    }
+
+
+                    #endregion
+
+                    Sys_Users user = new Sys_Users()
+                    {
+                        Id = oldUser.Id,
+                        CnName = oldUser.CnName,
+                        EnName = oldUser.EnName,
+                        Number = oldUser.Number,
+                        CompanyId = 2,
+                        DepId = depId,
+                        JobPostId = postId,
+                        Password = oldUser.Password,
+                        Sex = oldUser.Sex,
+                        Ext = oldUser.Ext,
+                        Phone = oldUser.Phone,
+                        UrgentPhone = oldUser.UrgentPhone,
+                        Email = oldUser.Email,
+                        Address = oldUser.Address,
+                        Edate = oldUser.Edate,
+                        Rdate = oldUser.Rdate,
+                        Seniority = oldUser.Seniority,
+                        Birthday = birthday,
+                        IDCard = idCradNumber,
+                        StartWorkDate = startWorkDate,
+                        GraduateInstitutions = oldUser.GraduateInstitutions,
+                        Professional = oldUser.Professional,
+                        Education = education,
+                        TheOrAdultEducation = theOrAdultEducation,
+                        MaritalStatus = oldUser.MaritalStatus,
+                        HomeAddress = oldUser.HomeAddress,
+                        UsePeriod = oldUser.UsePeriod,
+                        WorkExperience = oldUser.WorkExperience,
+                        Certificate = oldUser.Certificate,
+                        HrAudit = 1,
+                        CreateUserId = 208,
+                        CreateTime = DateTime.Now,
+                        DeleteUserId = null,
+                        DeleteTime = string.Empty,
+                        Remark = oldUser.Remark,
+                        IsDel = oldUser.IsDel,
+                    };
+
+                    newOaUserDatas.Add(user);
+                }
+
+                if (newOaUserDatas.Count > 0)
+                {
+
+                    //执行删除
+                    bool resetStatus = _sqlSuar.DbMaintenance.TruncateTable<Sys_Users>();
+
+                    //执行批量添加
+                    int addTotal = await _sqlSuar.Insertable(newOaUserDatas).IgnoreColumns(it => it.Id).ExecuteCommandAsync();
+
+                }
+
+
+                view = new
+                {
+                    Code = 200,
+                    Msg = "操作成功!",
+                    Data = newOaUserDatas
+
+                };
+            }
+            catch (Exception ex)
+            {
+
+                view = new
+                {
+                    Code = 400,
+                    Msg = ex.Message
+
+                };
+            }
+
+
             return Ok(JsonView(view));
         }
     }

+ 1 - 1
OASystem/OASystem.Api/Controllers/BusinessController.cs

@@ -80,7 +80,7 @@ namespace OASystem.API.Controllers
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
-        [HttpPost]
+        [HttpGet,HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> PostCurrencyList()
         {

+ 5 - 2
OASystem/OASystem.Api/Controllers/PersonnelModuleController.cs

@@ -151,7 +151,10 @@ namespace OASystem.API.Controllers
                 }
                 else //更新
                 {
-                    int updCount = await _sqlSugar.Updateable(pm_WageIssueWorkingDay).IgnoreColumns(z => new { z.CreateUserId, z.CreateTime, z.DeleteUserId, z.DeleteTime, z.IsDel }).ExecuteCommandAsync();
+                    int updCount = await _sqlSugar.Updateable(pm_WageIssueWorkingDay)
+                        .IgnoreColumns(z => new { z.CreateUserId, z.CreateTime, z.DeleteUserId, z.DeleteTime, z.IsDel })
+                        .WhereColumns(it => it.Id)
+                        .ExecuteCommandAsync();
                 }
 
                 List<Sys_Calendar> sys_Calendars_add = new List<Sys_Calendar>();
@@ -168,7 +171,7 @@ namespace OASystem.API.Controllers
                 if (sys_Calendars_update.Count > 0)
                 {
                     await _sqlSugar.Updateable<Sys_Calendar>(sys_Calendars)
-                    .UpdateColumns(it => new { it.Dt, it.IsWorkDay, it.IsHoliDay, it.HoliDayName })
+                    .UpdateColumns(it => new { it.Dt, it.IsWorkDay, it.IsHoliDay, it.HoliName })
                     .WhereColumns(it => it.Id)
                     .ExecuteCommandAsync();
                 }

+ 6 - 0
OASystem/OASystem.Domain/Dtos/PersonnelModule/WageSheetMonthWorkdaysDto.cs

@@ -20,6 +20,12 @@ namespace OASystem.Domain.Dtos.PersonnelModule
     public class WageSheetMonthWorkdaysAddOrEditDto 
     {
         public int UserId { get; set; }
+
+        /// <summary>
+        /// 月份Id 
+        /// </summary>
+        public int Id { get; set; }
+
         /// <summary>
         /// 年月
         /// </summary>

+ 4 - 1
OASystem/OASystem.Domain/Entities/EntityBase.cs

@@ -1,4 +1,6 @@
-namespace OASystem.Domain.Entities
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace OASystem.Domain.Entities
 {
     /// <summary>
     /// 实体基类
@@ -9,6 +11,7 @@
         /// 编号
         /// </summary>
         [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
+        //[DatabaseGenerated(DatabaseGeneratedOption.None)]
         public int Id { get; set; }
         /// <summary>
         /// 创建者Id

+ 1 - 1
OASystem/OASystem.Domain/Entities/System/Sys_Calendar.cs

@@ -34,6 +34,6 @@ namespace OASystem.Domain.Entities.System
         /// 节假日名称
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "varchar(50)")]
-        public string HoliDayName { get; set; }
+        public string HoliName { get; set; }
     }
 }

+ 3 - 3
OASystem/OASystem.Domain/Entities/System/Sys_Users.cs

@@ -92,7 +92,7 @@ namespace OASystem.Domain.Entities.System
         /// 生日
         /// </summary> 
         [SugarColumn(IsNullable = true,ColumnDataType = "DateTime")]
-        public DateTime Birthday { get; set; }
+        public DateTime? Birthday { get; set; }
         /// <summary>
         /// 身份证号码
         /// </summary>
@@ -102,7 +102,7 @@ namespace OASystem.Domain.Entities.System
         /// 开始工作时
         /// </summary>
         [SugarColumn(IsNullable = true, ColumnDataType = "DateTime")]
-        public DateTime StartWorkDate { get; set; }
+        public DateTime? StartWorkDate { get; set; }
         /// <summary>
         /// 毕业学校
         /// </summary>
@@ -122,7 +122,7 @@ namespace OASystem.Domain.Entities.System
         public int Education { get; set; }
         /// <summary>
         /// 学历类型
-        ///0 未设置 1 成教 2 统招
+        ///0 未设置 1 成教 2 统招 3 留学
         /// </summary>
         [SugarColumn(IsNullable = true,ColumnDataType ="int")]
         public int TheOrAdultEducation { get; set; }

+ 353 - 0
OASystem/OASystem.Domain/ViewModels/System/OA2014UsersView.cs

@@ -0,0 +1,353 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.ViewModels.System
+{
+    /// <summary>
+    /// 数据库 OA2014
+    /// 表  Users 
+    /// View 
+    /// </summary>
+    public class OA2014UsersView
+    {
+        int id;
+
+        /// <summary>
+        /// 主键
+        /// </summary>
+        public int Id
+        {
+            get { return id; }
+            set { id = value; }
+        }
+
+        string cnName;
+
+        /// <summary>
+        /// 中文姓名
+        /// </summary>
+        public string CnName
+        {
+            get { return cnName; }
+            set { cnName = value; }
+        }
+
+        string enName;
+
+        /// <summary>
+        /// 英文姓名
+        /// </summary>
+        public string EnName
+        {
+            get { return enName; }
+            set { enName = value; }
+        }
+
+        string number;
+
+        /// <summary>
+        /// 员工号
+        /// </summary>
+        public string Number
+        {
+            get { return number; }
+            set { number = value; }
+        }
+
+        int did;
+
+        /// <summary>
+        /// 设置数据类外键
+        /// </summary>
+        public int Did
+        {
+            get { return did; }
+            set { did = value; }
+        }
+
+        string password;
+
+        /// <summary>
+        /// 密码
+        /// </summary>
+        public string Password
+        {
+            get { return password; }
+            set { password = value; }
+        }
+
+        int sex;
+
+        /// <summary>
+        /// 性别
+        /// </summary>
+        public int Sex
+        {
+            get { return sex; }
+            set { sex = value; }
+        }
+
+        string post;
+
+        /// <summary>
+        /// 职位
+        /// </summary>
+        public string Post
+        {
+            get { return post; }
+            set { post = value; }
+        }
+
+        string ext;
+
+        /// <summary>
+        /// 分机号
+        /// </summary>
+        public string Ext
+        {
+            get { return ext; }
+            set { ext = value; }
+        }
+
+        string phone;
+
+        /// <summary>
+        /// 手机号
+        /// </summary>
+        public string Phone
+        {
+            get { return phone; }
+            set { phone = value; }
+        }
+
+        string urgentPhone;
+
+        /// <summary>
+        /// 紧急联络电话
+        /// </summary>
+        public string UrgentPhone
+        {
+            get { return urgentPhone; }
+            set { urgentPhone = value; }
+        }
+
+        string email;
+
+        /// <summary>
+        /// 电子邮箱
+        /// </summary>
+        public string Email
+        {
+            get { return email; }
+            set { email = value; }
+        }
+
+        string address;
+
+        /// <summary>
+        /// 目前所在地区
+        /// </summary>
+        public string Address
+        {
+            get { return address; }
+            set { address = value; }
+        }
+
+        DateTime edate;
+
+        /// <summary>
+        /// 入职日期
+        /// </summary>
+        public DateTime Edate
+        {
+            get { return edate; }
+            set { edate = value; }
+        }
+
+        DateTime rdate;
+
+        /// <summary>
+        /// 离职日期
+        /// </summary>
+        public DateTime Rdate
+        {
+            get { return rdate; }
+            set { rdate = value; }
+        }
+
+        int seniority;
+
+        /// <summary>
+        /// 工龄
+        /// </summary>
+        public int Seniority
+        {
+            get { return seniority; }
+            set { seniority = value; }
+        }
+
+        string remark;
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark
+        {
+            get { return remark; }
+            set { remark = value; }
+        }
+
+        int isDel;
+
+        /// <summary>
+        /// 删除标识
+        /// </summary>
+        public int IsDel
+        {
+            get { return isDel; }
+            set { isDel = value; }
+        }
+
+        int company;
+
+        /// <summary>
+        /// 所属公司
+        /// </summary>
+        public int Company
+        {
+            get { return company; }
+            set { company = value; }
+        }
+
+        string birthday;
+
+        /// <summary>
+        /// 出生日期
+        /// </summary>
+        public string Birthday
+        {
+            get { return birthday; }
+            set { birthday = value; }
+        }
+        string iDCard;
+
+        /// <summary>
+        /// 身份证号码
+        /// </summary>
+        public string IDCard
+        {
+            get { return iDCard; }
+            set { iDCard = value; }
+        }
+        string startWorkDate;
+        /// <summary>
+        /// 最初参加工作时间
+        /// </summary>
+        public string StartWorkDate
+        {
+            get { return startWorkDate; }
+            set { startWorkDate = value; }
+        }
+        string education;
+
+        /// <summary>
+        /// 学历
+        /// </summary>
+        public string Education
+        {
+            get { return education; }
+            set { education = value; }
+        }
+        string professional;
+
+        /// <summary>
+        /// 专业
+        /// </summary>
+        public string Professional
+        {
+            get { return professional; }
+            set { professional = value; }
+        }
+        string graduateInstitutions;
+
+        /// <summary>
+        /// 毕业院校
+        /// </summary>
+        public string GraduateInstitutions
+        {
+            get { return graduateInstitutions; }
+            set { graduateInstitutions = value; }
+        }
+        string theOrAdultEducation;
+
+        /// <summary>
+        /// 统招/成教
+        /// </summary>
+        public string TheOrAdultEducation
+        {
+            get { return theOrAdultEducation; }
+            set { theOrAdultEducation = value; }
+        }
+        string maritalStatus;
+        /// <summary>
+        /// 婚姻状况
+        /// </summary>
+        public string MaritalStatus
+        {
+            get { return maritalStatus; }
+            set { maritalStatus = value; }
+        }
+        string homeAddress;
+
+        /// <summary>
+        /// 家庭地址
+        /// </summary>
+        public string HomeAddress
+        {
+            get { return homeAddress; }
+            set { homeAddress = value; }
+        }
+        string usePeriod;
+        /// <summary>
+        /// 试用期限
+        /// </summary>
+        public string UsePeriod
+        {
+            get { return usePeriod; }
+            set { usePeriod = value; }
+        }
+        string workExperience;
+
+        /// <summary>
+        /// 工作经历单位
+        /// </summary>
+        public string WorkExperience
+        {
+            get { return workExperience; }
+            set { workExperience = value; }
+        }
+        string certificateTime;
+        /// <summary>
+        /// 证书时间
+        /// </summary>
+        public string CertificateTime
+        {
+            get { return certificateTime; }
+            set { certificateTime = value; }
+        }
+        string certificate;
+
+        /// <summary>
+        /// 专业培训及资格证书
+        /// </summary>
+        public string Certificate
+        {
+            get { return certificate; }
+            set { certificate = value; }
+        }
+
+    }
+}

+ 15 - 0
OASystem/OASystem.Infrastructure/Tools/CommonFun.cs

@@ -297,4 +297,19 @@ public static class CommonFun
         return rateStr;
     }
     #endregion
+
+    #region 验证身份证号码
+    /// <summary>
+    /// 正则表达式
+    /// 验证身份证号码
+    /// </summary>
+    /// <param name="idNumber"></param>
+    /// <returns></returns>
+    public static bool ValidateIdNumber(this string idNumber)
+    {
+        string pattern = @"^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}(\d|X)$";
+        Regex regex = new Regex(pattern);
+        return regex.IsMatch(idNumber);
+    }
+    #endregion
 }