Commit d1979dac by ruyun.zhang@suvalue.com

Merge branch 'feature/预留绩效' into develop

parents 17276664 93eed7af
...@@ -458,70 +458,8 @@ public ApiResponse Reserved([FromBody] ReservedRequest request) ...@@ -458,70 +458,8 @@ public ApiResponse Reserved([FromBody] ReservedRequest request)
return new ApiResponse(ResponseType.ParameterError, "绩效信息无效"); return new ApiResponse(ResponseType.ParameterError, "绩效信息无效");
var userid = _claim.GetUserId(); var userid = _claim.GetUserId();
var reserveds = _allotService.GetReserved(request.HospitalId, request.Year, userid); var reserveds = _allotService.GetReserved(request.HospitalId, request.Year, userid);
return new ApiResponse(ResponseType.OK, reserveds);
#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);
} }
/// <summary> /// <summary>
......
...@@ -384,10 +384,10 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request) ...@@ -384,10 +384,10 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
{ {
var userid = claimService.GetUserId(); var userid = claimService.GetUserId();
var result = secondAllotService.ConfirmAudit(userid, request); var result = secondAllotService.ConfirmAudit(userid, request);
if (request.IsPass == 1) //if (request.IsPass == 1)
{ //{
resultComputeService.SaveSecondReserved(request.SecondId); // resultComputeService.SaveSecondReserved(request.SecondId);
} //}
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败"); return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
} }
......
...@@ -3294,6 +3294,101 @@ ...@@ -3294,6 +3294,101 @@
药占比对应系数 药占比对应系数
</summary> </summary>
</member> </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"> <member name="P:Performance.DtoModels.GuaranteeResponse.AllotId">
<summary> <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) ...@@ -205,16 +205,16 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<report_performance_tags> report_performance_tags { get; set; } public virtual DbSet<report_performance_tags> report_performance_tags { get; set; }
/// <summary> 科室核算结果 </summary> /// <summary> 科室核算结果 </summary>
public virtual DbSet<res_account> res_account { get; set; } public virtual DbSet<res_account> res_account { get; set; }
/// <summary> 医生科室核算结果 </summary> ///// <summary> 医生科室核算结果 </summary>
public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; } //public virtual DbSet<res_accountdoctor> res_accountdoctor { get; set; }
/// <summary> 护理科室核算结果 </summary> ///// <summary> 护理科室核算结果 </summary>
public virtual DbSet<res_accountnurse> res_accountnurse { get; set; } //public virtual DbSet<res_accountnurse> res_accountnurse { get; set; }
/// <summary> 核算基础标准 </summary> /// <summary> 核算基础标准 </summary>
public virtual DbSet<res_baiscnorm> res_baiscnorm { get; set; } public virtual DbSet<res_baiscnorm> res_baiscnorm { get; set; }
/// <summary> </summary> /// <summary> </summary>
public virtual DbSet<res_compute> res_compute { get; set; } public virtual DbSet<res_compute> res_compute { get; set; }
/// <summary> </summary> ///// <summary> </summary>
public virtual DbSet<res_reserved> res_reserved { get; set; } //public virtual DbSet<res_reserved> res_reserved { get; set; }
/// <summary> </summary> /// <summary> </summary>
public virtual DbSet<res_specialunit> res_specialunit { get; set; } public virtual DbSet<res_specialunit> res_specialunit { get; set; }
/// <summary> 医院数据提取脚本 </summary> /// <summary> 医院数据提取脚本 </summary>
......
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs"> //// <copyright file=" res_accountdoctor.cs">
// * FileName: 医生科室核算结果.cs //// * FileName: 医生科室核算结果.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// 医生科室核算结果 // /// 医生科室核算结果
/// </summary> // /// </summary>
[Table("res_accountdoctor")] // [Table("res_accountdoctor")]
public class res_accountdoctor // public class res_accountdoctor
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int ID { get; set; } // public int ID { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> AllotID { get; set; } // public Nullable<int> AllotID { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> SheetID { get; set; } // public Nullable<int> SheetID { get; set; }
/// <summary> // /// <summary>
/// 核算单元 // /// 核算单元
/// </summary> // /// </summary>
public string AccountingUnit { get; set; } // public string AccountingUnit { get; set; }
/// <summary> // /// <summary>
/// 科室 // /// 科室
/// </summary> // /// </summary>
public string Department { get; set; } // public string Department { get; set; }
/// <summary> // /// <summary>
/// 科主任/护士长数量 // /// 科主任/护士长数量
/// </summary> // /// </summary>
public Nullable<int> ManagerNumber { get; set; } // public Nullable<int> ManagerNumber { get; set; }
/// <summary> // /// <summary>
/// 核算单元医生数量 // /// 核算单元医生数量
/// </summary> // /// </summary>
public Nullable<decimal> Number { get; set; } // public Nullable<decimal> Number { get; set; }
/// <summary> // /// <summary>
/// 医生基础系数 // /// 医生基础系数
/// </summary> // /// </summary>
public Nullable<decimal> BasicFactor { get; set; } // public Nullable<decimal> BasicFactor { get; set; }
/// <summary> // /// <summary>
/// 倾斜系数 // /// 倾斜系数
/// </summary> // /// </summary>
public Nullable<decimal> SlopeFactor { get; set; } // public Nullable<decimal> SlopeFactor { get; set; }
/// <summary> // /// <summary>
/// 其他绩效1 // /// 其他绩效1
/// </summary> // /// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; } // public Nullable<decimal> OtherPerfor1 { get; set; }
/// <summary> // /// <summary>
/// 其他绩效2 // /// 其他绩效2
/// </summary> // /// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; } // public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary> // /// <summary>
/// 医院奖罚 // /// 医院奖罚
/// </summary> // /// </summary>
public Nullable<decimal> Extra { get; set; } // public Nullable<decimal> Extra { get; set; }
/// <summary> // /// <summary>
/// 考核对分率 // /// 考核对分率
/// </summary> // /// </summary>
public Nullable<decimal> ScoringAverage { get; set; } // public Nullable<decimal> ScoringAverage { get; set; }
/// <summary> // /// <summary>
/// 调节系数 // /// 调节系数
/// </summary> // /// </summary>
public Nullable<decimal> AdjustFactor { get; set; } // public Nullable<decimal> AdjustFactor { get; set; }
/// <summary> // /// <summary>
/// 科室业绩 // /// 科室业绩
/// </summary> // /// </summary>
public Nullable<decimal> Income { get; set; } // public Nullable<decimal> Income { get; set; }
/// <summary> // /// <summary>
/// 业绩绩效 // /// 业绩绩效
/// </summary> // /// </summary>
public Nullable<decimal> PerforFee { get; set; } // public Nullable<decimal> PerforFee { get; set; }
/// <summary> // /// <summary>
/// 工作量绩效 // /// 工作量绩效
/// </summary> // /// </summary>
public Nullable<decimal> WorkloadFee { get; set; } // public Nullable<decimal> WorkloadFee { get; set; }
/// <summary> // /// <summary>
/// 绩效合计 // /// 绩效合计
/// </summary> // /// </summary>
public Nullable<decimal> PerforTotal { get; set; } // public Nullable<decimal> PerforTotal { get; set; }
/// <summary> // /// <summary>
/// 人均绩效 // /// 人均绩效
/// </summary> // /// </summary>
public Nullable<decimal> Avg { get; set; } // public Nullable<decimal> Avg { get; set; }
/// <summary> // /// <summary>
/// 实发绩效 // /// 实发绩效
/// </summary> // /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } // public Nullable<decimal> RealGiveFee { get; set; }
/// <summary> // /// <summary>
/// 变更日志 // /// 变更日志
/// </summary> // /// </summary>
public string ChangeLog { get; set; } // public string ChangeLog { get; set; }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs"> //// <copyright file=" res_accountnurse.cs">
// * FileName: 护理科室核算结果.cs //// * FileName: 护理科室核算结果.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// 护理科室核算结果 // /// 护理科室核算结果
/// </summary> // /// </summary>
[Table("res_accountnurse")] // [Table("res_accountnurse")]
public class res_accountnurse // public class res_accountnurse
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int ID { get; set; } // public int ID { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> AllotID { get; set; } // public Nullable<int> AllotID { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public Nullable<int> SheetID { get; set; } // public Nullable<int> SheetID { get; set; }
/// <summary> // /// <summary>
/// 核算单元 // /// 核算单元
/// </summary> // /// </summary>
public string AccountingUnit { get; set; } // public string AccountingUnit { get; set; }
/// <summary> // /// <summary>
/// 科室 // /// 科室
/// </summary> // /// </summary>
public string Department { get; set; } // public string Department { get; set; }
/// <summary> // /// <summary>
/// 科主任/护士长数量 // /// 科主任/护士长数量
/// </summary> // /// </summary>
public Nullable<int> ManagerNumber { get; set; } // public Nullable<int> ManagerNumber { get; set; }
/// <summary> // /// <summary>
/// 护士人数 // /// 护士人数
/// </summary> // /// </summary>
public Nullable<decimal> Number { get; set; } // public Nullable<decimal> Number { get; set; }
/// <summary> // /// <summary>
/// 护理基础系数 // /// 护理基础系数
/// </summary> // /// </summary>
public Nullable<decimal> BasicFactor { get; set; } // public Nullable<decimal> BasicFactor { get; set; }
/// <summary> // /// <summary>
/// 倾斜系数 // /// 倾斜系数
/// </summary> // /// </summary>
public Nullable<decimal> SlopeFactor { get; set; } // public Nullable<decimal> SlopeFactor { get; set; }
/// <summary> // /// <summary>
/// 其他绩效1 // /// 其他绩效1
/// </summary> // /// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; } // public Nullable<decimal> OtherPerfor1 { get; set; }
/// <summary> // /// <summary>
/// 其他绩效2 // /// 其他绩效2
/// </summary> // /// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; } // public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary> // /// <summary>
/// 医院奖罚 // /// 医院奖罚
/// </summary> // /// </summary>
public Nullable<decimal> Extra { get; set; } // public Nullable<decimal> Extra { get; set; }
/// <summary> // /// <summary>
/// 考核对分率 // /// 考核对分率
/// </summary> // /// </summary>
public Nullable<decimal> ScoringAverage { get; set; } // public Nullable<decimal> ScoringAverage { get; set; }
/// <summary> // /// <summary>
/// 调节系数 // /// 调节系数
/// </summary> // /// </summary>
public Nullable<decimal> AdjustFactor { get; set; } // public Nullable<decimal> AdjustFactor { get; set; }
/// <summary> // /// <summary>
/// 科室业绩 // /// 科室业绩
/// </summary> // /// </summary>
public Nullable<decimal> Income { get; set; } // public Nullable<decimal> Income { get; set; }
/// <summary> // /// <summary>
/// 业绩绩效 // /// 业绩绩效
/// </summary> // /// </summary>
public Nullable<decimal> PerforFee { get; set; } // public Nullable<decimal> PerforFee { get; set; }
/// <summary> // /// <summary>
/// 工作量绩效 // /// 工作量绩效
/// </summary> // /// </summary>
public Nullable<decimal> WorkloadFee { get; set; } // public Nullable<decimal> WorkloadFee { get; set; }
/// <summary> // /// <summary>
/// 绩效合计 // /// 绩效合计
/// </summary> // /// </summary>
public Nullable<decimal> PerforTotal { get; set; } // public Nullable<decimal> PerforTotal { get; set; }
/// <summary> // /// <summary>
/// 人均绩效 // /// 人均绩效
/// </summary> // /// </summary>
public Nullable<decimal> Avg { get; set; } // public Nullable<decimal> Avg { get; set; }
/// <summary> // /// <summary>
/// 实发绩效 // /// 实发绩效
/// </summary> // /// </summary>
public Nullable<decimal> RealGiveFee { get; set; } // public Nullable<decimal> RealGiveFee { get; set; }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" res_reserved.cs"> //// <copyright file=" res_reserved.cs">
// * FileName: .cs //// * FileName: .cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using System; //using System;
using System.ComponentModel.DataAnnotations; //using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; //using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels //namespace Performance.EntityModels
{ //{
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Table("res_reserved")] // [Table("res_reserved")]
public class res_reserved // public class res_reserved
{ // {
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
[Key] // [Key]
public int Id { get; set; } // public int Id { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public int HospitalId { get; set; } // public int HospitalId { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public int Year { get; set; } // public int Year { get; set; }
/// <summary> // /// <summary>
/// // ///
/// </summary> // /// </summary>
public string UnitType { get; set; } // public string UnitType { get; set; }
/// <summary> // /// <summary>
/// 核算单元 // /// 核算单元
/// </summary> // /// </summary>
public string AccountingUnit { get; set; } // public string AccountingUnit { get; set; }
/// <summary> // /// <summary>
/// 人员姓名 // /// 人员姓名
/// </summary> // /// </summary>
public string EmployeeName { get; set; } // public string EmployeeName { get; set; }
/// <summary> // /// <summary>
/// 工号 // /// 工号
/// </summary> // /// </summary>
public string JobNumber { get; set; } // public string JobNumber { get; set; }
/// <summary> // /// <summary>
/// 一月 // /// 一月
/// </summary> // /// </summary>
public Nullable<decimal> JanFee { get; set; } // public Nullable<decimal> JanFee { get; set; }
/// <summary> // /// <summary>
/// 一月 // /// 一月
/// </summary> // /// </summary>
public Nullable<decimal> JanRatio { get; set; } // public Nullable<decimal> JanRatio { get; set; }
/// <summary> // /// <summary>
/// 二月 // /// 二月
/// </summary> // /// </summary>
public Nullable<decimal> FebFee { get; set; } // public Nullable<decimal> FebFee { get; set; }
/// <summary> // /// <summary>
/// 二月 // /// 二月
/// </summary> // /// </summary>
public Nullable<decimal> FebRatio { get; set; } // public Nullable<decimal> FebRatio { get; set; }
/// <summary> // /// <summary>
/// 三月 // /// 三月
/// </summary> // /// </summary>
public Nullable<decimal> MarFee { get; set; } // public Nullable<decimal> MarFee { get; set; }
/// <summary> // /// <summary>
/// 三月 // /// 三月
/// </summary> // /// </summary>
public Nullable<decimal> MarRatio { get; set; } // public Nullable<decimal> MarRatio { get; set; }
/// <summary> // /// <summary>
/// 四月 // /// 四月
/// </summary> // /// </summary>
public Nullable<decimal> AprFee { get; set; } // public Nullable<decimal> AprFee { get; set; }
/// <summary> // /// <summary>
/// 四月 // /// 四月
/// </summary> // /// </summary>
public Nullable<decimal> AprRatio { get; set; } // public Nullable<decimal> AprRatio { get; set; }
/// <summary> // /// <summary>
/// 五月 // /// 五月
/// </summary> // /// </summary>
public Nullable<decimal> MayFee { get; set; } // public Nullable<decimal> MayFee { get; set; }
/// <summary> // /// <summary>
/// 五月 // /// 五月
/// </summary> // /// </summary>
public Nullable<decimal> MayRatio { get; set; } // public Nullable<decimal> MayRatio { get; set; }
/// <summary> // /// <summary>
/// 六月 // /// 六月
/// </summary> // /// </summary>
public Nullable<decimal> JunFee { get; set; } // public Nullable<decimal> JunFee { get; set; }
/// <summary> // /// <summary>
/// 六月 // /// 六月
/// </summary> // /// </summary>
public Nullable<decimal> JunRatio { get; set; } // public Nullable<decimal> JunRatio { get; set; }
/// <summary> // /// <summary>
/// 七月 // /// 七月
/// </summary> // /// </summary>
public Nullable<decimal> JulFee { get; set; } // public Nullable<decimal> JulFee { get; set; }
/// <summary> // /// <summary>
/// 七月 // /// 七月
/// </summary> // /// </summary>
public Nullable<decimal> JulRatio { get; set; } // public Nullable<decimal> JulRatio { get; set; }
/// <summary> // /// <summary>
/// 八月 // /// 八月
/// </summary> // /// </summary>
public Nullable<decimal> AugFee { get; set; } // public Nullable<decimal> AugFee { get; set; }
/// <summary> // /// <summary>
/// 八月 // /// 八月
/// </summary> // /// </summary>
public Nullable<decimal> AugRatio { get; set; } // public Nullable<decimal> AugRatio { get; set; }
/// <summary> // /// <summary>
/// 九月 // /// 九月
/// </summary> // /// </summary>
public Nullable<decimal> SepFee { get; set; } // public Nullable<decimal> SepFee { get; set; }
/// <summary> // /// <summary>
/// 九月 // /// 九月
/// </summary> // /// </summary>
public Nullable<decimal> SepRatio { get; set; } // public Nullable<decimal> SepRatio { get; set; }
/// <summary> // /// <summary>
/// 十月 // /// 十月
/// </summary> // /// </summary>
public Nullable<decimal> OctFee { get; set; } // public Nullable<decimal> OctFee { get; set; }
/// <summary> // /// <summary>
/// 十月 // /// 十月
/// </summary> // /// </summary>
public Nullable<decimal> OctRatio { get; set; } // public Nullable<decimal> OctRatio { get; set; }
/// <summary> // /// <summary>
/// 十一月 // /// 十一月
/// </summary> // /// </summary>
public Nullable<decimal> NovFee { get; set; } // public Nullable<decimal> NovFee { get; set; }
/// <summary> // /// <summary>
/// 十一月 // /// 十一月
/// </summary> // /// </summary>
public Nullable<decimal> NovRatio { get; set; } // public Nullable<decimal> NovRatio { get; set; }
/// <summary> // /// <summary>
/// 十二月 // /// 十二月
/// </summary> // /// </summary>
public Nullable<decimal> DecFee { get; set; } // public Nullable<decimal> DecFee { get; set; }
/// <summary> // /// <summary>
/// 十二月 // /// 十二月
/// </summary> // /// </summary>
public Nullable<decimal> DecRatio { get; set; } // public Nullable<decimal> DecRatio { get; set; }
} // }
} //}
...@@ -370,5 +370,17 @@ public List<PerReport> NurseAvg(ReportRequest request) ...@@ -370,5 +370,17 @@ public List<PerReport> NurseAvg(ReportRequest request)
return DapperQuery(sql, new { hospitalId = request.HospitalId }).ToList(); return DapperQuery(sql, new { hospitalId = request.HospitalId }).ToList();
} }
#endregion #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"> //// <copyright file=" res_accountdoctor.cs">
// * FileName: res_accountdoctor.cs //// * FileName: res_accountdoctor.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// res_accountdoctor Repository // /// res_accountdoctor Repository
/// </summary> // /// </summary>
public partial class PerforResaccountdoctorRepository : PerforRepository<res_accountdoctor> // public partial class PerforResaccountdoctorRepository : PerforRepository<res_accountdoctor>
{ // {
public PerforResaccountdoctorRepository(PerformanceDbContext context) : base(context) // public PerforResaccountdoctorRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" res_accountnurse.cs"> //// <copyright file=" res_accountnurse.cs">
// * FileName: res_accountnurse.cs //// * FileName: res_accountnurse.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// res_accountnurse Repository // /// res_accountnurse Repository
/// </summary> // /// </summary>
public partial class PerforResaccountnurseRepository : PerforRepository<res_accountnurse> // public partial class PerforResaccountnurseRepository : PerforRepository<res_accountnurse>
{ // {
public PerforResaccountnurseRepository(PerformanceDbContext context) : base(context) // public PerforResaccountnurseRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
// <copyright file=" res_reserved.cs"> //// <copyright file=" res_reserved.cs">
// * FileName: res_reserved.cs //// * FileName: res_reserved.cs
// </copyright> //// </copyright>
//----------------------------------------------------------------------- ////-----------------------------------------------------------------------
using Performance.EntityModels; //using Performance.EntityModels;
namespace Performance.Repository //namespace Performance.Repository
{ //{
/// <summary> // /// <summary>
/// res_reserved Repository // /// res_reserved Repository
/// </summary> // /// </summary>
public partial class PerforResreservedRepository : PerforRepository<res_reserved> // public partial class PerforResreservedRepository : PerforRepository<res_reserved>
{ // {
public PerforResreservedRepository(PerformanceDbContext context) : base(context) // public PerforResreservedRepository(PerformanceDbContext context) : base(context)
{ // {
} // }
} // }
} //}
...@@ -26,7 +26,6 @@ public class AllotService : IAutoInjection ...@@ -26,7 +26,6 @@ public class AllotService : IAutoInjection
private ProcessComputService processComputService; private ProcessComputService processComputService;
private ResultComputeService resultComputeService; private ResultComputeService resultComputeService;
private PerforLogdbugRepository logdbug; private PerforLogdbugRepository logdbug;
private readonly PerforResreservedRepository perforresreservedRepository;
private ConfigService configService; private ConfigService configService;
private IHostingEnvironment _evn; private IHostingEnvironment _evn;
private ILogger<AllotService> _logger; private ILogger<AllotService> _logger;
...@@ -44,6 +43,7 @@ public class AllotService : IAutoInjection ...@@ -44,6 +43,7 @@ public class AllotService : IAutoInjection
private readonly RoleService roleService; private readonly RoleService roleService;
private readonly UserService userService; private readonly UserService userService;
private PerforCofdirectorRepository perforCofdirectorRepository; private PerforCofdirectorRepository perforCofdirectorRepository;
private readonly PerforReportRepository _reportRepository;
//private readonly IHubContext<AllotLogHub> hubContext; //private readonly IHubContext<AllotLogHub> hubContext;
private readonly LogManageService logManageService; private readonly LogManageService logManageService;
...@@ -51,33 +51,34 @@ public class AllotService : IAutoInjection ...@@ -51,33 +51,34 @@ public class AllotService : IAutoInjection
private readonly ReportService reportService; private readonly ReportService reportService;
private readonly QueryDataService queryDataService; private readonly QueryDataService queryDataService;
public AllotService(PerforPerallotRepository allotRepository, public AllotService(
BaiscNormService baiscNormService, PerforPerallotRepository allotRepository,
CheckDataService checkDataService, BaiscNormService baiscNormService,
ImportDataService importDataService, CheckDataService checkDataService,
ProcessComputService processComputService, ImportDataService importDataService,
ResultComputeService resultComputeService, ProcessComputService processComputService,
ConfigService configService, ResultComputeService resultComputeService,
PerforLogdbugRepository logdbug, ConfigService configService,
PerforResreservedRepository perforresreservedRepository, PerforLogdbugRepository logdbug,
IHostingEnvironment evn, ILogger<AllotService> logger, IHostingEnvironment evn, ILogger<AllotService> logger,
IEmailService emailService, IEmailService emailService,
IOptions<Application> options, IOptions<Application> options,
ComputeDirector computeDirector, ComputeDirector computeDirector,
PerforRescomputeRepository perforRescomputeRepository, PerforRescomputeRepository perforRescomputeRepository,
PerforImemployeeRepository perforImEmployeeRepository, PerforImemployeeRepository perforImEmployeeRepository,
PerforPeragainallotRepository againallotRepository, PerforPeragainallotRepository againallotRepository,
PerforLogcheckRepository perforLogcheckRepository, PerforLogcheckRepository perforLogcheckRepository,
PerforHospitalRepository perforHospitalRepository, PerforHospitalRepository perforHospitalRepository,
PerforResbaiscnormRepository perforResbaiscnormRepository, PerforResbaiscnormRepository perforResbaiscnormRepository,
PerforHospitalconfigRepository perforHospitalconfigRepository, PerforHospitalconfigRepository perforHospitalconfigRepository,
//IHubContext<AllotLogHub> hubContext //IHubContext<AllotLogHub> hubContext
RoleService roleService, RoleService roleService,
UserService userService, UserService userService,
LogManageService logManageService, LogManageService logManageService,
ReportService reportService, ReportService reportService,
PerforCofdirectorRepository perforCofdirectorRepository, PerforCofdirectorRepository perforCofdirectorRepository,
QueryDataService queryDataService) PerforReportRepository reportRepository,
QueryDataService queryDataService)
{ {
_allotRepository = allotRepository; _allotRepository = allotRepository;
_againallotRepository = againallotRepository; _againallotRepository = againallotRepository;
...@@ -95,7 +96,6 @@ public class AllotService : IAutoInjection ...@@ -95,7 +96,6 @@ public class AllotService : IAutoInjection
_perforImEmployeeRepository = perforImEmployeeRepository; _perforImEmployeeRepository = perforImEmployeeRepository;
this.configService = configService; this.configService = configService;
this.logdbug = logdbug; this.logdbug = logdbug;
this.perforresreservedRepository = perforresreservedRepository;
this.perforLogcheckRepository = perforLogcheckRepository; this.perforLogcheckRepository = perforLogcheckRepository;
this.perforHospitalRepository = perforHospitalRepository; this.perforHospitalRepository = perforHospitalRepository;
this.perforResbaiscnormRepository = perforResbaiscnormRepository; this.perforResbaiscnormRepository = perforResbaiscnormRepository;
...@@ -106,6 +106,7 @@ public class AllotService : IAutoInjection ...@@ -106,6 +106,7 @@ public class AllotService : IAutoInjection
this.logManageService = logManageService; this.logManageService = logManageService;
this.reportService = reportService; this.reportService = reportService;
this.perforCofdirectorRepository = perforCofdirectorRepository; this.perforCofdirectorRepository = perforCofdirectorRepository;
_reportRepository = reportRepository;
this.queryDataService = queryDataService; this.queryDataService = queryDataService;
} }
...@@ -431,9 +432,9 @@ public void Generate(per_allot allot) ...@@ -431,9 +432,9 @@ public void Generate(per_allot allot)
logManageService.WriteMsg("正在生成绩效", "保存绩效人均参考标准", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存绩效人均参考标准", 1, allot.ID, "ReceiveMessage", true);
perforResbaiscnormRepository.AddRange(baiscnormList.ToArray()); perforResbaiscnormRepository.AddRange(baiscnormList.ToArray());
// 保存预留绩效 //// 保存预留绩效
logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SaveReserved(allot, allot.HospitalId); //resultComputeService.SaveReserved(allot, allot.HospitalId);
// 科室下发 // 科室下发
resultComputeService.GenerateSecondAllot(allot); resultComputeService.GenerateSecondAllot(allot);
...@@ -625,7 +626,14 @@ public List<log_dbug> AllotLog(per_allot allot, int type) ...@@ -625,7 +626,14 @@ public List<log_dbug> AllotLog(per_allot allot, int type)
return list; 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); var user = userService.GetUser(userid);
if (user == null) if (user == null)
...@@ -635,20 +643,18 @@ public List<res_reserved> GetReserved(int hospitalId, int year, int userid) ...@@ -635,20 +643,18 @@ public List<res_reserved> GetReserved(int hospitalId, int year, int userid)
if (!role.HasValue) if (!role.HasValue)
throw new PerformanceException("用户信息错误"); throw new PerformanceException("用户信息错误");
var roleTypes = new[] { options.Value.NurseRole, options.Value.DirectorRole, options.Value.SpecialRole, options.Value.OfficeRole }; var reserveds = _reportRepository.GetEmployeeReserved(hospitalId, year);
var reserveds = perforresreservedRepository.GetEntities(w => w.HospitalId == hospitalId && w.Year == year);
if (reserveds != null && reserveds.Any()) if (reserveds != null && reserveds.Any())
{ {
if (role.Value == options.Value.NurseRole) 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) 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) 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) 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; return reserveds;
......
using Performance.DtoModels; using Performance.DtoModels;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
namespace Performance.Services namespace Performance.Services
...@@ -30,10 +31,16 @@ public static bool IsOffice(string unit) ...@@ -30,10 +31,16 @@ public static bool IsOffice(string unit)
/// 核算单元类型是否相同 /// 核算单元类型是否相同
/// </summary> /// </summary>
/// <param name="left"></param> /// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns> /// <returns></returns>
public static bool IsEqualsUnitType(string left, string right) public static bool IsEqualsUnitType(string left, string right)
{ {
return left?.Replace("行政后勤", "行政工勤") == right?.Replace("行政后勤", "行政工勤"); 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