Commit c96be038 by 799284587@qq.com

绩效科室绩效大动版,修改了很多,需详细测试

parent 2f1759de
......@@ -81,29 +81,29 @@ public AutoMapperConfigs()
CreateMap<PerDataEmployee, im_employee>();
CreateMap<im_employee, PerDataEmployee>();
CreateMap<PerDataAccountBaisc, PerDataAccountDoctor>()
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.Number))
.ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.BasicFactor))
.ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
.ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1))
.ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2))
.ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.Extra))
.ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage))
.ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor));
CreateMap<PerDataAccountBaisc, PerDataAccount>()
.ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
.ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
.ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.Number))
.ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.BasicFactor))
.ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
.ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1))
.ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2))
.ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.Extra))
.ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage))
.ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor));
//CreateMap<PerDataAccountBaisc, PerDataAccount>()
// .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
// .ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
// .ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.Number))
// .ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.BasicFactor))
// .ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
// .ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1))
// .ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2))
// .ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.Extra))
// .ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage))
// .ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor));
//CreateMap<PerDataAccountBaisc, PerDataAccount>()
// .ForMember(dest => dest.AccountingUnit, opt => opt.MapFrom(src => src.AccountingUnit))
// .ForMember(dest => dest.Department, opt => opt.MapFrom(src => src.Department))
// .ForMember(dest => dest.Number, opt => opt.MapFrom(src => src.Number))
// .ForMember(dest => dest.BasicFactor, opt => opt.MapFrom(src => src.BasicFactor))
// .ForMember(dest => dest.SlopeFactor, opt => opt.MapFrom(src => src.SlopeFactor))
// .ForMember(dest => dest.OtherPerfor1, opt => opt.MapFrom(src => src.OtherPerfor1))
// .ForMember(dest => dest.OtherPerfor2, opt => opt.MapFrom(src => src.OtherPerfor2))
// .ForMember(dest => dest.Extra, opt => opt.MapFrom(src => src.Extra))
// .ForMember(dest => dest.ScoringAverage, opt => opt.MapFrom(src => src.ScoringAverage))
// .ForMember(dest => dest.AdjustFactor, opt => opt.MapFrom(src => src.AdjustFactor));
//CreateMap<PerDataAccountBaisc, im_accountbasic>();
//CreateMap<im_accountbasic, PerDataAccountBaisc>();
......@@ -143,18 +143,20 @@ public AutoMapperConfigs()
.ForMember(dest => dest.Grant, opt => opt.MapFrom(src => src.DoctorGrant));
CreateMap<PerDataSpecialUnit, im_specialunit>();
CreateMap<PerDataAccountDoctor, res_accountdoctor>();
CreateMap<res_accountdoctor, PerDataAccount>();
CreateMap<PerDataAccountNurse, res_accountnurse>();
CreateMap<res_accountnurse, PerDataAccount>();
CreateMap<res_accountdoctor, ComputeSource>();
CreateMap<res_accountnurse, ComputeSource>();
//CreateMap<PerDataAccountDoctor, res_accountdoctor>();
//CreateMap<PerDataAccountNurse, res_accountnurse>();
//CreateMap<res_accountdoctor, PerDataAccountBaisc>();
CreateMap<res_account, PerDataAccountBaisc>();
CreateMap<PerDataAccountBaisc, res_account>();
//CreateMap<PerDataAccountBaisc, res_accountnurse>();
//CreateMap<res_accountdoctor, ComputeSource>();
//CreateMap<res_accountnurse, ComputeSource>();
CreateMap<im_employee, ComputeEmployee>();
CreateMap<ComputeResult, res_compute>();
CreateMap<res_accountdoctor, DoctorResponse>();
CreateMap<res_accountnurse, NurseResponse>();
CreateMap<res_account, DoctorResponse>();
CreateMap<res_account, NurseResponse>();
//二次绩效
......
using System;
using System.Collections.Generic;
using System.Text;
//using System;
//using System.Collections.Generic;
//using System.Text;
namespace Performance.DtoModels
{
public class ComputeSource
{
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
//namespace Performance.DtoModels
//{
// public class ComputeSource
// {
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
/// <summary>
/// 核算单元医生数量
/// </summary>
public Nullable<decimal> Number { get; set; }
// /// <summary>
// /// 核算单元医生数量
// /// </summary>
// public Nullable<decimal> Number { get; set; }
/// <summary>
/// 医生基础系数
/// </summary>
public Nullable<decimal> BasicFactor { get; set; }
// /// <summary>
// /// 医生基础系数
// /// </summary>
// public Nullable<decimal> BasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public Nullable<decimal> SlopeFactor { get; set; }
// /// <summary>
// /// 倾斜系数
// /// </summary>
// public Nullable<decimal> SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public Nullable<decimal> OtherPerfor1 { get; set; }
// /// <summary>
// /// 其他绩效1
// /// </summary>
// public Nullable<decimal> OtherPerfor1 { get; set; }
/// <summary>
/// 其他绩效2
/// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; }
// /// <summary>
// /// 其他绩效2
// /// </summary>
// public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public Nullable<decimal> Extra { get; set; }
// /// <summary>
// /// 医院奖罚
// /// </summary>
// public Nullable<decimal> Extra { get; set; }
/// <summary>
/// 考核对分率
/// </summary>
public Nullable<decimal> ScoringAverage { get; set; }
// /// <summary>
// /// 考核对分率
// /// </summary>
// public Nullable<decimal> ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public Nullable<decimal> AdjustFactor { get; set; }
// /// <summary>
// /// 调节系数
// /// </summary>
// public Nullable<decimal> AdjustFactor { get; set; }
/// <summary>
/// 科室业绩
/// </summary>
public Nullable<decimal> Income { get; set; }
// /// <summary>
// /// 科室业绩
// /// </summary>
// public Nullable<decimal> Income { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public Nullable<decimal> PerforFee { get; set; }
// /// <summary>
// /// 业绩绩效
// /// </summary>
// public Nullable<decimal> PerforFee { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public Nullable<decimal> WorkloadFee { get; set; }
// /// <summary>
// /// 工作量绩效
// /// </summary>
// public Nullable<decimal> WorkloadFee { get; set; }
/// <summary>
/// 绩效合计
/// </summary>
public Nullable<decimal> PerforTotal { get; set; }
// /// <summary>
// /// 绩效合计
// /// </summary>
// public Nullable<decimal> PerforTotal { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public Nullable<decimal> Avg { get; set; }
// /// <summary>
// /// 人均绩效
// /// </summary>
// public Nullable<decimal> Avg { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public Nullable<decimal> GiveFee { get; set; }
}
}
// /// <summary>
// /// 实发绩效
// /// </summary>
// public Nullable<decimal> GiveFee { get; set; }
// }
//}
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class PerDataAccount : IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
/// <summary>
/// 科室
/// </summary>
public string Department { 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; }
}
}
//using System;
//using System.Collections.Generic;
//using System.Text;
//namespace Performance.DtoModels
//{
// public class PerDataAccount : IPerData
// {
// public int UnitType;
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
// /// <summary>
// /// 科室
// /// </summary>
// public string Department { 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; }
// }
//}
......@@ -6,6 +6,17 @@ namespace Performance.DtoModels
{
public class PerDataAccountBaisc : IPerData
{
/// <summary>
/// 行号
/// </summary>
public int RowNumber { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
#region EXCEL读取
/// <summary>
/// 核算单元类别 1 医生组 2护理组 3医技组
......@@ -61,29 +72,61 @@ public class PerDataAccountBaisc : IPerData
/// 考核对分率
/// </summary>
public decimal ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public decimal AdjustFactor { get; set; }
/// <summary>
/// 行号
/// </summary>
public int RowNumber { get; set; }
/// <summary>
/// 规模绩效系数
/// </summary>
public Nullable<decimal> Scale { get; set; }
public decimal Scale { get; set; }
/// <summary>
/// 效率绩效系数
/// </summary>
public Nullable<decimal> Effic { get; set; }
public decimal Effic { get; set; }
/// <summary>
/// 发放系数
/// </summary>
public Nullable<decimal> Grant { get; set; }
public decimal Grant { get; set; }
#endregion
#region 由计算得出
/// <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; }
#endregion
}
}
using System;
using System.Collections.Generic;
using System.Text;
//using System;
//using System.Collections.Generic;
//using System.Text;
namespace Performance.DtoModels
{
public class PerDataAccountDoctor : IPerData
{
public int UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
//namespace Performance.DtoModels
//{
// public class PerDataAccountDoctor : IPerData
// {
// public int UnitType { get; set; }
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
// /// <summary>
// /// 科室名称
// /// </summary>
// public string Department { get; set; }
/// <summary>
/// 核算单元医生数量
/// </summary>
public decimal Number { get; set; }
// /// <summary>
// /// 核算单元医生数量
// /// </summary>
// public decimal Number { get; set; }
/// <summary>
/// 医生基础系数
/// </summary>
public decimal BasicFactor { get; set; }
// /// <summary>
// /// 医生基础系数
// /// </summary>
// public decimal BasicFactor { get; set; }
/// <summary>
/// 倾斜系数
/// </summary>
public decimal SlopeFactor { get; set; }
// /// <summary>
// /// 倾斜系数
// /// </summary>
// public decimal SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public decimal OtherPerfor1 { get; set; }
// /// <summary>
// /// 其他绩效1
// /// </summary>
// public decimal OtherPerfor1 { get; set; }
/// <summary>
/// 其他绩效2
/// </summary>
public decimal OtherPerfor2 { get; set; }
// /// <summary>
// /// 其他绩效2
// /// </summary>
// public decimal OtherPerfor2 { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public decimal Extra { get; set; }
// /// <summary>
// /// 医院奖罚
// /// </summary>
// public decimal Extra { get; set; }
/// <summary>
/// 考核对分率
/// </summary>
public decimal ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public decimal AdjustFactor { get; set; }
// /// <summary>
// /// 考核对分率
// /// </summary>
// public decimal ScoringAverage { get; set; }
// /// <summary>
// /// 调节系数
// /// </summary>
// public decimal AdjustFactor { get; set; }
/// <summary>
/// 科室业绩
/// </summary>
public decimal Income { get; set; }
// /// <summary>
// /// 科室业绩
// /// </summary>
// public decimal Income { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public decimal WorkloadFee { get; set; }
// /// <summary>
// /// 工作量绩效
// /// </summary>
// public decimal WorkloadFee { get; set; }
/// <summary>
/// 绩效合计
/// </summary>
public decimal PerforTotal { get; set; }
// /// <summary>
// /// 绩效合计
// /// </summary>
// public decimal PerforTotal { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public decimal PerforFee { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal RealGiveFee { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public decimal Avg { get; set; }
}
}
// /// <summary>
// /// 业绩绩效
// /// </summary>
// public decimal PerforFee { get; set; }
// /// <summary>
// /// 实发绩效
// /// </summary>
// public decimal RealGiveFee { get; set; }
// /// <summary>
// /// 人均绩效
// /// </summary>
// public decimal Avg { get; set; }
// }
//}
using System;
using System.Collections.Generic;
using System.Text;
//using System;
//using System.Collections.Generic;
//using System.Text;
namespace Performance.DtoModels
{
public class PerDataAccountNurse : IPerData
{
public int UnitType { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
//namespace Performance.DtoModels
//{
// public class PerDataAccountNurse : IPerData
// {
// public int UnitType { get; set; }
// /// <summary>
// /// 核算单元
// /// </summary>
// public string AccountingUnit { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string Department { get; set; }
// /// <summary>
// /// 科室名称
// /// </summary>
// public string Department { get; set; }
/// <summary>
/// 核算单元护士数量
/// </summary>
public decimal Number { get; set; }
// /// <summary>
// /// 核算单元护士数量
// /// </summary>
// public decimal Number { get; set; }
/// <summary>
/// 护理基础系数
/// </summary>
public decimal BasicFactor { get; set; }
// /// <summary>
// /// 护理基础系数
// /// </summary>
// public decimal BasicFactor { get; set; }
/// <summary>
/// 护理倾斜系数
/// </summary>
public decimal SlopeFactor { get; set; }
// /// <summary>
// /// 护理倾斜系数
// /// </summary>
// public decimal SlopeFactor { get; set; }
/// <summary>
/// 其他绩效1
/// </summary>
public decimal OtherPerfor1 { get; set; }
// /// <summary>
// /// 其他绩效1
// /// </summary>
// public decimal OtherPerfor1 { get; set; }
/// <summary>
/// 其他绩效2
/// </summary>
public decimal OtherPerfor2 { get; set; }
// /// <summary>
// /// 其他绩效2
// /// </summary>
// public decimal OtherPerfor2 { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public decimal Extra { get; set; }
// /// <summary>
// /// 医院奖罚
// /// </summary>
// public decimal Extra { get; set; }
/// <summary>
/// 考核对分率
/// </summary>
public decimal ScoringAverage { get; set; }
/// <summary>
/// 调节系数
/// </summary>
public decimal AdjustFactor { get; set; }
// /// <summary>
// /// 考核对分率
// /// </summary>
// public decimal ScoringAverage { get; set; }
// /// <summary>
// /// 调节系数
// /// </summary>
// public decimal AdjustFactor { get; set; }
/// <summary>
/// 科室业绩
/// </summary>
public decimal Income { get; set; }
// /// <summary>
// /// 科室业绩
// /// </summary>
// public decimal Income { get; set; }
/// <summary>
/// 工作量绩效
/// </summary>
public decimal WorkloadFee { get; set; }
// /// <summary>
// /// 工作量绩效
// /// </summary>
// public decimal WorkloadFee { get; set; }
/// <summary>
/// 绩效合计
/// </summary>
public decimal PerforTotal { get; set; }
// /// <summary>
// /// 绩效合计
// /// </summary>
// public decimal PerforTotal { get; set; }
/// <summary>
/// 业绩绩效
/// </summary>
public decimal PerforFee { get; set; }
/// <summary>
/// 实发绩效
/// </summary>
public decimal RealGiveFee { get; set; }
// /// <summary>
// /// 业绩绩效
// /// </summary>
// public decimal PerforFee { get; set; }
// /// <summary>
// /// 实发绩效
// /// </summary>
// public decimal RealGiveFee { get; set; }
/// <summary>
/// 人均绩效
/// </summary>
public decimal Avg { get; set; }
}
}
// /// <summary>
// /// 人均绩效
// /// </summary>
// public decimal Avg { get; set; }
// }
//}
......@@ -6,7 +6,7 @@ namespace Performance.DtoModels
{
public class DeptDetailResponse
{
public PerDataAccount Pandect { get; set; }
public PerDataAccountBaisc Pandect { get; set; }
public List<DeptDetail> Economic { get; set; }
public List<DeptDetail> Workload { get; set; }
}
......
......@@ -78,10 +78,12 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<per_first> per_first { get; set; }
/// <summary> 上传数据解析 <summary>
public virtual DbSet<per_sheet> per_sheet { 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; }
// 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>
......
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// <copyright file=" mod_module.cs">
// * FileName: .cs
// </copyright>
......@@ -45,5 +45,15 @@ public class mod_module
/// 提取脚本ID
/// </summary>
public Nullable<int> ExtractId { get; set; }
/// <summary>
/// 只读 0、否 1、是
/// </summary>
public Nullable<int> ReadOnly { get; set; }
/// <summary>
/// 是否生成Item 0、否 1、是
/// </summary>
public Nullable<int> IsGenerated { get; set; }
}
}
//-----------------------------------------------------------------------
// <copyright file=" res_account.cs">
// * FileName: 科室核算结果.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Performance.EntityModels
{
/// <summary>
/// 科室核算结果
/// </summary>
[Table("res_account")]
public class res_account
{
/// <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>
/// 核算单元类型 1 医生组 2 护理组 3 医技组
/// </summary>
public Nullable<int> UnitType { 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 Remark { 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<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<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=" im_data.cs">
// * FileName: im_data.cs
// </copyright>
//-----------------------------------------------------------------------
using Performance.EntityModels;
using System;
using System.Collections.Generic;
namespace Performance.Repository
{
/// <summary>
/// im_data Repository
/// </summary>
public partial class PerforImdataRepository : PerforRepository<im_data>
{
/// <summary>
/// 获取核算单元
/// </summary>
/// <param name="deptList">科室列表</param>
/// <param name="hospitalid">医院id</param>
/// <param name="sheetType">sheet模板类型</param>
/// <returns></returns>
public IEnumerable<im_data> GetAccountingUnit(int hospitalid, int sheettype, List<string> deptList)
{
string sql = "select distinct im.accountingUnit,im.department,im.unittype from im_data im " +
"inner join per_allot allot on im.AllotID = allot.ID " +
"inner join per_sheet sheet on im.SheetID = sheet.ID " +
"where allot.hospitalid = @hospitalid and sheet.sheettype = @sheettype and im.department in @deptList";
return DapperQuery(sql, new { hospitalid, sheettype, deptList }, 1000 * 60 * 5);
}
}
}
......@@ -4,7 +4,6 @@
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using Performance.EntityModels;
namespace Performance.Repository
......@@ -17,21 +16,5 @@ public partial class PerforImdataRepository : PerforRepository<im_data>
public PerforImdataRepository(PerformanceDbContext context) : base(context)
{
}
/// <summary>
/// 获取核算单元
/// </summary>
/// <param name="deptList">科室列表</param>
/// <param name="hospitalid">医院id</param>
/// <param name="sheetType">sheet模板类型</param>
/// <returns></returns>
public IEnumerable<im_data> GetAccountingUnit(int hospitalid, int sheettype, List<string> deptList)
{
string sql = "select distinct im.accountingUnit,im.department,im.unittype from im_data im " +
"inner join per_allot allot on im.AllotID = allot.ID " +
"inner join per_sheet sheet on im.SheetID = sheet.ID " +
"where allot.hospitalid = @hospitalid and sheet.sheettype = @sheettype and im.department in @deptList";
return DapperQuery(sql, new { hospitalid, sheettype, deptList }, 1000 * 60 * 5);
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" res_account.cs">
// * FileName: res_account.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
namespace Performance.Repository
{
/// <summary>
/// res_account Repository
/// </summary>
public partial class PerforResaccountRepository : PerforRepository<res_account>
{
public PerforResaccountRepository(PerformanceDbContext context) : base(context)
{
}
}
}
//-----------------------------------------------------------------------
// <copyright file=" res_accountdoctor.cs">
// * FileName: res_accountdoctor.cs
// </copyright>
//-----------------------------------------------------------------------
using System;
using Performance.EntityModels;
////-----------------------------------------------------------------------
//// <copyright file=" res_accountdoctor.cs">
//// * FileName: res_accountdoctor.cs
//// </copyright>
////-----------------------------------------------------------------------
//using System;
//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 System;
using Performance.EntityModels;
////-----------------------------------------------------------------------
//// <copyright file=" res_accountnurse.cs">
//// * FileName: res_accountnurse.cs
//// </copyright>
////-----------------------------------------------------------------------
//using System;
//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)
// {
// }
// }
//}
......@@ -19,8 +19,8 @@ public class AgainAllotService : IAutoInjection
private ConfigService configService;
private PerforCofagainRepository perforCofagainRepository;
private PerforPeragainallotRepository perforPeragainallotRepository;
private PerforResaccountdoctorRepository perforResaccountdoctorRepository;
private PerforResaccountnurseRepository perforResaccountnurseRepository;
private PerforResaccountRepository perforResaccountRepository;
//private PerforResaccountnurseRepository perforResaccountnurseRepository;
private PerforUserRepository perforUserRepository;
private PerforUserhospitalRepository perforUserhospitalRepository;
private PerforPerallotRepository perforPerallotRepository;
......@@ -34,8 +34,8 @@ public class AgainAllotService : IAutoInjection
RoleService roleService,
PerforCofagainRepository perforCofagainRepository,
PerforPeragainallotRepository perforPeragainallotRepository,
PerforResaccountdoctorRepository perforResaccountdoctorRepository,
PerforResaccountnurseRepository perforResaccountnurseRepository,
PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforResaccountnurseRepository,
PerforUserRepository perforUserRepository,
PerforUserhospitalRepository perforUserhospitalRepository,
PerforPerallotRepository perforPerallotRepository,
......@@ -50,8 +50,8 @@ public class AgainAllotService : IAutoInjection
this.roleService = roleService;
this.perforCofagainRepository = perforCofagainRepository;
this.perforPeragainallotRepository = perforPeragainallotRepository;
this.perforResaccountdoctorRepository = perforResaccountdoctorRepository;
this.perforResaccountnurseRepository = perforResaccountnurseRepository;
this.perforResaccountRepository = perforResaccountRepository;
//this.perforResaccountnurseRepository = perforResaccountnurseRepository;
this.perforUserRepository = perforUserRepository;
this.perforUserhospitalRepository = perforUserhospitalRepository;
this.perforPerallotRepository = perforPerallotRepository;
......@@ -97,9 +97,9 @@ public bool Generate(AgainAllotRequest request, int userId, string department)
if (role != null)
{
if (application.NurseRole == role.ID)
basicnumber = perforResaccountnurseRepository.GetEntity(t => t.AllotID == againAllot.AllotID && t.AccountingUnit == department)?.RealGiveFee;
basicnumber = perforResaccountRepository.GetEntity(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == againAllot.AllotID && t.AccountingUnit == department)?.RealGiveFee;
else if (application.DirectorRole == role.ID)
basicnumber = perforResaccountdoctorRepository.GetEntity(t => t.AllotID == againAllot.AllotID && t.AccountingUnit == department)?.RealGiveFee;
basicnumber = perforResaccountRepository.GetEntity(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == againAllot.AllotID && t.AccountingUnit == department)?.RealGiveFee;
}
}
#endregion
......
......@@ -110,43 +110,30 @@ public List<res_baiscnorm> ComputeOtherAvg(List<res_baiscnorm> baiscnormList, Li
/// <returns></returns>
public List<res_baiscnorm> DocterNurseBaiscnorm(List<res_baiscnorm> baiscnormList, List<im_accountbasic> accountbasicList, List<PerSheet> list)
{
// 护士
var sheetNurse = list.FirstOrDefault(t => t.SheetType == SheetType.ComputeNurseAccount);
var perdataNurse = sheetNurse.PerData.Select(t => (PerDataAccountNurse)t);
perdataNurse = perdataNurse.GroupBy(t => t.AccountingUnit)
.Select(t => new PerDataAccountNurse
{
AccountingUnit = t.Key,
Number = t.Sum(p => p.Number),
PerforTotal = t.Max(p => p.PerforTotal)
});
var baiscnormNurse = new res_baiscnorm
{
PositionName = EnumHelper.GetDescription(PerforType.护士),
TotelNumber = perdataNurse.Sum(t => t.Number),
TotelValue = perdataNurse.Sum(t => t.PerforTotal),
AvgValue = perdataNurse.Sum(t => t.PerforTotal) / perdataNurse.Sum(t => t.Number)
var pairs = new[]
{
new { SheetType = SheetType.ComputeDoctorAccount, UnitType = UnitType.医生组, PerforType = PerforType.临床医生 },
new { SheetType = SheetType.ComputeDoctorAccount, UnitType = UnitType.医技组, PerforType = PerforType.医技医生 },
new { SheetType = SheetType.ComputeNurseAccount, UnitType = UnitType.护理组, PerforType = PerforType.护士 },
};
baiscnormList.Add(baiscnormNurse);
// 医生
var count = accountbasicList.Where(t => t.UnitType == (int)UnitType.医生组).Sum(t => t.DoctorNumber + t.DoctorDirectorNumber);
var sheetDocter = list.FirstOrDefault(t => t.SheetType == SheetType.ComputeDoctorAccount);
var perdataDocter = sheetDocter.PerData.Select(t => (PerDataAccountDoctor)t);
foreach (var info in pairs)
{
var sheet = list.FirstOrDefault(t => t.SheetType == info.SheetType);
var perData = sheet.PerData.Select(t => (PerDataAccountBaisc)t);
//剔除不同科室相同核算单元
perdataDocter = perdataDocter.Where(t => t.UnitType == (int)UnitType.医生组).GroupBy(t => t.AccountingUnit)
.Select(t => new PerDataAccountDoctor { AccountingUnit = t.Key, PerforTotal = t.Max(p => p.PerforTotal) });
var groupData = perData.Where(t => t.UnitType == (int)info.UnitType)
.GroupBy(t => t.AccountingUnit)
.Select(t => new { AccountingUnit = t.Key, Number = t.Sum(p => p.ManagerNumber + p.Number), PerforTotal = t.Max(p => p.PerforTotal) });
var baiscnormDocter = new res_baiscnorm
var baiscnorm = new res_baiscnorm
{
PositionName = EnumHelper.GetDescription(PerforType.临床医生),
TotelNumber = count,
TotelValue = perdataDocter.Sum(t => t.PerforTotal),
AvgValue = perdataDocter.Sum(t => t.PerforTotal) / count
PositionName = EnumHelper.GetDescription(info.PerforType),
TotelNumber = groupData.Sum(t => t.Number),
TotelValue = groupData.Sum(t => t.PerforTotal),
AvgValue = groupData.Sum(t => t.PerforTotal) / groupData.Sum(t => t.Number)
};
baiscnormList.Add(baiscnormDocter);
baiscnormList.Add(baiscnorm);
}
return baiscnormList;
}
}
......
......@@ -12,8 +12,8 @@ namespace Performance.Services
{
public class ComputeService : IAutoInjection
{
private readonly PerforResaccountdoctorRepository _perforResAccountdoctorRepository;
private readonly PerforResaccountnurseRepository _perforResAccountnurseRepository;
private readonly PerforResaccountRepository perforResaccountRepository;
//private readonly PerforResaccountnurseRepository _perforResAccountnurseRepository;
private readonly PerforPersheetRepository _perforPerSheetRepository;
private readonly PerforImdataRepository _perforImDataRepository;
private readonly PerforRescomputeRepository _perforRescomputeRepository;
......@@ -23,8 +23,8 @@ public class ComputeService : IAutoInjection
private readonly PerforAgemployeeRepository _perforAgemployeeRepository;
private readonly PerforResbaiscnormRepository perforResbaiscnormRepository;
public ComputeService(PerforResaccountdoctorRepository perforResAccountdoctorRepository,
PerforResaccountnurseRepository perforResAccountnurseRepository,
public ComputeService(PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforResAccountnurseRepository,
PerforPersheetRepository perforPerSheetRepository,
PerforImdataRepository perforImDataRepository,
PerforRescomputeRepository perforRescomputeRepository,
......@@ -34,8 +34,8 @@ public class ComputeService : IAutoInjection
PerforAgemployeeRepository perforAgemployeeRepository,
PerforResbaiscnormRepository perforResbaiscnormRepository)
{
this._perforResAccountdoctorRepository = perforResAccountdoctorRepository;
this._perforResAccountnurseRepository = perforResAccountnurseRepository;
this.perforResaccountRepository = perforResaccountRepository;
//this._perforResAccountnurseRepository = perforResAccountnurseRepository;
this._perforPerSheetRepository = perforPerSheetRepository;
this._perforImDataRepository = perforImDataRepository;
this._perforRescomputeRepository = perforRescomputeRepository;
......@@ -115,7 +115,7 @@ public List<res_specialunit> GetSpecial(int allotId)
/// <returns></returns>
public List<DoctorResponse> GetDoctorPerformance(int allotId)
{
var list = _perforResAccountdoctorRepository.GetEntities(t => t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
var list = perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
List<DoctorResponse> doctor = Mapper.Map<List<DoctorResponse>>(list);
doctor?.ForEach(t => t.UnitName = "医生组");
return doctor;
......@@ -128,7 +128,7 @@ public List<DoctorResponse> GetDoctorPerformance(int allotId)
/// <returns></returns>
public List<NurseResponse> GetNursePerformance(int allotId)
{
var list = _perforResAccountnurseRepository.GetEntities(t => t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
var list = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId)?.OrderByDescending(t => t.AccountingUnit);
List<NurseResponse> nurse = Mapper.Map<List<NurseResponse>>(list);
nurse?.ForEach(t => t.UnitName = "护理组");
return nurse;
......@@ -145,13 +145,13 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, string department, in
{
if (type == 1)
{
var accountList = _perforResAccountdoctorRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == department);
var accountList = perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == allotId && t.AccountingUnit == department);
if (accountList != null)
return GetDepartmentDetail(allotId, accountList.First().ID, type);
}
else if (type == 2)
{
var accountList = _perforResAccountnurseRepository.GetEntities(t => t.AllotID == allotId && t.AccountingUnit == department);
var accountList = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId && t.AccountingUnit == department);
if (accountList != null)
return GetDepartmentDetail(allotId, accountList.First().ID, type);
}
......@@ -171,11 +171,11 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
var sheetList = _perforPerSheetRepository.GetEntities(t => t.AllotID == allotId);
if (type == 1)
{
var doctor = _perforResAccountdoctorRepository.GetEntity(t => t.AllotID == allotId && t.ID == accountId);
var doctor = perforResaccountRepository.GetEntity(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == allotId && t.ID == accountId);
DeptDetailResponse response = new DeptDetailResponse()
{
Pandect = Mapper.Map<PerDataAccount>(doctor),
Pandect = Mapper.Map<PerDataAccountBaisc>(doctor),
Economic = new List<DeptDetail>(),
Workload = new List<DeptDetail>()
};
......@@ -198,10 +198,10 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, int accountId, int ty
}
else if (type == 2)
{
var nurse = _perforResAccountnurseRepository.GetEntity(t => t.AllotID == allotId && t.ID == accountId);
var nurse = perforResaccountRepository.GetEntity(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allotId && t.ID == accountId);
DeptDetailResponse response = new DeptDetailResponse()
{
Pandect = Mapper.Map<PerDataAccount>(nurse),
Pandect = Mapper.Map<PerDataAccountBaisc>(nurse),
Economic = new List<DeptDetail>(),
Workload = new List<DeptDetail>()
};
......
......@@ -18,20 +18,18 @@ public class ComputeDirector : IAutoInjection
private readonly BaiscNormService baiscNormService;
private readonly PerforCofdirectorRepository perforCofdirectorRepository;
private readonly PerforCofworkyearRepository perforCofworkyearRepository;
private readonly PerforResaccountnurseRepository perforResAccountnurseRepository;
private readonly PerforResaccountdoctorRepository perforResAccountdoctorRepository;
private readonly PerforResaccountRepository perforResaccountRepository;
//private readonly PerforResaccountdoctorRepository perforResAccountdoctorRepository;
public ComputeDirector(BaiscNormService baiscNormService,
PerforCofdirectorRepository perforCofdirectorRepository,
PerforCofworkyearRepository perforCofworkyearRepository,
PerforResaccountnurseRepository perforResAccountnurseRepository,
PerforResaccountdoctorRepository perforResAccountdoctorRepository)
PerforResaccountRepository perforResaccountRepository)
{
this.baiscNormService = baiscNormService;
this.perforCofdirectorRepository = perforCofdirectorRepository;
this.perforCofworkyearRepository = perforCofworkyearRepository;
this.perforResAccountnurseRepository = perforResAccountnurseRepository;
this.perforResAccountdoctorRepository = perforResAccountdoctorRepository;
this.perforResaccountRepository = perforResaccountRepository;
}
#region 老版计算
......@@ -147,10 +145,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
new { AccountUnitType = AccountUnitType.临床科室, PerforType = PerforType.护士长, UnitType = UnitType.护理组 },
new { AccountUnitType = AccountUnitType.医技科室, PerforType = PerforType.医技主任, UnitType = UnitType.医技组 },
};
//取出医生科室
var doctorList = perforResAccountdoctorRepository.GetEntities(t => t.AllotID == allot.ID);
//取出护士科室
var nurseList = perforResAccountnurseRepository.GetEntities(t => t.AllotID == allot.ID);
//取出科室
var dataList = perforResaccountRepository.GetEntities(t => t.AllotID == allot.ID);
List<ComputeResult> computeList = new List<ComputeResult>();
foreach (var accountbasic in accountbasicList)
......@@ -160,21 +156,11 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
if (!accountbasic.DoctorDirectorNumber.HasValue || accountbasic.DoctorDirectorNumber.Value == 0)
continue;
//分别取出对应的 计算 人员 平均值等信息
decimal? number, perforTotal, avg;
if (accountbasic.UnitType == (int)UnitType.护理组)
{
var resAccount = nurseList.Where(t => t.AccountingUnit == accountbasic.DoctorAccountingUnit);
number = resAccount.Max(t => t.Number);
perforTotal = resAccount.Max(t => t.PerforTotal);
avg = resAccount.Max(t => t.PerforTotal);
}
else
{
var resAccount = doctorList.Where(t => t.AccountingUnit == accountbasic.DoctorAccountingUnit);
number = resAccount.Max(t => t.Number);
perforTotal = resAccount.Max(t => t.PerforTotal);
avg = resAccount.Max(t => t.PerforTotal);
}
var resAccount = dataList.Where(t => t.UnitType == accountbasic.UnitType && t.AccountingUnit == accountbasic.DoctorAccountingUnit);
var number = resAccount.OrderByDescending(t => t.ManagerNumber).Sum(t => t.ManagerNumber + t.Number);
var perforTotal = resAccount.Max(t => t.PerforTotal);
var avg = resAccount.Max(t => t.Avg);
var basicRule = basicRuleList.FirstOrDefault(t => t.UnitType == (UnitType)accountbasic.UnitType);
var empolyee = empolyeeList.FirstOrDefault(t =>
t.AccountType == basicRule.AccountUnitType.ToString()
......
......@@ -15,22 +15,22 @@ public class ReportService : IAutoInjection
private PerforPerallotRepository perforPerallotRepository;
private PerforResbaiscnormRepository perforResbaiscnormRepository;
private PerforHospersonfeeRepository perforHospersonfeeRepository;
private PerforResaccountdoctorRepository perforResaccountdoctorRepository;
private PerforResaccountnurseRepository perforResaccountnurseRepository;
private PerforResaccountRepository perforResaccountRepository;
//private PerforResaccountnurseRepository perforResaccountnurseRepository;
public ReportService(PerforReportRepository perforReportRepository,
PerforPerallotRepository perforPerallotRepository,
PerforResbaiscnormRepository perforResbaiscnormRepository,
PerforHospersonfeeRepository perforHospersonfeeRepository,
PerforResaccountdoctorRepository perforResaccountdoctorRepository,
PerforResaccountnurseRepository perforResaccountnurseRepository)
//PerforResaccountdoctorRepository perforResaccountdoctorRepository,
PerforResaccountRepository perforResaccountRepository)
{
this.perforReportRepository = perforReportRepository;
this.perforPerallotRepository = perforPerallotRepository;
this.perforResbaiscnormRepository = perforResbaiscnormRepository;
this.perforHospersonfeeRepository = perforHospersonfeeRepository;
this.perforResaccountdoctorRepository = perforResaccountdoctorRepository;
this.perforResaccountnurseRepository = perforResaccountnurseRepository;
this.perforResaccountRepository = perforResaccountRepository;
//this.perforResaccountnurseRepository = perforResaccountnurseRepository;
}
/// <summary>
......@@ -102,11 +102,11 @@ public List<PerReport> DoctorAvg(int hospitalId, int isIndex)
throw new PerformanceException("用户未创建绩效!");
var result = new List<PerReport>();
var doctorList = perforResaccountdoctorRepository.GetEntities(t => allotList.Select(a => a.ID).Contains(t.AllotID.Value));
var doctorList = perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && allotList.Select(a => a.ID).Contains(t.AllotID.Value));
if (isIndex == 1)
{
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
doctorList = perforResaccountdoctorRepository.GetEntities(t => t.AllotID == allot.ID);
doctorList = perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.AllotID == allot.ID);
}
if (doctorList == null)
return result;
......@@ -134,11 +134,11 @@ public List<PerReport> NurseAvg(int hospitalId, int isIndex)
throw new PerformanceException("用户未创建绩效!");
var result = new List<PerReport>();
var doctorList = perforResaccountnurseRepository.GetEntities(t => allotList.Select(a => a.ID).Contains(t.AllotID.Value));
var doctorList = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && allotList.Select(a => a.ID).Contains(t.AllotID.Value));
if (isIndex == 1)
{
var allot = allotList.OrderByDescending(t => t.Year).ThenByDescending(t => t.Month).FirstOrDefault();
doctorList = perforResaccountnurseRepository.GetEntities(t => t.AllotID == allot.ID);
doctorList = perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.AllotID == allot.ID);
}
if (doctorList == null)
return result;
......
......@@ -21,8 +21,8 @@ public class SheetSevice : IAutoInjection
private PerforImheaderRepository _perforImHeaderRepository;
private PerforImemployeeRepository _perforImEmployeeRepository;
private PerforImaccountbasicRepository _perforImaccountbasicRepository;
private PerforResaccountdoctorRepository _perforImaccountdoctorRepository;
private PerforResaccountnurseRepository _perforImaccountnurseRepository;
private PerforResaccountRepository _perforResaccountRepository;
//private PerforResaccountnurseRepository _perforImaccountnurseRepository;
private PerforImspecialunitRepository _perforImspecialunitRepository;
public SheetSevice(PerforPerallotRepository perforAllotRepository,
......@@ -31,8 +31,8 @@ public class SheetSevice : IAutoInjection
PerforImheaderRepository perforImHeaderRepository,
PerforImemployeeRepository perforImEmployeeRepository,
PerforImaccountbasicRepository perforImaccountbasicRepository,
PerforResaccountdoctorRepository perforImaccountdoctorRepository,
PerforResaccountnurseRepository perforImaccountnurseRepository,
PerforResaccountRepository perforResaccountRepository,
//PerforResaccountnurseRepository perforImaccountnurseRepository,
PerforImspecialunitRepository perforImspecialunitRepository)
{
_perforAllotRepository = perforAllotRepository;
......@@ -40,8 +40,8 @@ public class SheetSevice : IAutoInjection
_perforImDataRepository = perforImDataRepository;
_perforImHeaderRepository = perforImHeaderRepository;
_perforImEmployeeRepository = perforImEmployeeRepository;
_perforImaccountdoctorRepository = perforImaccountdoctorRepository;
_perforImaccountnurseRepository = perforImaccountnurseRepository;
_perforResaccountRepository = perforResaccountRepository;
//_perforImaccountnurseRepository = perforImaccountnurseRepository;
_perforImaccountbasicRepository = perforImaccountbasicRepository;
_perforImspecialunitRepository = perforImspecialunitRepository;
}
......@@ -246,7 +246,7 @@ private void CommonExport(int sheetID, SheetExportResponse response)
private void AccountNurseExport(int sheetID, SheetExportResponse response)
{
var list = _perforImaccountnurseRepository.GetEntities(t => t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit);
var list = _perforResaccountRepository.GetEntities(t => t.UnitType == (int)UnitType.护理组 && t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit);
if (list != null && list.Count() > 0)
{
......@@ -294,7 +294,7 @@ private void AccountNurseExport(int sheetID, SheetExportResponse response)
private void AccountDoctorExport(int sheetID, SheetExportResponse response)
{
var list = _perforImaccountdoctorRepository.GetEntities(t => t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit);
var list = _perforResaccountRepository.GetEntities(t => t.UnitType != (int)UnitType.护理组 && t.SheetID == sheetID)?.OrderByDescending(t => t.AccountingUnit);
if (list != null && list.Count() > 0)
{
......
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