Commit 3e4c46bf by 李承祥

筛选添加的数据

parent eb2034c8
......@@ -25,6 +25,8 @@ public enum UnitType
专家组 = 4,
[Description("其他组")]
其他组 = 5,
[Description("特殊核算组")]
特殊核算组 = 6,
}
public enum SheetType
......
......@@ -45,7 +45,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue),
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue),
};
dataList.Add(clinicEmployee);
if (!string.IsNullOrEmpty(clinicEmployee.UnitType) && !string.IsNullOrEmpty(clinicEmployee.DoctorName))
dataList.Add(clinicEmployee);
}
return dataList;
......
......@@ -51,7 +51,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue),
//Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
};
dataList.Add(employee);
if (!string.IsNullOrEmpty(employee.AccountingUnit) && !string.IsNullOrEmpty(employee.FitPeople))
dataList.Add(employee);
}
return dataList;
......
......@@ -24,6 +24,7 @@ public class SheetSevice : IAutoInjection
private PerforResaccountRepository _perforResaccountRepository;
//private PerforResaccountnurseRepository _perforImaccountnurseRepository;
private PerforImspecialunitRepository _perforImspecialunitRepository;
private PerforImemployeeclinicRepository _perforImemployeeclinicRepository;
public SheetSevice(PerforPerallotRepository perforAllotRepository,
PerforPersheetRepository perforImSheetRepository,
......@@ -33,7 +34,8 @@ public class SheetSevice : IAutoInjection
PerforImaccountbasicRepository perforImaccountbasicRepository,
PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforImaccountnurseRepository,
PerforImspecialunitRepository perforImspecialunitRepository)
PerforImspecialunitRepository perforImspecialunitRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository)
{
_perforAllotRepository = perforAllotRepository;
_perforImSheetRepository = perforImSheetRepository;
......@@ -44,6 +46,7 @@ public class SheetSevice : IAutoInjection
//_perforImaccountnurseRepository = perforImaccountnurseRepository;
_perforImaccountbasicRepository = perforImaccountbasicRepository;
_perforImspecialunitRepository = perforImspecialunitRepository;
_perforImemployeeclinicRepository = perforImemployeeclinicRepository;
}
/// <summary>
......@@ -80,6 +83,10 @@ public SheetExportResponse SheetExport(int sheetID)
{
EmployeeExport(sheetID, response);
}
else if (sheet.SheetType == (int)SheetType.ClinicEmployee)
{
ClinicEmployeeExport(sheetID, response);
}
else if (sheet.SheetType == (int)SheetType.SpecialUnit)
{
SpecialUnitExport(sheetID, response);
......@@ -475,6 +482,61 @@ private void EmployeeExport(int sheetID, SheetExportResponse response)
}
}
private void ClinicEmployeeExport(int sheetID, SheetExportResponse response)
{
var clinicemployeeList = _perforImemployeeclinicRepository.GetEntities(t => t.SheetID == sheetID)?
.OrderByDescending(t => t.UnitType)
.ThenBy(t => t.AccountingUnit);
if (clinicemployeeList != null && clinicemployeeList.Count() > 0)
{
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, true));
row.Data.Add(new Cell(5, "职称", 1, 1, false, true));
//row.Data.Add(new Cell(6, "绩效基数核算参考对象", 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(8, "效率绩效系数", 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(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 < clinicemployeeList.Count(); i++)
{
var item = clinicemployeeList.ElementAt(i);
//var workTime = item.WorkTime != null ? ((DateTime)item.WorkTime).ToString("yyyy-MM-dd") : "";
var rowbody = new Row(i);
rowbody.Data.Add(new Cell(1, item.UnitType, 1, 1, false, false));
rowbody.Data.Add(new Cell(2, item.AccountingUnit, 1, 1, false, false));
rowbody.Data.Add(new Cell(3, item.Department, 1, 1, false, false));
rowbody.Data.Add(new Cell(4, item.DoctorName, 1, 1, false, true));
rowbody.Data.Add(new Cell(5, item.JobTitle, 1, 1, false, true));
//rowbody.Data.Add(new Cell(6, item.FitPeople, 1, 1, false, true));
rowbody.Data.Add(new Cell(7, item.PostCoefficient, 1, 1, false, true));
rowbody.Data.Add(new Cell(8, item.Efficiency, 1, 1, false, true));
rowbody.Data.Add(new Cell(9, item.Scale, 1, 1, false, true));
rowbody.Data.Add(new Cell(10, item.Management, 1, 1, false, true));
rowbody.Data.Add(new Cell(11, item.ScoreAverageRate, 1, 1, false, true));
rowbody.Data.Add(new Cell(12, item.Attendance, 1, 1, false, true));
rowbody.Data.Add(new Cell(13, item.OtherPerfor, 1, 1, false, true));
rowbody.Data.Add(new Cell(14, item.Punishment, 1, 1, false, true));
rowbody.Data.Add(new Cell(15, item.Adjust, 1, 1, false, true));
//rowbody.Data.Add(new Cell(16, item.Grant, 1, 1, false, true));
response.Row.Add(rowbody);
}
}
}
/// <summary>
/// 添加系数值
/// </summary>
......
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