Commit 23a71138 by wyc

计算绩效(添加行号)/管理绩效详情调整

parent 87a1721f
...@@ -515,6 +515,11 @@ ...@@ -515,6 +515,11 @@
分值 分值
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeEmployee.RowNumber">
<summary>
行号
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeEmployee.AccountType"> <member name="P:Performance.DtoModels.ComputeEmployee.AccountType">
<summary> <summary>
科室类别(例如 医技科室 临床科室 其他科室) 科室类别(例如 医技科室 临床科室 其他科室)
...@@ -655,6 +660,11 @@ ...@@ -655,6 +660,11 @@
是否需要二次分配 是否需要二次分配
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeResult.RowNumber">
<summary>
行号
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResult.AccountType"> <member name="P:Performance.DtoModels.ComputeResult.AccountType">
<summary> <summary>
科室类别(例如 医技科室 临床科室 其他科室) 科室类别(例如 医技科室 临床科室 其他科室)
......
...@@ -9218,6 +9218,11 @@ ...@@ -9218,6 +9218,11 @@
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.res_compute.RowNumber">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_compute.AllotID"> <member name="P:Performance.EntityModels.res_compute.AllotID">
<summary> <summary>
......
...@@ -5,6 +5,10 @@ namespace Performance.DtoModels ...@@ -5,6 +5,10 @@ namespace Performance.DtoModels
public class ComputeEmployee public class ComputeEmployee
{ {
/// <summary> /// <summary>
/// 行号
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室) /// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary> /// </summary>
public string AccountType { get; set; } public string AccountType { get; set; }
......
...@@ -5,6 +5,10 @@ namespace Performance.DtoModels ...@@ -5,6 +5,10 @@ namespace Performance.DtoModels
public class ComputeResult public class ComputeResult
{ {
/// <summary> /// <summary>
/// 行号
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary>
/// 科室类别(例如 医技科室 临床科室 其他科室) /// 科室类别(例如 医技科室 临床科室 其他科室)
/// </summary> /// </summary>
public string AccountType { get; set; } public string AccountType { get; set; }
......
...@@ -20,6 +20,10 @@ public class res_compute ...@@ -20,6 +20,10 @@ public class res_compute
/// </summary> /// </summary>
[Key] [Key]
public int ID { get; set; } public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> RowNumber { get; set; }
/// <summary> /// <summary>
/// ///
......
...@@ -1175,7 +1175,7 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use ...@@ -1175,7 +1175,7 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use
if (temp == null) return new List<UniteDeptDetailResponse>(); if (temp == null) return new List<UniteDeptDetailResponse>();
resComputes.AddRange(temp); resComputes.AddRange(temp);
} }
foreach (var resCompute in resComputes) foreach (var resCompute in resComputes.OrderBy(o => o.RowNumber))
{ {
var allot = perforPerallotRepository.GetEntity(t => t.ID == resCompute.AllotID) ?? throw new PerformanceException("绩效月信息错误"); var allot = perforPerallotRepository.GetEntity(t => t.ID == resCompute.AllotID) ?? throw new PerformanceException("绩效月信息错误");
if (!Enum.TryParse(resCompute.UnitType ?? resCompute.AccountType, ignoreCase: true, out UnitType unitType)) if (!Enum.TryParse(resCompute.UnitType ?? resCompute.AccountType, ignoreCase: true, out UnitType unitType))
...@@ -1187,11 +1187,31 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use ...@@ -1187,11 +1187,31 @@ public List<UniteDeptDetailResponse> EmpDetail(EmpDetailRequest request, int use
var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == resCompute.AllotID) ?? new List<im_header>(); var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == resCompute.AllotID) ?? new List<im_header>();
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.JobNumber == resCompute.JobNumber) ?? new List<im_data>(); var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.JobNumber == resCompute.JobNumber) ?? new List<im_data>();
var employee = _perforImemployeeclinicRepository.GetEntity(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.UnitType == resCompute.UnitType && t.PersonnelNumber == resCompute.JobNumber); var employee = _perforImemployeeclinicRepository
.GetEntity(t => t.AllotID == resCompute.AllotID
&& t.AccountingUnit == resCompute.AccountingUnit
&& t.UnitType == resCompute.UnitType
&& t.PersonnelNumber == resCompute.JobNumber
&& t.RowNumber == resCompute.RowNumber);
var tempResComputes = resComputes
.Where(w => w.AllotID == resCompute.AllotID
&& w.AccountingUnit == resCompute.AccountingUnit
&& w.UnitType == resCompute.UnitType
&& w.JobNumber == resCompute.JobNumber).OrderBy(o => o.RowNumber).ToList();
string isMultiterm = "";
if (tempResComputes.Count > 1)
{
isMultiterm = tempResComputes.FindIndex(t => t.RowNumber == resCompute.RowNumber) switch
{
0 => "1",
1 => "2",
_ => ""
};
}
var response = new UniteDeptDetailResponse var response = new UniteDeptDetailResponse
{ {
Title = $"{resCompute.EmployeeName}({resCompute.JobNumber}) {resCompute.JobTitle ?? ""} {resCompute.AccountingUnit}", Title = $"{resCompute.EmployeeName}({resCompute.JobNumber}) {resCompute.JobTitle ?? ""} {resCompute.AccountingUnit} {isMultiterm}",
UnitType = resCompute?.UnitType, UnitType = resCompute?.UnitType,
AccountingUnit = resCompute?.AccountingUnit, AccountingUnit = resCompute?.AccountingUnit,
DetailItems = new List<DeptDetailItem>() DetailItems = new List<DeptDetailItem>()
......
...@@ -370,9 +370,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS ...@@ -370,9 +370,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
var effAvg = (empolyee.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / empolyee.PermanentStaff) ?? 0; var effAvg = (empolyee.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / empolyee.PermanentStaff) ?? 0;
//var efficiency = avg * (empolyee.Efficiency ?? 1); //var efficiency = avg * (empolyee.Efficiency ?? 1);
var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1); //var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1);
var compute = new ComputeResult var compute = new ComputeResult
{ {
RowNumber = empolyee.RowNumber,
UnitType = empolyee.UnitType, UnitType = empolyee.UnitType,
AccountingUnit = empolyee.AccountingUnit, AccountingUnit = empolyee.AccountingUnit,
...@@ -474,6 +475,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -474,6 +475,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
var compute = new ComputeResult var compute = new ComputeResult
{ {
RowNumber = item.RowNumber,
AccountType = item.AccountType, AccountType = item.AccountType,
AccountingUnit = item.AccountingUnit, AccountingUnit = item.AccountingUnit,
EmployeeName = item.DoctorName, EmployeeName = item.DoctorName,
......
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