Commit 0e79b004 by 李承祥

读取数据(避免公式)

parent 05f68db2
......@@ -34,7 +34,7 @@ public class log_dbug
/// <summary>
///
/// </summary>
public string Titile { get; set; }
public string Title { get; set; }
/// <summary>
///
......
......@@ -15,7 +15,7 @@ public partial class PerforLogdbugRepository
/// <returns></returns>
public bool Add(int allotId, string title, string message, int level)
{
return Add(new EntityModels.log_dbug { AllotID = allotId, CreateTime = DateTime.Now, Titile = title, Message = message, Level = level });
return Add(new EntityModels.log_dbug { AllotID = allotId, CreateTime = DateTime.Now, Title = title, Message = message, Level = level });
}
}
}
......@@ -235,7 +235,7 @@ public void InsertLog(int allotId, int type, int level, string title, string mes
Message = message
};
perforLogcheckRepository.Add(model);
logManageService.WriteMsg("绩效数据校验", $"{title} - {message}", level, allotId, "ReceiveMessage");
logManageService.WriteMsg("绩效数据校验", $"{title} - {message}", level, allotId, "ReceiveMessage", true);
}
#endregion
}
......
......@@ -231,12 +231,12 @@ public void Generate(per_allot allot, string mail)
UpdateAllotStates(allot.ID, (int)AllotStates.InGenerate, EnumHelper.GetDescription(AllotStates.InGenerate));
// 计算合并数据
logManageService.WriteMsg("正在生成绩效", "计算合并数据", allot.ID, 1, "ReceiveMessage", true);
logManageService.WriteMsg("正在生成绩效", "计算合并数据", 1, allot.ID, "ReceiveMessage", true);
List<PerSheet> list = processComputService.MergeAndSave(excel, allot);
//var baiscnorm = baiscNormService.NurseBaiscnorm(list);
// 计算最总数据
logManageService.WriteMsg("正在生成绩效", "计算最终绩效数据", allot.ID, 1, "ReceiveMessage", true);
logManageService.WriteMsg("正在生成绩效", "计算最终绩效数据", 1, allot.ID, "ReceiveMessage", true);
var baiscnormList = resultComputeService.Compute(allot, excel, list);
logManageService.WriteMsg("正在生成绩效", "计算最终特殊科室绩效数据", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SpecialUnitCompute(excel, allot, baiscnormList);
......@@ -250,10 +250,10 @@ public void Generate(per_allot allot, string mail)
}
catch (Exception ex)
{
logManageService.WriteMsg("绩效生成失败", "程序异常,请重新尝试。", 4, allot.ID, "ReceiveMessage");
logdbug.Add(allot.ID, "绩效开始执行", ex.ToString(), 4);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateFail, EnumHelper.GetDescription(AllotStates.GenerateFail));
SendEmail(allot, mail, 2, time);
logdbug.Add(allot.ID, "绩效开始执行", ex.ToString(), 4);
logManageService.WriteMsg("绩效生成失败", "程序异常,请重新尝试。", 4, allot.ID, "ReceiveMessage");
//throw ex;
}
}
......@@ -284,7 +284,7 @@ private void SendEmail(per_allot allot, string mail, int type, DateTime time)
$"{hospital.HosName}{allot.Year}{allot.Month}月的绩效生成任务<strong><span style=\"color:#E53333;\">“执行失败”</span></strong>," +
$"执行过程中出现异常情况,我们将尽快解决问题。给您带来的不便我们深感歉意!</p>";
}
else if (type == 1)
else if (type == 3)
{
message.Body = $"<p>尊敬的用户!</p><p>&nbsp;&nbsp;&nbsp;&nbsp;数值健康提醒您,您在{time.ToString("yyyy-MM-dd hh:mm:ss")}发布" +
$"{hospital.HosName}{allot.Year}{allot.Month}月的绩效生成任务<strong><span style=\"color:#E53333;\">“校验失败”</span></strong>," +
......
......@@ -33,22 +33,22 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
PerDataEmployee employee = new PerDataEmployee
{
RowNumber = r,
AccountingUnit = 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(),
JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职称").PointCell)?.ToString(),
FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.ToString(),
FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算系数").PointCell)?.ToString()),
AccountingUnit = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue,
Department = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元").PointCell)?.StringCellValue,
DoctorName = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医生姓名").PointCell)?.StringCellValue,
JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职称").PointCell)?.StringCellValue,
FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.StringCellValue,
FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算系数").PointCell)?.NumericCellValue),
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)?.NumericCellValue),
WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)),
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()),
ScoreAverageRate = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue),
Attendance = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "出勤率").PointCell)?.NumericCellValue),
//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()),
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()),
Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.ToString()),
OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue),
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),
//Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
};
dataList.Add(employee);
......
......@@ -81,7 +81,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
AccountingUnit = row.GetCell(unit.AccountingUnitCellNum.Value)?.ToString(),
Department = row.GetCell(unit.DeptCellNum.Value)?.ToString(),
TypeName = athead?.CellValue,
CellValue = ConvertHelper.To<decimal?>(row.GetCell(athead.PointCell)?.ToString()),
CellValue = cellValue,
Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType = unit.UnitType, //手动匹配
FactorValue = ConvertHelper.To<decimal?>(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.ToString()),
......
......@@ -35,17 +35,17 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
RowNumber = r,
//AccountingUnit = accountingUnit,
//Department = accountingUnit,
QuantitativeIndicators = 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()),
QuantitativeIndicators = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标").PointCell)?.StringCellValue,
Quantity = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "数量").PointCell)?.NumericCellValue),
QuantitativeIndicatorsValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标绩效分值").PointCell)?.NumericCellValue),
};
var cell = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell);//?.ToString();
var accountingUnit = cell?.ToString();
var accountingUnit = cell?.StringCellValue;
if (cell != null && IsMergeCell(cell, out Point start, out Point end) && r != start.X)
{
row = sheet.GetRow(start.X);
cell = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell);
accountingUnit = cell.ToString();
accountingUnit = cell?.StringCellValue;
}
if (string.IsNullOrEmpty(accountingUnit))
accountingUnit = lastAccount;
......@@ -55,11 +55,11 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit.AccountingUnit = accountingUnit;
specialUnit.Department = accountingUnit;
specialUnit.Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell)?.ToString());
specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.ToString());
specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.ToString());
specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.ToString());
specialUnit.Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.ToString());
specialUnit.Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell)?.NumericCellValue);
specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue);
specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
specialUnit.Adjust = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue);
//}
if (!string.IsNullOrEmpty(specialUnit.QuantitativeIndicators) && specialUnit.QuantitativeIndicatorsValue != null)
dataList.Add(specialUnit);
......
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