private PersonnelService CreatePersonnelService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new PersonnelService(userId);

            return(service);
        }
예제 #2
0
        public IHttpActionResult GetById(int PersonnelId)
        {
            PersonnelService personnelService = CreatePersonnelService();
            var personnelById = personnelService.GetPersonnelById(PersonnelId);

            return(Ok(personnelById));
        }
예제 #3
0
        public IHttpActionResult GetByInactive()
        {
            PersonnelService personnelService = CreatePersonnelService();
            var personnelById = personnelService.GetInactivePersonnel();

            return(Ok(personnelById));
        }
예제 #4
0
        public IHttpActionResult Get()
        {
            PersonnelService personnelService = CreatePersonnelService();
            var allPersonnel = personnelService.GetPersonnel();

            return(Ok(allPersonnel));
        }
예제 #5
0
 public AjouterStageModelView(ClubModel club)
 {
     this.club           = club;
     stage               = new StageModel();
     Entraineurs         = PersonnelService.ListeEntraineur(club);
     AjouterStageCommand = new SimpleCommand(AjouterStage);
 }
예제 #6
0
        public ActionResult getPrenom(int id)
        {
            IPersonnelService pers = new PersonnelService();


            string objcity = pers.findPrenomByNom(id);

            return(Json(objcity));
        }
예제 #7
0
        public ActionResult GetEmployees(int clubid, string personneltype, int?conceptid = null, int?personnelid = null)
        {
            _logger.LogInformation("Logging Info");

            PersonnelFilters filters = RequestHelper.GetPersonnelFilters(this.Request);

            List <Personnel> employees = new PersonnelService(clubid, filters).GetPersonnel();

            var emp = employees.Where((e) => e.clubId == clubid);

            return(Ok(emp));
        }
예제 #8
0
        /// <summary>
        /// 员工转正提醒
        /// </summary>
        /// <param name="eGFunc"></param>
        private void EmployeeCheckRemindTrigger(IEnumerable <XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return;
                }

                string strId = string.Empty;

                foreach (var item in eGFunc)
                {
                    if (item.Attribute("Name").Value == "BEREGULARID")
                    {
                        strId = item.Attribute("Value").Value;
                        break;
                    }
                }

                PersonnelService   svcPersonnel = new PersonnelService();
                T_HR_EMPLOYEEENTRY entry        = svcPersonnel.GetEmployeeEntryByEmployeeID(strId);
                if (entry != null)
                {
                    //员工已经离职了,不需要再发员工转正提醒待办
                    if (entry.T_HR_EMPLOYEE.EMPLOYEESTATE == "2")
                    {
                        return;
                    }
                    string             strMsg        = "";
                    T_HR_EMPLOYEECHECK employeeCheck = new T_HR_EMPLOYEECHECK();
                    employeeCheck.BEREGULARID              = Guid.NewGuid().ToString();
                    employeeCheck.T_HR_EMPLOYEE            = new T_HR_EMPLOYEE();
                    employeeCheck.T_HR_EMPLOYEE.EMPLOYEEID = entry.T_HR_EMPLOYEE.EMPLOYEEID;
                    employeeCheck.EMPLOYEECODE             = entry.T_HR_EMPLOYEE.EMPLOYEECODE;
                    employeeCheck.EMPLOYEENAME             = entry.T_HR_EMPLOYEE.EMPLOYEECNAME;
                    employeeCheck.PROBATIONPERIOD          = entry.PROBATIONPERIOD;
                    employeeCheck.REPORTDATE     = entry.ENTRYDATE;
                    employeeCheck.ONDUTYDATE     = entry.ONPOSTDATE;
                    employeeCheck.OWNERID        = entry.OWNERID;
                    employeeCheck.OWNERCOMPANYID = entry.OWNERCOMPANYID;
                    employeeCheck.CREATEUSERID   = entry.CREATEUSERID;
                    employeeCheck.CHECKSTATE     = "0";
                    svcPersonnel.EmployeeCheckAdd(employeeCheck, ref strMsg);
                    svcPersonnel.EmployeeCheckAlarm(employeeCheck);
                }
            }
            catch (Exception e)
            {
                Tracer.Debug("员工转正提醒出现错误" + e.ToString());
                throw e;
            }
        }
예제 #9
0
        public void Initialisation()
        {
            foreach (PersonnelModel e in PersonnelService.ListeEntraineur(club))
            {
                ListeDesEntraineurs.Add(e);
            }
            ListeDesCompetiteursSansEquipe = MembreService.ListeCompetiteurDisponible(club);

            AjouterCompetiteurSCommand   = new SimpleCommand(AjouterCompetiteurS);
            SupprimerCompetiteurSCommand = new SimpleCommand(SupprimerCompetiteurS);
            AjouterEquipeCommand         = new SimpleCommand(AjouterEquipe);
        }
예제 #10
0
        /// <summary>
        /// 更新工龄
        /// </summary>
        /// <param name="eGFunc"></param>
        private void UpdateEmployeeWorkAgeByID(IEnumerable <XElement> eGFunc)
        {
            if (eGFunc.Count() == 0)
            {
                return;
            }

            string companyID = string.Empty;

            foreach (var item in eGFunc)
            {
                if (item.Attribute("Name").Value == "COMPANYID")
                {
                    companyID = item.Attribute("Value").Value;
                    break;
                }
            }

            PersonnelService svcPersonnel = new PersonnelService();

            svcPersonnel.UpdateEmployeeWorkAgeByID(companyID);
        }
예제 #11
0
        public void finalTest()
        {
            Operation op = new Operation();

            // Personnel p =ch1.GetById(ch.CodePersonnel);

            //// Personnel p1 = new Personnel();

            op.DateDebut = new DateTime(2016, 1, 1, 12, 00, 00);
            op.DateFin   = new DateTime(2016, 1, 1, 13, 40, 00);
            op.Reussi    = false;
            op.Duree     = Int32.Parse((op.DateFin - op.DateDebut).TotalMinutes.ToString());
            op.PatientId = 1;
            op.Personnels.Add(ch);
            IOperationService OP = new OperationServices();

            OP.Add(op);

            OP.Commit();
            Operation a  = OP.GetById(op.OperationId);
            Operation oo = OP.Get(c => c.Reussi);
            int       b  = a.Personnels.Select(p1 => p1.CodePersonnel).First();

            Console.WriteLine(b);
            PersonnelService per = new PersonnelService();
            //Personnel p = per.GetById(41);
            Chirurgien ch3 = ch1.Get(c => c.CodePersonnel == b);

            Console.WriteLine(ch3.CodePersonnel);

            // ch3.NoteXP = +5;
            // ch1.Update(ch3);
            //ch1.Commit();
            foreach (var r in ch1.getChirurgienByOperationReussit())
            {
                Console.WriteLine(r.CodePersonnel);
            }
        }
예제 #12
0
        /// <summary>
        /// 根据传回的xml生成薪资档案
        /// </summary>
        /// <param name="eGFunc"></param>
        /// <returns></returns>
        private static string AddEmployeeSalaryArchive(IEnumerable <XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return("");
                }

                string strEmployeeID        = string.Empty;
                string strOwnerID           = string.Empty;
                string strOwnerPostID       = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID    = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                    case "EMPLOYEEID":
                        strEmployeeID = q.Attribute("Value").Value;
                        break;

                    case "OWNERID":
                        strOwnerID = q.Attribute("Value").Value;
                        break;

                    case "OWNERPOSTID":
                        strOwnerPostID = q.Attribute("Value").Value;
                        break;

                    case "OWNERDEPARTMENTID":
                        strOwnerDepartmentID = q.Attribute("Value").Value;
                        break;

                    case "OWNERCOMPANYID":
                        strOwnerCompanyID = q.Attribute("Value").Value;
                        break;
                    }
                }


                SalaryService ser = new SalaryService();

                T_HR_SALARYARCHIVE entity = new T_HR_SALARYARCHIVE();
                entity.SALARYARCHIVEID = Guid.NewGuid().ToString();
                entity.EMPLOYEEID      = strEmployeeID.Replace("{", "").Replace("}", "");

                entity.CHECKSTATE         = ((int)CheckStates.UnSubmit).ToString();
                entity.EDITSTATE          = ((int)EditStates.UnActived).ToString();
                entity.CREATEDATE         = DateTime.Now;
                entity.OWNERID            = strOwnerID;
                entity.OWNERPOSTID        = strOwnerPostID;
                entity.OWNERDEPARTMENTID  = strOwnerDepartmentID;
                entity.OWNERCOMPANYID     = strOwnerCompanyID;
                entity.CREATEUSERID       = strOwnerID;
                entity.CREATEPOSTID       = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID    = strOwnerCompanyID;
                PersonnelService  ps  = new PersonnelService();
                T_HR_EMPLOYEEPOST emp = ps.GetEmployeePostActivedByEmployeeID(entity.EMPLOYEEID);
                if (emp != null)
                {
                    entity.EMPLOYEECODE = emp.T_HR_EMPLOYEE.EMPLOYEECODE;
                    entity.EMPLOYEENAME = emp.T_HR_EMPLOYEE.EMPLOYEECNAME;

                    entity.OWNERID           = emp.T_HR_EMPLOYEE.EMPLOYEEID;
                    entity.OWNERPOSTID       = emp.T_HR_EMPLOYEE.OWNERPOSTID;
                    entity.OWNERDEPARTMENTID = emp.T_HR_EMPLOYEE.OWNERDEPARTMENTID;
                    entity.OWNERCOMPANYID    = emp.T_HR_EMPLOYEE.OWNERCOMPANYID;
                    entity.POSTLEVEL         = emp.POSTLEVEL;
                    entity.EMPLOYEEPOSTID    = emp.EMPLOYEEPOSTID;
                }
                ser.SalaryArchiveAdd(entity);
                return(entity.SALARYARCHIVEID);
            }
            catch (Exception e)
            {
                string abc = "<HR>Message=[" + e.Message + "]" + "<HR>Source=[" + e.Source + "]<HR>StackTrace=[" + e.StackTrace + "]<HR>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return(abc);
            }
        }
예제 #13
0
 public PersonnelController()
 {
     _personnelService      = new PersonnelService();
     _departmentService     = new DepartmentService();
     _departmentRoleService = new DepartmentRoleService();
 }
예제 #14
0
 private void ModifierPersonnel(object obj)
 {
     PersonnelService.ModifierPersonnel(club, P);
     SauvegarderVisible = "Hidden";
 }
예제 #15
0
 public PersonnelController(PersonnelService service)
 {
     _service = service;
 }
 public PersonnelController()
 {
     _engineService         = new PersonnelService();
     FormConstructProvider  = new PersonnelConstructs();
     TableConstructProvider = new PersonnelConstructs();
 }
예제 #17
0
 public PersonnelApiController()
 {
     _engineService = new PersonnelService();
 }
예제 #18
0
        private PersonnelService CreatePersonnelService()
        {
            var personnelService = new PersonnelService();

            return(personnelService);
        }
예제 #19
0
 private void AjouterPersonnel(object obj)
 {
     PersonnelService.AjouterPersonnel(club, Personnel);
     ButtonAjouter    = "Hidden";
     ButtonVoirMembre = "Visible";
 }
예제 #20
0
        /// <summary>
        /// 根据传回的xml生成员工入职
        /// </summary>
        /// <param name="eGFunc"></param>
        /// <returns></returns>
        private static string AddEmployeeEntry(IEnumerable <XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return("");
                }

                string strEmployeeID        = string.Empty;
                string strOwnerID           = string.Empty;
                string strOwnerPostID       = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID    = string.Empty;
                string Name            = string.Empty;
                int    PROBATIONPERIOD = 0;
                string Idnumber        = string.Empty;
                string sex             = string.Empty;

                string isAcceptemploied = string.Empty;
                string createuserid     = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                    case "EMPLOYEEID":
                        strEmployeeID = q.Attribute("Value").Value;
                        break;

                    case "OWNERID":
                        strOwnerID = q.Attribute("Value").Value;
                        break;

                    case "OWNERPOSTID":
                        strOwnerPostID = q.Attribute("Value").Value;
                        break;

                    case "OWNERDEPARTMENTID":
                        strOwnerDepartmentID = q.Attribute("Value").Value;
                        break;

                    case "OWNERCOMPANYID":
                        strOwnerCompanyID = q.Attribute("Value").Value;
                        break;

                    case "NAME":
                        Name = q.Attribute("Value").Value;
                        break;

                    case "IDCARDNUMBER":
                        Idnumber = q.Attribute("Value").Value;
                        break;

                    case "SEX":
                        sex = q.Attribute("Value").Value;
                        break;

                    case "PROBATIONPERIOD":
                        PROBATIONPERIOD = int.Parse(q.Attribute("Value").Value);
                        break;

                    case "ISACCEPTEMPLOIED":
                        isAcceptemploied = q.Attribute("Value").Value;
                        break;

                    case "CREATEUSERID":
                        createuserid = q.Attribute("Value").Value;
                        break;
                    }
                }
                //if (isAcceptemploied != "2")
                //{
                //    return string.Empty;
                //}

                PersonnelService   ser      = new PersonnelService();
                T_HR_EMPLOYEEENTRY entry    = new T_HR_EMPLOYEEENTRY();
                T_HR_EMPLOYEE      employee = new T_HR_EMPLOYEE();
                T_HR_EMPLOYEEPOST  epost    = new T_HR_EMPLOYEEPOST();
                employee.EMPLOYEEID        = Guid.NewGuid().ToString();
                employee.EMPLOYEECNAME     = Name;
                employee.IDNUMBER          = Idnumber.Replace("{", "").Replace("}", "");
                employee.OWNERCOMPANYID    = strOwnerCompanyID.Replace("{", "").Replace("}", "");
                employee.OWNERDEPARTMENTID = strOwnerDepartmentID.Replace("{", "").Replace("}", "");
                employee.OWNERPOSTID       = strOwnerPostID.Replace("{", "").Replace("}", "");
                employee.OWNERID           = employee.EMPLOYEEID.Replace("{", "").Replace("}", "");
                employee.CREATEDATE        = DateTime.Now;
                employee.SEX          = sex;
                employee.CREATEUSERID = createuserid;

                epost.EMPLOYEEPOSTID           = Guid.NewGuid().ToString();
                epost.ISAGENCY                 = "0";
                epost.CREATEDATE               = DateTime.Now;
                epost.T_HR_POST                = new T_HR_POST();
                epost.T_HR_POST.POSTID         = employee.OWNERPOSTID;
                epost.T_HR_EMPLOYEE            = new T_HR_EMPLOYEE();
                epost.T_HR_EMPLOYEE.EMPLOYEEID = employee.EMPLOYEEID;
                epost.CREATEUSERID             = createuserid;
                epost.CHECKSTATE               = "0";

                entry.EMPLOYEEENTRYID          = Guid.NewGuid().ToString();
                entry.CHECKSTATE               = "0";
                entry.PROBATIONPERIOD          = PROBATIONPERIOD;
                entry.T_HR_EMPLOYEE            = new T_HR_EMPLOYEE();
                entry.T_HR_EMPLOYEE.EMPLOYEEID = employee.EMPLOYEEID;
                entry.CREATEDATE               = System.DateTime.Now;
                entry.EMPLOYEEPOSTID           = epost.EMPLOYEEPOSTID;
                entry.OWNERCOMPANYID           = employee.OWNERCOMPANYID;
                entry.OWNERDEPARTMENTID        = employee.OWNERDEPARTMENTID;
                entry.OWNERPOSTID              = employee.OWNERPOSTID;
                entry.OWNERID      = employee.EMPLOYEEID;
                entry.CREATEUSERID = createuserid;


                ser.AddEmployeeEntry(employee, entry, epost);
                return(entry.EMPLOYEEENTRYID);
            }
            catch (Exception e)
            {
                string abc = "<HR>Message=[" + e.Message + "]" + "<HR>Source=[" + e.Source + "]<HR>StackTrace=[" + e.StackTrace + "]<HR>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return(abc);
            }
        }
예제 #21
0
 public HomeController()
 {
     _personnelService = new PersonnelService();
 }
예제 #22
0
        /// <summary>
        /// 合同到期提醒
        /// </summary>
        /// <param name="eGFunc"></param>
        private void EmployeeContractRemindTrigger(IEnumerable <XElement> eGFunc)
        {
            try
            {
                SMT.Foundation.Log.Tracer.Debug("员工合同到期开始");
                if (eGFunc.Count() == 0)
                {
                    return;
                }

                string strId = string.Empty;

                foreach (var item in eGFunc)
                {
                    if (item.Attribute("Name").Value == "EMPLOYEECONTACTID")
                    {
                        strId = item.Attribute("Value").Value;
                        break;
                    }
                }
                PersonnelService svcPersonnel = new PersonnelService();

                T_HR_EMPLOYEECONTRACT entry = svcPersonnel.GetEmployeeContractByID(strId);

                if (entry != null)
                {
                    if (entry.T_HR_EMPLOYEE != null && entry.T_HR_EMPLOYEE.EMPLOYEESTATE != "2")
                    {
                        string strMsg = "";
                        T_HR_EMPLOYEECONTRACT employeeContract = new T_HR_EMPLOYEECONTRACT();
                        employeeContract.EMPLOYEECONTACTID        = Guid.NewGuid().ToString();
                        employeeContract.T_HR_EMPLOYEE            = new T_HR_EMPLOYEE();
                        employeeContract.T_HR_EMPLOYEE.EMPLOYEEID = entry.T_HR_EMPLOYEE.EMPLOYEEID;
                        employeeContract.FROMDATE           = entry.FROMDATE;
                        employeeContract.TODATE             = entry.TODATE;
                        employeeContract.ENDDATE            = entry.ENDDATE;
                        employeeContract.CONTACTPERIOD      = entry.CONTACTPERIOD;
                        employeeContract.CONTACTCODE        = entry.CONTACTCODE;
                        employeeContract.ATTACHMENT         = entry.ATTACHMENT;
                        employeeContract.ATTACHMENTPATH     = entry.ATTACHMENTPATH;
                        employeeContract.ALARMDAY           = entry.ALARMDAY;
                        employeeContract.CHECKSTATE         = "0";
                        employeeContract.EDITSTATE          = "0";
                        employeeContract.ISSPECIALCONTRACT  = entry.ISSPECIALCONTRACT;
                        employeeContract.REASON             = entry.REASON;
                        employeeContract.REMARK             = entry.REMARK;
                        employeeContract.OWNERID            = entry.OWNERID;
                        employeeContract.OWNERPOSTID        = entry.OWNERPOSTID;
                        employeeContract.OWNERDEPARTMENTID  = entry.OWNERDEPARTMENTID;
                        employeeContract.OWNERCOMPANYID     = entry.OWNERCOMPANYID;
                        employeeContract.CREATECOMPANYID    = entry.CREATECOMPANYID;
                        employeeContract.CREATEDATE         = System.DateTime.Now;
                        employeeContract.CREATEUSERID       = entry.CREATEUSERID;
                        employeeContract.CREATEPOSTID       = entry.CREATEPOSTID;
                        employeeContract.CREATEDEPARTMENTID = entry.CREATEDEPARTMENTID;
                        employeeContract.CREATECOMPANYID    = entry.CREATECOMPANYID;
                        employeeContract.UPDATEUSERID       = entry.UPDATEUSERID;
                        employeeContract.UPDATEDATE         = entry.UPDATEDATE;
                        //获取附件问题
                        //SMT.SaaS.BLLCommonServices PermClient = new SMT.SaaS.BLLCommonServices.PermissionWS.PermissionServiceClient();


                        svcPersonnel.EmployeeContractAdd(employeeContract, ref strMsg);
                        svcPersonnel.EmployeeContractAlarm(employeeContract);
                    }
                    else
                    {
                        var EmployeeEnt = entry.T_HR_EMPLOYEE;
                        SMT.Foundation.Log.Tracer.Debug("员工" + EmployeeEnt.EMPLOYEEID + "的在EMPLOYEESTATE:" + EmployeeEnt.EMPLOYEESTATE
                                                        + ",不自动生成合同。");
                    }
                }
                else
                {
                    SMT.Foundation.Log.Tracer.Debug("员工合同到期没有获取到合同信息");
                }
            }
            catch (Exception ex)
            {
                SMT.Foundation.Log.Tracer.Debug("员工合同到期提醒出现错误:" + ex.ToString());
            }
        }
예제 #23
0
        /// <summary>
        /// 根据传回的xml生成员工合同
        /// </summary>
        /// <param name="eGFunc"></param>
        /// <returns></returns>
        private static string AddEmployeeContract(IEnumerable <XElement> eGFunc)
        {
            SMT.Foundation.Log.Tracer.Debug("开始添加员工合同信息");
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return("");
                }

                string strEmployeeID        = string.Empty;
                string strOwnerID           = string.Empty;
                string strOwnerPostID       = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID    = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                    case "EMPLOYEEID":
                        strEmployeeID = q.Attribute("Value").Value;
                        break;

                    case "OWNERID":
                        strOwnerID = q.Attribute("Value").Value;
                        break;

                    case "OWNERPOSTID":
                        strOwnerPostID = q.Attribute("Value").Value;
                        break;

                    case "OWNERDEPARTMENTID":
                        strOwnerDepartmentID = q.Attribute("Value").Value;
                        break;

                    case "OWNERCOMPANYID":
                        strOwnerCompanyID = q.Attribute("Value").Value;
                        break;
                    }
                }


                OrganizationService ser = new OrganizationService();

                T_HR_EMPLOYEECONTRACT entity = new T_HR_EMPLOYEECONTRACT();
                entity.EMPLOYEECONTACTID        = Guid.NewGuid().ToString();
                entity.T_HR_EMPLOYEE            = new T_HR_EMPLOYEE();
                entity.T_HR_EMPLOYEE.EMPLOYEEID = strEmployeeID.Replace("{", "").Replace("}", "");
                //  entity.T_HR_PENSIONDETAIL = new T_HR_PENSIONDETAIL();
                SMT.Foundation.Log.Tracer.Debug("合同员工ID:" + entity.T_HR_EMPLOYEE.EMPLOYEEID);

                entity.CHECKSTATE         = ((int)CheckStates.UnSubmit).ToString();
                entity.EDITSTATE          = ((int)EditStates.UnActived).ToString();
                entity.CREATEDATE         = DateTime.Now;
                entity.OWNERID            = strOwnerID;
                entity.OWNERPOSTID        = strOwnerPostID;
                entity.OWNERDEPARTMENTID  = strOwnerDepartmentID;
                entity.OWNERCOMPANYID     = strOwnerCompanyID;
                entity.CREATEUSERID       = strOwnerID;
                entity.CREATEPOSTID       = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID    = strOwnerCompanyID;
                string           strMsg = "";
                PersonnelService ps     = new PersonnelService();
                T_HR_EMPLOYEE    emp    = ps.GetEmployeeByID(entity.T_HR_EMPLOYEE.EMPLOYEEID);
                if (emp != null)
                {
                    entity.OWNERID           = emp.EMPLOYEEID;
                    entity.OWNERPOSTID       = emp.OWNERPOSTID;
                    entity.OWNERDEPARTMENTID = emp.OWNERDEPARTMENTID;
                    entity.OWNERCOMPANYID    = emp.OWNERCOMPANYID;
                    ps.EmployeeContractAdd(entity, ref strMsg);
                }
                else
                {
                    SMT.Foundation.Log.Tracer.Debug("引擎触发员工合同记录失败");
                }
                SMT.Foundation.Log.Tracer.Debug("合同工ID:" + entity.EMPLOYEECONTACTID);
                SMT.Foundation.Log.Tracer.Debug("开始添加员工信息:" + emp.EMPLOYEECNAME);

                SMT.Foundation.Log.Tracer.Debug("添加完员工信息的结果:" + strMsg);
                return(entity.EMPLOYEECONTACTID);
            }
            catch (Exception e)
            {
                string abc = "<HR>Message=[" + e.Message + "]" + "<HR>Source=[" + e.Source + "]<HR>StackTrace=[" + e.StackTrace + "]<HR>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return(abc);
            }
        }
예제 #24
0
        /// <summary>
        /// 根据传回的XML,添加员工社保档案
        /// </summary>
        /// <param name="xele"></param>
        private static string AddPensionMaster(IEnumerable <XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return("");
                }

                string strEmployeeID        = string.Empty;
                string strOwnerID           = string.Empty;
                string strOwnerPostID       = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID    = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                    case "EMPLOYEEID":
                        strEmployeeID = q.Attribute("Value").Value;
                        break;

                    case "OWNERID":
                        strOwnerID = q.Attribute("Value").Value;
                        break;

                    case "OWNERPOSTID":
                        strOwnerPostID = q.Attribute("Value").Value;
                        break;

                    case "OWNERDEPARTMENTID":
                        strOwnerDepartmentID = q.Attribute("Value").Value;
                        break;

                    case "OWNERCOMPANYID":
                        strOwnerCompanyID = q.Attribute("Value").Value;
                        break;
                    }
                }


                PersonnelService ser        = new PersonnelService();
                string           employeeid = strEmployeeID.Replace("{", "").Replace("}", "");
                //注释获取社保的原因:如果兼职的则存在,这样待办还是有,但实际社保却没有添加
                //var pensionTmp = ser.GetPensionMasterByEmployeeID(employeeid);
                //if (pensionTmp == null)
                //{

                T_HR_PENSIONMASTER entity = new T_HR_PENSIONMASTER();
                entity.PENSIONMASTERID          = Guid.NewGuid().ToString();
                entity.T_HR_EMPLOYEE            = new T_HR_EMPLOYEE();
                entity.T_HR_EMPLOYEE.EMPLOYEEID = employeeid;
                //  entity.T_HR_PENSIONDETAIL = new T_HR_PENSIONDETAIL();

                entity.CARDID             = string.Empty;
                entity.COMPUTERNO         = string.Empty;
                entity.CHECKSTATE         = ((int)CheckStates.UnSubmit).ToString();
                entity.EDITSTATE          = ((int)EditStates.UnActived).ToString();
                entity.CREATEDATE         = DateTime.Now;
                entity.OWNERID            = strOwnerID;
                entity.OWNERPOSTID        = strOwnerPostID;
                entity.OWNERDEPARTMENTID  = strOwnerDepartmentID;
                entity.OWNERCOMPANYID     = strOwnerCompanyID;
                entity.CREATEUSERID       = strOwnerID;
                entity.CREATEPOSTID       = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID    = strOwnerCompanyID;
                string        strMsg = "";
                T_HR_EMPLOYEE emp    = ser.GetEmployeeByID(entity.T_HR_EMPLOYEE.EMPLOYEEID);
                if (emp != null)
                {
                    entity.OWNERID           = emp.EMPLOYEEID;
                    entity.OWNERPOSTID       = emp.OWNERPOSTID;
                    entity.OWNERDEPARTMENTID = emp.OWNERDEPARTMENTID;
                    entity.OWNERCOMPANYID    = emp.OWNERCOMPANYID;
                }
                ser.PensionMasterAdd(entity, ref strMsg);
                return(entity.PENSIONMASTERID);
                //}
                //else
                //{
                //    return pensionTmp.PENSIONMASTERID;
                //}
            }
            catch (Exception e)
            {
                string abc = "<HR>Message=[" + e.Message + "]" + "<HR>Source=[" + e.Source + "]<HR>StackTrace=[" + e.StackTrace + "]<HR>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return(abc);
            }
        }
예제 #25
0
        /// <summary>
        /// 根据传回的xml生成员工离职确认
        /// </summary>
        /// <param name="eGFunc"></param>
        /// <returns></returns>
        private static string AddLeftOfficeConfirm(IEnumerable <XElement> eGFunc)
        {
            try
            {
                if (eGFunc.Count() == 0)
                {
                    return("");
                }

                string strEmployeeID        = string.Empty;
                string strOwnerID           = string.Empty;
                string strOwnerPostID       = string.Empty;
                string strOwnerDepartmentID = string.Empty;
                string strOwnerCompanyID    = string.Empty;
                string strDimissionID       = string.Empty;

                foreach (var q in eGFunc)
                {
                    string strName = q.Attribute("Name").Value;
                    switch (strName)
                    {
                    case "EMPLOYEEID":
                        strEmployeeID = q.Attribute("Value").Value;
                        break;

                    case "OWNERID":
                        strOwnerID = q.Attribute("Value").Value;
                        break;

                    case "OWNERPOSTID":
                        strOwnerPostID = q.Attribute("Value").Value;
                        break;

                    case "OWNERDEPARTMENTID":
                        strOwnerDepartmentID = q.Attribute("Value").Value;
                        break;

                    case "OWNERCOMPANYID":
                        strOwnerCompanyID = q.Attribute("Value").Value;
                        break;

                    case "DIMISSIONID":
                        strDimissionID = q.Attribute("Value").Value;
                        break;
                    }
                }


                PersonnelService ser = new PersonnelService();

                T_HR_LEFTOFFICECONFIRM entity = new T_HR_LEFTOFFICECONFIRM();
                entity.CONFIRMID       = Guid.NewGuid().ToString();
                entity.T_HR_LEFTOFFICE = new T_HR_LEFTOFFICE();
                //entity.T_HR_LEFTOFFICE.DIMISSIONID = strDimissionID.Replace("{", "").Replace("}", "");
                //  entity.T_HR_PENSIONDETAIL = new T_HR_PENSIONDETAIL();
                entity.CHECKSTATE         = ((int)CheckStates.UnSubmit).ToString();
                entity.CREATEDATE         = DateTime.Now;
                entity.OWNERID            = strEmployeeID;
                entity.OWNERPOSTID        = strOwnerPostID;
                entity.OWNERDEPARTMENTID  = strOwnerDepartmentID;
                entity.OWNERCOMPANYID     = strOwnerCompanyID;
                entity.CREATEUSERID       = strOwnerID;
                entity.CREATEPOSTID       = strOwnerPostID;
                entity.CREATEDEPARTMENTID = strOwnerDepartmentID;
                entity.CREATECOMPANYID    = strOwnerCompanyID;
                T_HR_LEFTOFFICE leftOffice = ser.GetLeftOfficeByEmployeeIDAndPostID(strEmployeeID, strOwnerPostID);
                if (leftOffice != null)
                {
                    entity.LEFTOFFICECATEGORY          = leftOffice.LEFTOFFICECATEGORY;
                    entity.LEFTOFFICEDATE              = leftOffice.LEFTOFFICEDATE;
                    entity.LEFTOFFICEREASON            = leftOffice.LEFTOFFICEREASON;
                    entity.REMARK                      = leftOffice.REMARK;
                    entity.T_HR_LEFTOFFICE.DIMISSIONID = leftOffice.DIMISSIONID;
                    entity.EMPLOYEECNAME               = leftOffice.T_HR_EMPLOYEE.EMPLOYEECNAME;
                    entity.APPLYDATE                   = leftOffice.APPLYDATE;
                    entity.EMPLOYEEPOSTID              = leftOffice.T_HR_EMPLOYEEPOST.EMPLOYEEPOSTID;
                    V_EMPLOYEEPOST eps = ser.GetEmployeeDetailByID(leftOffice.T_HR_EMPLOYEE.EMPLOYEEID);
                    entity.EMPLOYEEID   = leftOffice.T_HR_EMPLOYEE.EMPLOYEEID;
                    entity.CREATEUSERID = leftOffice.T_HR_EMPLOYEE.CREATEUSERID;
                    foreach (T_HR_EMPLOYEEPOST ep in eps.EMPLOYEEPOSTS)
                    {
                        if (ep.EMPLOYEEPOSTID == leftOffice.T_HR_EMPLOYEEPOST.EMPLOYEEPOSTID)
                        {
                            entity.OWNERID           = leftOffice.T_HR_EMPLOYEE.EMPLOYEEID;
                            entity.OWNERPOSTID       = ep.T_HR_POST.POSTID;
                            entity.OWNERDEPARTMENTID = ep.T_HR_POST.T_HR_DEPARTMENT.DEPARTMENTID;
                            entity.OWNERCOMPANYID    = ep.T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.COMPANYID;
                        }
                    }
                }



                ser.LeftOfficeConfirmAdd(entity);
                return(entity.CONFIRMID);
            }
            catch (Exception e)
            {
                string abc = "<HR>Message=[" + e.Message + "]" + "<HR>Source=[" + e.Source + "]<HR>StackTrace=[" + e.StackTrace + "]<HR>TargetSite=[" + e.TargetSite + "]";
                Tracer.Debug(abc);
                return(abc);
            }
        }
예제 #26
0
        private void SupprimerPersonnel(object obj)
        {
            PersonnelModel p = obj as PersonnelModel;

            PersonnelService.SupprimerPersonnel(club, p);
        }