空值判断

parent 0ec71472
...@@ -871,7 +871,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -871,7 +871,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
private decimal? GetFactors(List<per_sheet> persheet, List<im_data> basicData, UnitType type, SheetType sheetType) private decimal? GetFactors(List<per_sheet> persheet, List<im_data> basicData, UnitType type, SheetType sheetType)
{ {
var sheet = persheet.FirstOrDefault(w => w.SheetType == (int)sheetType); var sheet = persheet.FirstOrDefault(w => w.SheetType == (int)sheetType);
return basicData.FirstOrDefault(t => t.SheetID == sheet.ID && t.UnitType == (int)type && t.IsTotal == 1)?.CellValue; return basicData.FirstOrDefault(t => t.SheetID == sheet?.ID && t.UnitType == (int)type && t.IsTotal == 1)?.CellValue;
} }
private (int sheettype, decimal amount) ClinicDepartmentDetail(List<per_sheet> persheet, res_account account, List<im_data> basicData, per_sheet sheet, UnitType type, string sheetName) private (int sheettype, decimal amount) ClinicDepartmentDetail(List<per_sheet> persheet, res_account account, List<im_data> basicData, per_sheet sheet, UnitType type, string sheetName)
......
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