public List <V_EMPLOYEEVIEW> GetPerformenceEmployee(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int Count, ref int pageCount, string sType, string sValue, string userID, string startTime, string endTime, int sartlevel, int endlevel) { using (SumPerformanceBll bll = new SumPerformanceBll()) { var pents = bll.GetPerformenceEmployee(pageIndex, pageSize, sort, filterString, paras, ref Count, ref pageCount, sType, sValue, userID, startTime, endTime, sartlevel, endlevel); return(pents); } }
public List<V_EMPLOYEEVIEW> GetPerformenceEmployee(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int Count, ref int pageCount, string sType, string sValue, string userID, string startTime, string endTime, int sartlevel, int endlevel) { using (SumPerformanceBll bll = new SumPerformanceBll()) { var pents = bll.GetPerformenceEmployee(pageIndex, pageSize, sort, filterString, paras, ref Count, ref pageCount, sType, sValue, userID, startTime, endTime, sartlevel, endlevel); return pents; } }
private int AddPerformanceRecordList(List<T_HR_PERFORMANCERECORD> entList) { using (SumPerformanceBll bll = new SumPerformanceBll()) { return bll.AddPerformanceRecordList(entList); } }
private int DeleteSumPerformances(string[] sumIdList) { using (SumPerformanceBll bll = new SumPerformanceBll()) { return bll.DeleteSumPerformances(sumIdList); } }
private int DeleteSumPerformance(string sumId) { using (SumPerformanceBll bll = new SumPerformanceBll()) { return bll.DeleteSumPerformance(sumId); } }
private void UpdateSumPerformanceAndSum(T_HR_SUMPERFORMANCERECORD entType) { using (SumPerformanceBll bll = new SumPerformanceBll()) { bll.UpdateSumPerformanceAndSum(entType); } }
/// <summary> /// 绩效控件手动打分,并返回结果 /// </summary> /// <param name="kpiPoint"></param> /// <param name="formCode"></param> /// <param name="flowID"></param> /// <param name="lastStepCode"></param> /// <param name="AppraiseeID"></param> /// <param name="AppraiserID"></param> /// <param name="score"></param> /// <param name="scoretype"></param> /// <returns></returns> public T_HR_KPIRECORD SaveKPIRecord(T_HR_KPIPOINT kpiPoint, string formCode, string flowID, string lastStepCode, string AppraiseeID, string AppraiserID, int score, int scoretype) { try { bool isAdd = false; //判断是否为添加的标示。 // 1s 冉龙军 // 改stepID为stepCode(当流程中有重复的步骤时,此方法不可取) //T_HR_KPIRECORD record = GetKPIRecord(formCode, flowID, lastStepCode); T_HR_KPIRECORD record = GetKPIRecord(formCode, flowID, kpiPoint.STEPID); // 1e if (record == null) { isAdd = true; record = InitialKPIRecord(formCode, flowID, lastStepCode, kpiPoint); } // 1s 冉龙军 else { if (record.OWNERCOMPANYID != null && record.OWNERDEPARTMENTID != null && record.OWNERPOSTID != null && record.OWNERID != null) { } else { if (string.IsNullOrEmpty(AppraiseeID)) { } else { // 绩效所有者 using (EmployeeBLL kpiDetailEmployeeBLL = new EmployeeBLL()) { V_EMPLOYEEPOST kpiDetailRecord = kpiDetailEmployeeBLL.GetEmployeeDetailByID(AppraiseeID); if (kpiDetailRecord != null && kpiDetailRecord.EMPLOYEEPOSTS[0] != null && kpiDetailRecord.EMPLOYEEPOSTS[0].T_HR_POST != null && kpiDetailRecord.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT != null && kpiDetailRecord.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY != null) { record.OWNERCOMPANYID = kpiDetailRecord.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.T_HR_COMPANY.COMPANYID; record.OWNERDEPARTMENTID = kpiDetailRecord.EMPLOYEEPOSTS[0].T_HR_POST.T_HR_DEPARTMENT.DEPARTMENTID; record.OWNERPOSTID = kpiDetailRecord.EMPLOYEEPOSTS[0].T_HR_POST.POSTID; record.OWNERID = AppraiseeID; record.CREATEUSERID = AppraiseeID; } } } } } // 1e switch (scoretype) { //系统评分 case 0: record.SYSTEMSCORE = score; record.APPRAISEEID = AppraiseeID; record.UPDATEUSERID = AppraiseeID; break; //手动评分 case 1: record.MANUALSCORE = score; record.APPRAISEEID = AppraiseeID; record.APPRAISERID = AppraiserID; record.UPDATEUSERID = AppraiserID; break; //抽查评分 case 2: record.RANDOMSCORE = score; record.APPRAISEEID = AppraiseeID; record.RANDOMPERSONID = AppraiserID; record.UPDATEUSERID = AppraiserID; break; // 1s 冉龙军 //抽查评分 case 3: record.RANDOMPERSONID = AppraiserID; break; // 1e } //判断打分是否已经全部打完 // 1s 冉龙军 //if ((kpiPoint.T_HR_SCORETYPE.ISSYSTEMSCORE.Trim() == "0" || record.SYSTEMSCORE != null) //不需要机打,或者已经打过 // && (kpiPoint.T_HR_SCORETYPE.ISMANUALSCORE.Trim() == "0" || record.MANUALSCORE != null) //不需要人打,或者已经打过 // && (kpiPoint.T_HR_SCORETYPE.ISRANDOMSCORE.Trim() == "0" || record.RANDOMSCORE != null)) //不需要抽查,或者已经打过 //{ // record.SUMSCORE = CulcalateScore(record); //} #region 全部打完才出总分 //if (kpiPoint != null && kpiPoint.T_HR_SCORETYPE != null) //{ // if ((kpiPoint.T_HR_SCORETYPE.ISSYSTEMSCORE.Trim() == "0" || record.SYSTEMSCORE != null) //不需要机打,或者已经打过 // && (kpiPoint.T_HR_SCORETYPE.ISMANUALSCORE.Trim() == "0" || record.MANUALSCORE != null) // //不需要人打,或者已经打过 // && (kpiPoint.T_HR_SCORETYPE.ISRANDOMSCORE.Trim() == "0" || record.RANDOMSCORE != null)) // //不需要抽查,或者已经打过 // { // record.SUMSCORE = CulcalateScore(record); // } //} #endregion // 计算总分 record.SUMSCORE = CulcalateScore(record); // 1e KPIRecordBll bll = new KPIRecordBll(); record.UPDATEDATE = System.DateTime.Now; //修改时间 if (isAdd) { bll.KPIRecordAdd(record); //添加KPI明细记录 } else { bll.KPIRecordUpdate(record); //修改KPI明细记录 } SumPerformanceBll bllSumPerf = new SumPerformanceBll(); bllSumPerf.SaveMyRecordByKPIRd(record); return(record); } catch (Exception ex) { Utility.SaveLog("绩效控件执行手动打分出错,出错原因:" + ex.ToString()); return(null); } }
private int DeletePerformanceRecord(string randomGroupId) { using (SumPerformanceBll bll = new SumPerformanceBll()) { return bll.DeletePerformanceRecord(randomGroupId); } }
public Dictionary<string, decimal> GetEmployePerformance(List<string> employeIDs, DateTime startTime, DateTime endTime) { using (SumPerformanceBll bll = new SumPerformanceBll()) { Dictionary<string, decimal> q = bll.GetEmployePerformance(employeIDs, startTime, endTime); return q; } }
public List<V_PERFORMANCERECORDDETAIL> GetPerformanceDetailEmployeeAllBySumID(string sumID) { using (SumPerformanceBll bll = new SumPerformanceBll()) { IQueryable<V_PERFORMANCERECORDDETAIL> q = bll.GetPerformanceDetailEmployeeAllBySumID(sumID); return q.Count() > 0 ? q.ToList() : null; } }
public List<T_HR_PERFORMANCERECORD> GetPerformanceAllBySumID(string sumID) { using (SumPerformanceBll bll = new SumPerformanceBll()) { IQueryable<T_HR_PERFORMANCERECORD> q = bll.GetPerformanceAllBySumID(sumID); return q.Count() > 0 ? q.ToList() : null; } }
public List<V_PERFORMANCERECORD> GetPerformanceEmployeeAllPaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string userID) { using (SumPerformanceBll bll = new SumPerformanceBll()) { IQueryable<V_PERFORMANCERECORD> q = bll.GetPerformanceEmployeeAllPaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, userID); return q.Count() > 0 ? q.ToList() : null; } }
public List<V_PERFORMANCERECORD> GetEmployeePerformancePagingByTime(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string sType, string sValue, string userID, string startTime, string endTime) { using (SumPerformanceBll bll = new SumPerformanceBll()) { IQueryable<V_PERFORMANCERECORD> q = bll.GetEmployeePerformancePagingByTime(pageIndex, pageSize, sort, filterString, paras, ref pageCount, sType, sValue, userID, startTime, endTime); return q.Count() > 0 ? q.ToList() : null; } }
public List<T_HR_SUMPERFORMANCERECORD> GetSumPerformancePaging(int pageIndex, int pageSize, string sort, string filterString, string[] paras, ref int pageCount, string sType, string sValue, string userID, bool isSelf, string checkState) { using (SumPerformanceBll bll = new SumPerformanceBll()) { IQueryable<T_HR_SUMPERFORMANCERECORD> q = bll.GetSumPerformancePaging(pageIndex, pageSize, sort, filterString, paras, ref pageCount, sType, sValue, userID, isSelf, checkState); return q.Count() > 0 ? q.ToList() : null; } }
private void UpdatePerformanceRecord(T_HR_PERFORMANCERECORD entType) { using (SumPerformanceBll bll = new SumPerformanceBll()) { bll.UpdatePerformanceRecord(entType); } }
private int[] UpdatePerformanceRecordList(List<T_HR_PERFORMANCERECORD> entList, string[] employeeIDs) { using (SumPerformanceBll bll = new SumPerformanceBll()) { return bll.UpdatePerformanceRecordList(entList, employeeIDs); } }
public T_HR_PERFORMANCERECORD GetPerformanceRecordByID(string recordID) { using (SumPerformanceBll bll = new SumPerformanceBll()) { T_HR_PERFORMANCERECORD q = bll.GetPerformanceRecordByID(recordID); return q; } }
public bool DeletePerformanceRecords(string[] groupPersonIDs) { using (SumPerformanceBll bll = new SumPerformanceBll()) { int rslt = bll.DeletePerformanceRecords(groupPersonIDs); return (rslt > 0); } }
private void AddSumPerformance(T_HR_SUMPERFORMANCERECORD entType) { using (SumPerformanceBll bll = new SumPerformanceBll()) { bll.AddSumPerformance(entType); } }
public T_HR_SUMPERFORMANCERECORD GetSumPerformanceRecordByID(string sumid) { using (SumPerformanceBll bll = new SumPerformanceBll()) { return bll.GetSumPerformanceRecordByID(sumid); } }
/// <summary> /// 添加绩效记录 /// </summary> /// <param name="obj"></param> public bool PerformanceRewardRecordAdd(int orgtype, string orgid, string year, string month, DateTime startTime, DateTime endTime, string construes) { T_HR_PERFORMANCEREWARDRECORD entity = new T_HR_PERFORMANCEREWARDRECORD(); Dictionary <string, decimal> getPerformance = new Dictionary <string, decimal>(); construe = construes.Split(';'); employes.Clear(); employeIDs.Clear(); switch (orgtype) { case 0: GenerateCompanySalary(orgid, year, month); break; case 1: GenerateDepartmentSalary(orgid, year, month); break; case 2: GeneratePostSalary(orgid, year, month); break; } SumPerformanceBll bll = new SumPerformanceBll();//获取绩效数据 (GetEmployePerformanceInterface) getPerformance = bll.GetEmployePerformance(employeIDs, startTime, endTime); if (getPerformance.Count > 0) { int i = 0; foreach (string gp in getPerformance.Keys) { var ent = from b in dal.GetObjects <T_HR_PERFORMANCEREWARDRECORD>() where b.EMPLOYEEID == gp && b.SALARYYEAR == year && b.SALARYMONTH == month select b; if (ent.Count() > 0) { entity = ent.FirstOrDefault(); } entity.EMPLOYEEID = gp; entity.EMPLOYEENAME = employes[i].EMPLOYEECNAME; entity.EMPLOYEECODE = employes[i].EMPLOYEECODE; entity.SALARYYEAR = year; entity.SALARYMONTH = month; entity.STARTDATE = startTime; entity.ENDDATE = endTime; entity.CHECKSTATE = "0"; entity.PERFORMANCESCORE = Convert.ToDecimal(getPerformance[gp].ToString()); try { entity.CREATEUSERID = construe[0]; entity.CREATEPOSTID = construe[1]; entity.CREATEDEPARTMENTID = construe[2]; entity.CREATECOMPANYID = construe[3]; entity.OWNERID = construe[4]; entity.OWNERPOSTID = construe[5]; entity.OWNERDEPARTMENTID = construe[6]; entity.OWNERCOMPANYID = construe[7]; } catch (Exception exx) { SMT.Foundation.Log.Tracer.Debug(exx.Message); exx.Message.ToString(); } if (ent.Count() > 0) { dal.Update(entity); } else { entity.PERFORMANCEREWARDRECORDID = Guid.NewGuid().ToString(); dal.AddToContext(entity); //DataContext.AddObject("T_HR_PERFORMANCEREWARDRECORD", entity); } i++; } if (dal.SaveContextChanges() > 0) { return(true); } } return(false); }