Commit 317f4b39 by 799284587@qq.com

原始数据展示修改

parent a18cb637
......@@ -145,9 +145,7 @@ private void CommonExport(int sheetID, SheetExportResponse response)
{
var headList = _perforImHeaderRepository.GetEntities(t => t.SheetID == sheetID)?.OrderBy(t => t.PointCell);
if (headList == null) return;
var dataList = _perforImDataRepository.GetEntities(t => t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit).ToList();
if (dataList == null || dataList.Count == 0) return;
//添加系数值
var sheet = _perforImSheetRepository.GetEntity(t => t.ID == sheetID);
......@@ -155,20 +153,18 @@ private void CommonExport(int sheetID, SheetExportResponse response)
if (sheet.SheetType == (int)SheetType.Workload)
{
factorhead.Data.Add(new Cell(0, "单元工作量绩效标准:", 1, 2, false, false));
response = AddFactor(response, factorhead, headList.ToList(), dataList, sheet.SheetName);
}
else if (sheet.SheetType == (int)SheetType.OtherIncome)
{
factorhead.Data.Add(new Cell(0, "额外收入绩效标准:", 1, 2, false, false));
response = AddFactor(response, factorhead, headList.ToList(), dataList, sheet.SheetName);
response = AddFactor(response, factorhead, headList.ToList(), dataList);
}
else if (sheet.SheetType == (int)SheetType.Income || sheet.SheetType == (int)SheetType.Income)
else if (sheet.SheetType == (int)SheetType.OtherIncome || sheet.SheetType == (int)SheetType.Income || sheet.SheetType == (int)SheetType.Expend)
{
factorhead.Data.Add(new Cell(0, "护理组分割比例", 1, 3, false, false));
response = AddFactor(response, factorhead, headList.ToList(), dataList, "护理组");
factorhead.Data.Add(new Cell(0, "护理组分割比例", 1, 4, false, false));
response = AddFactor(response, factorhead, headList.ToList(), dataList, UnitType.护理组);
var factorhead1 = new Row(1);
factorhead1.Data.Add(new Cell(0, "医生组分割比例", 1, 3, false, false));
response = AddFactor(response, factorhead1, headList.ToList(), dataList, "医生组");
factorhead1.Data.Add(new Cell(0, "医生组分割比例", 1, 4, false, false));
response = AddFactor(response, factorhead1, headList.ToList(), dataList, UnitType.医生组);
var factorhead2 = new Row(2);
factorhead2.Data.Add(new Cell(0, "医技组分割比例", 1, 4, false, false));
response = AddFactor(response, factorhead2, headList.ToList(), dataList, UnitType.医技组);
}
//创建列头行
......@@ -195,6 +191,7 @@ private void CommonExport(int sheetID, SheetExportResponse response)
}
//创建数据行
if (dataList == null || dataList.Count == 0) return;
Row rowbody = null;
foreach (var rowNumber in dataList.Select(t => t.RowNumber).Distinct()) //.OrderBy(t => t)
{
......@@ -217,6 +214,11 @@ private void CommonExport(int sheetID, SheetExportResponse response)
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.UnitType == 2)?.AccountingUnit;
rowbody.Data.Add(new Cell(head.PointCell.Value, value, 1, 1, false, false));
}
else if (head.CellValue.Contains("医技组"))
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber && t.UnitType == 3)?.AccountingUnit;
rowbody.Data.Add(new Cell(head.PointCell.Value, value, 1, 1, false, false));
}
else
{
var value = dataList.FirstOrDefault(t => t.RowNumber == rowNumber)?.AccountingUnit;
......@@ -252,20 +254,21 @@ private void AccountNurseExport(int sheetID, SheetExportResponse response)
{
var row = new Row(0);
row.Data.Add(new Cell(1, "核算单元", 1, 1, false, false));
row.Data.Add(new Cell(2, "核算单元护士数量", 1, 1, false, true));
row.Data.Add(new Cell(3, "医生基础系数", 1, 1, false, true));
row.Data.Add(new Cell(4, "倾斜系数", 1, 1, false, true));
row.Data.Add(new Cell(5, "其他绩效1", 1, 1, false, true));
row.Data.Add(new Cell(6, "其他绩效2", 1, 1, false, true));
row.Data.Add(new Cell(7, "医院奖罚", 1, 1, false, true));
row.Data.Add(new Cell(8, "考核对分率", 1, 1, false, true));
row.Data.Add(new Cell(9, "调节系数", 1, 1, false, true));
row.Data.Add(new Cell(10, "科室业绩", 1, 1, false, true));
row.Data.Add(new Cell(11, "业绩绩效", 1, 1, false, true));
row.Data.Add(new Cell(12, "工作量绩效", 1, 1, false, true));
row.Data.Add(new Cell(13, "绩效合计", 1, 1, false, true));
row.Data.Add(new Cell(14, "人均绩效", 1, 1, false, true));
row.Data.Add(new Cell(15, "实发绩效", 1, 1, false, true));
row.Data.Add(new Cell(2, "护士长人数", 1, 1, false, true));
row.Data.Add(new Cell(3, "核算单元护士数量", 1, 1, false, true));
row.Data.Add(new Cell(4, "医生基础系数", 1, 1, false, true));
row.Data.Add(new Cell(5, "倾斜系数", 1, 1, false, true));
row.Data.Add(new Cell(6, "其他绩效1", 1, 1, false, true));
row.Data.Add(new Cell(7, "其他绩效2", 1, 1, false, true));
row.Data.Add(new Cell(8, "医院奖罚", 1, 1, false, true));
row.Data.Add(new Cell(9, "考核对分率", 1, 1, false, true));
row.Data.Add(new Cell(10, "调节系数", 1, 1, false, true));
row.Data.Add(new Cell(11, "科室业绩", 1, 1, false, true));
row.Data.Add(new Cell(12, "业绩绩效", 1, 1, false, true));
row.Data.Add(new Cell(13, "工作量绩效", 1, 1, false, true));
row.Data.Add(new Cell(14, "绩效合计", 1, 1, false, true));
row.Data.Add(new Cell(15, "人均绩效", 1, 1, false, true));
row.Data.Add(new Cell(16, "实发绩效", 1, 1, false, true));
response.Header.Add(row);
for (int i = 0; i < list.Count(); i++)
......@@ -273,20 +276,21 @@ private void AccountNurseExport(int sheetID, SheetExportResponse response)
var item = list.ElementAt(i);
var rowbody = new Row(i);
rowbody.Data.Add(new Cell(1, item.AccountingUnit, 1, 1, false, false));
rowbody.Data.Add(new Cell(2, item.Number, 1, 1, false, true));
rowbody.Data.Add(new Cell(3, item.BasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(4, item.SlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.OtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.OtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.Extra, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.ScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.AdjustFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.Income, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.PerforFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.WorkloadFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.PerforTotal, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.Avg, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.RealGiveFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(2, item.ManagerNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(3, item.Number, 1, 1, false, true));
rowbody.Data.Add(new Cell(4, item.BasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.SlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.OtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.OtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.Extra, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.ScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.AdjustFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.Income, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.PerforFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.WorkloadFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.PerforTotal, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.Avg, 1, 1, false, true));
rowbody.Data.Add(new Cell(16, item.RealGiveFee, 1, 1, false, true));
response.Row.Add(rowbody);
}
}
......@@ -300,20 +304,21 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
{
var row = new Row(0);
row.Data.Add(new Cell(1, "核算单元", 1, 1, false, false));
row.Data.Add(new Cell(2, "核算单元医生数量", 1, 1, false, true));
row.Data.Add(new Cell(3, "医生基础系数", 1, 1, false, true));
row.Data.Add(new Cell(4, "倾斜系数", 1, 1, false, true));
row.Data.Add(new Cell(5, "其他绩效1", 1, 1, false, true));
row.Data.Add(new Cell(6, "其他绩效2", 1, 1, false, true));
row.Data.Add(new Cell(7, "医院奖罚", 1, 1, false, true));
row.Data.Add(new Cell(8, "考核对分率", 1, 1, false, true));
row.Data.Add(new Cell(9, "调节系数", 1, 1, false, true));
row.Data.Add(new Cell(10, "科室业绩", 1, 1, false, true));
row.Data.Add(new Cell(11, "业绩绩效", 1, 1, false, true));
row.Data.Add(new Cell(12, "工作量绩效", 1, 1, false, true));
row.Data.Add(new Cell(13, "绩效合计", 1, 1, false, true));
row.Data.Add(new Cell(14, "人均绩效", 1, 1, false, true));
row.Data.Add(new Cell(15, "实发绩效", 1, 1, false, true));
row.Data.Add(new Cell(2, "科主任人数", 1, 1, false, true));
row.Data.Add(new Cell(3, "核算单元医生数量", 1, 1, false, true));
row.Data.Add(new Cell(4, "医生基础系数", 1, 1, false, true));
row.Data.Add(new Cell(5, "倾斜系数", 1, 1, false, true));
row.Data.Add(new Cell(6, "其他绩效1", 1, 1, false, true));
row.Data.Add(new Cell(7, "其他绩效2", 1, 1, false, true));
row.Data.Add(new Cell(8, "医院奖罚", 1, 1, false, true));
row.Data.Add(new Cell(9, "考核对分率", 1, 1, false, true));
row.Data.Add(new Cell(10, "调节系数", 1, 1, false, true));
row.Data.Add(new Cell(11, "科室业绩", 1, 1, false, true));
row.Data.Add(new Cell(12, "业绩绩效", 1, 1, false, true));
row.Data.Add(new Cell(13, "工作量绩效", 1, 1, false, true));
row.Data.Add(new Cell(14, "绩效合计", 1, 1, false, true));
row.Data.Add(new Cell(15, "人均绩效", 1, 1, false, true));
row.Data.Add(new Cell(16, "实发绩效", 1, 1, false, true));
response.Header.Add(row);
for (int i = 0; i < list.Count(); i++)
......@@ -321,21 +326,22 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
var item = list.ElementAt(i);
var rowbody = new Row(i);
rowbody.Data.Add(new Cell(1, item.AccountingUnit, 1, 1, false, false));
rowbody.Data.Add(new Cell(2, item.Number, 1, 1, false, true));
rowbody.Data.Add(new Cell(2, item.ManagerNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(3, item.Number, 1, 1, false, true));
rowbody.Data.Add(new Cell(3, item.BasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(4, item.SlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.OtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.OtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.Extra, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.ScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.AdjustFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.Income, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.PerforFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.WorkloadFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.PerforTotal, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.Avg, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.RealGiveFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(4, item.BasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.SlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.OtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.OtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.Extra, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.ScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.AdjustFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.Income, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.PerforFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.WorkloadFee, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.PerforTotal, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.Avg, 1, 1, false, true));
rowbody.Data.Add(new Cell(16, item.RealGiveFee, 1, 1, false, true));
response.Row.Add(rowbody);
}
......@@ -344,54 +350,47 @@ private void AccountDoctorExport(int sheetID, SheetExportResponse response)
private void AccountBaiscExport(int sheetID, SheetExportResponse response)
{
var list = _perforImaccountbasicRepository.GetEntities(t => t.SheetID == sheetID)?.OrderByDescending(t => t.DoctorAccountingUnit);
var list = _perforImaccountbasicRepository.GetEntities(t => t.SheetID == sheetID)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.DoctorAccountingUnit);
if (list != null && list.Count() > 0)
{
var row1 = new Row(0);
row1.Data.Add(new Cell(1, "核算单元类型", 2, 1, false, false));
row1.Data.Add(new Cell(2, "核算单元", 2, 1, false, false));
row1.Data.Add(new Cell(3, "科室", 2, 1, false, false));
row1.Data.Add(new Cell(4, "医生组", 1, 8, false, false));
row1.Data.Add(new Cell(12, "护士组", 1, 8, false, false));
response.Header.Add(row1);
var row2 = new Row(1);
row2.Data.Add(new Cell(4, "核算单元医生数量", 1, 1, false, false));
row2.Data.Add(new Cell(5, "医生基础系数", 1, 1, false, false));
row2.Data.Add(new Cell(6, "倾斜系数", 1, 1, false, false));
row2.Data.Add(new Cell(7, "其他绩效1", 1, 1, false, false));
row2.Data.Add(new Cell(8, "其他绩效2", 1, 1, false, false));
row2.Data.Add(new Cell(9, "医院奖罚", 1, 1, false, false));
row2.Data.Add(new Cell(10, "考核对分率", 1, 1, false, false));
row2.Data.Add(new Cell(11, "调节系数", 1, 1, false, false));
row2.Data.Add(new Cell(12, "核算单元护士数量", 1, 1, false, false));
row2.Data.Add(new Cell(13, "医生基础系数", 1, 1, false, false));
row2.Data.Add(new Cell(14, "倾斜系数", 1, 1, false, false));
row2.Data.Add(new Cell(15, "其他绩效1", 1, 1, false, false));
row2.Data.Add(new Cell(16, "其他绩效2", 1, 1, false, false));
row2.Data.Add(new Cell(17, "医院奖罚", 1, 1, false, false));
row2.Data.Add(new Cell(18, "考核对分率", 1, 1, false, false));
row2.Data.Add(new Cell(19, "调节系数", 1, 1, false, false));
var row = new Row(0);
row.Data.Add(new Cell(1, "核算单元类型", 1, 1, false, false));
row.Data.Add(new Cell(2, "核算单元", 1, 1, false, false));
row.Data.Add(new Cell(3, "科室名称", 1, 1, false, false));
row.Data.Add(new Cell(4, "科主任/护士长人数", 1, 1, false, false));
row.Data.Add(new Cell(5, "核算单元人员数量", 1, 1, false, false));
row.Data.Add(new Cell(6, "预算比例", 1, 1, false, false));
row.Data.Add(new Cell(7, "倾斜系数", 1, 1, false, false));
row.Data.Add(new Cell(8, "规模绩效系数", 1, 1, false, false));
row.Data.Add(new Cell(9, "效率绩效系数", 1, 1, false, false));
row.Data.Add(new Cell(10, "管理绩效发放系数", 1, 1, false, false));
row.Data.Add(new Cell(11, "其他绩效1", 1, 1, false, false));
row.Data.Add(new Cell(12, "考核得分率", 1, 1, false, false));
row.Data.Add(new Cell(13, "医院奖罚", 1, 1, false, false));
row.Data.Add(new Cell(14, "其他绩效2", 1, 1, false, false));
row.Data.Add(new Cell(15, "调节系数", 1, 1, false, false));
response.Header.Add(row2);
response.Header.Add(row);
for (int i = 0; i < list.Count(); i++)
{
var item = list.ElementAt(i);
var rowbody = new Row(i);
rowbody.Data.Add(new Cell(1, item.DoctorAccountingUnit, 1, 1, false, false));
rowbody.Data.Add(new Cell(1, ((UnitType)item.UnitType).ToString(), 1, 1, false, false));
rowbody.Data.Add(new Cell(2, item.DoctorAccountingUnit, 1, 1, false, false));
rowbody.Data.Add(new Cell(3, item.Department, 1, 1, false, false));
rowbody.Data.Add(new Cell(4, item.DoctorNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.DoctorBasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.DoctorSlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.DoctorOtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.DoctorOtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.DoctorExtra, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.DoctorScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.DoctorAdjustFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(4, item.DoctorDirectorNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.DoctorNumber, 1, 1, false, true));
rowbody.Data.Add(new Cell(6, item.DoctorBasicFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.DoctorSlopeFactor, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.DoctorScale, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.DoctorEffic, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.DoctorGrant, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.DoctorOtherPerfor1, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.DoctorScoringAverage, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.DoctorExtra, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.DoctorOtherPerfor2, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.DoctorAdjustFactor, 1, 1, false, true));
response.Row.Add(rowbody);
}
}
......@@ -454,29 +453,33 @@ private void EmployeeExport(int sheetID, SheetExportResponse response)
/// <param name="dataList"></param>
/// <param name="type"></param>
/// <returns></returns>
private SheetExportResponse AddFactor(SheetExportResponse response, Row row, List<im_header> headList, List<im_data> dataList, string type)
private SheetExportResponse AddFactor(SheetExportResponse response, Row row, List<im_header> headList, List<im_data> dataList, UnitType? unitType = null)
{
int unitType = type.Contains("医生") ? 1 : 2;
response.Header.Add(row);
if (headList.Any(t => t.ParentID.HasValue && t.ParentID.Value > 0))
if (unitType == null)
{
foreach (var header in headList.Where(t => t.ParentID.HasValue && t.ParentID.Value > 0))
string[] array = new string[] { "核算单元", "科室名称" };
foreach (var header in headList.Where(t => !t.ParentID.HasValue || t.ParentID.Value == 0))
{
var factor = _perforImDataRepository.GetEntities(t => t.AllotID == header.AllotID && t.SheetID == header.SheetID && t.IsFactor == 1
&& t.TypeName == header.CellValue && t.UnitType == unitType);
decimal? value = factor != null ? factor.FirstOrDefault().FactorValue : null;
if (!array.Contains(header.CellValue))
{
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));
}
}
}
else
{
string[] array = new string[] { "核算单元(医生组)", "核算单元(医生组)", "核算单元(护理组)", "科室名称" };
foreach (var header in headList.Where(t => !t.ParentID.HasValue || t.ParentID.Value == 0))
{
if (header.CellValue != "核算单元(医生组)" && header.CellValue != "核算单元(护理组)" && header.CellValue != "科室名称")
if (!array.Contains(header.CellValue))
{
var factor = _perforImDataRepository.GetEntities(t => t.AllotID == header.AllotID && t.SheetID == header.SheetID && t.IsFactor == 1
&& t.TypeName == header.CellValue && t.UnitType == unitType);
decimal? value = factor != null ? factor.FirstOrDefault().FactorValue : null;
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));
}
}
......
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