Commit 2d341f65 by lcx

Merge branch 'develop' into feature/运营分析

parents 1fa36210 86dd9971
......@@ -458,70 +458,8 @@ public ApiResponse Reserved([FromBody] ReservedRequest request)
return new ApiResponse(ResponseType.ParameterError, "绩效信息无效");
var userid = _claim.GetUserId();
var reserveds = _allotService.GetReserved(request.HospitalId, request.Year, userid);
#region 格式转换
var result = reserveds?.Select(w => new
{
w.HospitalId,
w.Year,
w.UnitType,
w.AccountingUnit,
w.EmployeeName,
w.JobNumber,
JanReseFee = w.JanFee * w.JanRatio,
JanGiveFee = w.JanFee * (1 - w.JanRatio),
FebReseFee = w.FebFee * w.FebRatio,
FebGiveFee = w.FebFee * (1 - w.FebRatio),
MarReseFee = w.MarFee * w.MarRatio,
MarGiveFee = w.MarFee * (1 - w.MarRatio),
AprReseFee = w.AprFee * w.AprRatio,
AprGiveFee = w.AprFee * (1 - w.AprRatio),
MayReseFee = w.MayFee * w.MayRatio,
MayGiveFee = w.MayFee * (1 - w.MayRatio),
JunReseFee = w.JunFee * w.JunRatio,
JunGiveFee = w.JunFee * (1 - w.JunRatio),
JulReseFee = w.JulFee * w.JulRatio,
JulGiveFee = w.JulFee * (1 - w.JulRatio),
AugReseFee = w.AugFee * w.AugRatio,
AugGiveFee = w.AugFee * (1 - w.AugRatio),
SepReseFee = w.SepFee * w.SepRatio,
SepGiveFee = w.SepFee * (1 - w.SepRatio),
OctReseFee = w.OctFee * w.OctRatio,
OctGiveFee = w.OctFee * (1 - w.OctRatio),
NovReseFee = w.NovFee * w.NovRatio,
NovGiveFee = w.NovFee * (1 - w.NovRatio),
DecReseFee = w.DecFee * w.DecRatio,
DecGiveFee = w.DecFee * (1 - w.DecRatio),
TotalReseFee = (w.JanFee * w.JanRatio ?? 0) + (w.FebFee * w.FebRatio ?? 0) + (w.MarFee * w.MarRatio ?? 0)
+ (w.AprFee * w.AprRatio ?? 0) + (w.MayFee * w.MayRatio ?? 0) + (w.JunFee * w.JunRatio ?? 0)
+ (w.JulFee * w.JulRatio ?? 0) + (w.AugFee * w.AugRatio ?? 0) + (w.SepFee * w.SepRatio ?? 0)
+ (w.OctFee * w.OctRatio ?? 0) + (w.NovFee * w.NovRatio ?? 0) + (w.DecFee * w.DecRatio ?? 0),
TotalGiveFee = (w.JanFee * (1 - w.JanRatio) ?? 0) + (w.FebFee * (1 - w.FebRatio) ?? 0) + (w.MarFee * (1 - w.MarRatio) ?? 0)
+ (w.AprFee * (1 - w.AprRatio) ?? 0) + (w.MayFee * (1 - w.MayRatio) ?? 0) + (w.JunFee * (1 - w.JunRatio) ?? 0)
+ (w.JulFee * (1 - w.JulRatio) ?? 0) + (w.AugFee * (1 - w.AugRatio) ?? 0) + (w.SepFee * (1 - w.SepRatio) ?? 0)
+ (w.OctFee * (1 - w.OctRatio) ?? 0) + (w.NovFee * (1 - w.NovRatio) ?? 0) + (w.DecFee * (1 - w.DecRatio) ?? 0),
});
#endregion 格式转换
return new ApiResponse(ResponseType.OK, result);
return new ApiResponse(ResponseType.OK, reserveds);
}
/// <summary>
......
......@@ -384,10 +384,10 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
{
var userid = claimService.GetUserId();
var result = secondAllotService.ConfirmAudit(userid, request);
if (request.IsPass == 1)
{
resultComputeService.SaveSecondReserved(request.SecondId);
}
//if (request.IsPass == 1)
//{
// resultComputeService.SaveSecondReserved(request.SecondId);
//}
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
}
......
......@@ -3294,6 +3294,101 @@
药占比对应系数
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.HospitalId">
<summary>
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.Year">
<summary>
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.UnitType">
<summary>
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.EmployeeName">
<summary>
人员姓名
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.JobNumber">
<summary>
工号
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.JanReseFee">
<summary>
1月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.FebReseFee">
<summary>
2月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.MarReseFee">
<summary>
3月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.AprReseFee">
<summary>
4月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.MayReseFee">
<summary>
5月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.JunReseFee">
<summary>
6月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.JulReseFee">
<summary>
7月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.AugReseFee">
<summary>
8月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.SepReseFee">
<summary>
9月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.OctReseFee">
<summary>
10月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.NovReseFee">
<summary>
11月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.DecReseFee">
<summary>
12月
</summary>
</member>
<member name="P:Performance.DtoModels.EmployeeReservedDto.TotalReseFee">
<summary>
汇总
</summary>
</member>
<member name="P:Performance.DtoModels.GuaranteeResponse.AllotId">
<summary>
......
......@@ -295,21 +295,12 @@
<member name="P:Performance.EntityModels.PerformanceDbContext.res_account">
<summary> 科室核算结果 </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.res_accountdoctor">
<summary> 医生科室核算结果 </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.res_accountnurse">
<summary> 护理科室核算结果 </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.res_baiscnorm">
<summary> 核算基础标准 </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.res_compute">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.res_reserved">
<summary> </summary>
</member>
<member name="P:Performance.EntityModels.PerformanceDbContext.res_specialunit">
<summary> </summary>
</member>
......@@ -6376,221 +6367,6 @@
夜班绩效
</summary>
</member>
<member name="T:Performance.EntityModels.res_accountdoctor">
<summary>
医生科室核算结果
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.ID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.AllotID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.SheetID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.Department">
<summary>
科室
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.ManagerNumber">
<summary>
科主任/护士长数量
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.Number">
<summary>
核算单元医生数量
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.BasicFactor">
<summary>
医生基础系数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.SlopeFactor">
<summary>
倾斜系数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.OtherPerfor1">
<summary>
其他绩效1
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.OtherPerfor2">
<summary>
其他绩效2
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.Extra">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.ScoringAverage">
<summary>
考核对分率
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.AdjustFactor">
<summary>
调节系数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.Income">
<summary>
科室业绩
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.PerforFee">
<summary>
业绩绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.WorkloadFee">
<summary>
工作量绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.PerforTotal">
<summary>
绩效合计
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.Avg">
<summary>
人均绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.RealGiveFee">
<summary>
实发绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountdoctor.ChangeLog">
<summary>
变更日志
</summary>
</member>
<member name="T:Performance.EntityModels.res_accountnurse">
<summary>
护理科室核算结果
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.ID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.AllotID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.SheetID">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.Department">
<summary>
科室
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.ManagerNumber">
<summary>
科主任/护士长数量
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.Number">
<summary>
护士人数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.BasicFactor">
<summary>
护理基础系数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.SlopeFactor">
<summary>
倾斜系数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.OtherPerfor1">
<summary>
其他绩效1
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.OtherPerfor2">
<summary>
其他绩效2
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.Extra">
<summary>
医院奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.ScoringAverage">
<summary>
考核对分率
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.AdjustFactor">
<summary>
调节系数
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.Income">
<summary>
科室业绩
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.PerforFee">
<summary>
业绩绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.WorkloadFee">
<summary>
工作量绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.PerforTotal">
<summary>
绩效合计
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.Avg">
<summary>
人均绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_accountnurse.RealGiveFee">
<summary>
实发绩效
</summary>
</member>
<member name="T:Performance.EntityModels.res_baiscnorm">
<summary>
核算基础标准
......@@ -6876,166 +6652,6 @@
考核后管理绩效
</summary>
</member>
<member name="T:Performance.EntityModels.res_reserved">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.Id">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.HospitalId">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.Year">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.UnitType">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.AccountingUnit">
<summary>
核算单元
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.EmployeeName">
<summary>
人员姓名
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JobNumber">
<summary>
工号
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JanFee">
<summary>
一月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JanRatio">
<summary>
一月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.FebFee">
<summary>
二月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.FebRatio">
<summary>
二月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.MarFee">
<summary>
三月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.MarRatio">
<summary>
三月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.AprFee">
<summary>
四月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.AprRatio">
<summary>
四月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.MayFee">
<summary>
五月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.MayRatio">
<summary>
五月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JunFee">
<summary>
六月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JunRatio">
<summary>
六月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JulFee">
<summary>
七月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.JulRatio">
<summary>
七月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.AugFee">
<summary>
八月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.AugRatio">
<summary>
八月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.SepFee">
<summary>
九月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.SepRatio">
<summary>
九月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.OctFee">
<summary>
十月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.OctRatio">
<summary>
十月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.NovFee">
<summary>
十一月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.NovRatio">
<summary>
十一月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.DecFee">
<summary>
十二月
</summary>
</member>
<member name="P:Performance.EntityModels.res_reserved.DecRatio">
<summary>
十二月
</summary>
</member>
<member name="T:Performance.EntityModels.res_specialunit">
<summary>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class EmployeeReservedDto
{
/// <summary>
///
/// </summary>
public int HospitalId { get; set; }
/// <summary>
///
/// </summary>
public int Year { get; set; }
/// <summary>
///
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 1月
/// </summary>
public Nullable<decimal> JanReseFee { get; set; }
public Nullable<decimal> JanGiveFee { get; set; }
/// <summary>
/// 2月
/// </summary>
public Nullable<decimal> FebReseFee { get; set; }
public Nullable<decimal> FebGiveFee { get; set; }
/// <summary>
/// 3月
/// </summary>
public Nullable<decimal> MarReseFee { get; set; }
public Nullable<decimal> MarGiveFee { get; set; }
/// <summary>
/// 4月
/// </summary>
public Nullable<decimal> AprReseFee { get; set; }
public Nullable<decimal> AprGiveFee { get; set; }
/// <summary>
/// 5月
/// </summary>
public Nullable<decimal> MayReseFee { get; set; }
public Nullable<decimal> MayGiveFee { get; set; }
/// <summary>
/// 6月
/// </summary>
public Nullable<decimal> JunReseFee { get; set; }
public Nullable<decimal> JunGiveFee { get; set; }
/// <summary>
/// 7月
/// </summary>
public Nullable<decimal> JulReseFee { get; set; }
public Nullable<decimal> JulGiveFee { get; set; }
/// <summary>
/// 8月
/// </summary>
public Nullable<decimal> AugReseFee { get; set; }
public Nullable<decimal> AugGiveFee { get; set; }
/// <summary>
/// 9月
/// </summary>
public Nullable<decimal> SepReseFee { get; set; }
public Nullable<decimal> SepGiveFee { get; set; }
/// <summary>
/// 10月
/// </summary>
public Nullable<decimal> OctReseFee { get; set; }
public Nullable<decimal> OctGiveFee { get; set; }
/// <summary>
/// 11月
/// </summary>
public Nullable<decimal> NovReseFee { get; set; }
public Nullable<decimal> NovGiveFee { get; set; }
/// <summary>
/// 12月
/// </summary>
public Nullable<decimal> DecReseFee { get; set; }
public Nullable<decimal> DecGiveFee { get; set; }
/// <summary>
/// 汇总
/// </summary>
public Nullable<decimal> TotalReseFee { get; set; }
public Nullable<decimal> TotalGiveFee { get; set; }
}
}
......@@ -205,16 +205,16 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<report_performance_tags> report_performance_tags { get; set; }
/// <summary> 科室核算结果 </summary>
public virtual DbSet<res_account> res_account { get; set; }
/// <summary> 医生科室核算结果 </summary>
public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; }
/// <summary> 护理科室核算结果 </summary>
public virtual DbSet<res_accountnurse> res_accountnurse { get; set; }
///// <summary> 医生科室核算结果 </summary>
//public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; }
///// <summary> 护理科室核算结果 </summary>
//public virtual DbSet<res_accountnurse> res_accountnurse { get; set; }
/// <summary> 核算基础标准 </summary>
public virtual DbSet<res_baiscnorm> res_baiscnorm { get; set; }
/// <summary> </summary>
public virtual DbSet<res_compute> res_compute { get; set; }
/// <summary> </summary>
public virtual DbSet<res_reserved> res_reserved { get; set; }
///// <summary> </summary>
//public virtual DbSet<res_reserved> res_reserved { get; set; }
/// <summary> </summary>
public virtual DbSet<res_specialunit> res_specialunit { get; set; }
/// <summary> 医院数据提取脚本 </summary>
......
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: 医生科室核算结果.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 医生科室核算结果
/// </summary>
[Table("res_accountdoctor")]
public class res_accountdoctor
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> SheetID { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 科主任/护士长数量
/// </summary>
public Nullable<int> ManagerNumber { get; set; }
/// <summary>
/// 核算单元医生数量
/// </summary>
public Nullable<decimal> Number { get; set; }
/// <summary>
/// 医生基础系数
/// </summary>
public Nullable<decimal> BasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public Nullable<decimal> SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; }
/// <summary>
/// 其他绩效2
/// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Extra { get; set; }
/// <summary>
/// 考核对分率
/// </summary>
public Nullable<decimal> ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> AdjustFactor { get; set; }
/// <summary>
/// 科室业绩
/// </summary>
public Nullable<decimal> Income { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public Nullable<decimal> PerforFee { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> WorkloadFee { get; set; }
/// <summary>
/// 绩效合计
/// </summary>
public Nullable<decimal> PerforTotal { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public Nullable<decimal> Avg { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
/// <summary>
/// 变更日志
/// </summary>
public string ChangeLog { get; set; }
}
}
////-----------------------------------------------------------------------
//// <copyright file=" res_accountdoctor.cs">
//// * FileName: 医生科室核算结果.cs
//// </copyright>
////-----------------------------------------------------------------------
//using System;
//using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;
//namespace Performance.EntityModels
//{
// /// <summary>
// /// 医生科室核算结果
// /// </summary>
// [Table("res_accountdoctor")]
// public class res_accountdoctor
// {
// /// <summary>
// ///
// /// </summary>
// [Key]
// public int ID { get; set; }
// /// <summary>
// ///
// /// </summary>
// public Nullable<int> AllotID { get; set; }
// /// <summary>
// ///
// /// </summary>
// public Nullable<int> SheetID { get; set; }
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
// /// <summary>
// /// 科室
// /// </summary>
// public string Department { get; set; }
// /// <summary>
// /// 科主任/护士长数量
// /// </summary>
// public Nullable<int> ManagerNumber { get; set; }
// /// <summary>
// /// 核算单元医生数量
// /// </summary>
// public Nullable<decimal> Number { get; set; }
// /// <summary>
// /// 医生基础系数
// /// </summary>
// public Nullable<decimal> BasicFactor { get; set; }
// /// <summary>
// /// 倾斜系数
// /// </summary>
// public Nullable<decimal> SlopeFactor { get; set; }
// /// <summary>
// /// 其他绩效1
// /// </summary>
// public Nullable<decimal> OtherPerfor1 { get; set; }
// /// <summary>
// /// 其他绩效2
// /// </summary>
// public Nullable<decimal> OtherPerfor2 { get; set; }
// /// <summary>
// /// 医院奖罚
// /// </summary>
// public Nullable<decimal> Extra { get; set; }
// /// <summary>
// /// 考核对分率
// /// </summary>
// public Nullable<decimal> ScoringAverage { get; set; }
// /// <summary>
// /// 调节系数
// /// </summary>
// public Nullable<decimal> AdjustFactor { get; set; }
// /// <summary>
// /// 科室业绩
// /// </summary>
// public Nullable<decimal> Income { get; set; }
// /// <summary>
// /// 业绩绩效
// /// </summary>
// public Nullable<decimal> PerforFee { get; set; }
// /// <summary>
// /// 工作量绩效
// /// </summary>
// public Nullable<decimal> WorkloadFee { get; set; }
// /// <summary>
// /// 绩效合计
// /// </summary>
// public Nullable<decimal> PerforTotal { get; set; }
// /// <summary>
// /// 人均绩效
// /// </summary>
// public Nullable<decimal> Avg { get; set; }
// /// <summary>
// /// 实发绩效
// /// </summary>
// public Nullable<decimal> RealGiveFee { get; set; }
// /// <summary>
// /// 变更日志
// /// </summary>
// public string ChangeLog { get; set; }
// }
//}
//-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs">
// * FileName: 护理科室核算结果.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 护理科室核算结果
/// </summary>
[Table("res_accountnurse")]
public class res_accountnurse
{
/// <summary>
///
/// </summary>
[Key]
public int ID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> AllotID { get; set; }
/// <summary>
///
/// </summary>
public Nullable<int> SheetID { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { get; set; }
/// <summary>
/// 科主任/护士长数量
/// </summary>
public Nullable<int> ManagerNumber { get; set; }
/// <summary>
/// 护士人数
/// </summary>
public Nullable<decimal> Number { get; set; }
/// <summary>
/// 护理基础系数
/// </summary>
public Nullable<decimal> BasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public Nullable<decimal> SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; }
/// <summary>
/// 其他绩效2
/// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Extra { get; set; }
/// <summary>
/// 考核对分率
/// </summary>
public Nullable<decimal> ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> AdjustFactor { get; set; }
/// <summary>
/// 科室业绩
/// </summary>
public Nullable<decimal> Income { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public Nullable<decimal> PerforFee { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> WorkloadFee { get; set; }
/// <summary>
/// 绩效合计
/// </summary>
public Nullable<decimal> PerforTotal { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public Nullable<decimal> Avg { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
}
}
////-----------------------------------------------------------------------
//// <copyright file=" res_accountnurse.cs">
//// * FileName: 护理科室核算结果.cs
//// </copyright>
////-----------------------------------------------------------------------
//using System;
//using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;
//namespace Performance.EntityModels
//{
// /// <summary>
// /// 护理科室核算结果
// /// </summary>
// [Table("res_accountnurse")]
// public class res_accountnurse
// {
// /// <summary>
// ///
// /// </summary>
// [Key]
// public int ID { get; set; }
// /// <summary>
// ///
// /// </summary>
// public Nullable<int> AllotID { get; set; }
// /// <summary>
// ///
// /// </summary>
// public Nullable<int> SheetID { get; set; }
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
// /// <summary>
// /// 科室
// /// </summary>
// public string Department { get; set; }
// /// <summary>
// /// 科主任/护士长数量
// /// </summary>
// public Nullable<int> ManagerNumber { get; set; }
// /// <summary>
// /// 护士人数
// /// </summary>
// public Nullable<decimal> Number { get; set; }
// /// <summary>
// /// 护理基础系数
// /// </summary>
// public Nullable<decimal> BasicFactor { get; set; }
// /// <summary>
// /// 倾斜系数
// /// </summary>
// public Nullable<decimal> SlopeFactor { get; set; }
// /// <summary>
// /// 其他绩效1
// /// </summary>
// public Nullable<decimal> OtherPerfor1 { get; set; }
// /// <summary>
// /// 其他绩效2
// /// </summary>
// public Nullable<decimal> OtherPerfor2 { get; set; }
// /// <summary>
// /// 医院奖罚
// /// </summary>
// public Nullable<decimal> Extra { get; set; }
// /// <summary>
// /// 考核对分率
// /// </summary>
// public Nullable<decimal> ScoringAverage { get; set; }
// /// <summary>
// /// 调节系数
// /// </summary>
// public Nullable<decimal> AdjustFactor { get; set; }
// /// <summary>
// /// 科室业绩
// /// </summary>
// public Nullable<decimal> Income { get; set; }
// /// <summary>
// /// 业绩绩效
// /// </summary>
// public Nullable<decimal> PerforFee { get; set; }
// /// <summary>
// /// 工作量绩效
// /// </summary>
// public Nullable<decimal> WorkloadFee { get; set; }
// /// <summary>
// /// 绩效合计
// /// </summary>
// public Nullable<decimal> PerforTotal { get; set; }
// /// <summary>
// /// 人均绩效
// /// </summary>
// public Nullable<decimal> Avg { get; set; }
// /// <summary>
// /// 实发绩效
// /// </summary>
// public Nullable<decimal> RealGiveFee { get; set; }
// }
//}
//-----------------------------------------------------------------------
// <copyright file=" res_reserved.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
///
/// </summary>
[Table("res_reserved")]
public class res_reserved
{
/// <summary>
///
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
///
/// </summary>
public int HospitalId { get; set; }
/// <summary>
///
/// </summary>
public int Year { get; set; }
/// <summary>
///
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 人员姓名
/// </summary>
public string EmployeeName { get; set; }
/// <summary>
/// 工号
/// </summary>
public string JobNumber { get; set; }
/// <summary>
/// 一月
/// </summary>
public Nullable<decimal> JanFee { get; set; }
/// <summary>
/// 一月
/// </summary>
public Nullable<decimal> JanRatio { get; set; }
/// <summary>
/// 二月
/// </summary>
public Nullable<decimal> FebFee { get; set; }
/// <summary>
/// 二月
/// </summary>
public Nullable<decimal> FebRatio { get; set; }
/// <summary>
/// 三月
/// </summary>
public Nullable<decimal> MarFee { get; set; }
/// <summary>
/// 三月
/// </summary>
public Nullable<decimal> MarRatio { get; set; }
/// <summary>
/// 四月
/// </summary>
public Nullable<decimal> AprFee { get; set; }
/// <summary>
/// 四月
/// </summary>
public Nullable<decimal> AprRatio { get; set; }
/// <summary>
/// 五月
/// </summary>
public Nullable<decimal> MayFee { get; set; }
/// <summary>
/// 五月
/// </summary>
public Nullable<decimal> MayRatio { get; set; }
/// <summary>
/// 六月
/// </summary>
public Nullable<decimal> JunFee { get; set; }
/// <summary>
/// 六月
/// </summary>
public Nullable<decimal> JunRatio { get; set; }
/// <summary>
/// 七月
/// </summary>
public Nullable<decimal> JulFee { get; set; }
/// <summary>
/// 七月
/// </summary>
public Nullable<decimal> JulRatio { get; set; }
/// <summary>
/// 八月
/// </summary>
public Nullable<decimal> AugFee { get; set; }
/// <summary>
/// 八月
/// </summary>
public Nullable<decimal> AugRatio { get; set; }
/// <summary>
/// 九月
/// </summary>
public Nullable<decimal> SepFee { get; set; }
/// <summary>
/// 九月
/// </summary>
public Nullable<decimal> SepRatio { get; set; }
/// <summary>
/// 十月
/// </summary>
public Nullable<decimal> OctFee { get; set; }
/// <summary>
/// 十月
/// </summary>
public Nullable<decimal> OctRatio { get; set; }
/// <summary>
/// 十一月
/// </summary>
public Nullable<decimal> NovFee { get; set; }
/// <summary>
/// 十一月
/// </summary>
public Nullable<decimal> NovRatio { get; set; }
/// <summary>
/// 十二月
/// </summary>
public Nullable<decimal> DecFee { get; set; }
/// <summary>
/// 十二月
/// </summary>
public Nullable<decimal> DecRatio { get; set; }
}
}
////-----------------------------------------------------------------------
//// <copyright file=" res_reserved.cs">
//// * FileName: .cs
//// </copyright>
////-----------------------------------------------------------------------
//using System;
//using System.ComponentModel.DataAnnotations;
//using System.ComponentModel.DataAnnotations.Schema;
//namespace Performance.EntityModels
//{
// /// <summary>
// ///
// /// </summary>
// [Table("res_reserved")]
// public class res_reserved
// {
// /// <summary>
// ///
// /// </summary>
// [Key]
// public int Id { get; set; }
// /// <summary>
// ///
// /// </summary>
// public int HospitalId { get; set; }
// /// <summary>
// ///
// /// </summary>
// public int Year { get; set; }
// /// <summary>
// ///
// /// </summary>
// public string UnitType { get; set; }
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
// /// <summary>
// /// 人员姓名
// /// </summary>
// public string EmployeeName { get; set; }
// /// <summary>
// /// 工号
// /// </summary>
// public string JobNumber { get; set; }
// /// <summary>
// /// 一月
// /// </summary>
// public Nullable<decimal> JanFee { get; set; }
// /// <summary>
// /// 一月
// /// </summary>
// public Nullable<decimal> JanRatio { get; set; }
// /// <summary>
// /// 二月
// /// </summary>
// public Nullable<decimal> FebFee { get; set; }
// /// <summary>
// /// 二月
// /// </summary>
// public Nullable<decimal> FebRatio { get; set; }
// /// <summary>
// /// 三月
// /// </summary>
// public Nullable<decimal> MarFee { get; set; }
// /// <summary>
// /// 三月
// /// </summary>
// public Nullable<decimal> MarRatio { get; set; }
// /// <summary>
// /// 四月
// /// </summary>
// public Nullable<decimal> AprFee { get; set; }
// /// <summary>
// /// 四月
// /// </summary>
// public Nullable<decimal> AprRatio { get; set; }
// /// <summary>
// /// 五月
// /// </summary>
// public Nullable<decimal> MayFee { get; set; }
// /// <summary>
// /// 五月
// /// </summary>
// public Nullable<decimal> MayRatio { get; set; }
// /// <summary>
// /// 六月
// /// </summary>
// public Nullable<decimal> JunFee { get; set; }
// /// <summary>
// /// 六月
// /// </summary>
// public Nullable<decimal> JunRatio { get; set; }
// /// <summary>
// /// 七月
// /// </summary>
// public Nullable<decimal> JulFee { get; set; }
// /// <summary>
// /// 七月
// /// </summary>
// public Nullable<decimal> JulRatio { get; set; }
// /// <summary>
// /// 八月
// /// </summary>
// public Nullable<decimal> AugFee { get; set; }
// /// <summary>
// /// 八月
// /// </summary>
// public Nullable<decimal> AugRatio { get; set; }
// /// <summary>
// /// 九月
// /// </summary>
// public Nullable<decimal> SepFee { get; set; }
// /// <summary>
// /// 九月
// /// </summary>
// public Nullable<decimal> SepRatio { get; set; }
// /// <summary>
// /// 十月
// /// </summary>
// public Nullable<decimal> OctFee { get; set; }
// /// <summary>
// /// 十月
// /// </summary>
// public Nullable<decimal> OctRatio { get; set; }
// /// <summary>
// /// 十一月
// /// </summary>
// public Nullable<decimal> NovFee { get; set; }
// /// <summary>
// /// 十一月
// /// </summary>
// public Nullable<decimal> NovRatio { get; set; }
// /// <summary>
// /// 十二月
// /// </summary>
// public Nullable<decimal> DecFee { get; set; }
// /// <summary>
// /// 十二月
// /// </summary>
// public Nullable<decimal> DecRatio { get; set; }
// }
//}
......@@ -372,5 +372,17 @@ public List<PerReport> NurseAvg(ReportRequest request)
return DapperQuery(sql, new { hospitalId = request.HospitalId }).ToList();
}
#endregion
/// <summary>
/// 获取医院预留绩效
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="year"></param>
/// <returns></returns>
public List<EmployeeReservedDto> GetEmployeeReserved(int hospitalId, int year)
{
string sql = "SELECT * FROM view_allot_result_report WHERE HospitalID=@HospitalID AND Year=@Year";
return DapperQuery<EmployeeReservedDto>(sql, new { HospitalID = hospitalId, Year = year })?.ToList();
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: res_accountdoctor.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
////-----------------------------------------------------------------------
//// <copyright file=" res_accountdoctor.cs">
//// * FileName: res_accountdoctor.cs
//// </copyright>
////-----------------------------------------------------------------------
//using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// res_accountdoctor Repository
/// </summary>
public partial class PerforResaccountdoctorRepository : PerforRepository<res_accountdoctor>
{
public PerforResaccountdoctorRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//namespace Performance.Repository
//{
// /// <summary>
// /// res_accountdoctor Repository
// /// </summary>
// public partial class PerforResaccountdoctorRepository : PerforRepository<res_accountdoctor>
// {
// public PerforResaccountdoctorRepository(PerformanceDbContext context) : base(context)
// {
// }
// }
//}
//-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs">
// * FileName: res_accountnurse.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
////-----------------------------------------------------------------------
//// <copyright file=" res_accountnurse.cs">
//// * FileName: res_accountnurse.cs
//// </copyright>
////-----------------------------------------------------------------------
//using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// res_accountnurse Repository
/// </summary>
public partial class PerforResaccountnurseRepository : PerforRepository<res_accountnurse>
{
public PerforResaccountnurseRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//namespace Performance.Repository
//{
// /// <summary>
// /// res_accountnurse Repository
// /// </summary>
// public partial class PerforResaccountnurseRepository : PerforRepository<res_accountnurse>
// {
// public PerforResaccountnurseRepository(PerformanceDbContext context) : base(context)
// {
// }
// }
//}
//-----------------------------------------------------------------------
// <copyright file=" res_reserved.cs">
// * FileName: res_reserved.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
////-----------------------------------------------------------------------
//// <copyright file=" res_reserved.cs">
//// * FileName: res_reserved.cs
//// </copyright>
////-----------------------------------------------------------------------
//using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// res_reserved Repository
/// </summary>
public partial class PerforResreservedRepository : PerforRepository<res_reserved>
{
public PerforResreservedRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//namespace Performance.Repository
//{
// /// <summary>
// /// res_reserved Repository
// /// </summary>
// public partial class PerforResreservedRepository : PerforRepository<res_reserved>
// {
// public PerforResreservedRepository(PerformanceDbContext context) : base(context)
// {
// }
// }
//}
......@@ -23,7 +23,6 @@ public class ResultComputeService : IAutoInjection
private readonly PerforPerallotRepository perforPerallotRepository;
private readonly PerforAgcomputeRepository perforAgcomputeRepository;
private readonly PerforAgsecondallotRepository perforAgsecondallotRepository;
private readonly PerforResreservedRepository perforresreservedRepository;
private readonly PerforHospitalRepository hospitalRepository;
private readonly PerforImemployeeRepository perforImEmployeeRepository;
private readonly PerforRescomputeRepository perforRescomputeRepository;
......@@ -50,7 +49,6 @@ public class ResultComputeService : IAutoInjection
PerforPerallotRepository perforPerallotRepository,
PerforAgcomputeRepository perforAgcomputeRepository,
PerforAgsecondallotRepository perforAgsecondallotRepository,
PerforResreservedRepository perforresreservedRepository,
PerforImemployeeclinicRepository perforImemployeeclinicRepository,
PerforImemployeelogisticsRepository perforImemployeelogisticsRepository,
ILogger<ResultComputeService> logger)
......@@ -70,7 +68,6 @@ public class ResultComputeService : IAutoInjection
this.perforPerallotRepository = perforPerallotRepository;
this.perforAgcomputeRepository = perforAgcomputeRepository;
this.perforAgsecondallotRepository = perforAgsecondallotRepository;
this.perforresreservedRepository = perforresreservedRepository;
this.perforImemployeeclinicRepository = perforImemployeeclinicRepository;
this.perforImemployeelogisticsRepository = perforImemployeelogisticsRepository;
this.logger = logger;
......@@ -351,172 +348,172 @@ private IEnumerable<PerDataSpecialUnit> CalculateSpecialUnit(PerSheet specialUni
#region 预留金额
/// <summary>
/// 二次绩效审核通过后修改绩效预留金额
/// </summary>
/// <param name="secondId"></param>
public void SaveSecondReserved(int secondId)
{
var second = perforAgsecondallotRepository.GetEntity(t => t.Id == secondId);
if (second == null)
throw new PerformanceException("参数信息无效");
var allot = perforPerallotRepository.GetEntity(t => t.ID == second.AllotId);
if (allot == null)
throw new PerformanceException("参数信息无效");
var again = perforAgcomputeRepository.GetEntities(t => t.AllotId == allot.ID);
if (again != null && again.Any())
{
var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allot.ID);
var group = again.GroupBy(t => new { t.Department, t.JobNumber, t.PersonName })
.Select(t => new ComputeResponse
{
UnitType = second.UnitType,
AccountingUnit = t.Key.Department,
JobNumber = t.Key.JobNumber,
EmployeeName = t.Key.PersonName,
RealGiveFee = t.Sum(g => g.RealGiveFee)
});
AddOrUpdate(allot, empDic, group);
}
}
/// <summary>
/// 绩效生成完成后修改绩效预留金额
/// </summary>
/// <param name="allot"></param>
public void SaveReserved(per_allot allot, int hospitalId)
{
var mTypes = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString(), AccountUnitType.行政工勤.ToString() };
var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
if (hospital?.IsShowManage == 1)
mTypes.AddRange(new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() });
var resComputes = perforRescomputeRepository
.GetEntities(t => t.AllotID == allot.ID && mTypes.Contains(t.AccountType) && (string.IsNullOrEmpty(t.NeedSecondAllot) || t.NeedSecondAllot == "否"))
?.OrderByDescending(t => t.AccountingUnit);
if (resComputes != null && resComputes.Any())
{
var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allot.ID);
var group = resComputes.GroupBy(t => new { t.UnitType, t.AccountingUnit, t.EmployeeName, t.JobNumber })
.Select(t => new ComputeResponse
{
UnitType = t.Key.UnitType,
AccountingUnit = t.Key.AccountingUnit,
EmployeeName = t.Key.EmployeeName,
JobNumber = t.Key.JobNumber,
RealGiveFee = t.Sum(g => g.RealGiveFee)
});
AddOrUpdate(allot, empDic, group);
}
}
private void AddOrUpdate(per_allot allot, List<per_employee> empDic, IEnumerable<ComputeResponse> group)
{
var reserveds = perforresreservedRepository.GetEntities(w => w.HospitalId == allot.HospitalId && w.Year == allot.Year);
List<res_reserved> updates = new List<res_reserved>(), inserts = new List<res_reserved>();
foreach (var item in group)
{
var ratio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
var reserved = reserveds?.FirstOrDefault(w => w.AccountingUnit == item.AccountingUnit && w.JobNumber == item.JobNumber);
if (reserved == null)
{
reserved = new res_reserved
{
UnitType = item.UnitType,
HospitalId = allot.HospitalId,
Year = allot.Year,
AccountingUnit = item.AccountingUnit,
JobNumber = item.JobNumber,
EmployeeName = item.EmployeeName,
};
inserts.Add(reserved);
}
else
updates.Add(reserved);
ChangeRealGiveFee(reserved, allot, item.RealGiveFee ?? 0, ratio);
}
perforresreservedRepository.AddRange(inserts.ToArray());
perforresreservedRepository.UpdateRange(updates.ToArray());
}
/// <summary>
/// 修改绩效金额
/// </summary>
/// <param name="reserved"></param>
/// <param name="allot"></param>
/// <param name="realGiveFee"></param>
/// <param name="ratio"></param>
private void ChangeRealGiveFee(res_reserved reserved, per_allot allot, decimal realGiveFee, decimal ratio)
{
if (allot.Month == 1)
{
reserved.JanFee = realGiveFee;
reserved.JanRatio = ratio;
}
else if (allot.Month == 2)
{
reserved.FebFee = realGiveFee;
reserved.FebRatio = ratio;
}
else if (allot.Month == 3)
{
reserved.MarFee = realGiveFee;
reserved.MarRatio = ratio;
}
else if (allot.Month == 4)
{
reserved.AprFee = realGiveFee;
reserved.AprRatio = ratio;
}
else if (allot.Month == 5)
{
reserved.MayFee = realGiveFee;
reserved.MayRatio = ratio;
}
else if (allot.Month == 6)
{
reserved.JunFee = realGiveFee;
reserved.JunRatio = ratio;
}
else if (allot.Month == 7)
{
reserved.JulFee = realGiveFee;
reserved.JulRatio = ratio;
}
else if (allot.Month == 8)
{
reserved.AugFee = realGiveFee;
reserved.AugRatio = ratio;
}
else if (allot.Month == 9)
{
reserved.SepFee = realGiveFee;
reserved.SepRatio = ratio;
}
else if (allot.Month == 10)
{
reserved.OctFee = realGiveFee;
reserved.OctRatio = ratio;
}
else if (allot.Month == 11)
{
reserved.NovFee = realGiveFee;
reserved.NovRatio = ratio;
}
else if (allot.Month == 12)
{
reserved.DecFee = realGiveFee;
reserved.DecRatio = ratio;
}
}
///// <summary>
///// 二次绩效审核通过后修改绩效预留金额
///// </summary>
///// <param name="secondId"></param>
//public void SaveSecondReserved(int secondId)
//{
// var second = perforAgsecondallotRepository.GetEntity(t => t.Id == secondId);
// if (second == null)
// throw new PerformanceException("参数信息无效");
// var allot = perforPerallotRepository.GetEntity(t => t.ID == second.AllotId);
// if (allot == null)
// throw new PerformanceException("参数信息无效");
// var again = perforAgcomputeRepository.GetEntities(t => t.AllotId == allot.ID);
// if (again != null && again.Any())
// {
// var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allot.ID);
// var group = again.GroupBy(t => new { t.Department, t.JobNumber, t.PersonName })
// .Select(t => new ComputeResponse
// {
// UnitType = second.UnitType,
// AccountingUnit = t.Key.Department,
// JobNumber = t.Key.JobNumber,
// EmployeeName = t.Key.PersonName,
// RealGiveFee = t.Sum(g => g.RealGiveFee)
// });
// AddOrUpdate(allot, empDic, group);
// }
//}
///// <summary>
///// 绩效生成完成后修改绩效预留金额
///// </summary>
///// <param name="allot"></param>
//public void SaveReserved(per_allot allot, int hospitalId)
//{
// var mTypes = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString(), AccountUnitType.行政工勤.ToString() };
// var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
// if (hospital?.IsShowManage == 1)
// mTypes.AddRange(new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() });
// var resComputes = perforRescomputeRepository
// .GetEntities(t => t.AllotID == allot.ID && mTypes.Contains(t.AccountType) && (string.IsNullOrEmpty(t.NeedSecondAllot) || t.NeedSecondAllot == "否"))
// ?.OrderByDescending(t => t.AccountingUnit);
// if (resComputes != null && resComputes.Any())
// {
// var empDic = perforPeremployeeRepository.GetEntities(w => w.AllotId == allot.ID);
// var group = resComputes.GroupBy(t => new { t.UnitType, t.AccountingUnit, t.EmployeeName, t.JobNumber })
// .Select(t => new ComputeResponse
// {
// UnitType = t.Key.UnitType,
// AccountingUnit = t.Key.AccountingUnit,
// EmployeeName = t.Key.EmployeeName,
// JobNumber = t.Key.JobNumber,
// RealGiveFee = t.Sum(g => g.RealGiveFee)
// });
// AddOrUpdate(allot, empDic, group);
// }
//}
//private void AddOrUpdate(per_allot allot, List<per_employee> empDic, IEnumerable<ComputeResponse> group)
//{
// var reserveds = perforresreservedRepository.GetEntities(w => w.HospitalId == allot.HospitalId && w.Year == allot.Year);
// List<res_reserved> updates = new List<res_reserved>(), inserts = new List<res_reserved>();
// foreach (var item in group)
// {
// var ratio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
// var reserved = reserveds?.FirstOrDefault(w => w.AccountingUnit == item.AccountingUnit && w.JobNumber == item.JobNumber);
// if (reserved == null)
// {
// reserved = new res_reserved
// {
// UnitType = item.UnitType,
// HospitalId = allot.HospitalId,
// Year = allot.Year,
// AccountingUnit = item.AccountingUnit,
// JobNumber = item.JobNumber,
// EmployeeName = item.EmployeeName,
// };
// inserts.Add(reserved);
// }
// else
// updates.Add(reserved);
// ChangeRealGiveFee(reserved, allot, item.RealGiveFee ?? 0, ratio);
// }
// perforresreservedRepository.AddRange(inserts.ToArray());
// perforresreservedRepository.UpdateRange(updates.ToArray());
//}
///// <summary>
///// 修改绩效金额
///// </summary>
///// <param name="reserved"></param>
///// <param name="allot"></param>
///// <param name="realGiveFee"></param>
///// <param name="ratio"></param>
//private void ChangeRealGiveFee(res_reserved reserved, per_allot allot, decimal realGiveFee, decimal ratio)
//{
// if (allot.Month == 1)
// {
// reserved.JanFee = realGiveFee;
// reserved.JanRatio = ratio;
// }
// else if (allot.Month == 2)
// {
// reserved.FebFee = realGiveFee;
// reserved.FebRatio = ratio;
// }
// else if (allot.Month == 3)
// {
// reserved.MarFee = realGiveFee;
// reserved.MarRatio = ratio;
// }
// else if (allot.Month == 4)
// {
// reserved.AprFee = realGiveFee;
// reserved.AprRatio = ratio;
// }
// else if (allot.Month == 5)
// {
// reserved.MayFee = realGiveFee;
// reserved.MayRatio = ratio;
// }
// else if (allot.Month == 6)
// {
// reserved.JunFee = realGiveFee;
// reserved.JunRatio = ratio;
// }
// else if (allot.Month == 7)
// {
// reserved.JulFee = realGiveFee;
// reserved.JulRatio = ratio;
// }
// else if (allot.Month == 8)
// {
// reserved.AugFee = realGiveFee;
// reserved.AugRatio = ratio;
// }
// else if (allot.Month == 9)
// {
// reserved.SepFee = realGiveFee;
// reserved.SepRatio = ratio;
// }
// else if (allot.Month == 10)
// {
// reserved.OctFee = realGiveFee;
// reserved.OctRatio = ratio;
// }
// else if (allot.Month == 11)
// {
// reserved.NovFee = realGiveFee;
// reserved.NovRatio = ratio;
// }
// else if (allot.Month == 12)
// {
// reserved.DecFee = realGiveFee;
// reserved.DecRatio = ratio;
// }
//}
#endregion 预留金额
......
......@@ -26,7 +26,6 @@ public class AllotService : IAutoInjection
private ProcessComputService processComputService;
private ResultComputeService resultComputeService;
private PerforLogdbugRepository logdbug;
private readonly PerforResreservedRepository perforresreservedRepository;
private ConfigService configService;
private IHostingEnvironment _evn;
private ILogger<AllotService> _logger;
......@@ -44,6 +43,7 @@ public class AllotService : IAutoInjection
private readonly RoleService roleService;
private readonly UserService userService;
private PerforCofdirectorRepository perforCofdirectorRepository;
private readonly PerforReportRepository _reportRepository;
//private readonly IHubContext<AllotLogHub> hubContext;
private readonly LogManageService logManageService;
......@@ -51,7 +51,8 @@ public class AllotService : IAutoInjection
private readonly ReportService reportService;
private readonly QueryDataService queryDataService;
public AllotService(PerforPerallotRepository allotRepository,
public AllotService(
PerforPerallotRepository allotRepository,
BaiscNormService baiscNormService,
CheckDataService checkDataService,
ImportDataService importDataService,
......@@ -59,7 +60,6 @@ public class AllotService : IAutoInjection
ResultComputeService resultComputeService,
ConfigService configService,
PerforLogdbugRepository logdbug,
PerforResreservedRepository perforresreservedRepository,
IHostingEnvironment evn, ILogger<AllotService> logger,
IEmailService emailService,
IOptions<Application> options,
......@@ -77,6 +77,7 @@ public class AllotService : IAutoInjection
LogManageService logManageService,
ReportService reportService,
PerforCofdirectorRepository perforCofdirectorRepository,
PerforReportRepository reportRepository,
QueryDataService queryDataService)
{
_allotRepository = allotRepository;
......@@ -95,7 +96,6 @@ public class AllotService : IAutoInjection
_perforImEmployeeRepository = perforImEmployeeRepository;
this.configService = configService;
this.logdbug = logdbug;
this.perforresreservedRepository = perforresreservedRepository;
this.perforLogcheckRepository = perforLogcheckRepository;
this.perforHospitalRepository = perforHospitalRepository;
this.perforResbaiscnormRepository = perforResbaiscnormRepository;
......@@ -106,6 +106,7 @@ public class AllotService : IAutoInjection
this.logManageService = logManageService;
this.reportService = reportService;
this.perforCofdirectorRepository = perforCofdirectorRepository;
_reportRepository = reportRepository;
this.queryDataService = queryDataService;
}
......@@ -431,9 +432,9 @@ public void Generate(per_allot allot)
logManageService.WriteMsg("正在生成绩效", "保存绩效人均参考标准", 1, allot.ID, "ReceiveMessage", true);
perforResbaiscnormRepository.AddRange(baiscnormList.ToArray());
// 保存预留绩效
logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SaveReserved(allot, allot.HospitalId);
//// 保存预留绩效
//logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
//resultComputeService.SaveReserved(allot, allot.HospitalId);
// 科室下发
resultComputeService.GenerateSecondAllot(allot);
......@@ -625,7 +626,14 @@ public List<log_dbug> AllotLog(per_allot allot, int type)
return list;
}
public List<res_reserved> GetReserved(int hospitalId, int year, int userid)
/// <summary>
/// 获取医院预留绩效
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="year"></param>
/// <param name="userid"></param>
/// <returns></returns>
public List<EmployeeReservedDto> GetReserved(int hospitalId, int year, int userid)
{
var user = userService.GetUser(userid);
if (user == null)
......@@ -635,20 +643,18 @@ public List<res_reserved> GetReserved(int hospitalId, int year, int userid)
if (!role.HasValue)
throw new PerformanceException("用户信息错误");
var roleTypes = new[] { options.Value.NurseRole, options.Value.DirectorRole, options.Value.SpecialRole, options.Value.OfficeRole };
var reserveds = perforresreservedRepository.GetEntities(w => w.HospitalId == hospitalId && w.Year == year);
var reserveds = _reportRepository.GetEmployeeReserved(hospitalId, year);
if (reserveds != null && reserveds.Any())
{
if (role.Value == options.Value.NurseRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && w.UnitType.Contains(UnitType.护理组.ToString()) && w.AccountingUnit == user.Department)?.ToList();
reserveds = reserveds.Where(w => UnitTypeUtil.Is(w.UnitType, UnitType.护理组, UnitType.其他护理组) && w.AccountingUnit == user.Department)?.ToList();
else if (role.Value == options.Value.DirectorRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && (w.UnitType.Contains(UnitType.医生组.ToString()) || w.UnitType.Contains(UnitType.医技组.ToString())) && w.AccountingUnit == user.Department)?.ToList();
reserveds = reserveds.Where(w => UnitTypeUtil.Is(w.UnitType, UnitType.医生组, UnitType.其他医生组, UnitType.医技组, UnitType.其他医技组) && w.AccountingUnit == user.Department)?.ToList();
else if (role.Value == options.Value.SpecialRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && w.UnitType.Contains(UnitType.特殊核算组.ToString()) && w.AccountingUnit == user.Department)?.ToList();
reserveds = reserveds.Where(w => UnitTypeUtil.Is(w.UnitType, UnitType.特殊核算组) && w.AccountingUnit == user.Department)?.ToList();
else if (role.Value == options.Value.OfficeRole)
reserveds = reserveds.Where(w => !string.IsNullOrEmpty(w.UnitType) && (w.UnitType.Contains(UnitType.行政中层.ToString()) || w.UnitType.Contains(UnitType.行政后勤.ToString())) && w.AccountingUnit == user.Department)?.ToList();
reserveds = reserveds.Where(w => UnitTypeUtil.Is(w.UnitType, UnitType.行政中层, UnitType.行政后勤) && w.AccountingUnit == user.Department)?.ToList();
}
return reserveds;
......
......@@ -966,7 +966,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
return allot?.Select(t =>
{
var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle);
var comp = new ComputeResponse("一次绩效", t.AccountingUnit, t.EmployeeName, t.JobNumber, t.JobTitle??"");
comp.UnitType = t.AccountType;
comp.Adjust = t.Adjust;
comp.AdjustLaterOtherFee = t.AdjustLaterOtherFee;
......@@ -1029,7 +1029,7 @@ private List<ComputeResponse> GetSecondPerformance(int allotId)
.GroupBy(t => new { t.UnitType, t.Department, t.WorkPost, t.JobNumber, t.PersonName })
.Select(t =>
{
var comp = new ComputeResponse("二次绩效", t.Key.Department, t.Key.PersonName, t.Key.JobNumber, t.Key.WorkPost);
var comp = new ComputeResponse("二次绩效", t.Key.Department, t.Key.PersonName, t.Key.JobNumber, t.Key.WorkPost??"");
comp.UnitType = t.Key.UnitType;
comp.PerforSumFee = t.Sum(g => g.PerforSumFee);
comp.NightWorkPerfor = t.Sum(g => g.NightWorkPerfor);
......
......@@ -898,7 +898,7 @@ public void Copy(per_allot allot)
var index = list.IndexOf(list.First(t => t.ID == allot.ID));
// 先取上一个月的绩效Id,若没有取最后一个月的绩效Id,若都不存在则获取allotId为-1的数据
int allotId = index == list.Count - 1 ? list.First().ID : list[index - 1].ID;
int allotId = index + 1 < list.Count ? list[index + 1].ID : list.First().ID;
if (allotId == allot.ID) allotId = -1;
#region 弃用
......
......@@ -83,7 +83,7 @@ public SheetType GetSheetType(string sheetName)
return SheetType.Employee;
else if (sheetName.StartsWith("业务中层"))
return SheetType.ClinicEmployee;
else if (sheetName.StartsWith("行政后勤"))
else if (sheetName.StartsWith("行政后勤") || sheetName.StartsWith("行政后勤-"))
return SheetType.LogisticsEmployee;
else if (sheetName.StartsWith("1.0"))
return SheetType.OtherIncome;
......
......@@ -90,13 +90,16 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
var allot = _perallotRepository.GetEntity(t => t.ID == second.AllotId);
if (allot == null) throw new PerformanceException("绩效记录不存在!");
// 填报模板带出 行政工勤 绩效
var computes = _rescomputeRepository.GetEntities(w => w.AllotID == allot.ID && UnitTypeUtil.IsOffice(w.AccountType));
var loads = GetWorkLoads(allot.HospitalId, second.UnitType, second.Department);
var employees = _peremployeeRepository.GetEntities(w => w.AllotId == second.AllotId);
HandsonTableBase handson = GetHandsonTable(computeMode, loads);
// 先占位,更加选择加载指定范围数据
// 加载方式分 保存,上次,字典,测算表
var loadEmployees = LoadEmployees(allot, second, overrideMode, out bool isSave);
var loadEmployees = LoadEmployees(allot, second, employees, overrideMode, out bool isSave);
// 保存后则不再设置默认值
if (!isSave)
{
......@@ -106,6 +109,9 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
item.StaffCoefficient = item.StaffCoefficient ?? 1; // 人员系数
item.ActualAttendance = item.ActualAttendance ?? DateTime.DaysInMonth(allot.Year, allot.Month); // 出勤
item.TitleCoefficient = item.TitleCoefficient ?? 1; // 职称系数
// 填报模板带出 行政工勤 绩效
if (computeMode == ComputeMode.NotCalculate)
item.WorkPerformance = computes?.Where(w => w.AccountingUnit == second.Department && w.JobNumber?.Trim() == item.WorkNumber?.Trim())?.Sum(w => w.GiveFee) ?? 0;
}
}
//if (overrideMode == EmployeeSource.Workload) isSave = false;
......@@ -223,14 +229,28 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
maps.Add(new SecondColumnDictionary(label, item.Title, false, ++workloadSort, type: "Workload", color: $"workload_color{index}"));
}
}
// 多工作量加载
var status = (new int[] { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit });
// 已提交
if (second.Status.HasValue && status.Contains(second.Status.Value))
{
var headDynamic = _agworktypesourceRepository.GetEntities(t => t.SecondId == second.Id) ?? new List<ag_worktype_source>();
foreach (var item in headDynamic.OrderBy(t => t.Id))
{
maps.Add(new SecondColumnDictionary(item.FieldName, item.FieldId, true, 1, "Top"));
}
}
else
{
var workloadTypes = _agworkloadtypeRepository
.GetEntities(t => t.HospitalId == allot.HospitalId && t.Department == second.Department && t.UnitType == second.UnitType) ?? new List<ag_workload_type>();
foreach (var item in workloadTypes.OrderBy(t => t.Id))
{
maps.Add(new SecondColumnDictionary($"{item.TypeName}占比", $"Workload_Ratio_{item.Id}", true, 1, "Top"));
maps.Add(new SecondColumnDictionary($"{item.TypeName}金额", $"Workload_Amount_{item.Id}", true, 1, "Top"));
}
}
}
// 单项奖励
int singleAwardsSort = 400;
foreach (var item in loads.Where(w => w.Title.StartsWithIgnoreCase("SingleAwards_")))
......@@ -388,9 +408,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
/// <param name="mode"></param>
/// <param name="isSave">true 保存 false 未保存</param>
/// <returns></returns>
private List<ag_bodysource> LoadEmployees(per_allot allot, ag_secondallot second, EmployeeSource mode, out bool isSave)
private List<ag_bodysource> LoadEmployees(per_allot allot, ag_secondallot second, List<per_employee> employees, EmployeeSource mode, out bool isSave)
{
var employees = _peremployeeRepository.GetEntities(w => w.AllotId == second.AllotId);
isSave = false;
// 默认流程
if (new[] { EmployeeSource.Initial, EmployeeSource.Workload }.Contains(mode))
......@@ -446,18 +465,16 @@ List<ag_bodysource> LoadEmployeeByDictionary(ag_secondallot second, List<per_emp
List<ag_bodysource> loadDatas = new List<ag_bodysource>();
foreach (var personnelNumber in numbers)
{
var existEmp = employees.FirstOrDefault(w => w.PersonnelNumber?.Trim() == personnelNumber?.Trim());
if (existEmp == null)
continue;
var existEmp = employees?.FirstOrDefault(w => w.PersonnelNumber?.Trim() == personnelNumber?.Trim());
var data = new ag_bodysource
{
SecondId = second.Id,
Department = existEmp.AccountingUnit,
WorkNumber = existEmp.PersonnelNumber,
Name = existEmp.DoctorName,
JobTitle = existEmp.JobTitle,
ReservedRatio = existEmp.ReservedRatio,
Department = existEmp?.AccountingUnit ?? "",
WorkNumber = personnelNumber,
Name = existEmp?.DoctorName ?? "花名册无信息",
JobTitle = existEmp?.JobTitle ?? "",
ReservedRatio = existEmp?.ReservedRatio ?? 1,
Post = "",
};
// 带出上次 人员系数、职称系数
......@@ -1246,7 +1263,7 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
List<SecondComputeCheckResultDto> result = new List<SecondComputeCheckResultDto>();
var employees = _peremployeeRepository.GetEntities(w => w.AllotId == second.AllotId)
.Select(w => new { w.PersonnelNumber, w.DoctorName, w.AccountingUnit, w.UnitType, w.ReservedRatio });
?.Select(w => new { w.PersonnelNumber, w.DoctorName, w.AccountingUnit, w.UnitType, w.ReservedRatio });
var handsonTable = GetHandsonTable(computeMode, loads);
var fixat = new string[] { nameof(ag_bodysource.Id).ToLower(), nameof(ag_bodysource.SecondId).ToLower(), nameof(ag_bodysource.Department).ToLower() };
......@@ -1263,17 +1280,17 @@ public List<SecondComputeCheckResultDto> CheckData(ag_secondallot second, Comput
item.AddOrUpdate(nameof(ResponseType), ResponseType.Warning);
result.Add(new SecondComputeCheckResultDto(nameof(ResponseType.Error), "空", "空", $"第{(i + 1)}行,工号或姓名无效;请删除!"));
}
else if (!employees.Any(w => w.PersonnelNumber == number && w.DoctorName == name))
else if (employees == null || !employees.Any(w => w.PersonnelNumber == number && w.DoctorName == name))
{
item.AddOrUpdate(nameof(ResponseType), ResponseType.Error);
result.Add(new SecondComputeCheckResultDto(nameof(ResponseType.Error), number, name, $"第{(i + 1)}行,工号和姓名在字典中不存在,请修复!"));
}
else
{
var emp = employees.FirstOrDefault(w => w.PersonnelNumber == number && w.DoctorName == name);
var emp = employees?.FirstOrDefault(w => w.PersonnelNumber == number && w.DoctorName == name);
item.AddOrUpdate(nameof(ResponseType), ResponseType.OK);
item.AddOrUpdate(nameof(ag_bodysource.Department), emp.AccountingUnit);
item.AddOrUpdate(nameof(ag_bodysource.ReservedRatio), emp.ReservedRatio);
item.AddOrUpdate(nameof(ag_bodysource.Department), emp?.AccountingUnit ?? "");
item.AddOrUpdate(nameof(ag_bodysource.ReservedRatio), emp?.ReservedRatio ?? 0);
}
}
}
......@@ -1338,31 +1355,32 @@ public object RedistributionEmployee(SecondEmployeeDto request)
if (employees != null)
{
Func<per_employee, decimal?> getDistPerformance = (emp) => 0;
// 不计算模板时,带出工作量绩效(一次分配中的应发绩效)
if (request.ComputeMode == (int)ComputeMode.NotCalculate)
{
if (UnitTypeUtil.IsOffice(second.UnitType))
{
var distPerformance = _rescomputeRepository.GetEntities(t => t.AllotID == second.AllotId && employees.Select(s => s.PersonnelNumber).Contains(t.JobNumber));
getDistPerformance = (emp) =>
{
if (second.Department == emp.AccountingUnit)
return distPerformance?.Where(w => w.JobNumber?.Trim() == emp.PersonnelNumber?.Trim())?.Sum(w => w.GiveFee);
return 0;
};
}
}
//// 不计算模板时,带出工作量绩效(一次分配中的应发绩效)
//if (request.ComputeMode == (int)ComputeMode.NotCalculate)
//{
// if (UnitTypeUtil.IsOffice(second.UnitType))
// {
// // 填报模板带出 行政工勤 绩效
// var distPerformance = _rescomputeRepository.GetEntities(t => t.AllotID == second.AllotId && employees.Select(s => s.PersonnelNumber).Contains(t.JobNumber));
// getDistPerformance = (emp) =>
// {
// if (second.Department == emp.AccountingUnit)
// return distPerformance?.Where(w => w.JobNumber?.Trim() == emp.PersonnelNumber?.Trim())?.Sum(w => w.GiveFee) ?? 0;
// return 0;
// };
// }
//}
var secondWorkload = GetSecondWorkloadByValue(second.AllotId.Value, second.UnitType, second.Department);
var monthDays = DateTime.DaysInMonth(allot.Year, allot.Month);
foreach (var employee in employees)
{
Dictionary<string, object> item = new Dictionary<string, object>();
// 不计算模板时,带出工作量绩效(一次分配中的应发绩效)
if (request.ComputeMode == (int)ComputeMode.NotCalculate)
{
item.Add(nameof(ag_bodysource.WorkPerformance), getDistPerformance(employee));
}
//// 不计算模板时,带出工作量绩效(一次分配中的应发绩效)
//if (request.ComputeMode == (int)ComputeMode.NotCalculate)
//{
// item.Add(nameof(ag_bodysource.WorkPerformance), getDistPerformance(employee));
//}
item.Add(nameof(per_employee.UnitType), employee.UnitType);
item.Add(nameof(ag_bodysource.SecondId), request.SecondId);
......
......@@ -1615,7 +1615,7 @@ public bool AuditSubmit(ag_secondallot second, int userId)
bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
{
decimal floatValue = 0.1m;
decimal floatValue = 0m;
return Math.Abs((rightAmount ?? 0) - (leftAmount ?? 0)) <= floatValue;
}
......
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
......@@ -30,10 +31,16 @@ public static bool IsOffice(string unit)
/// 核算单元类型是否相同
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
public static bool IsEqualsUnitType(string left, string right)
{
return left?.Replace("行政后勤", "行政工勤") == right?.Replace("行政后勤", "行政工勤");
}
public static bool Is(string unit, params UnitType[] types)
{
return !string.IsNullOrEmpty(unit) && types.Any(w => IsEqualsUnitType(w.ToString(), unit));
}
}
}
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