Commit 28ddeae2 by wyc

加载默认考勤(补充限制)

parent 7cb504e1
......@@ -756,6 +756,9 @@ public ApiResponse GetAttendanceReplenishment(int allotId, int userid)
.GetEntity(g => g.AllotId == allotId && g.IsDefault == (int)Attendance.Default.默认)
?? throw new PerformanceException("未设置默认类型");
var allot = perforPerallotRepository.GetEntity(w => w.ID == allotId) ?? throw new PerformanceException("当前绩效记录不存在"); ;
var days = DateTime.DaysInMonth(allot.Year, allot.Month);
//查询全部考勤上报内容
var attendanceDepts = _perforPerAttendanceDeptRepository.GetEntities(t => t.AllotId == allotId);
......@@ -770,7 +773,7 @@ public ApiResponse GetAttendanceReplenishment(int allotId, int userid)
?.Where(w => w.PersonnelNumber == item.PersonnelNumber && w.UnitType != item.UnitType && w.AccountingUnit != item.AccountingUnit)
.ToList();
for (int day = 1; day <= 31; day++)
for (int day = 1; day <= days; day++)
{
string dayPropertyName = $"Day{day:00}";
int? dayValue = (int?)typeof(per_attendance_dept).GetProperty(dayPropertyName)?.GetValue(item);
......
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