Commit 4327f006 by lcx

Merge branch 'v2020morge' into v2020morge-graphql

parents 2c56d8c7 782dcfae
...@@ -3046,7 +3046,7 @@ ...@@ -3046,7 +3046,7 @@
</member> </member>
<member name="P:Performance.DtoModels.DeptResponse.PerforTotal"> <member name="P:Performance.DtoModels.DeptResponse.PerforTotal">
<summary> <summary>
绩效合计 考核前绩效合计
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.DeptResponse.Avg"> <member name="P:Performance.DtoModels.DeptResponse.Avg">
......
...@@ -129,7 +129,7 @@ public class DeptResponse ...@@ -129,7 +129,7 @@ public class DeptResponse
public Nullable<decimal> WorkloadFee { get; set; } public Nullable<decimal> WorkloadFee { get; set; }
/// <summary> /// <summary>
/// 绩效合计 /// 考核前绩效合计
/// </summary> /// </summary>
public Nullable<decimal> PerforTotal { get; set; } public Nullable<decimal> PerforTotal { get; set; }
......
...@@ -311,6 +311,154 @@ public List<DeptResponse> GetOfficePerformance(int allotId) ...@@ -311,6 +311,154 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
return other; return other;
} }
///// <summary>
///// 返回院领导、中层、工勤组绩效
///// </summary>
///// <param name="allotId">绩效ID</param>
///// <returns></returns>
//public List<DeptResponse> GetAdminPerformance(int allotId)
//{
// var result = new List<DeptResponse>();
// var resData = perforResaccountRepository.GetEntities(t => t.AllotID == allotId);
// if (resData != null && resData.Any())
// {
// result.AddRange(Mapper.Map<List<DeptResponse>>(resData));
// result.ForEach(t =>
// {
// t.UnitName = ((UnitType)t.UnitType).ToString();
// t.AssessLaterPerforTotal = Math.Round((t.PerforTotal * t.ScoringAverage + (t.MedicineExtra ?? 0) + (t.MaterialsExtra ?? 0) + (t.Extra ?? 0) + (t.AssessLaterOtherFee ?? 0)) ?? 0);
// });
// result = result.OrderBy(t => t.UnitType).ThenBy(t => t.AccountingUnit).ToList();
// }
// var list = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId);
// if (list == null || !list.Any()) return result;
// var isShowManage = IsShowManage(allotId);
// Dictionary<string, string> dict = new Dictionary<string, string>
// {
// { "科主任", "医生组" },
// { "护士长", "护理组" },
// { AccountUnitType.行政高层.ToString(), AccountUnitType.行政高层.ToString() },
// { AccountUnitType.行政中层.ToString(), AccountUnitType.行政中层.ToString() },
// { AccountUnitType.行政工勤.ToString(), AccountUnitType.行政工勤.ToString() }
// };
// var doctors = new string[] { "医生组", "护理组", "医技组" };
// List<DeptResponse> adminPerfor = list.GroupBy(t => new { t.AccountingUnit, t.AccountType, t.UnitType }).Select(t =>
// {
// string unitName = !string.IsNullOrEmpty(t.Key.UnitType) ? t.Key.UnitType : result.Where(w => !dict.Values.Contains(w.UnitName)).FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit)?.UnitName ?? "";
// var data = new DeptResponse
// {
// UnitName = !dict.Values.Contains(unitName) && !string.IsNullOrEmpty(unitName) ? unitName : dict.ContainsKey(t.Key.AccountType) ? dict[t.Key.AccountType] : "未知",
// AccountingUnit = t.Key.AccountingUnit,
// Department = t.Key.AccountingUnit,
// Number = t.Count(),
// };
// if (doctors.Contains(data.UnitName))
// {
// data.AssessLaterManagementFee = isShowManage == 1
// ? t.Sum(group => group.RealGiveFee ?? 0) + t.Sum(group => group.OtherPerfor ?? 0) //实发绩效
// : Math.Round((t.Max(m => m.ShouldGiveFee) * t.Max(m => m.ScoreAverageRate) * t.Max(m => m.Attendance) ?? 0.0M) + t.Max(m => m.Punishment ?? 0.0M)); //考核后管理绩效
// }
// return data;
// }).ToList();
// result.AddRange(adminPerfor);
// var aprAmounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3) ?? new List<per_apr_amount>();
// var employees = perforPeremployeeRepository.GetEntities(t => t.AllotId == allotId) ?? new List<per_employee>();
// var otherPerformances = aprAmounts.Join(employees,
// outer => new { outer.AccountingUnit, outer.PersonnelNumber },
// inner => new { inner.AccountingUnit, inner.PersonnelNumber },
// (outer, inner) => new
// {
// AccountingUnit = outer.AccountingUnit,
// UnitType = inner.UnitType,
// PersonnelNumber = inner.PersonnelNumber,
// PersonnelName = outer.DoctorName,
// Amount = outer.Amount
// })?.GroupBy(t => new { t.AccountingUnit, t.UnitType }).Select(t => new
// {
// AccountingUnit = t.Key.AccountingUnit,
// UnitType = t.Key.UnitType,
// Amount = t.Sum(s => s.Amount)
// });
// result = result.GroupBy(t => new { t.AccountingUnit, t.UnitName }).Select(t => new DeptResponse
// {
// UnitName = t.Key.UnitName,
// AccountingUnit = t.Key.AccountingUnit,
// Department = t.Key.AccountingUnit,
// PerforFee = t.Sum(group => group.PerforFee),
// WorkloadFee = t.Sum(group => group.WorkloadFee),
// AssessBeforeOtherFee = t.Sum(group => group.AssessBeforeOtherFee),
// ScoringAverage = t.Sum(group => group.ScoringAverage),
// MedicineExtra = t.Sum(group => group.MedicineExtra),
// Extra = t.Sum(group => group.Extra),
// AssessLaterOtherFee = t.Sum(group => group.AssessLaterOtherFee),
// AdjustFactor = t.Max(group => group.AdjustFactor),
// AdjustLaterOtherFee = t.Sum(group => group.AdjustLaterOtherFee),
// PerforTotal = t.Sum(group => group.PerforTotal),
// AssessLaterPerforTotal = t.Sum(group => group.AssessLaterPerforTotal),
// AssessLaterManagementFee = t.Sum(group => group.AssessLaterManagementFee),
// AprPerforAmount = otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0,
// RealGiveFee = t.Sum(group => group.RealGiveFee) + t.Sum(group => group.AssessLaterManagementFee)
// + (otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0),
// }).ToList();
// var specialData = _perforResspecialunitRepository.GetEntities(t => t.AllotID == allotId);
// if (specialData != null && specialData.Any())
// {
// result.AddRange(specialData.GroupBy(t => new { t.AccountingUnit, t.Department }).Select(t =>
// {
// var data = new DeptResponse
// {
// UnitName = "特殊核算组",
// AccountingUnit = t.Key.AccountingUnit,
// Department = t.Key.Department,
// PerforFee = t.Max(max => max.GiveFee),
// WorkloadFee = 0,
// AssessBeforeOtherFee = t.Max(max => max.AssessBeforeOtherFee),
// PerforTotal = t.Max(max => max.PerforTotal),
// ScoringAverage = t.Max(max => max.ScoringAverage),
// MedicineExtra = t.Max(max => max.MedicineExtra),
// MaterialsExtra = t.Max(max => max.MaterialsExtra),
// Extra = 0,
// AssessLaterOtherFee = t.Max(max => max.AssessLaterOtherFee),
// AdjustFactor = t.Max(max => max.Adjust),
// AdjustLaterOtherFee = t.Max(max => max.AdjustLaterOtherFee),
// AssessLaterManagementFee = 0,
// AprPerforAmount = 0,
// RealGiveFee = t.Max(max => max.RealGiveFee),
// };
// data.AssessLaterPerforTotal = Math.Round(((data.PerforTotal * data.ScoringAverage) ?? 0) + (data.MedicineExtra ?? 0) + (data.MaterialsExtra ?? 0) + (data.AssessLaterOtherFee ?? 0));
// return data;
// }));
// }
// var enumItems = EnumHelper.GetItems<AccountUnitType>();
// result = result.OrderBy(t => enumItems.FirstOrDefault(e => e.Name == t.UnitName)?.Value)/*.ThenBy(t => t.AccountingUnit)*/.ToList();
// return result;
//}
/// <summary> /// <summary>
/// 返回院领导、中层、工勤组绩效 /// 返回院领导、中层、工勤组绩效
/// </summary> /// </summary>
...@@ -319,58 +467,10 @@ public List<DeptResponse> GetOfficePerformance(int allotId) ...@@ -319,58 +467,10 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
public List<DeptResponse> GetAdminPerformance(int allotId) public List<DeptResponse> GetAdminPerformance(int allotId)
{ {
var result = new List<DeptResponse>(); var result = new List<DeptResponse>();
//var types = new[] { (int)UnitType.行政高层, (int)UnitType.行政中层 }; var amounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3) ?? new List<per_apr_amount>();
//var resData = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && !types.Contains(t.UnitType ?? 0));
var resData = perforResaccountRepository.GetEntities(t => t.AllotID == allotId);
if (resData != null && resData.Any())
{
result.AddRange(Mapper.Map<List<DeptResponse>>(resData));
result.ForEach(t =>
{
t.UnitName = ((UnitType)t.UnitType).ToString();
t.AssessLaterPerforTotal = Math.Round((t.PerforTotal * t.ScoringAverage + (t.MedicineExtra ?? 0) + (t.MaterialsExtra ?? 0) + (t.Extra ?? 0) + (t.AssessLaterOtherFee ?? 0)) ?? 0);
});
result = result.OrderBy(t => t.UnitType).ThenBy(t => t.AccountingUnit).ToList();
}
var list = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId);
if (list == null || !list.Any()) return result;
var isShowManage = IsShowManage(allotId);
Dictionary<string, string> dict = new Dictionary<string, string>
{
{ "科主任", "医生组" },
{ "护士长", "护理组" },
{ AccountUnitType.行政高层.ToString(), AccountUnitType.行政高层.ToString() },
{ AccountUnitType.行政中层.ToString(), AccountUnitType.行政中层.ToString() },
{ AccountUnitType.行政工勤.ToString(), AccountUnitType.行政工勤.ToString() }
};
var doctors = new string[] { "医生组", "护理组", "医技组" };
List<DeptResponse> adminPerfor = list.GroupBy(t => new { t.AccountingUnit, t.AccountType }).Select(t =>
{
string unitName = result.Where(w => !dict.Values.Contains(w.UnitName)).FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit)?.UnitName ?? "";
var data = new DeptResponse
{
UnitName = !dict.Values.Contains(unitName) && !string.IsNullOrEmpty(unitName) ? unitName : dict.ContainsKey(t.Key.AccountType) ? dict[t.Key.AccountType] : "未知",
AccountingUnit = t.Key.AccountingUnit,
Department = t.Key.AccountingUnit,
Number = t.Count(),
};
if (doctors.Contains(data.UnitName))
{
data.AssessLaterManagementFee = isShowManage == 1
? t.Sum(group => group.RealGiveFee ?? 0) + t.Sum(group => group.OtherPerfor ?? 0) //实发绩效
: Math.Round((t.Max(m => m.ShouldGiveFee) * t.Max(m => m.ScoreAverageRate) * t.Max(m => m.Attendance) ?? 0.0M) + t.Max(m => m.Punishment ?? 0.0M)); //考核后管理绩效
}
return data;
}).ToList();
result.AddRange(adminPerfor);
var aprAmounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3) ?? new List<per_apr_amount>();
var employees = perforPeremployeeRepository.GetEntities(t => t.AllotId == allotId) ?? new List<per_employee>(); var employees = perforPeremployeeRepository.GetEntities(t => t.AllotId == allotId) ?? new List<per_employee>();
// 获取各科室 医院其他绩效
var otherPerformances = aprAmounts.Join(employees, var otherPerformances = amounts.Join(employees,
outer => new { outer.AccountingUnit, outer.PersonnelNumber }, outer => new { outer.AccountingUnit, outer.PersonnelNumber },
inner => new { inner.AccountingUnit, inner.PersonnelNumber }, inner => new { inner.AccountingUnit, inner.PersonnelNumber },
(outer, inner) => new (outer, inner) => new
...@@ -387,64 +487,111 @@ public List<DeptResponse> GetAdminPerformance(int allotId) ...@@ -387,64 +487,111 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
Amount = t.Sum(s => s.Amount) Amount = t.Sum(s => s.Amount)
}); });
result = result.GroupBy(t => new { t.AccountingUnit, t.UnitName }).Select(t => new DeptResponse var clinicalTypes = new UnitType[] { UnitType.医生组, UnitType.其他医生组, UnitType.医技组, UnitType.其他医技组, UnitType.护理组, UnitType.其他护理组, UnitType.特殊核算组 };
var clinicalTypesString = clinicalTypes.Select(w => w.ToString()).ToList();
var clinicalTypesInt = clinicalTypes.Select(w => (int)w).ToList();
var clinicalComputes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && clinicalTypesString.Contains(t.UnitType)) ?? new List<res_compute>();
var clinicalEmployees = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId && clinicalTypesString.Contains(t.UnitType));
var isShowManage = IsShowManage(allotId);
// 计算 科主任/护士长 管理绩效
clinicalComputes?.ForEach(t =>
{
if (isShowManage == 2)
{
var employee = clinicalEmployees.FirstOrDefault(e => e.PersonnelNumber == t.JobNumber && e.AccountingUnit == t.AccountingUnit);
var scoreAverageRate = t.ScoreAverageRate ?? employee.ScoreAverageRate ?? 1;
var attendance = t.Attendance ?? employee.Attendance ?? 0;
t.GiveFee = (t.ShouldGiveFee ?? 0) * scoreAverageRate * attendance + (t.OtherPerfor ?? 0) + (t.Punishment ?? 0) + (t.AssessLaterOtherFee ?? 0);
t.RealGiveFee = t.GiveFee * (t.Adjust ?? 1m) + (t.AdjustLaterOtherFee ?? 0);
}
});
// 临床科室
var accounts = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && clinicalTypesInt.Contains(t.UnitType.Value)) ?? new List<res_account>();
var clinicalResult = accounts.Select(t => new DeptResponse
{ {
UnitName = t.Key.UnitName, UnitName = ((UnitType)t.UnitType).ToString(),
AccountingUnit = t.AccountingUnit,
Department = t.AccountingUnit,
PerforFee = t.PerforFee,
WorkloadFee = t.WorkloadFee,
AssessBeforeOtherFee = t.AssessBeforeOtherFee,
PerforTotal = t.PerforTotal,
ScoringAverage = t.ScoringAverage,
Extra = t.Extra,
MedicineExtra = t.MedicineExtra,
MaterialsExtra = t.MaterialsExtra,
AssessLaterOtherFee = t.AssessLaterOtherFee,
AssessLaterPerforTotal = t.AssessLaterPerforTotal,
AdjustFactor = t.AdjustFactor,
AdjustLaterOtherFee = t.AdjustLaterOtherFee,
AssessLaterManagementFee = clinicalComputes?.Where(w => w.AccountingUnit == t.AccountingUnit && w.UnitType == ((UnitType)t.UnitType).ToString())?.Sum(c => c.RealGiveFee),
RealGiveFee = t.RealGiveFee,
});
result.AddRange(clinicalResult);
// 特殊核算组科室
var specialunits = _perforResspecialunitRepository.GetEntities(t => t.AllotID == allotId) ?? new List<res_specialunit>();
var specialResult = specialunits.GroupBy(t => new { t.AccountingUnit }).Select(t => new DeptResponse
{
UnitName = UnitType.特殊核算组.ToString(),
AccountingUnit = t.Key.AccountingUnit, AccountingUnit = t.Key.AccountingUnit,
Department = t.Key.AccountingUnit, Department = t.Key.AccountingUnit,
PerforFee = t.Sum(group => group.PerforFee), PerforFee = t.Max(w => w.ResultsTotalFee),
WorkloadFee = t.Sum(group => group.WorkloadFee), WorkloadFee = 0,
AssessBeforeOtherFee = t.Sum(group => group.AssessBeforeOtherFee), AssessBeforeOtherFee = t.Max(w => w.AssessBeforeOtherFee),
ScoringAverage = t.Sum(group => group.ScoringAverage), PerforTotal = t.Max(w => w.PerforTotal),
MedicineExtra = t.Sum(group => group.MedicineExtra), ScoringAverage = t.Max(w => w.ScoringAverage),
Extra = t.Sum(group => group.Extra), Extra = t.Max(w => w.Punishment),
AssessLaterOtherFee = t.Sum(group => group.AssessLaterOtherFee), MedicineExtra = t.Max(w => w.MedicineExtra),
AdjustFactor = t.Max(group => group.AdjustFactor), MaterialsExtra = t.Max(w => w.MaterialsExtra),
AdjustLaterOtherFee = t.Sum(group => group.AdjustLaterOtherFee), AssessLaterOtherFee = t.Max(w => w.AssessLaterOtherFee),
PerforTotal = t.Sum(group => group.PerforTotal), AssessLaterPerforTotal = Math.Round((t.Max(w => w.PerforTotal) * t.Max(w => w.ScoringAverage) + t.Max(w => w.MedicineExtra) + t.Max(w => w.MaterialsExtra) + t.Max(w => w.Punishment) + t.Max(w => w.AssessLaterOtherFee)) ?? 0),
AssessLaterPerforTotal = t.Sum(group => group.AssessLaterPerforTotal), AdjustFactor = t.Max(w => w.Adjust),
AssessLaterManagementFee = t.Sum(group => group.AssessLaterManagementFee), AdjustLaterOtherFee = t.Max(w => w.AdjustLaterOtherFee),
AprPerforAmount = otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0, AssessLaterManagementFee = clinicalComputes?.Where(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == UnitType.特殊核算组.ToString())?.Sum(c => c.RealGiveFee),
RealGiveFee = t.Sum(group => group.RealGiveFee) + t.Sum(group => group.AssessLaterManagementFee) RealGiveFee = t.Max(w => w.RealGiveFee),
+ (otherPerformances?.FirstOrDefault(w => w.AccountingUnit == t.Key.AccountingUnit && w.UnitType == t.Key.UnitName)?.Amount ?? 0), }).Distinct();
}).ToList(); result.AddRange(specialResult);
var specialData = _perforResspecialunitRepository.GetEntities(t => t.AllotID == allotId); var officeTypes = new List<string> { "行政工勤", "行政高层", "行政中层" };
if (specialData != null && specialData.Any()) var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && officeTypes.Contains(t.AccountType)) ?? new List<res_compute>();
var officeResult = computes.GroupBy(t => new { t.AccountingUnit, t.AccountType, t.UnitType }).Select(t => new DeptResponse
{ {
result.AddRange(specialData.GroupBy(t => new { t.AccountingUnit, t.Department }).Select(t => UnitName = t.Key.AccountType == "行政后勤" ? "行政工勤" : t.Key.AccountType,
{ AccountingUnit = t.Key.AccountingUnit,
var data = new DeptResponse Department = t.Key.AccountingUnit,
{ PerforFee = 0,
UnitName = "特殊核算组", WorkloadFee = 0,
AccountingUnit = t.Key.AccountingUnit, AssessBeforeOtherFee = 0,
Department = t.Key.Department, PerforTotal = t.Sum(w => w.PerforTotal),
PerforFee = t.Max(max => max.GiveFee), ScoringAverage = 1,
WorkloadFee = 0, Extra = 0,
AssessBeforeOtherFee = t.Max(max => max.AssessBeforeOtherFee), MedicineExtra = 0,
PerforTotal = t.Max(max => max.PerforTotal), MaterialsExtra = 0,
ScoringAverage = t.Max(max => max.ScoringAverage), AssessLaterOtherFee = 0,
MedicineExtra = t.Max(max => max.MedicineExtra), AssessLaterPerforTotal = t.Sum(w => w.GiveFee),
MaterialsExtra = t.Max(max => max.MaterialsExtra), AdjustFactor = t.FirstOrDefault()?.Adjust ?? 1,
Extra = 0, AdjustLaterOtherFee = t.Sum(w => w.AdjustLaterOtherFee),
AssessLaterOtherFee = t.Max(max => max.AssessLaterOtherFee), RealGiveFee = t.Sum(w => w.RealGiveFee),
AdjustFactor = t.Max(max => max.Adjust), }); ;
AdjustLaterOtherFee = t.Max(max => max.AdjustLaterOtherFee), result.AddRange(officeResult);
AssessLaterManagementFee = 0, // 医院其他绩效、科主任护士长管理绩效、合并实发
AprPerforAmount = 0, foreach (var item in result)
RealGiveFee = t.Max(max => max.RealGiveFee), {
}; item.AprPerforAmount = otherPerformances?.Where(w => w.AccountingUnit == item.AccountingUnit && w.UnitType == item.UnitName)?.Sum(w => w.Amount) ?? 0;
data.AssessLaterPerforTotal = Math.Round(((data.PerforTotal * data.ScoringAverage) ?? 0) + (data.MedicineExtra ?? 0) + (data.MaterialsExtra ?? 0) + (data.AssessLaterOtherFee ?? 0)); item.AssessLaterManagementFee = item.AssessLaterManagementFee ?? 0;
return data; item.RealGiveFee = (item.RealGiveFee ?? 0) + item.AssessLaterManagementFee + item.AprPerforAmount;
}));
} }
var enumItems = EnumHelper.GetItems<AccountUnitType>(); var enumItems = EnumHelper.GetItems<AccountUnitType>();
result = result.OrderBy(t => enumItems.FirstOrDefault(e => e.Name == t.UnitName)?.Value)/*.ThenBy(t => t.AccountingUnit)*/.ToList(); result = result.OrderBy(t => enumItems.FirstOrDefault(e => e.Name == t.UnitName)?.Value)/*.ThenBy(t => t.AccountingUnit)*/.ToList();
return result; return result;
} }
/// <summary> /// <summary>
/// 查看科室绩效 /// 查看科室绩效
/// </summary> /// </summary>
...@@ -607,7 +754,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i ...@@ -607,7 +754,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
//// 业务中层人员信息 //// 业务中层人员信息
//var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId); //var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
// 一次绩效 获取特定人员绩效结果 // 一次绩效 获取特定人员绩效结果
var allot = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && mTypes.Contains(t.AccountType))?.OrderByDescending(t => t.AccountingUnit); var allot = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && mTypes.Contains(t.AccountType) && t.NeedSecondAllot == "否")?.OrderByDescending(t => t.AccountingUnit);
//var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId); //var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId);
return allot?.Select(t => return allot?.Select(t =>
...@@ -993,7 +1140,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -993,7 +1140,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
if (pairs.Contains((SheetType)sheet.SheetType)) if (pairs.Contains((SheetType)sheet.SheetType))
{ {
sheettype = 5; sheettype = 5;
amount = basicData.Where(t => t.SheetID == sheet.ID && t.UnitType == (int)type && t.IsTotal == 1)?.FirstOrDefault()?.CellValue ?? 0; amount = basicData?.Where(t => t.SheetID == sheet.ID && t.UnitType == (int)type && t.IsTotal == 1)?.FirstOrDefault()?.CellValue ?? 0;
if (sheet.SheetType != (int)SheetType.BudgetRatio) if (sheet.SheetType != (int)SheetType.BudgetRatio)
amount = Math.Round(amount, 0); amount = Math.Round(amount, 0);
} }
......
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