Esempio n. 1
0
        //处理岗位信息一栏
        public List <T_FB_PERSONMONEYASSIGNDETAIL> UpdatePostInfo(List <T_FB_PERSONMONEYASSIGNDETAIL> listperson)
        {
            PersonnelWS.PersonnelServiceClient pe            = new PersonnelWS.PersonnelServiceClient();
            PersonnelWS.V_EMPLOYEEPOSTFORFB[]  vlistpostinfo = new PersonnelWS.V_EMPLOYEEPOSTFORFB[listperson.Count];
            int i = 0;

            listperson.ForEach(item =>
            {
                PersonnelWS.V_EMPLOYEEPOSTFORFB vpostinfo = new PersonnelWS.V_EMPLOYEEPOSTFORFB();
                vpostinfo.PERSONBUDGETAPPLYDETAILID       = item.PERSONBUDGETAPPLYDETAILID;
                vpostinfo.OWNERID     = item.OWNERID;
                vpostinfo.OWNERPOSTID = item.OWNERPOSTID;
                vlistpostinfo[i]      = vpostinfo;
                i++;
            });
            try
            {
                vlistpostinfo = pe.GetEmployeeListForFB(vlistpostinfo) as PersonnelWS.V_EMPLOYEEPOSTFORFB[];
            }
            catch (Exception ex)
            {
                SystemBLL.Debug("调用HR服务异常 GetEmployeeListForFB " + ex.ToString());
            }

            listperson.ForEach(item =>
            {
                var person = vlistpostinfo.Where(p => p.PERSONBUDGETAPPLYDETAILID == item.PERSONBUDGETAPPLYDETAILID).FirstOrDefault();
                if (person != null)
                {
                    item.SUGGESTBUDGETMONEY = person.SUM;
                    switch (person.EMPLOYEESTATE)
                    {
                    case "0":    //试用期
                        item.POSTINFO = "试用期,请注意";
                        break;

                    case "1":    //在职
                        item.POSTINFO = string.Empty;
                        break;

                    case "2":    //已离职
                        item.POSTINFO = "已离职,请删除";
                        break;

                    case "3":    //离职中
                        item.POSTINFO = "离职中,请注意";
                        break;

                    case "4":    //未入职
                        item.POSTINFO = "未入职,请删除";
                        break;

                    case "10":    //异动中
                        item.POSTINFO = "异动中,请异动后再处理";
                        break;

                    case "11":    //异动过
                        item.POSTINFO = "异动过,已转换成新岗位";

                        item.OWNERPOSTID         = person.NEWPOSTID;
                        item.OWNERPOSTNAME       = person.NEWPOSTNAME;
                        item.OWNERDEPARTMENTID   = person.NEWDEPARTMENTID;
                        item.OWNERDEPARTMENTNAME = person.NEWDEPARTMENTNAME;
                        item.OWNERCOMPANYID      = person.NEWCOMPANYID;
                        item.OWNERCOMPANYNAME    = person.NEWCOMPANYNAME;
                        break;

                    case "12":    //岗位异常
                        item.POSTINFO = "岗位异常,请删除后再选择";
                        break;

                    default:
                        item.POSTINFO = string.Empty;
                        break;
                    }

                    switch (person.ISAGENCY)
                    {
                    case "0":    //主岗位
                        // item.POSTINFO += string.Empty;
                        break;

                    case "1":    //赚职
                        if (item.POSTINFO != string.Empty && person.EMPLOYEESTATE != "1")
                        {
                            item.POSTINFO = item.POSTINFO.Insert(0, "兼职,");
                        }
                        else
                        {
                            item.POSTINFO = "兼职";
                        }
                        break;

                    default:
                        // item.POSTINFO += string.Empty;
                        break;
                    }
                }
            });
            return(listperson);
        }
Esempio n. 2
0
        //处理岗位信息一栏
        public List<T_FB_PERSONMONEYASSIGNDETAIL> UpdatePostInfo(List<T_FB_PERSONMONEYASSIGNDETAIL> listperson)
        {
            PersonnelWS.PersonnelServiceClient pe=new PersonnelWS.PersonnelServiceClient ();
            PersonnelWS.V_EMPLOYEEPOSTFORFB[] vlistpostinfo = new PersonnelWS.V_EMPLOYEEPOSTFORFB[listperson.Count];
            int i = 0;
            listperson.ForEach(item =>
                {
                    PersonnelWS.V_EMPLOYEEPOSTFORFB vpostinfo = new PersonnelWS.V_EMPLOYEEPOSTFORFB();
                    vpostinfo.PERSONBUDGETAPPLYDETAILID = item.PERSONBUDGETAPPLYDETAILID;
                    vpostinfo.OWNERID = item.OWNERID;
                    vpostinfo.OWNERPOSTID = item.OWNERPOSTID;
                    vlistpostinfo[i]=vpostinfo;
                    i++;
                });
            try
            {
                vlistpostinfo = pe.GetEmployeeListForFB(vlistpostinfo) as PersonnelWS.V_EMPLOYEEPOSTFORFB[];
                               
            }
            catch (Exception ex)
            {
                SystemBLL.Debug("调用HR服务异常 GetEmployeeListForFB " + ex.ToString());  
            }

            listperson.ForEach(item =>
            {
                var person = vlistpostinfo.Where(p => p.PERSONBUDGETAPPLYDETAILID == item.PERSONBUDGETAPPLYDETAILID ).FirstOrDefault();
                if (person != null)
                {
                    item.SUGGESTBUDGETMONEY = person.SUM;
                    switch (person.EMPLOYEESTATE)
                    {
                        case "0"://试用期
                            item.POSTINFO = "试用期,请注意";
                            break;
                        case "1"://在职
                            item.POSTINFO = string.Empty;
                            break;
                        case "2"://已离职
                            item.POSTINFO = "已离职,请删除";
                            break;
                        case "3"://离职中
                            item.POSTINFO = "离职中,请注意";
                            break;
                        case "4"://未入职
                            item.POSTINFO = "未入职,请删除";
                            break;
                        case "10"://异动中
                            item.POSTINFO = "异动中,请异动后再处理";
                            break;
                        case "11"://异动过
                            item.POSTINFO = "异动过,已转换成新岗位";

                            item.OWNERPOSTID = person.NEWPOSTID;
                            item.OWNERPOSTNAME  = person.NEWPOSTNAME;
                            item.OWNERDEPARTMENTID = person.NEWDEPARTMENTID;
                            item.OWNERDEPARTMENTNAME  = person.NEWDEPARTMENTNAME;
                            item.OWNERCOMPANYID = person.NEWCOMPANYID;
                            item.OWNERCOMPANYNAME = person.NEWCOMPANYNAME;
                            break;
                        case "12"://岗位异常
                            item.POSTINFO = "岗位异常,请删除后再选择";
                            break;
                        default:
                            item.POSTINFO = string.Empty;
                            break;
                    }

                    switch (person.ISAGENCY)
                    {
                        case "0"://主岗位
                          // item.POSTINFO += string.Empty;
                            break;
                        case "1"://赚职
                            if (item.POSTINFO != string.Empty && person.EMPLOYEESTATE!="1")
                                item.POSTINFO = item.POSTINFO.Insert(0, "兼职,");
                            else
                                item.POSTINFO = "兼职";
                            break;
                        default:
                           // item.POSTINFO += string.Empty;
                            break;
                    }
                }
            });
           return listperson;
        }