二次分配全院发放BUG修复

parent 1d74fb2b
......@@ -489,7 +489,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int isShowManage)
if (types2.Contains(t.AccountType))
comp.NightWorkPerfor = t.NightWorkPerfor;
// 仅显示管理绩效
if (isShowManage == 1)
if (isShowManage == 2)
comp.PerforSumFee = 0;
else
comp.PerforSumFee = t.Avg;
......
......@@ -1129,15 +1129,25 @@ public List<ag_secondallot> AuditList(int allotId)
throw new PerformanceException("所选绩效不存在!");
var accountUnit = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && !new int[] { (int)UnitType.行政高层, (int)UnitType.行政中层 }.Contains(t.UnitType.Value));
return SecondList(allot, accountUnit);
var specialunit = resspecialunitRepository.GetEntities(t => t.AllotID == allot.ID);
return SecondList(allot, accountUnit, specialunit);
}
private List<ag_secondallot> SecondList(per_allot allot, List<res_account> accountUnit)
private List<ag_secondallot> SecondList(per_allot allot, List<res_account> accountUnit, List<res_specialunit> specialunit)
{
if (accountUnit == null || !accountUnit.Any()) return new List<ag_secondallot>();
List<res_account> temps = new List<res_account>();
if (accountUnit != null)
accountUnit.ForEach(w => temps.Add(new res_account { UnitType = w.UnitType, AccountingUnit = w.AccountingUnit, RealGiveFee = w.RealGiveFee }));
if (specialunit != null)
specialunit.ForEach(w =>
{
if (!temps.Any(t => t.UnitType == (int)UnitType.特殊核算组 && t.AccountingUnit == w.AccountingUnit))
temps.Add(new res_account { UnitType = (int)UnitType.特殊核算组, AccountingUnit = w.AccountingUnit, RealGiveFee = w.RealGiveFee });
});
var secondList = perforAgsecondallotRepository.GetEntities(t => t.AllotId == allot.ID && t.Year == allot.Year && t.Month == allot.Month);
var result = accountUnit.Select(t =>
var result = temps.Select(t =>
{
var second = secondList?.FirstOrDefault(f => f.UnitType == ((UnitType)t.UnitType).ToString() && f.Department == t.AccountingUnit);
if (second != null) return second;
......@@ -1171,7 +1181,8 @@ public List<ag_secondallot> NursingDeptlist(int allotId)
throw new PerformanceException("所选绩效不存在!");
var types = new int[] { (int)UnitType.其他护理组, (int)UnitType.护理组 };
var accountUnit = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && types.Contains(t.UnitType.Value));
return SecondList(allot, accountUnit);
var specialunit = resspecialunitRepository.GetEntities(t => t.AllotID == allot.ID);
return SecondList(allot, accountUnit, specialunit);
}
/// <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