药占比CMI工作量倾斜

parent 88a437e0
......@@ -758,7 +758,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
{
(int)SheetType.Income, (int)SheetType.OtherIncome, (int)SheetType.Expend, (int)SheetType.Workload,
(int)SheetType.AccountExtra,(int)SheetType.AccountDrugAssess, (int)SheetType.AccountMaterialsAssess, (int)SheetType.AccountScoreAverage,
(int)SheetType.AccountAdjustLaterOtherFee, (int)SheetType.BudgetRatio, (int)SheetType.AssessBeforeOtherFee
(int)SheetType.AccountAdjustLaterOtherFee, (int)SheetType.BudgetRatio, (int)SheetType.AssessBeforeOtherFee,
};
int groupbasis = 1; string single = "";
......@@ -787,9 +787,9 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
var workitems = cofworkitemRepository.GetEntities(t => t.AllotID == account.AllotID);
//var allotCmi = cofcmiRepository.GetEntity(t => t.AllotId == account.AllotID && t.UnitType == account.UnitType && t.AccountingUnit == account.AccountingUnit);
var medicineFactor = GetFactors(persheet, basicData, SheetType.WorkloadMedicineProp);
var cmiFactor = GetFactors(persheet, basicData, SheetType.WorkloadCMI);
var inclineFactor = GetFactors(persheet, basicData, SheetType.WorkloadIncline);
var medicineFactor = GetFactors(persheet, basicData, type, SheetType.WorkloadMedicineProp);
var cmiFactor = GetFactors(persheet, basicData, type, SheetType.WorkloadCMI);
var inclineFactor = GetFactors(persheet, basicData, type, SheetType.WorkloadIncline);
foreach (var dto in items)
{
......@@ -797,7 +797,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
dto.MediFactor = medicineFactor;
if (workitems != null && workitems.Any(a => a.Type == 2 && a.Item == dto.ItemName) && cmiFactor != null)
dto.CMIFactor = cmiFactor;
if (workitems != null && workitems.Any(a => a.Type == 2 && a.Item == dto.ItemName) && inclineFactor != null)
if (workitems != null && workitems.Any(a => a.Type == 3 && a.Item == dto.ItemName) && inclineFactor != null)
dto.InclineFactor = inclineFactor;
dto.ItemValue = dto.ItemValue * (dto.MediFactor ?? 1) * (dto.CMIFactor ?? 1) * (dto.InclineFactor ?? 1);
}
......@@ -818,10 +818,10 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
//return deptDetails;
}
private decimal? GetFactors(List<per_sheet> persheet, List<im_data> basicData, 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);
return basicData.FirstOrDefault(t => t.SheetID == sheet.ID && t.UnitType == (int)sheetType && 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)
......@@ -885,7 +885,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
SheetType[] pairs = new SheetType[]
{
SheetType.AccountExtra, SheetType.AccountDrugAssess, SheetType.AccountMaterialsAssess, SheetType.AccountScoreAverage, SheetType.AccountAdjustLaterOtherFee,
SheetType.AssessBeforeOtherFee, SheetType.BudgetRatio
SheetType.AssessBeforeOtherFee, SheetType.BudgetRatio,
};
if (pairs.Contains((SheetType)sheet.SheetType))
{
......
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