Commit e940a7c2 by lcx

Merge branch 'v20201230yubei' into v2020morge

# Conflicts:
#	performance/Performance.Api/Controllers/SecondAllotController.cs
#	performance/Performance.Api/wwwroot/Performance.DtoModels.xml
#	performance/Performance.Services/ComputeService.cs
parents 66d708ff f4c54d56
...@@ -456,7 +456,6 @@ public ApiResponse DeptComputeDetail(int allotId) ...@@ -456,7 +456,6 @@ public ApiResponse DeptComputeDetail(int allotId)
var userId = claimService.GetUserId(); var userId = claimService.GetUserId();
//var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage); //var data = secondAllotService.DeptComputeDetail(userId, allotId, out int isShowManage);
var data = secondAllotService.DeptComputeDetailList(userId, allotId, out int isShowManage); var data = secondAllotService.DeptComputeDetailList(userId, allotId, out int isShowManage);
return new ApiResponse(ResponseType.OK, new { isShowManage, data }); return new ApiResponse(ResponseType.OK, new { isShowManage, data });
} }
} }
......
...@@ -936,7 +936,7 @@ ...@@ -936,7 +936,7 @@
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.AccountingUnit"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.AccountingUnit">
<summary> <summary>
核算单元 核算单元
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.EmployeeName"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.EmployeeName">
...@@ -1044,6 +1044,11 @@ ...@@ -1044,6 +1044,11 @@
应发管理绩效 应发管理绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.OtherManagePerfor">
<summary>
其他管理绩效
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.Income"> <member name="P:Performance.DtoModels.PerDataAccountBaisc.Income">
<summary> <summary>
科室业绩 科室业绩
......
...@@ -24,7 +24,7 @@ public class PerDataAccountBaisc : IPerData ...@@ -24,7 +24,7 @@ public class PerDataAccountBaisc : IPerData
public string UnitType { get; set; } public string UnitType { get; set; }
/// <summary> /// <summary>
/// 核算单元 /// 核算单元
/// </summary> /// </summary>
public string AccountingUnit { get; set; } public string AccountingUnit { get; set; }
...@@ -158,6 +158,11 @@ public class PerDataAccountBaisc : IPerData ...@@ -158,6 +158,11 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public decimal ShouldGiveFee { get; set; } public decimal ShouldGiveFee { get; set; }
/// <summary>
/// 其他管理绩效
/// </summary>
public decimal OtherManagePerfor { get; set; }
///// <summary> ///// <summary>
///// 保底绩效参考标准 ///// 保底绩效参考标准
///// </summary> ///// </summary>
...@@ -172,8 +177,8 @@ public class PerDataAccountBaisc : IPerData ...@@ -172,8 +177,8 @@ public class PerDataAccountBaisc : IPerData
///// 工作量倾斜系数 ///// 工作量倾斜系数
///// </summary> ///// </summary>
//public Nullable<decimal> WorkSlopeFactor { get; set; } //public Nullable<decimal> WorkSlopeFactor { get; set; }
#endregion
#endregion EXCEL读取
#region 由计算得出 #region 由计算得出
...@@ -227,6 +232,6 @@ public class PerDataAccountBaisc : IPerData ...@@ -227,6 +232,6 @@ public class PerDataAccountBaisc : IPerData
/// </summary> /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } public Nullable<decimal> RealGiveFee { get; set; }
#endregion #endregion 由计算得出
} }
} }
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace Performance.Services namespace Performance.Services
...@@ -901,15 +903,20 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -901,15 +903,20 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_header> headers, per_sheet sheet, UnitType type) private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_header> headers, per_sheet sheet, UnitType type)
{ {
var items = basicData Expression<Func<im_data, bool>> exp = (t) => t.SheetID == sheet.ID && t.IsTotal != 1;
.Where(t => t.SheetID == sheet.ID && t.UnitType == (int)type && t.IsTotal != 1)
?.Select(t => new DetailModule if (sheet.SheetType == (int)SheetType.Workload && new int[] { (int)UnitType.医技组, (int)UnitType.其他医技组 }.Contains((int)type))
{ exp = exp.And(t => new int[] { (int)UnitType.医生组, (int)UnitType.医技组, (int)UnitType.其他医技组 }.Contains(t.UnitType.Value));
ItemName = t.TypeName, else
CellValue = t.CellValue, exp = exp.And(t => t.UnitType == (int)type);
Factor = sheet.SheetType == (int)SheetType.Workload ? t.FactorValue : t.FactorValue * 100,
ItemValue = t.IsFactor == 1 ? (t.CellValue * (t.FactorValue ?? 0)) : t.CellValue, var items = basicData.Where(exp.Compile())?.Select(t => new DetailModule
}).ToList(); {
ItemName = t.TypeName,
CellValue = t.CellValue,
Factor = sheet.SheetType == (int)SheetType.Workload ? t.FactorValue : t.FactorValue * 100,
ItemValue = t.IsFactor == 1 ? (t.CellValue * (t.FactorValue ?? 0)) : t.CellValue,
}).ToList();
if (items != null && items.Any()) if (items != null && items.Any())
{ {
...@@ -1252,35 +1259,43 @@ public DeptDataDetails GetDoctorDetail(int computeId) ...@@ -1252,35 +1259,43 @@ public DeptDataDetails GetDoctorDetail(int computeId)
//var allot = perforPerallotRepository.GetEntity(t => t.ID == resCompute.AllotID); //var allot = perforPerallotRepository.GetEntity(t => t.ID == resCompute.AllotID);
//if (allot == null) return new DeptDataDetails(); //if (allot == null) return new DeptDataDetails();
var employee = _perforImemployeeclinicRepository.GetEntity(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.UnitType == resCompute.UnitType && t.DoctorName == resCompute.EmployeeName); var employee = _perforImemployeeclinicRepository.GetEntity(t => t.AllotID == resCompute.AllotID && t.AccountingUnit == resCompute.AccountingUnit && t.UnitType == resCompute.UnitType && t.PersonnelNumber == resCompute.JobNumber);
DeptDataDetails doctorDetails = new DeptDataDetails DeptDataDetails doctorDetails = new DeptDataDetails
{ {
ShowFormula = 0, ShowFormula = 0,
Pandect = new PerDataAccountBaisc Pandect = new PerDataAccountBaisc
{ {
BasicFactor = employee?.Basics ?? 0, //基础绩效系数
Effic = employee.Efficiency ?? 0, //效率绩效系数
Scale = employee.Scale ?? 0, //规模绩效系数
Management = employee.Management,//管理绩效发放系数
AdjustFactor = employee?.Adjust ?? 1, //调节系数
AdjustLaterOtherFee = employee.AdjustLaterOtherFee, //调节后其他绩效
AccountingUnit = resCompute.AccountingUnit, AccountingUnit = resCompute.AccountingUnit,
EmployeeName = resCompute.EmployeeName, EmployeeName = resCompute.EmployeeName,
PerforTotal = resCompute.PerforTotal, //科室考核前绩效 PerforTotal = resCompute.PerforTotal, //科室考核前绩效
Number = resCompute.Number ?? 0, //核算人数 Number = resCompute.Number ?? 0, //核算人数
AvgPerfor = (resCompute.Number ?? 0) == 0 ? 0 : resCompute.PerforTotal / resCompute.Number, //人均绩效 AvgPerfor = (resCompute.Number ?? 0) == 0 ? 0 : resCompute.PerforTotal / resCompute.Number, //人均绩效
BasicFactor = employee?.Basics ?? 0, //基础绩效系数 Attendance = resCompute.Attendance ?? 1, //出勤率
Attendance = resCompute.Attendance, //出勤率
Avg = resCompute.Avg, //实际人均 Avg = resCompute.Avg, //实际人均
PermanentStaff = resCompute.PermanentStaff ?? 0, //效率绩效人数 PermanentStaff = resCompute.PermanentStaff ?? 0, //效率绩效人数
Effic = employee.Efficiency ?? 0, //效率绩效系数
EfficPerfor = resCompute.Efficiency ?? 0, //效率绩效 EfficPerfor = resCompute.Efficiency ?? 0, //效率绩效
Scale = employee.Scale ?? 0, //规模绩效系数
ScalePerfor = resCompute.Scale ?? 0, //规模绩效 ScalePerfor = resCompute.Scale ?? 0, //规模绩效
Management = employee.Management,//管理绩效发放系数 Extra = resCompute.Punishment ?? 0, //医院奖罚
OtherManagePerfor = resCompute.OtherManagePerfor ?? 0, //其他管理绩效
ShouldGiveFee = resCompute.ShouldGiveFee ?? 0, //考核前管理绩效 ShouldGiveFee = resCompute.ShouldGiveFee ?? 0, //考核前管理绩效
ScoringAverage = resCompute.ScoreAverageRate ?? 1, //考核得分率 ScoringAverage = resCompute.ScoreAverageRate ?? 1, //考核得分率
AssessLaterManagementFee = Math.Round(resCompute.ShouldGiveFee * resCompute.ScoreAverageRate * resCompute.Attendance + resCompute.Punishment ?? 0), //考核后管理绩效 AssessLaterManagementFee = Math.Round(resCompute.ShouldGiveFee * resCompute.ScoreAverageRate * resCompute.Attendance + resCompute.Punishment ?? 0), //考核后管理绩效
AdjustFactor = employee?.Adjust ?? 1, //调节系数
AdjustLaterOtherFee = employee.AdjustLaterOtherFee, //调节后其他绩效
RealGiveFee = resCompute.RealGiveFee //绩效合计 RealGiveFee = resCompute.RealGiveFee //绩效合计
}, },
Detail = new List<DetailDtos>() Detail = new List<DetailDtos>()
}; };
var isShowManage = IsShowManage(resCompute.AllotID.Value);
// 开启 显示管理绩效
if (isShowManage == 2)
doctorDetails.Pandect.RealGiveFee = doctorDetails.Pandect.AssessLaterManagementFee;
var sheets = _perforPerSheetRepository.GetEntities(t => t.AllotID == resCompute.AllotID && new int[] { (int)SheetType.PersonExtra, (int)SheetType.PersonAdjustLaterOtherFee }.Contains(t.SheetType.Value)); var sheets = _perforPerSheetRepository.GetEntities(t => t.AllotID == resCompute.AllotID && new int[] { (int)SheetType.PersonExtra, (int)SheetType.PersonAdjustLaterOtherFee }.Contains(t.SheetType.Value));
if (sheets == null || !sheets.Any()) return doctorDetails; if (sheets == null || !sheets.Any()) return doctorDetails;
...@@ -1312,4 +1327,4 @@ public DeptDataDetails GetDoctorDetail(int computeId) ...@@ -1312,4 +1327,4 @@ public DeptDataDetails GetDoctorDetail(int computeId)
return doctorDetails; return doctorDetails;
} }
} }
} }
\ No newline at end of file
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