二次分配满勤天数BUG修复

parent 6d9254d7
......@@ -478,6 +478,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
{
int secondId = overrideMode == EmployeeSource.PrevSecondAllot ? prevSecondAllot.Id : second.Id;
var history = _agheadsourceRepository.GetEntity(t => t.SecondId == secondId);
var daysFullAttendance = history?.DaysFullAttendance ?? (allot.Month >= 1 && allot.Month <= 12 ? DateTime.DaysInMonth(allot.Year, allot.Month) : 30);
if (history == null && prevSecondAllot != null && secondId != prevSecondAllot.Id)
history = _agheadsourceRepository.GetEntity(t => t.SecondId == prevSecondAllot.Id);
......@@ -488,11 +489,10 @@ 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);
var daysFullAttendance = allot.Month >= 1 && allot.Month <= 12 ? DateTime.DaysInMonth(allot.Year, allot.Month) : 30;
head.AddOrUpdate(nameof(ag_headsource.DaysFullAttendance), daysFullAttendance);
// 多工作量加载
var status = (new int[] { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit });
var status = new int[] { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit };
var headDynamic = _agworktypesourceRepository.GetEntities(t => t.SecondId == secondId) ?? new List<ag_worktype_source>();
if (!headDynamic.Any() && prevSecondAllot != null && secondId != prevSecondAllot.Id)
......
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