Commit cff05abc by lcx

预算系数绑定修改

parent e9c7ba17
......@@ -103,9 +103,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
var dataList = specialUnit.PerData.Select(t => (PerDataSpecialUnit)t);
var specialEmployee = perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allot.ID);
decimal adjust = 1m;
decimal grant = 1m;
var isBudget = budgetService.GetAdjustAndGrant(allot, ref adjust, ref grant);
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant);
//替换考核基数
foreach (var item in dataList)
......
......@@ -188,14 +188,15 @@ public List<BudgetRatioResponse> QueryBudgetRatio(int hospitalid, int year)
HospitalId = t.HospitalId,
Year = t.Year,
PersonExpendRatio = t.TotalLaborCost,
NewPerformanceRatio = t.TheCostInTotal,
NoPerformanceExpenditureRatio = t.StaffSpendingFixed,
NewPerformanceRatio = t.StaffSpendingBonus,
MedicinePropRatio = t.TheDrugIncome,
MaterialCostsRatio = t.MaterialIncome,
TotalMedicineRatio = t.TheDrugIncome + t.MaterialIncome,
DepreOfFixedAssetsRatio = t.DepreOfFixedAssets,
OtherExpensesRatio = t.OtherExpenses,
TheCostInTotalRatio = t.TheCostInTotal,
TheCostCombinedRatio = t.TheCostInTotal,
TheCostCombinedRatio = t.DepreOfFixedAssets + t.OtherExpenses + t.TheCostInTotal,
});
return result.OrderBy(t => t.Year).ToList();
......@@ -258,6 +259,7 @@ public bool SaveBudgetRatio(List<per_budget_result> request, int userId)
{
t.CreateDate = DateTime.Now;
t.CreateUser = userId;
t.States = 1;
});
perbudgetresultRepository.AddRange(addData.ToArray());
}
......@@ -279,8 +281,9 @@ public bool UseResult(int id)
return perbudgetresultRepository.Update(result);
}
public bool GetAdjustAndGrant(int allotId, ref decimal adjust, ref decimal grant)
public bool GetAdjustAndGrant(int allotId, out decimal adjust, out decimal grant)
{
adjust = 1m; grant = 1m;
var allot = perallotRepository.GetEntity(t => t.ID == allotId);
if (allot == null) return false;
......@@ -292,8 +295,9 @@ public bool GetAdjustAndGrant(int allotId, ref decimal adjust, ref decimal grant
return true;
}
public bool GetAdjustAndGrant(per_allot allot, ref decimal adjust, ref decimal grant)
public bool GetAdjustAndGrant(per_allot allot, out decimal adjust, out decimal grant)
{
adjust = 1m; grant = 1m;
var result = perbudgetresultRepository.GetEntity(t => t.HospitalId == allot.HospitalId && t.Year == allot.Year && t.Month == allot.Month);
if (result == null || result.States != 2) return false;
......
......@@ -295,9 +295,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
}
List<ComputeResult> computeList = new List<ComputeResult>();
var adjust = 1m;
var grant = 1m;
var isBudget = budgetService.GetAdjustAndGrant(allot, ref adjust, ref grant);
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant);
var empDis = empolyeeList.Select(w => new { w.DoctorName, w.JobNumber }).Distinct();
foreach (var emp in empDis)
......@@ -374,7 +372,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Attendance = empolyee.Attendance
};
//应发管理绩效
compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * (empolyee.Management ?? 0);
compute.ShouldGiveFee = (compute.Efficiency + compute.Scale) * (compute.Grant ?? 0);
//绩效合计
compute.PerforSumFee = (compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee;
//应发绩效
......@@ -410,9 +408,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
if (!needCompute.Any()) return computeList;
decimal adjust = 1m;
decimal grant = 1m;
var isBudget = budgetService.GetAdjustAndGrant(allot, ref adjust, ref grant);
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant);
var perforTypeArray = EnumHelper.GetItems<PerforType>();
foreach (var item in needCompute)
......
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