Commit 91ced9f1 by 钟博

Merge branch 'feature/个人绩效查询' into feature/个人账号登陆查询绩效

parents 87d8d98c 3cb09656
...@@ -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>
...@@ -555,5 +493,18 @@ public IActionResult DownloadCurrentCalculationTable(int allotid) ...@@ -555,5 +493,18 @@ public IActionResult DownloadCurrentCalculationTable(int allotid)
var memi = provider.Mappings[".xlsx"]; var memi = provider.Mappings[".xlsx"];
return File(memoryStream, memi, Path.GetFileName(fileInfo.Name)); return File(memoryStream, memi, Path.GetFileName(fileInfo.Name));
} }
/// <summary>
/// 查询个人绩效
/// </summary>
/// <returns></returns>
[Route("owner/query")]
[HttpGet]
public ApiResponse GetOwnerPerformance()
{
var userid = _claim.GetUserId();
var res = _allotService.GetOwnerPerformance(userid);
return new ApiResponse(ResponseType.OK, res);
}
} }
} }
...@@ -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, "操作失败");
} }
......
...@@ -308,6 +308,12 @@ ...@@ -308,6 +308,12 @@
<param name="allotid"></param> <param name="allotid"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.AllotController.GetOwnerPerformance">
<summary>
查询个人绩效
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.BudgetController.Query(Performance.DtoModels.Request.BudgetRequest)"> <member name="M:Performance.Api.Controllers.BudgetController.Query(Performance.DtoModels.Request.BudgetRequest)">
<summary> <summary>
预算管理查询(包含金额、占比) 预算管理查询(包含金额、占比)
......
...@@ -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>
...@@ -3379,6 +3474,26 @@ ...@@ -3379,6 +3474,26 @@
菜单状态 1 启用 2禁用 菜单状态 1 启用 2禁用
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.OwnerPerformanceDto.ShouldGiveFee">
<summary>
应发绩效
</summary>
</member>
<member name="P:Performance.DtoModels.OwnerPerformanceDto.ReservedRatio">
<summary>
预留比例
</summary>
</member>
<member name="P:Performance.DtoModels.OwnerPerformanceDto.ReservedRatioFee">
<summary>
预留金额
</summary>
</member>
<member name="P:Performance.DtoModels.OwnerPerformanceDto.RealGiveFee">
<summary>
实发绩效
</summary>
</member>
<member name="P:Performance.DtoModels.PerEmployeeResponse.WorkTime"> <member name="P:Performance.DtoModels.PerEmployeeResponse.WorkTime">
<summary> <summary>
参加工作时间 参加工作时间
......
...@@ -244,6 +244,9 @@ public AutoMapperConfigs() ...@@ -244,6 +244,9 @@ public AutoMapperConfigs()
CreateMap<ag_headsource, SecPrintHeaderResponse>() CreateMap<ag_headsource, SecPrintHeaderResponse>()
.ForMember(dest => dest.TheTotalAllocationOfPerformanceResults, opt => opt.MapFrom(src => src.TotalDeptReward)) .ForMember(dest => dest.TheTotalAllocationOfPerformanceResults, opt => opt.MapFrom(src => src.TotalDeptReward))
.ReverseMap(); .ReverseMap();
CreateMap<view_allot_result, OwnerPerformanceDto>()
.ReverseMap();
} }
} }
} }
...@@ -114,4 +114,20 @@ public enum DataFormat ...@@ -114,4 +114,20 @@ public enum DataFormat
/// <summary> 日期 </summary> /// <summary> 日期 </summary>
日期 日期
} }
public enum Role
{
绩效管理员 = 1,
医院管理员 = 2,
护士长 = 3,
科主任 = 4,
绩效核算办 = 5,
院领导 = 6,
财务科 = 7,
人事科 = 8,
特殊科室 = 9,
行政科室 = 10,
数据收集 = 11,
绩效查询 = 12,
}
} }
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; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class OwnerPerformanceDto : view_allot_result
{
public IEnumerable<OwnerPerformanceDto> Detail { get; set; }
/// <summary>
/// 应发绩效
/// </summary>
public decimal? ShouldGiveFee { get; set; }
/// <summary>
/// 预留比例
/// </summary>
public decimal? ReservedRatio { get; set; }
/// <summary>
/// 预留金额
/// </summary>
public decimal? ReservedRatioFee { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal RealGiveFee { 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; }
} // }
} //}
namespace Performance.DtoModels
{
public class view_allot_result
{
public int HospitalID { get; set; }
public int Year { get; set; }
public int Month { get; set; }
/// <summary>
/// 来源
/// </summary>
public string Source { get; set; }
public int AllotId { get; set; }
public int? SecondId { get; set; }
public string UnitType { get; set; }
public string AccountingUnit { get; set; }
public int? IsShowManage { get; set; }
public string EmployeeName { get; set; }
public string JobNumber { get; set; }
public string JobTitle { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public decimal? PerforSumFee { get; set; }
/// <summary>
/// 管理绩效
/// </summary>
public decimal? PerforManagementFee { get; set; }
/// <summary>
/// 夜班绩效
/// </summary>
public decimal? NightWorkPerfor { get; set; }
/// <summary>
/// 调节后其他绩效
/// </summary>
public decimal? AdjustLaterOtherFee { get; set; }
/// <summary>
/// 医院其他绩效
/// </summary>
public decimal? OtherPerfor { get; set; }
/// <summary>
/// 不公示其他绩效
/// </summary>
public decimal? HideOtherPerfor { get; set; }
public decimal? RealPerformance { get; set; }
}
}
using Performance.DtoModels; using Performance.DtoModels;
using Performance.EntityModels; using Performance.EntityModels;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -370,5 +371,23 @@ public List<PerReport> NurseAvg(ReportRequest request) ...@@ -370,5 +371,23 @@ 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();
}
public List<view_allot_result> GetOwnerPerformance(List<int> hospitalId, string jobNumber)
{
string sql = "SELECT * FROM view_allot_result WHERE HospitalID IN @HospitalID AND JobNumber=@JobNumber";
return DapperQuery<view_allot_result>(sql, new { HospitalID = hospitalId, JobNumber = jobNumber })?.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)
{ // {
} // }
} // }
} //}
...@@ -898,7 +898,7 @@ public void Copy(per_allot allot) ...@@ -898,7 +898,7 @@ public void Copy(per_allot allot)
var index = list.IndexOf(list.First(t => t.ID == allot.ID)); var index = list.IndexOf(list.First(t => t.ID == allot.ID));
// 先取上一个月的绩效Id,若没有取最后一个月的绩效Id,若都不存在则获取allotId为-1的数据 // 先取上一个月的绩效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; if (allotId == allot.ID) allotId = -1;
#region 弃用 #region 弃用
......
...@@ -17,7 +17,7 @@ public class PerSheetService : IAutoInjection ...@@ -17,7 +17,7 @@ public class PerSheetService : IAutoInjection
//private PerforCofdrugpropRepository _perforCofdrugpropRepository; //private PerforCofdrugpropRepository _perforCofdrugpropRepository;
private PerforCofdrugtypeRepository _perforCofdrugtypeRepository; private PerforCofdrugtypeRepository _perforCofdrugtypeRepository;
public PerSheetService(PerHeaderService perHeader, public PerSheetService(PerHeaderService perHeader,
//PerforCofdrugpropRepository perforCofdrugpropRepository, //PerforCofdrugpropRepository perforCofdrugpropRepository,
PerforCofdrugtypeRepository perforCofdrugtypeRepository) PerforCofdrugtypeRepository perforCofdrugtypeRepository)
{ {
_perHeader = perHeader; _perHeader = perHeader;
...@@ -83,7 +83,7 @@ public SheetType GetSheetType(string sheetName) ...@@ -83,7 +83,7 @@ public SheetType GetSheetType(string sheetName)
return SheetType.Employee; return SheetType.Employee;
else if (sheetName.StartsWith("业务中层")) else if (sheetName.StartsWith("业务中层"))
return SheetType.ClinicEmployee; return SheetType.ClinicEmployee;
else if (sheetName.StartsWith("行政后勤")) else if (sheetName.StartsWith("行政后勤") || sheetName.StartsWith("行政后勤-"))
return SheetType.LogisticsEmployee; return SheetType.LogisticsEmployee;
else if (sheetName.StartsWith("1.0")) else if (sheetName.StartsWith("1.0"))
return SheetType.OtherIncome; return SheetType.OtherIncome;
......
...@@ -1615,7 +1615,7 @@ public bool AuditSubmit(ag_secondallot second, int userId) ...@@ -1615,7 +1615,7 @@ public bool AuditSubmit(ag_secondallot second, int userId)
bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
{ {
decimal floatValue = 0.1m; decimal floatValue = 0m;
return Math.Abs((rightAmount ?? 0) - (leftAmount ?? 0)) <= floatValue; return Math.Abs((rightAmount ?? 0) - (leftAmount ?? 0)) <= floatValue;
} }
......
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));
}
} }
} }
...@@ -129,6 +129,14 @@ public sys_role GetUserFirstRole(int userId) ...@@ -129,6 +129,14 @@ public sys_role GetUserFirstRole(int userId)
return role; return role;
} }
public List<int> GetUserHospital(int userId)
{
var userHospital = _userhospitalRepository.GetEntities(t => t.UserID == userId);
if (userHospital != null && userHospital.Any(w => w.HospitalID.HasValue))
return userHospital.Where(w => w.HospitalID.HasValue).Select(w => w.HospitalID.Value).ToList();
return new List<int>();
}
/// <summary> /// <summary>
/// 查询用户列表 /// 查询用户列表
/// </summary> /// </summary>
......
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