Commit 2a027676 by lcx

过滤重复员工,无工号时根据姓名+工号匹配

parent 4f79fa32
......@@ -612,7 +612,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
Name = w.DoctorName,
Department = w.AccountingUnit,
WorkPost = w.JobTitle,
}).ToList();
}).ToDistinct().ToList();
}
}
//非行政科室 有三种逻辑,或从保存中加载,或从人员字典加载,或从上次绩效中加载
......@@ -679,12 +679,24 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
item.ReservedRatio = empl?.ReservedRatio ?? 0;
// 如果是行政后勤,则把绩效放在工作量上
if (isTitlePerformance && second.UnitType == UnitType.行政后勤.ToString())
item.WorkPerformance = distPerformance?.Where(w => second.Department == item.Department && w.JobNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.GiveFee);
{
item.WorkPerformance = distPerformance?.Where(w => w.AccountingUnit == item.Department && w.JobNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.GiveFee);
if (string.IsNullOrEmpty(item.WorkNumber))
item.WorkPerformance = distPerformance?.Where(w => w.AccountingUnit == item.Department && w.JobNumber?.Trim() == item.WorkNumber?.Trim() && w.EmployeeName?.Trim() == item.Name?.Trim())?.Sum(w => w.GiveFee);
}
if (second.UnitType == UnitType.行政后勤.ToString())
item.OtherPerformance = perapramounts?.Where(w => second.Department == item.Department && w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.Amount);
{
item.OtherPerformance = perapramounts?.Where(w => w.AccountingUnit == item.Department && w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.Amount);
if (string.IsNullOrEmpty(item.WorkNumber))
item.OtherPerformance = perapramounts?.Where(w => w.AccountingUnit == item.Department && w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim() && w.DoctorName?.Trim() == item.Name?.Trim())?.Sum(w => w.Amount);
}
else if (!string.IsNullOrEmpty(empl?.AccountingUnit))
item.OtherPerformance = perapramounts?.Where(w => second.Department == empl?.AccountingUnit && w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.Amount);
{
item.OtherPerformance = perapramounts?.Where(w => w.AccountingUnit == empl?.AccountingUnit && w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.Amount);
if (string.IsNullOrEmpty(item.WorkNumber))
item.OtherPerformance = perapramounts?.Where(w => w.AccountingUnit == empl?.AccountingUnit && w.PersonnelNumber?.Trim() == item.WorkNumber?.Trim() && w.DoctorName?.Trim() == item.Name?.Trim())?.Sum(w => w.Amount);
}
}
}
......
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