Commit f70eceb4 by 李承祥

数据提取,人员名单增加--绩效考核系数;清除合并单元格。

生成绩效,cell时间格式转换
parent b7feb4f7
......@@ -224,6 +224,14 @@ private bool WriteExcel(string newpath, string originalPath, List<PerSheet> shee
if (importRow != null)
importSheet.RemoveRow(importRow);
}
//取消合并单元格
int mergedCount = importSheet.NumMergedRegions;
for (int i = mergedCount - 1; i >= 0; i--)
{
var temp = importSheet.GetMergedRegion(i);
if (temp.FirstRow > maxHeaderRowNumber)
importSheet.RemoveMergedRegion(i);
}
//填充人员信息
if (SheetType.Employee == sheet.SheetType && sheet.PerData != null && sheet.PerData.Any())
......@@ -239,6 +247,7 @@ private bool WriteExcel(string newpath, string originalPath, List<PerSheet> shee
{ "医生姓名", (t) => t.DoctorName },
{ "职称", (t) => t.JobTitle },
{ "绩效基数核算参考对象", (t) => t.FitPeople },
{ "绩效基数核算系数", (t) => t.FitPeopleRatio },
{ "核算单元分类", (t) => t.AccountType },
{ "岗位系数", (t) => t.PostCoefficient },
{ "参加工作时间", (t) => t.WorkTime },
......@@ -546,7 +555,7 @@ public dynamic Verify(string obj)
return ConvertHelper.To<double>(obj);
//判断值是否为日期格式
else if (!string.IsNullOrEmpty(obj) && Regex.Match(obj.Trim(), @"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?").ToString() == obj.Trim())
return ConvertHelper.To<DateTime>(obj).ToString("yyyy/MM/dd");
return ConvertHelper.To<DateTime>(obj).ToString("yyyy/M/d");
else
return obj;
}
......@@ -578,18 +587,19 @@ public List<PerHeader> GetHeader(SheetType sheetType)
},
new PerHeader { CellValue = "核算单元", MergeCell = 1, MergeRow = 1, PointCell = 1, PointRow = 1 },
new PerHeader { CellValue = "绩效基数核算参考对象", MergeCell = 1, MergeRow = 1, PointCell = 2, PointRow = 1 },
new PerHeader { CellValue = "医生姓名", MergeCell = 1, MergeRow = 1, PointCell = 3, PointRow = 1 },
new PerHeader { CellValue = "职称", MergeCell = 1, MergeRow = 1, PointCell = 4, PointRow = 1 },
new PerHeader { CellValue = "岗位系数", MergeCell = 1, MergeRow = 1, PointCell = 5, PointRow = 1 },
new PerHeader { CellValue = "参加工作时间", MergeCell = 1, MergeRow = 1, PointCell = 6, PointRow = 1 },
new PerHeader { CellValue = "考核得分率", MergeCell = 1, MergeRow = 1, PointCell = 7, PointRow = 1 },
new PerHeader { CellValue = "出勤率", MergeCell = 1, MergeRow = 1, PointCell = 8, PointRow = 1 },
new PerHeader { CellValue = "核算单元医生数", MergeCell = 1, MergeRow = 1, PointCell = 9, PointRow = 1 },
new PerHeader { CellValue = "工作量绩效", MergeCell = 1, MergeRow = 1, PointCell = 10, PointRow = 1 },
new PerHeader { CellValue = "其他绩效", MergeCell = 1, MergeRow = 1, PointCell = 11, PointRow = 1 },
new PerHeader { CellValue = "医院奖罚", MergeCell = 1, MergeRow = 1, PointCell = 12, PointRow = 1 },
new PerHeader { CellValue = "调节系数", MergeCell = 1, MergeRow = 1, PointCell = 13, PointRow = 1 },
new PerHeader { CellValue = "发放系数", MergeCell = 1, MergeRow = 1, PointCell = 14, PointRow = 1 },
new PerHeader { CellValue = "绩效基数核算系数", MergeCell = 1, MergeRow = 1, PointCell = 3, PointRow = 1 },
new PerHeader { CellValue = "医生姓名", MergeCell = 1, MergeRow = 1, PointCell = 4, PointRow = 1 },
new PerHeader { CellValue = "职称", MergeCell = 1, MergeRow = 1, PointCell = 5, PointRow = 1 },
new PerHeader { CellValue = "岗位系数", MergeCell = 1, MergeRow = 1, PointCell = 6, PointRow = 1 },
new PerHeader { CellValue = "参加工作时间", MergeCell = 1, MergeRow = 1, PointCell = 7, PointRow = 1 },
new PerHeader { CellValue = "考核得分率", MergeCell = 1, MergeRow = 1, PointCell = 8, PointRow = 1 },
new PerHeader { CellValue = "出勤率", MergeCell = 1, MergeRow = 1, PointCell = 9, PointRow = 1 },
new PerHeader { CellValue = "核算单元医生数", MergeCell = 1, MergeRow = 1, PointCell = 10, PointRow = 1 },
new PerHeader { CellValue = "工作量绩效", MergeCell = 1, MergeRow = 1, PointCell = 11, PointRow = 1 },
new PerHeader { CellValue = "其他绩效", MergeCell = 1, MergeRow = 1, PointCell = 12, PointRow = 1 },
new PerHeader { CellValue = "医院奖罚", MergeCell = 1, MergeRow = 1, PointCell = 13, PointRow = 1 },
new PerHeader { CellValue = "调节系数", MergeCell = 1, MergeRow = 1, PointCell = 14, PointRow = 1 },
new PerHeader { CellValue = "发放系数", MergeCell = 1, MergeRow = 1, PointCell = 15, PointRow = 1 },
};
}
else if (SheetType.AccountBasic == sheetType)
......
......@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace Performance.Services
{
......@@ -44,6 +45,12 @@ public class NopiSevice
return cell.DateCellValue;
}
}
else if (cell.CellType == CellType.String)
{
var reg = @"(19|20)\d{2}(-|/)[01]?\d(-|/)[0123]?\d( [012]?\d\:\d{2}\:\d{2})?";
if (!string.IsNullOrEmpty(cell.StringCellValue) && Regex.Match(cell.StringCellValue.Trim(), reg).ToString() == cell.StringCellValue.Trim())
return ConvertHelper.To<DateTime>(cell.StringCellValue);
}
}
return null;
}
......
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