Commit ec770743 by ruyun.zhang@suvalue.com

Merge branch 'feature/reconsitution' into develop

parents 8d0a7b15 f89c2766
...@@ -8,125 +8,130 @@ ...@@ -8,125 +8,130 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels namespace Performance.EntityModels
{ {
/// <summary> /// <summary>
/// res_compute Entity Model /// res_compute Entity Model
/// </summary> /// </summary>
[Table("res_compute")] [Table("res_compute")]
public class res_compute public class res_compute
{ {
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
[Key] [Key]
public int ID { get; set; } public int ID { get; set; }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public Nullable<int> AllotID { get; set; } public Nullable<int> AllotID { get; set; }
/// <summary> /// <summary>
/// sheet页id /// sheet页id
/// </summary> /// </summary>
public Nullable<int> SheetID { get; set; } public Nullable<int> SheetID { get; set; }
/// <summary> /// <summary>
/// 核算单元 /// 核算单元
/// </summary> /// </summary>
public string AccountingUnit { get; set; } public string AccountingUnit { get; set; }
/// <summary> /// <summary>
/// 绩效基数核算参考对象 /// 绩效基数核算参考对象
/// </summary> /// </summary>
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 人员姓名 /// 人员姓名
/// </summary> /// </summary>
public string EmployeeName { get; set; } public string EmployeeName { get; set; }
/// <summary>
/// 职称
/// </summary>
public string JobTitle { get; set; }
/// <summary> /// <summary>
/// 绩效合计(来自科室经济测算表) /// 绩效合计(来自科室经济测算表)
/// </summary> /// </summary>
public Nullable<decimal> PerforTotal { get; set; } public Nullable<decimal> PerforTotal { get; set; }
/// <summary> /// <summary>
/// 核算单元医生数量(来自科室经济测算表) /// 核算单元医生数量(来自科室经济测算表)
/// </summary> /// </summary>
public Nullable<decimal> Number { get; set; } public Nullable<decimal> Number { get; set; }
/// <summary> /// <summary>
/// 人均绩效(来自科室经济测算表) /// 人均绩效(来自科室经济测算表)
/// </summary> /// </summary>
public Nullable<decimal> Avg { get; set; } public Nullable<decimal> Avg { get; set; }
/// <summary> /// <summary>
/// 效率绩效(需计算) /// 效率绩效(需计算)
/// </summary> /// </summary>
public Nullable<decimal> Efficiency { get; set; } public Nullable<decimal> Efficiency { get; set; }
/// <summary> /// <summary>
/// 规模绩效(需计算) /// 规模绩效(需计算)
/// </summary> /// </summary>
public Nullable<decimal> Scale { get; set; } public Nullable<decimal> Scale { get; set; }
/// <summary> /// <summary>
/// 岗位系数 /// 岗位系数
/// </summary> /// </summary>
public Nullable<decimal> PostCoefficient { get; set; } public Nullable<decimal> PostCoefficient { get; set; }
/// <summary> /// <summary>
/// 发放系数(来自人员名单) /// 发放系数(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> Grant { get; set; } public Nullable<decimal> Grant { get; set; }
/// <summary> /// <summary>
/// 应发管理绩效(需计算) /// 应发管理绩效(需计算)
/// </summary> /// </summary>
public Nullable<decimal> ShouldGiveFee { get; set; } public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary> /// <summary>
/// 绩效合计(需计算) /// 绩效合计(需计算)
/// </summary> /// </summary>
public Nullable<decimal> PerforSumFee { get; set; } public Nullable<decimal> PerforSumFee { get; set; }
/// <summary> /// <summary>
/// 考核对分率(来自人员名单) /// 考核对分率(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> ScoreAverageRate { get; set; } public Nullable<decimal> ScoreAverageRate { get; set; }
/// <summary> /// <summary>
/// 医院奖罚(来自人员名单) /// 医院奖罚(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> Punishment { get; set; } public Nullable<decimal> Punishment { get; set; }
/// <summary> /// <summary>
/// 其他绩效(来自人员名单) /// 其他绩效(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> OtherPerfor { get; set; } public Nullable<decimal> OtherPerfor { get; set; }
/// <summary> /// <summary>
/// 应发绩效(需计算) /// 应发绩效(需计算)
/// </summary> /// </summary>
public Nullable<decimal> GiveFee { get; set; } public Nullable<decimal> GiveFee { get; set; }
/// <summary> /// <summary>
/// 出勤率(来自人员名单) /// 出勤率(来自人员名单)
/// </summary> /// </summary>
public Nullable<decimal> Attendance { get; set; } public Nullable<decimal> Attendance { get; set; }
/// <summary> /// <summary>
/// 参加工作时间(来自人员名单) /// 参加工作时间(来自人员名单)
/// </summary> /// </summary>
public Nullable<DateTime> WorkTime { get; set; } public Nullable<DateTime> WorkTime { get; set; }
/// <summary> /// <summary>
/// 绩效基础金额(计算) /// 绩效基础金额(计算)
/// </summary> /// </summary>
public Nullable<decimal> BaiscNormValue { get; set; } public Nullable<decimal> BaiscNormValue { get; set; }
/// <summary> /// <summary>
/// 年资系数(来自人员名单) /// 年资系数(来自人员名单)
/// </summary> /// </summary>
......
...@@ -183,7 +183,7 @@ public void Generate(per_allot allot, UserIdentity user) ...@@ -183,7 +183,7 @@ public void Generate(per_allot allot, UserIdentity user)
if (!checkDataService.Check(excel, allot)) if (!checkDataService.Check(excel, allot))
{ {
_allotRepository.UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail)); _allotRepository.UpdateAllotStates(allot.ID, (int)AllotStates.CheckFail, EnumHelper.GetDescription(AllotStates.CheckFail));
SendEmail(allot, user); SendEmail(allot, user.Mail, false);
return; return;
} }
_allotRepository.UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate)); _allotRepository.UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate));
...@@ -198,17 +198,25 @@ public void Generate(per_allot allot, UserIdentity user) ...@@ -198,17 +198,25 @@ public void Generate(per_allot allot, UserIdentity user)
_allotRepository.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed)); _allotRepository.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
//发送邮件 //发送邮件
SendEmail(allot, user); SendEmail(allot, user.Mail, true);
} }
private void SendEmail(per_allot allot, UserIdentity user) private void SendEmail(per_allot allot, string mail, bool isPass)
{ {
string body = "绩效生成结束";
string subject = "绩效生成结束";
if (!isPass)
{
//获取所有检查未通过的数据提示
subject = "绩效数据校验未通过";
body = "绩效数据校验未通过,详情如下:";
}
var message = new EmailMessage var message = new EmailMessage
{ {
To = new List<string> { user.Mail }, To = new List<string> { mail },
DisplayName = "溯直健康", DisplayName = "溯直健康",
Subject = "绩效生成结束", Subject = subject,
Body = "绩效生成结束" Body = body
}; };
emailService.SendAsync(message); emailService.SendAsync(message);
} }
......
...@@ -32,9 +32,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType) ...@@ -32,9 +32,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
case SheetType.Expend: case SheetType.Expend:
dataread = new PerSheetDataReadExpend(); dataread = new PerSheetDataReadExpend();
break; break;
case SheetType.Overtime: //case SheetType.Overtime:
dataread = new PerSheetDataReadOvertime(); // dataread = new PerSheetDataReadOvertime();
break; // break;
case SheetType.Workload: case SheetType.Workload:
dataread = new PerSheetDataReadWorkload(); dataread = new PerSheetDataReadWorkload();
break; break;
......
...@@ -30,29 +30,28 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -30,29 +30,28 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var row = sheet.GetRow(r); var row = sheet.GetRow(r);
if (row == null) continue; if (row == null) continue;
var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell).ToString(); var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.ToString();
if (string.IsNullOrEmpty(accountingUnit))
continue;
PerDataAccountBaisc unifyUnit = new PerDataAccountBaisc(); PerDataAccountBaisc unifyUnit = new PerDataAccountBaisc();
unifyUnit.RowNumber = r; unifyUnit.RowNumber = r;
unifyUnit.AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell).ToString(); unifyUnit.AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.ToString();
unifyUnit.Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell).ToString(); unifyUnit.Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell)?.ToString();
unifyUnit.DoctorNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数量" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数量" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础系数" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.DoctorAdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数" && p.Parent.CellValue == "医生组").PointCell).ToString()); unifyUnit.DoctorAdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数" && p.Parent.CellValue == "医生组").PointCell)?.ToString());
unifyUnit.NurseNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元护士数量" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元护士数量" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础系数" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "基础系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
unifyUnit.NurseAdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数" && p.Parent.CellValue == "护理组").PointCell).ToString()); unifyUnit.NurseAdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
dataList.Add(unifyUnit); dataList.Add(unifyUnit);
} }
......
...@@ -30,28 +30,25 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -30,28 +30,25 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var row = sheet.GetRow(r); var row = sheet.GetRow(r);
if (row == null) continue; if (row == null) continue;
var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell).ToString();
if (string.IsNullOrEmpty(accountingUnit))
continue;
PerDataEmployee employee = new PerDataEmployee PerDataEmployee employee = new PerDataEmployee
{ {
RowNumber = r, RowNumber = r,
AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell).ToString(), AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.ToString(),
Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell).ToString(), Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.ToString(),
DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell).ToString(), DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.ToString(),
JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职称").PointCell).ToString(), JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职称").PointCell)?.ToString(),
FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell).ToString(), FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.ToString(),
AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元分类").PointCell).ToString(), AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元分类").PointCell)?.ToString(),
PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell).ToString()), PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.ToString()),
WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)), WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)),
ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell).ToString()), ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.ToString()),
Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell).ToString()), Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell)?.ToString()),
PeopleNumber = ConvertHelper.To<int?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数").PointCell).ToString()), PeopleNumber = ConvertHelper.To<int?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数").PointCell)?.ToString()),
Workload = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量绩效").PointCell).ToString()), Workload = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量绩效").PointCell)?.ToString()),
OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell).ToString()), OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.ToString()),
Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell).ToString()), Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.ToString()),
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell).ToString()), Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.ToString()),
Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell).ToString()), Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
}; };
dataList.Add(employee); dataList.Add(employee);
} }
......
...@@ -53,11 +53,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -53,11 +53,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if (row == null) continue; if (row == null) continue;
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
//获取当前核算单元名称
var accountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString();
//核算单元空值跳过
if (string.IsNullOrEmpty(accountingUnit))
continue;
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
if (!string.IsNullOrEmpty(athead?.CellValue) if (!string.IsNullOrEmpty(athead?.CellValue)
...@@ -74,7 +69,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -74,7 +69,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = accountingUnit, AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString(),
Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(), Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell)?.ToString()), CellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell)?.ToString()),
......
...@@ -57,11 +57,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -57,11 +57,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
//获取当前核算单元名称
var accountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString();
//核算单元空值跳过
if (string.IsNullOrEmpty(accountingUnit))
continue;
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
...@@ -70,7 +65,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -70,7 +65,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = accountingUnit, AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString(),
Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(), Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
......
...@@ -45,11 +45,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -45,11 +45,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
//获取当前核算单元名称
var accountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString();
//核算单元空值跳过
if (string.IsNullOrEmpty(accountingUnit))
continue;
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
...@@ -58,7 +53,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -58,7 +53,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = accountingUnit, AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString(),
Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(), Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
......
using NPOI.SS.UserModel;
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
/// <summary>
/// 加班
/// </summary>
public class PerSheetDataReadOvertime : IPerSheetDataRead
{
public PerSheetPoint Point => throw new NotImplementedException();
public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
throw new NotImplementedException();
}
}
}
...@@ -27,22 +27,22 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -27,22 +27,22 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var row = sheet.GetRow(r); var row = sheet.GetRow(r);
if (row == null) continue; if (row == null) continue;
var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell).ToString(); var accountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell)?.ToString();
if (string.IsNullOrEmpty(accountingUnit)) if (string.IsNullOrEmpty(accountingUnit))
continue; continue;
PerDataSpecialUnit employee = new PerDataSpecialUnit PerDataSpecialUnit employee = new PerDataSpecialUnit
{ {
RowNumber = r, RowNumber = r,
AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell).ToString(), AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell)?.ToString(),
Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell).ToString(), Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell)?.ToString(),
Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell).ToString()), Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell)?.ToString()),
QuantitativeIndicators = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标").PointCell).ToString(), QuantitativeIndicators = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标").PointCell)?.ToString(),
Quantity = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "数量").PointCell).ToString()), Quantity = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "数量").PointCell)?.ToString()),
QuantitativeIndicatorsValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标绩效分值").PointCell).ToString()), QuantitativeIndicatorsValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标绩效分值").PointCell)?.ToString()),
ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell).ToString()), ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.ToString()),
OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell).ToString()), OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.ToString()),
Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell).ToString()), Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.ToString()),
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell).ToString()), Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.ToString()),
}; };
dataList.Add(employee); dataList.Add(employee);
} }
......
...@@ -45,12 +45,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -45,12 +45,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
for (int c = 0; c < vhead.Count(); c++) for (int c = 0; c < vhead.Count(); c++)
{ {
//获取当前核算单元名称
var accountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString();
//核算单元空值跳过
if (string.IsNullOrEmpty(accountingUnit))
continue;
var athead = vhead.ElementAt(c); var athead = vhead.ElementAt(c);
var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell)); var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
if (!cellValue.HasValue || cellValue.Value == 0) if (!cellValue.HasValue || cellValue.Value == 0)
...@@ -60,7 +54,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -60,7 +54,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{ {
RowNumber = r, RowNumber = r,
SignID = athead.SignID, SignID = athead.SignID,
AccountingUnit = accountingUnit, AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString(),
Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(), Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(),
TypeName = athead?.CellValue, TypeName = athead?.CellValue,
CellValue = cellValue, CellValue = cellValue,
......
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