Commit 1f5649ee by lcx

科室、科主任详情四舍五入保留小数位根据数值进行判定

parent 3ff49094
......@@ -1142,7 +1142,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
sheettype = 5;
amount = basicData?.Where(t => t.SheetID == sheet.ID && t.UnitType == (int)type && t.IsTotal == 1)?.FirstOrDefault()?.CellValue ?? 0;
if (sheet.SheetType != (int)SheetType.BudgetRatio)
amount = Math.Round(amount, 0);
amount = GetDecimal(amount, 0);
}
return (sheettype, amount);
}
......@@ -1532,7 +1532,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
OtherManagePerfor = resCompute.OtherManagePerfor ?? 0, //其他管理绩效
ShouldGiveFee = resCompute.ShouldGiveFee ?? 0, //考核前管理绩效
ScoringAverage = resCompute.ScoreAverageRate ?? 1, //考核得分率
AssessLaterManagementFee = Math.Round(resCompute.ShouldGiveFee * resCompute.ScoreAverageRate * resCompute.Attendance + resCompute.Punishment ?? 0), //考核后管理绩效
AssessLaterManagementFee = GetDecimal(resCompute.ShouldGiveFee * resCompute.ScoreAverageRate * resCompute.Attendance + resCompute.Punishment ?? 0), //考核后管理绩效
RealGiveFee = resCompute.RealGiveFee //绩效合计
},
Detail = new List<DetailDtos>()
......@@ -1637,5 +1637,14 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
return others;
}
private decimal GetDecimal(decimal? value, decimal _ = 0)
{
if (!value.HasValue)
return _;
int decimals = Math.Abs(value.Value) > 100 ? 0 : 2;
return Math.Round(value.Value, decimals, MidpointRounding.AwayFromZero);
}
}
}
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