Commit 0998f72f by lcx

绩效计算科主任使用实发绩效改为核算总额,使用excel中的绩效参数,抽取bug修改,工作量详情接口和人员字典匹配

parent 08837348
...@@ -166,7 +166,7 @@ public ApiResponse DeptDics(int hospitalId, int type) ...@@ -166,7 +166,7 @@ public ApiResponse DeptDics(int hospitalId, int type)
[Route("dept/workdetail")] [Route("dept/workdetail")]
public ApiResponse DeptWorkloadDetail([CustomizeValidator(RuleSet = "Select"), FromBody] WorkDetailRequest request) public ApiResponse DeptWorkloadDetail([CustomizeValidator(RuleSet = "Select"), FromBody] WorkDetailRequest request)
{ {
var data = personService.DeptWorkloadDetail(request); var data = personService.DeptWorkloadDetail(request, claimService.GetUserId());
return new ApiResponse(ResponseType.OK, data); return new ApiResponse(ResponseType.OK, data);
} }
} }
......
...@@ -67,6 +67,16 @@ public ApiResponse Info([FromBody] SelectionRequest report) ...@@ -67,6 +67,16 @@ public ApiResponse Info([FromBody] SelectionRequest report)
[HttpPost] [HttpPost]
public ApiResponse Search([FromBody] SearchReportRequest report) public ApiResponse Search([FromBody] SearchReportRequest report)
{ {
if (report.Values == null || !report.Values.Any())
return new ApiResponse(ResponseType.OK, new List<ReportData>());
string[] keys = new string[] { "year", "month", };
foreach (var item in report.Values.Where(t => keys.Contains(t.Title)))
{
if (item.Values == null || !item.Values.Any(t => !string.IsNullOrEmpty(t)))
return new ApiResponse(ResponseType.OK, new List<ReportData>());
}
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
var result = reportDataService.GetReportData(report.HospitalId, report.GroupId, report.ReportId, report.Values ?? new List<SelectionValues>(), userId); var result = reportDataService.GetReportData(report.HospitalId, report.GroupId, report.ReportId, report.Values ?? new List<SelectionValues>(), userId);
return new ApiResponse(ResponseType.OK, result); return new ApiResponse(ResponseType.OK, result);
......
...@@ -353,6 +353,11 @@ ...@@ -353,6 +353,11 @@
绩效基数核算参考对象 绩效基数核算参考对象
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.ComputeEmployee.FitPeopleValue">
<summary>
绩效基础核算参考值
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeEmployee.FitPeopleRatio"> <member name="P:Performance.DtoModels.ComputeEmployee.FitPeopleRatio">
<summary> <summary>
绩效基数核算参考对象取值比例(如临床科室护士*95%) 绩效基数核算参考对象取值比例(如临床科室护士*95%)
...@@ -990,6 +995,11 @@ ...@@ -990,6 +995,11 @@
绩效基数核算参考对象 绩效基数核算参考对象
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataEmployee.FitPeopleValue">
<summary>
绩效基础核算参考值
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataEmployee.FitPeopleRatio"> <member name="P:Performance.DtoModels.PerDataEmployee.FitPeopleRatio">
<summary> <summary>
绩效基数核算参考对象取值比例(如临床科室护士*95%) 绩效基数核算参考对象取值比例(如临床科室护士*95%)
......
...@@ -2118,6 +2118,11 @@ ...@@ -2118,6 +2118,11 @@
绩效基数核算参考对象 绩效基数核算参考对象
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.im_employee.FitPeopleValue">
<summary>
绩效基础核算参考值
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee.FitPeopleRatio"> <member name="P:Performance.EntityModels.im_employee.FitPeopleRatio">
<summary> <summary>
绩效基数核算参考对象取值比例(如临床科室护士*95%) 绩效基数核算参考对象取值比例(如临床科室护士*95%)
......
...@@ -27,6 +27,11 @@ public class ComputeEmployee ...@@ -27,6 +27,11 @@ public class ComputeEmployee
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%) /// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary> /// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; } public Nullable<decimal> FitPeopleRatio { get; set; }
......
...@@ -22,6 +22,11 @@ public class PerDataEmployee : IPerData ...@@ -22,6 +22,11 @@ public class PerDataEmployee : IPerData
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary> /// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%) /// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary> /// </summary>
public Nullable<decimal> FitPeopleRatio { get; set; } public Nullable<decimal> FitPeopleRatio { get; set; }
......
...@@ -55,7 +55,12 @@ public class im_employee ...@@ -55,7 +55,12 @@ public class im_employee
/// 绩效基数核算参考对象 /// 绩效基数核算参考对象
/// </summary> /// </summary>
public string FitPeople { get; set; } public string FitPeople { get; set; }
/// <summary>
/// 绩效基础核算参考值
/// </summary>
public Nullable<decimal> FitPeopleValue { get; set; }
/// <summary> /// <summary>
/// 绩效基数核算参考对象取值比例(如临床科室护士*95%) /// 绩效基数核算参考对象取值比例(如临床科室护士*95%)
/// </summary> /// </summary>
......
...@@ -155,15 +155,15 @@ public void ImportWorkloadData(per_allot allot, object parameters) ...@@ -155,15 +155,15 @@ public void ImportWorkloadData(per_allot allot, object parameters)
/// 查询工作量数据 /// 查询工作量数据
/// </summary> /// </summary>
/// <param name="allotid"></param> /// <param name="allotid"></param>
public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, string accountingunit) public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, string accountingunit, string[] unittype)
{ {
using (var connection = context.Database.GetDbConnection()) using (var connection = context.Database.GetDbConnection())
{ {
if (connection.State != ConnectionState.Open) connection.Open(); if (connection.State != ConnectionState.Open) connection.Open();
try try
{ {
string clear = "select * from report_original_workload where allotid = @allotid and accountingunit = @accountingunit order by fee desc,convert(doctorname using gbk);"; string clear = "select * from report_original_workload t1 join per_employee t2 on t1.doctorname = t2.doctorname and t1.personnelnumber = t2.personnelnumber where t1.allotid = @allotid and t1.accountingunit = @accountingunit and t1.accountingunit = @accountingunit and t2.unittype in @unittype order by fee desc,convert(t1.doctorname using gbk);";
return connection.Query<report_original_workload>(clear, new { allotid, accountingunit }, commandTimeout: 60 * 60); return connection.Query<report_original_workload>(clear, new { allotid, accountingunit, unittype }, commandTimeout: 60 * 60);
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -122,7 +122,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -122,7 +122,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
var doctor = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.临床医生) ?? 0; var doctor = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.临床医生) ?? 0;
var nurse = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.护士) ?? 0; var nurse = baiscNormService.GetBaiscNorm(baiscnormList, PerforType.护士) ?? 0;
// 添加参数计算 // 添加参数计算
item.Quantity = (doctor + nurse) / 2; item.Quantity = item.Quantity ?? (doctor + nurse) / 2;
} }
else else
{ {
...@@ -130,7 +130,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -130,7 +130,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
// ?.FirstOrDefault().FitPeopleRatio ?? 1; // ?.FirstOrDefault().FitPeopleRatio ?? 1;
var basic = baiscNormService.GetBaiscNorm(baiscnormList, (PerforType)type.Value); var basic = baiscNormService.GetBaiscNorm(baiscnormList, (PerforType)type.Value);
// 添加参数计算 // 添加参数计算
item.Quantity = basic != null ? basic : null; item.Quantity = item.Quantity ?? (basic ?? 0);
} }
} }
} }
...@@ -245,7 +245,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno ...@@ -245,7 +245,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//实发绩效 //实发绩效
compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m); compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
// 参考基数专用绩效合计 // 参考基数专用绩效合计
compute.BaiscNormPerforTotal = compute.RealGiveFee; compute.BaiscNormPerforTotal = compute.PerforTotal;
computeList.Add(compute); computeList.Add(compute);
} }
......
...@@ -103,7 +103,8 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -103,7 +103,8 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
var employees = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType)); var employees = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType));
if (employees == null || !employees.Any()) return new List<ResComputeResponse>(); if (employees == null || !employees.Any()) return new List<ResComputeResponse>();
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId); string[] accountunittype = new string[] { AccountUnitType.行政中层.ToString(), AccountUnitType.行政工勤.ToString(), AccountUnitType.行政高层.ToString() };
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && !accountunittype.Contains(t.AccountType));
if (computes == null || !computes.Any()) return new List<ResComputeResponse>(); if (computes == null || !computes.Any()) return new List<ResComputeResponse>();
var joinData = employees.Join(computes, outer => new { outer.AccountingUnit, EmployeeName = outer.DoctorName }, var joinData = employees.Join(computes, outer => new { outer.AccountingUnit, EmployeeName = outer.DoctorName },
...@@ -119,7 +120,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -119,7 +120,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
accountUnit.ToList().ForEach(t => accountUnit.ToList().ForEach(t =>
{ {
var compute = joinData.First(join => join.EmployeeName == t.EmployeeName); var compute = joinData.First(join => join.EmployeeName == t.EmployeeName);
if (compute.AccountingUnit != t.AccountingUnit) if (compute.AccountingUnit != t.AccountingUnit && !joinData.Any(w => w.EmployeeName == t.EmployeeName && w.AccountingUnit == t.AccountingUnit))
joinData.Add(t); joinData.Add(t);
}); });
} }
...@@ -142,8 +143,10 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -142,8 +143,10 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
joinData.RemoveAll(t => delData.Select(d => d.ID).Contains(t.ID)); joinData.RemoveAll(t => delData.Select(d => d.ID).Contains(t.ID));
} }
} }
if (joinData == null || !joinData.Any()) return new List<ResComputeResponse>();
data = Mapper.Map<List<ResComputeResponse>>(joinData); data = Mapper.Map<List<ResComputeResponse>>(joinData);
data?.ForEach(t => data.ForEach(t =>
{ {
t.WorkTime = string.IsNullOrEmpty(t.WorkTime) ? null : Convert.ToDateTime(t.WorkTime).ToString("yyyy-MM-dd"); t.WorkTime = string.IsNullOrEmpty(t.WorkTime) ? null : Convert.ToDateTime(t.WorkTime).ToString("yyyy-MM-dd");
if (isShowManage == 2) if (isShowManage == 2)
...@@ -157,15 +160,18 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -157,15 +160,18 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
t.BaiscNormValue = t.RealGiveFee; t.BaiscNormValue = t.RealGiveFee;
} }
}); });
return data?.OrderByDescending(t => t.AccountingUnit).ToList(); return data.Distinct().OrderByDescending(t => t.AccountingUnit).ToList();
} }
else else
{ {
var compute = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountType == items.FirstOrDefault(p => p.Value == type).Name) var compute = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountType == items.FirstOrDefault(p => p.Value == type).Name);
?.OrderByDescending(t => t.RealGiveFee).ThenBy(t => t.FitPeople).ThenBy(t => t.AccountingUnit).ToList();
if (compute == null || !compute.Any()) return new List<ResComputeResponse>();
data = Mapper.Map<List<ResComputeResponse>>(compute); data = Mapper.Map<List<ResComputeResponse>>(compute);
data?.ForEach(t => t.WorkTime = string.IsNullOrEmpty(t.WorkTime) ? null : Convert.ToDateTime(t.WorkTime).ToString("yyyy-MM-dd")); data = data.OrderByDescending(t => t.RealGiveFee).ThenBy(t => t.FitPeople).ThenBy(t => t.AccountingUnit).ToList();
return data?.OrderByDescending(t => t.AccountingUnit).ToList(); data.ForEach(t => t.WorkTime = string.IsNullOrEmpty(t.WorkTime) ? null : Convert.ToDateTime(t.WorkTime).ToString("yyyy-MM-dd"));
return data.Distinct().OrderByDescending(t => t.AccountingUnit).ToList();
} }
} }
...@@ -662,13 +668,26 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details ...@@ -662,13 +668,26 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
} }
else else
{ {
items = data.First().Items.Select(t => new DetailModuleExtend if (data.FirstOrDefault().ItemName.IndexOf("执行") > -1)
{ {
ItemName = t.ItemName, items = data.First().Items.Select(t => new DetailModuleExtend
ItemValue = t.ItemValue, {
CellValue = t.CellValue, ItemName = t.ItemName,
Factor = t.Factor, ItemValue2 = t.ItemValue,
}).ToList(); CellValue2 = t.CellValue,
Factor2 = t.Factor,
}).ToList();
}
else
{
items = data.First().Items.Select(t => new DetailModuleExtend
{
ItemName = t.ItemName,
ItemValue = t.ItemValue,
CellValue = t.CellValue,
Factor = t.Factor,
}).ToList();
}
} }
result.Detail.Add(new DetailDtos<DetailModuleExtend> result.Detail.Add(new DetailDtos<DetailModuleExtend>
......
...@@ -590,7 +590,8 @@ private List<NewExtractDto> StandData(IEnumerable<ex_result> results) ...@@ -590,7 +590,8 @@ private List<NewExtractDto> StandData(IEnumerable<ex_result> results)
InpatTechnicAccounting = t.inner.FirstOrDefault(l => l.Department == dept)?.InpatTechnicAccounting?.AccountingUnit, InpatTechnicAccounting = t.inner.FirstOrDefault(l => l.Department == dept)?.InpatTechnicAccounting?.AccountingUnit,
}; };
}); });
new Task(() => SaveWorkload(data.Where(t => t.SheetName.Contains("3.")))).Start(); //new Task(() => SaveWorkload(data.Where(t => t.SheetName.Contains("3.")))).Start();
SaveWorkload(data.Where(t => t.SheetName.Contains("3.")));
var groupdata = data.GroupBy(t => new { t.Department, t.Category, t.SheetName }).Select(t => new NewExtractDto var groupdata = data.GroupBy(t => new { t.Department, t.Category, t.SheetName }).Select(t => new NewExtractDto
{ {
SheetName = t.Key.SheetName, SheetName = t.Key.SheetName,
......
...@@ -341,7 +341,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -341,7 +341,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
}; };
foreach (var type in unitTypes) foreach (var type in unitTypes)
{ {
if (empolyee.JobTitle.IndexOf(type.JobTitle) == -1) continue; if ((empolyee.JobTitle?.IndexOf(type.JobTitle) ?? -1) == -1) continue;
foreach (var item in type.UnitType) foreach (var item in type.UnitType)
{ {
resAccount = dataList.FirstOrDefault(t => t.UnitType == item && t.AccountingUnit == empolyee.AccountingUnit); resAccount = dataList.FirstOrDefault(t => t.UnitType == item && t.AccountingUnit == empolyee.AccountingUnit);
...@@ -354,10 +354,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -354,10 +354,10 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)resAccount.UnitType); var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)resAccount.UnitType);
if (basicRule == null) continue; if (basicRule == null) continue;
var avg = (resAccount.ManagerNumber + resAccount.Number) == 0 ? 0 : resAccount.RealGiveFee / (resAccount.ManagerNumber + resAccount.Number); var avg = (resAccount.ManagerNumber + resAccount.Number) == 0 ? 0 : resAccount.PerforTotal / (resAccount.ManagerNumber + resAccount.Number);
var effAvg = resAccount.PermanentStaff == 0 ? 0 : resAccount.RealGiveFee / resAccount.PermanentStaff; var effAvg = resAccount.PermanentStaff == 0 ? 0 : resAccount.PerforTotal / resAccount.PermanentStaff;
var efficiency = avg * (empolyee.Efficiency ?? 1); //var efficiency = avg * (empolyee.Efficiency ?? 1);
var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1); var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1);
var compute = new ComputeResult var compute = new ComputeResult
{ {
...@@ -375,7 +375,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -375,7 +375,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
OtherPerfor = empolyee.OtherPerfor, OtherPerfor = empolyee.OtherPerfor,
Number = resAccount.ManagerNumber + resAccount.Number, Number = resAccount.ManagerNumber + resAccount.Number,
PerforTotal = resAccount.RealGiveFee, PerforTotal = resAccount.PerforTotal,
Avg = avg, Avg = avg,
Efficiency = effAvg * (empolyee.Efficiency ?? 1), Efficiency = effAvg * (empolyee.Efficiency ?? 1),
Scale = resAccount.PerforTotal * (empolyee.Scale ?? 1), Scale = resAccount.PerforTotal * (empolyee.Scale ?? 1),
...@@ -398,7 +398,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a ...@@ -398,7 +398,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
//compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m); //compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
compute.RealGiveFee = compute.GiveFee * (compute.Adjust ?? 1m); compute.RealGiveFee = compute.GiveFee * (compute.Adjust ?? 1m);
// 参考基数专用绩效合计 // 参考基数专用绩效合计
compute.BaiscNormPerforTotal = compute.RealGiveFee; compute.BaiscNormPerforTotal = compute.PerforTotal;
computeList.Add(compute); computeList.Add(compute);
} }
...@@ -454,7 +454,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot ...@@ -454,7 +454,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
if (perforTypeItem != null) if (perforTypeItem != null)
{ {
var perforType = (PerforType)perforTypeItem.Value; var perforType = (PerforType)perforTypeItem.Value;
baiscnorm = baiscNormService.GetBaiscNorm(baiscnormList, perforType); baiscnorm = item.FitPeopleValue ?? baiscNormService.GetBaiscNorm(baiscnormList, perforType);
//年资系数 //年资系数
if (item.FitPeople == AccountUnitType.行政工勤.ToString() && item.WorkTime.HasValue && item.WorkTime.Value > new DateTime(1970, 1, 1)) if (item.FitPeople == AccountUnitType.行政工勤.ToString() && item.WorkTime.HasValue && item.WorkTime.Value > new DateTime(1970, 1, 1))
......
...@@ -31,6 +31,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -31,6 +31,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
"医生姓名", "医生姓名",
"职务分类", "职务分类",
"绩效基数核算参考对象", "绩效基数核算参考对象",
"绩效基础核算参考值",
"绩效基数核算系数", "绩效基数核算系数",
"人员分类", "人员分类",
"岗位系数", "岗位系数",
...@@ -60,6 +61,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -60,6 +61,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
DoctorName = 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, JobTitle = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "职务分类").PointCell)?.StringCellValue,
FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.StringCellValue, FitPeople = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算参考对象").PointCell)?.StringCellValue,
FitPeopleValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基础核算参考值").PointCell)?.ToString()),
FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算系数").PointCell)?.NumericCellValue), FitPeopleRatio = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "绩效基数核算系数").PointCell)?.NumericCellValue),
AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员分类").PointCell)?.StringCellValue, AccountType = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人员分类").PointCell)?.StringCellValue,
PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue), PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue),
......
...@@ -53,7 +53,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader) ...@@ -53,7 +53,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
//AccountingUnit = accountingUnit, //AccountingUnit = accountingUnit,
//Department = accountingUnit, //Department = accountingUnit,
QuantitativeIndicators = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标").PointCell)?.StringCellValue, QuantitativeIndicators = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标").PointCell)?.StringCellValue,
Quantity = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "数量").PointCell)?.NumericCellValue), 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)?.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 cell = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室").PointCell);//?.ToString();
......
...@@ -464,18 +464,22 @@ public List<TitleValue> DeptDics(int hospitalId, int type) ...@@ -464,18 +464,22 @@ public List<TitleValue> DeptDics(int hospitalId, int type)
/// </summary> /// </summary>
/// <param name="request"></param> /// <param name="request"></param>
/// <returns></returns> /// <returns></returns>
public object DeptWorkloadDetail(WorkDetailRequest request) public object DeptWorkloadDetail(WorkDetailRequest request, int userId)
{ {
var data = perallotRepository.QueryWorkloadData(request.AllotId, request.AccountingUnit); var (dept, unittype) = GetDeptByUser(userId);
var data = perallotRepository.QueryWorkloadData(request.AllotId, request.AccountingUnit, unittype);
if (data != null && data.Any()) if (data != null && data.Any())
return data.Select(t => new {
return data.GroupBy(t => new { t.Department, t.DoctorName, t.PersonnelNumber, t.Category }).Select(t => new
{ {
t.Department, t.Key.Department,
t.DoctorName, t.Key.DoctorName,
t.PersonnelNumber, t.Key.PersonnelNumber,
t.Category, t.Key.Category,
t.Fee Fee = t.Sum(group => group.Fee ?? 0)
}); }).OrderBy(t => t.PersonnelNumber).ThenBy(t => t.Category);
}
return new string[] { }; return new string[] { };
} }
} }
......
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