Commit 78453b6e by Licx

二次绩效详情返回出勤时间

parent 09d9cd4f
......@@ -125,7 +125,8 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
foreach (var item in loadEmployees)
{
item.StaffCoefficient = item.StaffCoefficient ?? 1; // 人员系数
item.ActualAttendance = item.ActualAttendance ?? DateTime.DaysInMonth(allot.Year, allot.Month); // 出勤
var actualAttendance = (allot.Month > 0 && allot.Month < 13) ? DateTime.DaysInMonth(allot.Year, allot.Month) : 30;
item.ActualAttendance = item.ActualAttendance ?? actualAttendance; // 出勤
item.TitleCoefficient = item.TitleCoefficient ?? 1; // 职称系数
// 填报模板带出 行政工勤 绩效
if (computeMode == ComputeMode.NotCalculate)
......@@ -449,7 +450,8 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
head.AddOrUpdate("ComputeModeDescription", EnumHelper.GetDescription(computeMode));
var allotStates = new int[] { (int)AllotStates.绩效下发, (int)AllotStates.归档 };
head.AddOrUpdate(nameof(ag_headsource.SecondId), second.Id);
head.AddOrUpdate(nameof(ag_headsource.PaymentOfTheMonth), $"{allot.Year}{allot.Month.ToString().PadLeft(2, '0')}月");
var monthName = string.IsNullOrEmpty(allot.Name) ? $"{allot.Month.ToString().PadLeft(2, '0')}月" : allot.Name;
head.AddOrUpdate(nameof(ag_headsource.PaymentOfTheMonth), $"{allot.Year}{monthName}");
head.AddOrUpdate(nameof(ag_headsource.TotalDistPerformance), allotStates.Contains(allot.States) ? (second.RealGiveFee ?? 0) : 1000);
head.AddOrUpdate(nameof(ag_headsource.NightShiftWorkPerforTotal), allotStates.Contains(allot.States) ? (second.NightShiftWorkPerforFee ?? 0) : 0);
head.AddOrUpdate(nameof(ag_headsource.TotalPerformance), head.GetDecimal(nameof(ag_headsource.TotalDistPerformance)) - head.GetDecimal(nameof(ag_headsource.NightShiftWorkPerforTotal)));
......@@ -485,7 +487,8 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
head.AddOrUpdate(nameof(ag_headsource.SeniorityTitlesAccountedPerformance), history?.SeniorityTitlesAccountedPerformance ?? titleRatio);
head.AddOrUpdate(nameof(ag_headsource.Workload_Ratio_Default), history?.Workload_Ratio_Default ?? workloadRatio);
head.AddOrUpdate(nameof(ag_headsource.DaysFullAttendance), DateTime.DaysInMonth(allot.Year, allot.Month));
var daysFullAttendance = (allot.Month > 0 && allot.Month < 13) ? DateTime.DaysInMonth(allot.Year, allot.Month) : 30;
head.AddOrUpdate(nameof(ag_headsource.DaysFullAttendance), daysFullAttendance);
// 多工作量加载
var status = (new int[] { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit });
......@@ -1678,7 +1681,7 @@ public object RedistributionEmployee(SecondEmployeeDto request)
{
Func<per_employee, decimal?> getDistPerformance = (emp) => 0;
var secondWorkload = GetSecondWorkloadByValue(second.AllotId.Value, second.UnitType, second.Department);
var monthDays = DateTime.DaysInMonth(allot.Year, allot.Month);
var monthDays = (allot.Month > 0 && allot.Month < 13) ? DateTime.DaysInMonth(allot.Year, allot.Month) : 30;
foreach (var employee in employees)
{
Dictionary<string, object> item = new Dictionary<string, object>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment