Commit 520101c5 by 钟博

Merge branch 'v20201230yubei' into v2020morge

parents 3bd9a58d 3cff38c8
......@@ -323,32 +323,6 @@ 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 = Math.Round(((t.PerforTotal * t.ScoringAverage) ?? 0) + (t.MedicineExtra ?? 0) + (t.MaterialsExtra ?? 0) + (t.AssessLaterOtherFee ?? 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;
......@@ -426,6 +400,36 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
+ (otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0),
}).ToList();
var specialData = _perforResspecialunitRepository.GetEntities(t => t.AllotID == allotId);
if (specialData != null && specialData.Any())
{
result.AddRange(specialData.GroupBy(t => new { t.AccountingUnit, t.Department }).Select(t =>
{
var data = new DeptResponse
{
UnitName = "特殊核算组",
AccountingUnit = t.Key.AccountingUnit,
Department = t.Key.Department,
PerforFee = t.Max(max => max.GiveFee),
WorkloadFee = 0,
AssessBeforeOtherFee = t.Max(max => max.AssessBeforeOtherFee),
PerforTotal = t.Max(max => max.PerforTotal),
ScoringAverage = t.Max(max => max.ScoringAverage),
MedicineExtra = t.Max(max => max.MedicineExtra),
MaterialsExtra = t.Max(max => max.MaterialsExtra),
Extra = 0,
AssessLaterOtherFee = t.Max(max => max.AssessLaterOtherFee),
AdjustFactor = t.Max(max => max.Adjust),
AdjustLaterOtherFee = t.Max(max => max.AdjustLaterOtherFee),
AssessLaterManagementFee = 0,
AprPerforAmount = 0,
RealGiveFee = t.Max(max => max.RealGiveFee),
};
data.AssessLaterPerforTotal = Math.Round(((data.PerforTotal * data.ScoringAverage) ?? 0) + (data.MedicineExtra ?? 0) + (data.MaterialsExtra ?? 0) + (data.AssessLaterOtherFee ?? 0));
return data;
}));
}
var enumItems = EnumHelper.GetItems<AccountUnitType>();
result = result.OrderBy(t => enumItems.FirstOrDefault(e => e.Name == t.UnitName)?.Value)/*.ThenBy(t => t.AccountingUnit)*/.ToList();
......
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