Commit 1b8f0709 by lcx

Merge branch 'develop' into feature/自定义模板抽取

# Conflicts:
#	performance/Performance.Api/appsettings.Localhost.json
parents 3a17417f 4c27c696
...@@ -3660,6 +3660,11 @@ ...@@ -3660,6 +3660,11 @@
夜班工作量绩效 夜班工作量绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.SecPrintResponse.ReservedRatio">
<summary>
预留比例
</summary>
</member>
<member name="P:Performance.DtoModels.SecPrintResponse.RealAmount"> <member name="P:Performance.DtoModels.SecPrintResponse.RealAmount">
<summary> <summary>
实发绩效工资金额 实发绩效工资金额
......
...@@ -106,7 +106,7 @@ private JArray GetBodyItemsByEmployeeSource(int userId, int employeeSource, ag_s ...@@ -106,7 +106,7 @@ private JArray GetBodyItemsByEmployeeSource(int userId, int employeeSource, ag_s
break; break;
case int source when source == (int)EmployeeSource.PrevSecondAllot && prevSecond != null: case int source when source == (int)EmployeeSource.PrevSecondAllot && prevSecond != null:
bodysources = GetEmployeeFromPrevData(prevSecond, employeeList); bodysources = GetEmployeeFromPrevData(prevSecond, employeeList, second.Id);
break; break;
default: default:
...@@ -149,20 +149,24 @@ public List<ag_bodysource> GetEmployeeFromEmployeeDict(List<per_employee> employ ...@@ -149,20 +149,24 @@ public List<ag_bodysource> GetEmployeeFromEmployeeDict(List<per_employee> employ
} }
return bodysources; return bodysources;
} }
/// <summary> /// <summary>
/// 从上一次的保存信息中获取人员信息 /// 从上一次的保存信息中获取人员信息
/// </summary> /// </summary>
/// <param name="prevSecondAllot"></param> /// <param name="prevSecond"></param>
/// <param name="otherShowColumns"></param> /// <param name="employeeList"></param>
/// <param name="secondId"></param>
/// <returns></returns> /// <returns></returns>
public List<ag_bodysource> GetEmployeeFromPrevData(ag_secondallot prevSecond, List<per_employee> employeeList) public List<ag_bodysource> GetEmployeeFromPrevData(ag_secondallot prevSecond, List<per_employee> employeeList, int secondId)
{ {
var result = new List<ag_bodysource>();
var body = agbodysourceRepository.GetEntities(t => t.SecondId == prevSecond.Id); var body = agbodysourceRepository.GetEntities(t => t.SecondId == prevSecond.Id);
if (body == null || !body.Any()) return new List<ag_bodysource>(); if (body == null || !body.Any()) return result;
foreach (var item in body.Select(t => new ag_bodysource var data = body.Select(t => new ag_bodysource
{ {
Id = 0, Id = 0,
SecondId = secondId,
WorkNumber = t.WorkNumber, WorkNumber = t.WorkNumber,
Name = t.Name, Name = t.Name,
Post = t.Post, Post = t.Post,
...@@ -170,11 +174,13 @@ public List<ag_bodysource> GetEmployeeFromPrevData(ag_secondallot prevSecond, Li ...@@ -170,11 +174,13 @@ public List<ag_bodysource> GetEmployeeFromPrevData(ag_secondallot prevSecond, Li
StaffCoefficient = t.StaffCoefficient, StaffCoefficient = t.StaffCoefficient,
JobTitle = t.JobTitle, JobTitle = t.JobTitle,
TitleCoefficient = t.TitleCoefficient TitleCoefficient = t.TitleCoefficient
})) });
foreach (var item in data)
{ {
item.ActualAttendance = employeeList?.FirstOrDefault(w => w.PersonnelNumber == item.WorkNumber && w.DoctorName == item.Name)?.AttendanceDay; item.ActualAttendance = employeeList?.FirstOrDefault(w => w.PersonnelNumber == item.WorkNumber && w.DoctorName == item.Name)?.AttendanceDay;
result.Add(item);
} }
return body; return result;
} }
/// <summary> /// <summary>
......
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