예제 #1
0
        private static void SumKpi(List <KpiItem> items, string empLid, int year, int month)
        {
            if (string.IsNullOrEmpty(empLid))
            {
                return;
            }

            List <KpiItem> list   = items.FindAll(a => a.员工编号 == empLid && a.年 == year && a.月 == month);
            decimal        个人执行绩效 = list.Sum(a => a.个人绩效标准);
            decimal        个人绩效实得 = list.Sum(a => a.个人绩效实得);
            decimal        公司奖励实得 = list.Sum(a => a.公司奖励实得);
            decimal        实得绩效工资 = 个人绩效实得 + 公司奖励实得;

            EffectivePerformanceSalary 绩效考核 = EffectivePerformanceSalary.AddEffectivePerformanceSalary(empLid, year, month);

            if (绩效考核 != null)
            {
                绩效考核.姓名   = PsHelper.GetEmplName(empLid);
                绩效考核.绩效工资 = 个人执行绩效;
                绩效考核.实得工资 = 实得绩效工资;
                绩效考核.录入人  = "系统同步获取";
                绩效考核.录入时间 = DateTime.Now;
                绩效考核.Save();
            }
        }
예제 #2
0
        public static EffectivePerformanceSalary AddEffectivePerformanceSalary(string empNo, int year, int month)
        {
            EffectivePerformanceSalary item = GetEffectivePerformanceSalary(empNo, year, month);

            if (item == null)
            {
                item      = new EffectivePerformanceSalary();
                item.标识   = Guid.NewGuid();
                item.员工编号 = empNo;
                item.年    = year;
                item.月    = month;
                item.Save();
            }
            return(item);
        }