行政科室是否需要二次分配BUG

parent be536d3f
...@@ -381,7 +381,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel) ...@@ -381,7 +381,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.Income = empolyees.Sum(w => w.PerforTotal ?? 0); dept.Income = empolyees.Sum(w => w.PerforTotal ?? 0);
dept.NeedSecondAllot = empolyees.Any(w => w.NeedSecondAllot == "是") ? "是" : "否"; dept.NeedSecondAllot = empolyees.Any(w => w.NeedSecondAllot == "是") ? "是" : "否";
if (UnitTypeUtil.IsOffice(resAccount?.UnitType) && resAccount?.NeedSecondAllot == "是") if (UnitTypeUtil.IsOffice(resAccount?.UnitType) && dept.NeedSecondAllot == "是")
{ {
dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage; dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage;
dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1; dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1;
...@@ -392,7 +392,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel) ...@@ -392,7 +392,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.AssessBeforeOtherFee = resAccount?.AssessBeforeOtherFee ?? 0; dept.AssessBeforeOtherFee = resAccount?.AssessBeforeOtherFee ?? 0;
dept.AssessLaterOtherFee = resAccount?.AssessLaterOtherFee ?? 0; dept.AssessLaterOtherFee = resAccount?.AssessLaterOtherFee ?? 0;
// 行政后勤 没有 调节后其他绩效 // 行政后勤 没有 调节后其他绩效
//dept.AdjustLaterOtherFee = resAccount?.AdjustLaterOtherFee ?? 0; dept.AdjustLaterOtherFee = resAccount?.AdjustLaterOtherFee ?? 0;
} }
else else
{ {
......
...@@ -555,8 +555,34 @@ public List<DeptResponse> GetAdminPerformance(int allotId) ...@@ -555,8 +555,34 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
}).Distinct(); }).Distinct();
result.AddRange(specialResult); result.AddRange(specialResult);
// 需要二次分配的行政科室
var needSecond = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && t.UnitType.Value == (int)UnitType.行政后勤 && t.NeedSecondAllot == "是") ?? new List<res_account>();
var needSecondResult = needSecond.Select(t => new DeptResponse
{
UnitName = ((UnitType)t.UnitType).ToString() == "行政后勤" ? "行政工勤" : ((UnitType)t.UnitType).ToString(),
AccountingUnit = t.AccountingUnit,
Department = t.AccountingUnit,
PerforFee = t.PerforFee,
WorkloadFee = t.WorkloadFee,
AssessBeforeOtherFee = t.AssessBeforeOtherFee,
PerforTotal = t.PerforTotal,
ScoringAverage = t.ScoringAverage,
Extra = t.Extra,
MedicineExtra = t.MedicineExtra,
MaterialsExtra = t.MaterialsExtra,
AssessLaterOtherFee = t.AssessLaterOtherFee,
AssessLaterPerforTotal = t.AssessLaterPerforTotal,
AdjustFactor = t.AdjustFactor,
AdjustLaterOtherFee = t.AdjustLaterOtherFee,
AssessLaterManagementFee = clinicalComputes?.Where(w => w.AccountingUnit == t.AccountingUnit && w.UnitType == ((UnitType)t.UnitType).ToString())?.Sum(c => c.RealGiveFee),
RealGiveFee = t.RealGiveFee,
});
result.AddRange(needSecondResult);
// 不需要二次分配的行政科室
var officeTypes = new List<string> { "行政工勤", "行政高层", "行政中层" }; var officeTypes = new List<string> { "行政工勤", "行政高层", "行政中层" };
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && officeTypes.Contains(t.AccountType)) ?? new List<res_compute>(); var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && officeTypes.Contains(t.AccountType) && t.NeedSecondAllot == "否") ?? new List<res_compute>();
var officeResult = computes.GroupBy(t => new { t.AccountingUnit, t.AccountType, t.UnitType }).Select(t => new DeptResponse var officeResult = computes.GroupBy(t => new { t.AccountingUnit, t.AccountType, t.UnitType }).Select(t => new DeptResponse
{ {
......
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