Commit f7ed0f40 by 李承祥

sheet 数据详情列头 工作量药占比计算项的复制

parent 87ddad8a
......@@ -478,6 +478,17 @@ public void Copy(per_allot allot)
_drugtypeRepository.AddRange(newAgains.ToArray());
}
var workItem = _workitemRepository.GetEntities(t => t.AllotID == allot.ID);
if (hospital != null && hospital?.IsOpenDrugprop == 1 && (workItem == null || workItem.Count == 0))
{
workItem = _workitemRepository.GetEntities(t => t.AllotID == allotId);
if (workItem != null && workItem.Count > 0)
{
var newWorkItem = workItem.Select(t => new cof_workitem { AllotID = allot.ID, Item = t.Item });
_workitemRepository.AddRange(newWorkItem.ToArray());
}
}
var data = _againRepository.GetEntities(t => t.AllotID == allot.ID);
if (data == null || data.Count == 0)
{
......
......@@ -184,7 +184,7 @@ private void CommonExport(int sheetID, SheetExportResponse response)
if (new List<string> { "核算单元(医技组)", "核算单元(医生组)", "核算单元(护理组)", "科室名称" }.Contains(header.CellValue)) continue;
var technician = dataList.FirstOrDefault(t => t.UnitType == 3 && t.TypeName == header.CellValue);
//technicianvalue.Data.Add(new Cell(header.PointCell.Value, technician.CellValue, header.MergeRow.Value, header.MergeCell.Value, header.IsTotal == 1, false));
technicianhead.Data.Add(new Cell(header.PointCell.Value, technician?.AccountingUnit ?? null, header.MergeRow.Value, header.MergeCell.Value, header.IsTotal == 1, false));
technicianhead.Data.Add(new Cell(header.PointCell.Value, technician?.AccountingUnit ?? null, 1, 1, header.IsTotal == 1, false));
}
}
......@@ -497,7 +497,7 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
var factor = dataList.Where(t => t.AllotID == header.AllotID && t.SheetID == header.SheetID && t.IsFactor == 1
&& t.TypeName == header.CellValue);
decimal? value = factor.Any() ? factor.FirstOrDefault().FactorValue : null;
row.Data.Add(new Cell(header.PointCell.Value, value, header.MergeRow.Value, header.MergeCell.Value, header.IsTotal == 1, false));
row.Data.Add(new Cell(header.PointCell.Value, value, 1, 1, header.IsTotal == 1, false));
}
}
}
......@@ -511,7 +511,7 @@ private SheetExportResponse AddFactor(SheetExportResponse response, Row row, Lis
var factor = dataList.Where(t => t.AllotID == header.AllotID && t.SheetID == header.SheetID && t.IsFactor == 1
&& t.TypeName == header.CellValue && t.UnitType == (int)unitType);
decimal? value = factor.Any() ? factor.FirstOrDefault().FactorValue : null;
row.Data.Add(new Cell(header.PointCell.Value, value, header.MergeRow.Value, header.MergeCell.Value, header.IsTotal == 1, false));
row.Data.Add(new Cell(header.PointCell.Value, value, 1, 1, header.IsTotal == 1, false));
}
}
}
......
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