在行政科室计算时行政工勤后勤适配

parent 1f5649ee
......@@ -381,7 +381,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.Income = empolyees.Sum(w => w.PerforTotal ?? 0);
dept.NeedSecondAllot = empolyees.Any(w => w.NeedSecondAllot == "是") ? "是" : "否";
if (resAccount?.UnitType == UnitType.行政后勤.ToString() && resAccount?.NeedSecondAllot == "是")
if (UnitTypeUtil.IsOffice(resAccount?.UnitType) && resAccount?.NeedSecondAllot == "是")
{
dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage;
dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1;
......
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
public class UnitTypeUtil
{
/// <summary>
/// 是否是行政后勤/工勤
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public static bool IsOffice(int unit)
{
return unit == (int)UnitType.行政后勤;
}
/// <summary>
/// 是否是行政后勤/工勤
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public static bool IsOffice(string unit)
{
return !string.IsNullOrEmpty(unit) && (unit == "行政后勤" || unit == "行政工勤");
}
}
}
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