Commit 7f9e132a by lcx

二次绩效其他模板修改、全员绩效发放内容修改

parent b711aae9
......@@ -321,6 +321,32 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
result = result.OrderBy(t => t.UnitType).ThenBy(t => t.AccountingUnit).ToList();
}
var specialData = _perforResspecialunitRepository.GetEntities(t => t.AllotID == allotId);
if (specialData != null && specialData.Any())
{
result.AddRange(specialData.Select(t => new DeptResponse
{
UnitName = "特殊核算组",
AccountingUnit = t.AccountingUnit,
Department = t.Department,
PerforFee = t.GiveFee,
WorkloadFee = 0,
AssessBeforeOtherFee = t.AssessBeforeOtherFee,
PerforTotal = t.PerforTotal,
ScoringAverage = t.ScoringAverage,
MedicineExtra = t.MedicineExtra,
MaterialsExtra = t.MaterialsExtra,
Extra = 0,
AssessLaterOtherFee = t.AssessLaterOtherFee,
AssessLaterPerforTotal = 0,
AdjustFactor = t.Adjust,
AdjustLaterOtherFee = t.AdjustLaterOtherFee,
AssessLaterManagementFee = 0,
AprPerforAmount = 0,
RealGiveFee = t.RealGiveFee,
}));
}
var list = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId);
if (list == null || !list.Any()) return result;
......@@ -334,20 +360,24 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
{ AccountUnitType.行政中层.ToString(), AccountUnitType.行政中层.ToString() },
{ AccountUnitType.行政工勤.ToString(), AccountUnitType.行政工勤.ToString() }
};
var adminDepartments = new string[] { AccountUnitType.行政高层.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政工勤.ToString() };
List<DeptResponse> adminPerfor = list.GroupBy(t => new { t.AccountingUnit, t.AccountType }).Select(t =>
{
string unitName = result.Where(w => !dict.Values.Contains(w.UnitName)).FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit)?.UnitName ?? "";
return new DeptResponse
var data = new DeptResponse
{
UnitName = !dict.Values.Contains(unitName) && !string.IsNullOrEmpty(unitName) ? unitName : dict.ContainsKey(t.Key.AccountType) ? dict[t.Key.AccountType] : "未知",
AccountingUnit = t.Key.AccountingUnit,
Department = t.Key.AccountingUnit,
Number = t.Count(),
// OtherPerfor1 = t.Sum(group => group.OtherPerfor),
AssessLaterManagementFee = isShowManage == 1 ? t.Sum(group => group.RealGiveFee ?? 0) + t.Sum(group => group.OtherPerfor ?? 0) //实发绩效
: Math.Round((t.Max(m => m.ShouldGiveFee) * t.Max(m => m.ScoreAverageRate) * t.Max(m => m.Attendance) ?? 0.0M) + t.Max(m => m.Punishment ?? 0.0M)) //考核后管理绩效
};
if (!adminDepartments.Contains(t.Key.AccountType))
{
data.AssessLaterManagementFee = isShowManage == 1
? t.Sum(group => group.RealGiveFee ?? 0) + t.Sum(group => group.OtherPerfor ?? 0) //实发绩效
: Math.Round((t.Max(m => m.ShouldGiveFee) * t.Max(m => m.ScoreAverageRate) * t.Max(m => m.Attendance) ?? 0.0M) + t.Max(m => m.Punishment ?? 0.0M)); //考核后管理绩效
}
return data;
}).ToList();
result.AddRange(adminPerfor);
......@@ -355,12 +385,12 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
var aprAmounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3) ?? new List<per_apr_amount>();
var employees = perforPeremployeeRepository.GetEntities(t => t.AllotId == allotId) ?? new List<per_employee>();
var otherPerformances = aprAmounts.Join(employees, outer => new { outer.AccountingUnit, outer.PersonnelNumber }, inner => new { inner.AccountingUnit, inner.PersonnelNumber }, (outer, inner) => new
var otherPerformances = aprAmounts.GroupJoin(employees, outer => new { outer.AccountingUnit, outer.PersonnelNumber }, inner => new { inner.AccountingUnit, inner.PersonnelNumber }, (outer, inner) => new
{
AccountingUnit = outer.AccountingUnit,
UnitType = inner.UnitType,
UnitType = inner?.FirstOrDefault(t => !string.IsNullOrEmpty(t.UnitType))?.UnitType,
PersonnelNumber = outer.PersonnelNumber,
PersonnelName = inner.DoctorName,
PersonnelName = outer.DoctorName,
Amount = outer.Amount
})?.GroupBy(t => new { t.AccountingUnit, t.UnitType }).Select(t => new
{
......
......@@ -639,7 +639,7 @@ public HandsonTable GetOtherTempData(int userId, int secondId, int isArchive, in
var readColumns = new int[] { 2, 3, }.Contains(secondAllot.Status.Value) ?
OtherTemp.Select(t => t.Value).ToArray() :
new string[] { "可分配绩效", "医院其他绩效", "预留比例", "预留金额", "实发绩效工资金额" };
new string[] { "可分配绩效", "科室单项奖励", "医院其他绩效", "预留年度考核比例", "年度考核发放金额", "预发绩效工资金额" };
var result = new HandsonTable((int)SheetType.Unidentifiable, OtherTemp.Select(t => t.Value).ToArray(), OtherTemp.Select(t => new collect_permission
{
......@@ -873,21 +873,24 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
}
}
public static Dictionary<string, string> OtherTemp { get; } = new Dictionary<string, string>
{
public static Dictionary<string, string> OtherTemp { get; } = new Dictionary<string, string>
{
{ nameof (ag_othersource.WorkNumber), "工号" },
{ nameof (ag_othersource.Name), "姓名" },
{ nameof (ag_othersource.Department), "科室" },
{ nameof (ag_othersource.WorkPost), "职称" },
{ nameof (ag_othersource.TitlePerformance), "职称绩效" },
{ nameof (ag_othersource.WorkPerformance), "工作量绩效工资" },
{ nameof (ag_othersource.ManagementAllowance), "管理津贴" },
{ nameof (ag_othersource.IndividualReward), "单项奖励" },
{ nameof (ag_othersource.AllocationOfKeySpecialty), "重点专科分配" },
{ nameof (ag_othersource.DeptReward), "科室单项奖励" },
{ nameof (ag_othersource.DistPerformance), "可分配绩效" },
{ nameof (ag_othersource.OtherPerformance), "医院其他绩效" },
{ nameof (ag_othersource.NightWorkPerformance), "夜班工作量绩效" },
{ nameof (ag_othersource.ReservedRatio), "预留比例" },
{ nameof (ag_othersource.ReservedAmount), "预留金额" },
{ nameof (ag_othersource.RealAmount), "发绩效工资金额" },
{ nameof (ag_othersource.ReservedRatio), "预留年度考核比例" },
{ nameof (ag_othersource.ReservedAmount), "年度考核发放金额" },
{ nameof (ag_othersource.RealAmount), "发绩效工资金额" },
};
#endregion 其他模板详情
......
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