Commit f088535d by ruyun.zhang@suvalue.com

Merge branch 'feature/137行政后勤' into develop

parents c4f1b659 2edf595f
......@@ -98,12 +98,12 @@ public List<res_baiscnorm> Compute(per_allot allot, List<PerSheet> accountSheet)
var empolyeeList2 = perforImEmployeeRepository.GetEntities(t => t.AllotID == allot.ID);
var computeEmployees2 = Mapper.Map<List<ComputeEmployee>>(empolyeeList2);
logManageService.WriteMsg("正在生成绩效", "行政中高层 最终绩效数据计算", 1, allot.ID, "ReceiveMessage");
var computResult2 = computeDirector.Compute(computeEmployees2, allot, baiscnormList);
var computResult2 = computeDirector.Compute(computeEmployees2, allot, baiscnormList, accountbasicList);
var empolyeeList3 = perforImemployeelogisticsRepository.GetEntities(t => t.AllotID == allot.ID);
var computeEmployees3 = Mapper.Map<List<ComputeEmployee>>(empolyeeList3);
logManageService.WriteMsg("正在生成绩效", "行政后勤 最终绩效数据计算", 1, allot.ID, "ReceiveMessage");
var computResult3 = computeDirector.Compute(computeEmployees3, allot, baiscnormList);
var computResult3 = computeDirector.Compute(computeEmployees3, allot, baiscnormList, accountbasicList);
//计算 行政中高层 平均值
baiscNormService.ComputeOtherAvg(baiscnormList, computResult2, empolyeeList2);
......@@ -395,7 +395,7 @@ public void SaveReserved(per_allot allot, int hospitalId)
var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
if (hospital?.IsShowManage == 1)
mTypes.AddRange(new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() });
var resComputes = perforRescomputeRepository
.GetEntities(t => t.AllotID == allot.ID && mTypes.Contains(t.AccountType) && (string.IsNullOrEmpty(t.NeedSecondAllot) || t.NeedSecondAllot == "否"))
?.OrderByDescending(t => t.AccountingUnit);
......
......@@ -442,11 +442,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
/// <param name="empolyeeList"></param>
/// <param name="baiscnormList"></param>
/// <returns></returns>
public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot allot, List<res_baiscnorm> baiscnormList)
public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot allot, List<res_baiscnorm> baiscnormList, List<im_accountbasic> accountbasicList = null)
{
////年资系数
//var workyearList = perforCofworkyearRepository.GetEntities(t => t.AllotID == allot.ID);
List<ComputeResult> computeList = new List<ComputeResult>();
if (empolyeeList == null) return computeList;
......@@ -527,6 +524,15 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
{
// 行政工勤 根据测算表判读是否需要二次分配 默认不需要
compute.NeedSecondAllot = string.IsNullOrWhiteSpace(item.NeedSecondAllot) ? "否" : item.NeedSecondAllot;
#region 禅道137
// 行政后勤人员不需要二次分配的时候,个人的考核得分及调节系数取4.1表里面的科室的考核得分和调节系数
if (compute.NeedSecondAllot == "否")
{
var resAccount = accountbasicList?.FirstOrDefault(t => UnitTypeUtil.IsOffice(t.UnitType) && t.DoctorAccountingUnit == compute.AccountingUnit);
compute.ScoreAverageRate = resAccount?.DoctorScoringAverage ?? 1;
compute.Adjust = resAccount?.DoctorAdjustFactor ?? 1m;
}
#endregion
//考核前绩效
compute.PerforTotal = Math.Round(compute.BaiscNormValue * compute.PostCoefficient * compute.Attendance + compute.OtherPerfor ?? 0);
//考核后绩效 更加开关来控制显示
......
......@@ -12,7 +12,7 @@ public class UnitTypeUtil
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public static bool IsOffice(int unit)
public static bool IsOffice(int? unit)
{
return unit == (int)UnitType.行政后勤;
}
......
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