Commit 4c41cfe9 by lcx

二次绩效管理绩效

parent 86776b8d
...@@ -52,17 +52,20 @@ public void ConfigureServices(IServiceCollection services) ...@@ -52,17 +52,20 @@ public void ConfigureServices(IServiceCollection services)
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
#region appsetting注入 #region appsetting注入
services services
.Configure<AppConnection>(Configuration.GetSection("AppConnection")) .Configure<AppConnection>(Configuration.GetSection("AppConnection"))
.Configure<Application>(Configuration.GetSection("Application")) .Configure<Application>(Configuration.GetSection("Application"))
.Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig")) .Configure<HuyiSmsConfig>(Configuration.GetSection("HuyiSmsConfig"))
.Configure<EmailOptions>(Configuration.GetSection("EmailOptions")) .Configure<EmailOptions>(Configuration.GetSection("EmailOptions"))
.Configure<WebapiUrl>(Configuration.GetSection("WebapiUrl")); .Configure<WebapiUrl>(Configuration.GetSection("WebapiUrl"));
#endregion
#endregion appsetting注入
var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>(); var connection = services.BuildServiceProvider().GetService<IOptions<AppConnection>>();
#region json & fluentvalidation & filter #region json & fluentvalidation & filter
services services
//筛选器配置 //筛选器配置
.AddMvc(option => .AddMvc(option =>
...@@ -97,19 +100,23 @@ public void ConfigureServices(IServiceCollection services) ...@@ -97,19 +100,23 @@ public void ConfigureServices(IServiceCollection services)
fv.RegisterValidatorsFromAssemblyContaining(type.GetType()); fv.RegisterValidatorsFromAssemblyContaining(type.GetType());
} }
}); });
#endregion
#endregion json & fluentvalidation & filter
#region automapper #region automapper
Mapper.Initialize(cfg => cfg.AddProfile<AutoMapperConfigs>()); Mapper.Initialize(cfg => cfg.AddProfile<AutoMapperConfigs>());
services.AddAutoMapper(); services.AddAutoMapper();
#endregion
#region service注入 repoitory注入 #endregion automapper
#region service注入 repoitory注入
services services
.AddPerformanceService() .AddPerformanceService()
.AddPerformanceRepoitory(); .AddPerformanceRepoitory();
#endregion
#endregion service注入 repoitory注入
#region custom util #region custom util
...@@ -118,7 +125,7 @@ public void ConfigureServices(IServiceCollection services) ...@@ -118,7 +125,7 @@ public void ConfigureServices(IServiceCollection services)
//用户身份信息服务 //用户身份信息服务
services.AddScoped<ClaimService>(); services.AddScoped<ClaimService>();
#endregion #endregion custom util
#region email #region email
...@@ -132,22 +139,26 @@ public void ConfigureServices(IServiceCollection services) ...@@ -132,22 +139,26 @@ public void ConfigureServices(IServiceCollection services)
options.SmtpServer = emailOption.Value.SmtpServer; options.SmtpServer = emailOption.Value.SmtpServer;
}); });
#endregion #endregion email
#region redis #region redis
//var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString); //var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString);
//RedisHelper.Initialization(csredis); //RedisHelper.Initialization(csredis);
#endregion
#endregion redis
services.AddMemoryCache(); services.AddMemoryCache();
#region hangfire #region hangfire
services.AddHangfire(config =>
{ //services.AddHangfire(config =>
config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 }); //{
config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString)); // config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
}); // config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
#endregion //});
#endregion hangfire
services.AddSignalR(); services.AddSignalR();
services.AddCors(options => services.AddCors(options =>
...@@ -158,15 +169,17 @@ public void ConfigureServices(IServiceCollection services) ...@@ -158,15 +169,17 @@ public void ConfigureServices(IServiceCollection services)
}); });
}); });
#region //ef配置 #region //ef配置
services.AddDbContext<PerformanceDbContext>(options => services.AddDbContext<PerformanceDbContext>(options =>
{ {
options.UseMySQL(connection.Value.PerformanceConnectionString); options.UseMySQL(connection.Value.PerformanceConnectionString);
}); });
#endregion
#region swagger #endregion //ef配置
#region swagger
services.AddSwaggerGen(c => services.AddSwaggerGen(c =>
{ {
c.SwaggerDoc("v1", new Info { Version = "v1.0", Title = "绩效API接口" }); c.SwaggerDoc("v1", new Info { Version = "v1.0", Title = "绩效API接口" });
...@@ -196,10 +209,10 @@ public void ConfigureServices(IServiceCollection services) ...@@ -196,10 +209,10 @@ public void ConfigureServices(IServiceCollection services)
In = "HEADER" In = "HEADER"
}); });
#endregion #endregion Token绑定到ConfigureServices
}); });
#endregion
#endregion swagger
} }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
...@@ -216,6 +229,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -216,6 +229,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
} }
#region Swagger #region Swagger
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(c => app.UseSwaggerUI(c =>
{ {
...@@ -223,14 +237,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF ...@@ -223,14 +237,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
//c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1.0"); //c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1.0");
c.RoutePrefix = ""; c.RoutePrefix = "";
}); });
#endregion
#endregion Swagger
#region hangfire #region hangfire
app.UseHangfireServer(); //app.UseHangfireServer();
app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } }); //app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
#endregion #endregion hangfire
app.UseCors("SignalrCore"); app.UseCors("SignalrCore");
app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub")); app.UseSignalR(routes => routes.MapHub<AllotLogHub>("/performance/allotLogHub"));
...@@ -250,5 +265,6 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context) ...@@ -250,5 +265,6 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context)
return true; return true;
} }
} }
#endregion
} #endregion hangfire 权限
}
\ No newline at end of file
...@@ -110,7 +110,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -110,7 +110,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3); var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == 3);
if (pairs.Keys.Any(t => t == type)) if (pairs.Keys.Any(t => t == type))
{ {
#region MyRegion #region MyRegion
//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));
...@@ -160,7 +159,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -160,7 +159,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
//data = Mapper.Map<List<ResComputeResponse>>(joinData); //data = Mapper.Map<List<ResComputeResponse>>(joinData);
#endregion #endregion MyRegion
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>();
...@@ -168,7 +167,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type) ...@@ -168,7 +167,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType)); var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType));
if (computes == null || !computes.Any()) return new List<ResComputeResponse>(); if (computes == null || !computes.Any()) return new List<ResComputeResponse>();
data = Mapper.Map<List<ResComputeResponse>>(computes); data = Mapper.Map<List<ResComputeResponse>>(computes);
data.ForEach(t => data.ForEach(t =>
...@@ -378,7 +376,6 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, string department, in ...@@ -378,7 +376,6 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, string department, in
return null; return null;
} }
/// <summary> /// <summary>
/// 返回科室详情 /// 返回科室详情
/// </summary> /// </summary>
...@@ -573,7 +570,7 @@ private List<ComputeResponse> GetSecondPerformance(int allotId) ...@@ -573,7 +570,7 @@ private List<ComputeResponse> GetSecondPerformance(int allotId)
/// </summary> /// </summary>
/// <param name="allotId"></param> /// <param name="allotId"></param>
/// <param name="computes"></param> /// <param name="computes"></param>
private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> computes) public List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> computes)
{ {
if (computes == null || !computes.Any()) if (computes == null || !computes.Any())
return computes; return computes;
...@@ -584,7 +581,7 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co ...@@ -584,7 +581,7 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
foreach (var item in computes.GroupBy(w => new { w.AccountingUnit, w.JobNumber })) foreach (var item in computes.GroupBy(w => new { w.AccountingUnit, w.JobNumber }))
{ {
// 补充过一次就不在补充了 // 补充过一次就不在补充了
var emp = computes.Where(w => w.AccountingUnit == item.Key.AccountingUnit && w.JobNumber == item.Key.JobNumber) var emp = computes.Where(w => w.AccountingUnit == item.Key.AccountingUnit && w.JobNumber == item.Key.JobNumber)
.OrderByDescending(w => w.Source).FirstOrDefault(); .OrderByDescending(w => w.Source).FirstOrDefault();
var apramount = list.Where(t => t.AccountingUnit == emp.AccountingUnit var apramount = list.Where(t => t.AccountingUnit == emp.AccountingUnit
...@@ -602,7 +599,6 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co ...@@ -602,7 +599,6 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
//} //}
} }
return computes; return computes;
} }
...@@ -666,8 +662,9 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co ...@@ -666,8 +662,9 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
// } // }
// } // }
// return result; // return result;
//} //}
#endregion
#endregion 绩效发放列表
public res_compute GetComputeSingle(int computeid) public res_compute GetComputeSingle(int computeid)
{ {
...@@ -728,7 +725,6 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId) ...@@ -728,7 +725,6 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == account.AllotID); var headers = _perforImheaderRepository.GetEntities(t => t.AllotID == account.AllotID);
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == account.AllotID && t.AccountingUnit == account.AccountingUnit); var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == account.AllotID && t.AccountingUnit == account.AccountingUnit);
DeptDataDetails deptDetails = new DeptDataDetails DeptDataDetails deptDetails = new DeptDataDetails
{ {
ShowFormula = allot.ShowFormula, ShowFormula = allot.ShowFormula,
...@@ -896,7 +892,6 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he ...@@ -896,7 +892,6 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
return dto; return dto;
}).ToList(); }).ToList();
} }
var headerData = headers?.Where(t => t.SheetID == sheet.ID); var headerData = headers?.Where(t => t.SheetID == sheet.ID);
if (headerData != null && headerData.Any()) if (headerData != null && headerData.Any())
...@@ -1003,6 +998,7 @@ private UnitType TypeConversion(int? unitType) ...@@ -1003,6 +998,7 @@ private UnitType TypeConversion(int? unitType)
type = UnitType.护理组; type = UnitType.护理组;
return type; return type;
} }
public DeptDataDetails DeptOfficeDetail(int accountId) public DeptDataDetails DeptOfficeDetail(int accountId)
{ {
var account = perforResaccountRepository.GetEntity(t => t.ID == accountId); var account = perforResaccountRepository.GetEntity(t => t.ID == accountId);
...@@ -1076,7 +1072,6 @@ public DeptDataDetails DeptOfficeDetail(int accountId) ...@@ -1076,7 +1072,6 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
return deptDetails; return deptDetails;
} }
public DeptDataDetails SpecialDeptDetail(ag_secondallot second) public DeptDataDetails SpecialDeptDetail(ag_secondallot second)
{ {
var allot = perforPerallotRepository.GetEntity(t => t.ID == second.AllotId); var allot = perforPerallotRepository.GetEntity(t => t.ID == second.AllotId);
...@@ -1243,7 +1238,7 @@ public DeptDataDetails GetDoctorDetail(int computeId) ...@@ -1243,7 +1238,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
Scale = employee.Scale ?? 0, //规模绩效系数 Scale = employee.Scale ?? 0, //规模绩效系数
ScalePerfor = resCompute.Scale ?? 0, //规模绩效 ScalePerfor = resCompute.Scale ?? 0, //规模绩效
Management = employee.Management,//管理绩效发放系数 Management = employee.Management,//管理绩效发放系数
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, //调节系数 AdjustFactor = employee?.Adjust ?? 1, //调节系数
......
...@@ -86,6 +86,7 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee ...@@ -86,6 +86,7 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
var row = sheet.GetRow(i); var row = sheet.GetRow(i);
if (row != null) if (row != null)
{ {
row.ZeroHeight = false; //取消隐藏行
int dataFirstCellRowNum = point.DataFirstCellNum.Value; int dataFirstCellRowNum = point.DataFirstCellNum.Value;
//跳过核算单元和科室 //跳过核算单元和科室
for (int j = dataFirstCellRowNum; j < row.LastCellNum; j++) for (int j = dataFirstCellRowNum; j < row.LastCellNum; j++)
...@@ -101,4 +102,4 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee ...@@ -101,4 +102,4 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
} }
} }
} }
} }
\ No newline at end of file
...@@ -37,7 +37,10 @@ public class SecondAllotService : IAutoInjection ...@@ -37,7 +37,10 @@ public class SecondAllotService : IAutoInjection
private readonly PerforPerapramountRepository perapramountRepository; private readonly PerforPerapramountRepository perapramountRepository;
private readonly PerforResspecialunitRepository resspecialunitRepository; private readonly PerforResspecialunitRepository resspecialunitRepository;
private readonly PersonService personService; private readonly PersonService personService;
private readonly ComputeService computeService;
private readonly PerforRescomputeRepository rescomputeRepository; private readonly PerforRescomputeRepository rescomputeRepository;
private readonly PerforPeremployeeRepository peremployeeRepository;
private readonly PerforImemployeeclinicRepository imemployeeclinicRepository;
private readonly List<ag_tempitem> tempitems = new List<ag_tempitem>(); private readonly List<ag_tempitem> tempitems = new List<ag_tempitem>();
public SecondAllotService(IOptions<Application> application, public SecondAllotService(IOptions<Application> application,
...@@ -61,7 +64,10 @@ public class SecondAllotService : IAutoInjection ...@@ -61,7 +64,10 @@ public class SecondAllotService : IAutoInjection
PerforPerapramountRepository perapramountRepository, PerforPerapramountRepository perapramountRepository,
PerforResspecialunitRepository resspecialunitRepository, PerforResspecialunitRepository resspecialunitRepository,
PersonService personService, PersonService personService,
PerforRescomputeRepository rescomputeRepository) ComputeService computeService,
PerforRescomputeRepository rescomputeRepository,
PerforPeremployeeRepository peremployeeRepository,
PerforImemployeeclinicRepository imemployeeclinicRepository)
{ {
this.application = application.Value; this.application = application.Value;
this.hospitalRepository = hospitalRepository; this.hospitalRepository = hospitalRepository;
...@@ -84,7 +90,10 @@ public class SecondAllotService : IAutoInjection ...@@ -84,7 +90,10 @@ public class SecondAllotService : IAutoInjection
this.perapramountRepository = perapramountRepository; this.perapramountRepository = perapramountRepository;
this.resspecialunitRepository = resspecialunitRepository; this.resspecialunitRepository = resspecialunitRepository;
this.personService = personService; this.personService = personService;
this.computeService = computeService;
this.rescomputeRepository = rescomputeRepository; this.rescomputeRepository = rescomputeRepository;
this.peremployeeRepository = peremployeeRepository;
this.imemployeeclinicRepository = imemployeeclinicRepository;
this.tempitems = perforAgtempitemRepository.GetEntities(); this.tempitems = perforAgtempitemRepository.GetEntities();
} }
...@@ -1721,9 +1730,11 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId) ...@@ -1721,9 +1730,11 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
if (user == null) if (user == null)
throw new NotImplementedException("人员ID无效"); throw new NotImplementedException("人员ID无效");
var allot = perforPerallotRepository.GetEntity(t => t.ID == allotId);
var isShowManage = computeService.IsShowManage(allotId);
var userrole = userroleRepository.GetEntity(t => t.UserID == userId); var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID); var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
Dictionary<int, string> dict = new Dictionary<int, string> Dictionary<int, string> dict = new Dictionary<int, string>
{ {
{ application.DirectorRole, AccountUnitType.科主任.ToString() }, { application.DirectorRole, AccountUnitType.科主任.ToString() },
...@@ -1733,10 +1744,78 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId) ...@@ -1733,10 +1744,78 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
if (!dict.Keys.Contains(role.Type.Value)) return new List<SecondPerforResponse>(); if (!dict.Keys.Contains(role.Type.Value)) return new List<SecondPerforResponse>();
var data = rescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == user.Department && t.AccountType == dict[role.Type.Value]); var computes = rescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == user.Department && t.AccountType == dict[role.Type.Value]);
if (data == null || !data.Any()) return new List<SecondPerforResponse>(); if (computes == null || !computes.Any()) return new List<SecondPerforResponse>();
var data = GetAllotPerformance(allotId, computes, isShowManage);
// 补充医院其他绩效
var result = computeService.AddAprAmount(allotId, data);
return Mapper.Map<List<SecondPerforResponse>>(data); // 预留比例
if (result != null)
{
var empDic = peremployeeRepository.GetEntities(w => w.AllotId == allotId);
foreach (var item in result)
{
var perfor = ((item.GiveFee ?? 0) != 0 ? item.GiveFee : item.PerforSumFee) ?? 0;
item.PerforSumFee = Math.Round(item.PerforSumFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.PerforManagementFee = Math.Round(item.PerforManagementFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.GiveFee = Math.Round(perfor, 0, MidpointRounding.AwayFromZero);
item.AdjustLaterOtherFee = Math.Round(item.AdjustLaterOtherFee ?? 0, 0, MidpointRounding.AwayFromZero);
item.OthePerfor = Math.Round(item.OthePerfor ?? 0, 0, MidpointRounding.AwayFromZero);
item.NightWorkPerfor = Math.Round(item.NightWorkPerfor ?? 0, 0, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round((perfor + item.AdjustLaterOtherFee + item.NightWorkPerfor) ?? 0, 0, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round((perfor + item.AdjustLaterOtherFee + item.NightWorkPerfor) ?? 0, 0, MidpointRounding.AwayFromZero);
}
}
return Mapper.Map<List<SecondPerforResponse>>(computes);
}
/// <summary>
/// 获取一次次绩效结果
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
private List<ComputeResponse> GetAllotPerformance(int allotId, List<res_compute> computes, int isShowManage)
{
if (computes == null || !computes.Any()) return new List<ComputeResponse>();
var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() };
var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
// 业务中层人员信息
var empolyeeList = imemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
return computes.Select(t =>
{
var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle);
comp.UnitType = t.AccountType;
if (types1.Contains(t.AccountType))
comp.PerforManagementFee = ((t.Efficiency + t.Scale) * t.Grant + t.OtherManagePerfor) * t.Attendance * t.ScoreAverageRate;
else
comp.PerforManagementFee = t.RealGiveFee;
// 行政中层 行政高层 补充 夜班费
if (types2.Contains(t.AccountType))
comp.NightWorkPerfor = t.NightWorkPerfor;
// 获取科主任系数,解决共用科主任重复计算人均问题
var basics = empolyeeList?.FirstOrDefault(w => w.AccountingUnit == t.AccountingUnit && w.DoctorName == t.EmployeeName && w.PersonnelNumber == t.JobNumber)?.Basics;
// 仅显示管理绩效
if (isShowManage == 2)
comp.PerforSumFee = 0;
else
comp.PerforSumFee = Math.Round((t.Avg * (basics ?? 1)) + t.ShouldGiveFee + t.AssessBeforeOtherFee ?? 0);
comp.Punishment = t.Punishment;
comp.ShouldGiveFee = t.ShouldGiveFee;
comp.PerforSumFee = t.PerforSumFee;
comp.GiveFee = t.GiveFee * t.Adjust;
comp.AdjustLaterOtherFee = t.AdjustLaterOtherFee ?? 0;
comp.OthePerfor = t.OtherPerfor;
comp.RealGiveFee = t.RealGiveFee;
return comp;
}).ToList();
} }
} }
} }
\ 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