Commit 52f75cb8 by 李承祥

添加系数

parent f62988ae
...@@ -156,8 +156,8 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al ...@@ -156,8 +156,8 @@ public ApiResponse Generate([CustomizeValidator(RuleSet = "Delete"), FromBody]Al
if (null == allot || string.IsNullOrEmpty(allot.Path)) if (null == allot || string.IsNullOrEmpty(allot.Path))
throw new PerformanceException("当前绩效记录不存在或没有上传数据文件"); throw new PerformanceException("当前绩效记录不存在或没有上传数据文件");
var user = _claim.At(request); var user = _claim.At(request);
//_allotService.Generate(allot, user.Mail); _allotService.Generate(allot, user.Mail);
BackgroundJob.Enqueue(() => _allotService.Generate(allot, user.Mail)); //BackgroundJob.Enqueue(() => _allotService.Generate(allot, user.Mail));
return new ApiResponse(ResponseType.OK); return new ApiResponse(ResponseType.OK);
} }
......
...@@ -68,13 +68,13 @@ public AutoMapperConfigs() ...@@ -68,13 +68,13 @@ public AutoMapperConfigs()
CreateMap<PerData, im_data>() CreateMap<PerData, im_data>()
.ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor ? 1 : 2)) .ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor ? 1 : 2))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType == "医生组" ? 1 : (src.UnitType == "护理组" ? 2 : 0))); .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType == "医生组" ? 1 : (src.UnitType == "护理组" ? 2 : (src.UnitType == "护理组" ? 3 : 0))));
CreateMap<im_header, PerHeader>() CreateMap<im_header, PerHeader>()
.ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge == 1 ? true : false)); .ForMember(dest => dest.IsMerge, opt => opt.MapFrom(src => src.IsMerge == 1 ? true : false));
CreateMap<im_data, PerData>() CreateMap<im_data, PerData>()
.ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor == 1 ? true : false)) .ForMember(dest => dest.IsFactor, opt => opt.MapFrom(src => src.IsFactor == 1 ? true : false))
.ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType == 1 ? "医生组" : (src.UnitType == 2 ? "护理组" : ""))); .ForMember(dest => dest.UnitType, opt => opt.MapFrom(src => src.UnitType == 1 ? "医生组" : (src.UnitType == 2 ? "护理组" : (src.UnitType == 3 ? "医技组" : ""))));
CreateMap<PerDataEmployee, im_employee>(); CreateMap<PerDataEmployee, im_employee>();
CreateMap<im_employee, PerDataEmployee>(); CreateMap<im_employee, PerDataEmployee>();
......
...@@ -6,6 +6,12 @@ namespace Performance.DtoModels ...@@ -6,6 +6,12 @@ namespace Performance.DtoModels
{ {
public class PerDataAccountBaisc : IPerData public class PerDataAccountBaisc : IPerData
{ {
/// <summary>
/// 核算单元类别 1 医生组 2护理组 3医技组
/// </summary>
public Nullable<int> UnitType { get; set; }
/// <summary> /// <summary>
/// 核算单元(医生组) /// 核算单元(医生组)
/// </summary> /// </summary>
......
...@@ -32,6 +32,11 @@ public class im_accountbasic ...@@ -32,6 +32,11 @@ public class im_accountbasic
public Nullable<int> SheetID { get; set; } public Nullable<int> SheetID { get; set; }
/// <summary> /// <summary>
/// 核算单元类别 1 医生组 2护理组 3医技组
/// </summary>
public Nullable<int> UnitType { get; set; }
/// <summary>
/// 核算单元(医生组) /// 核算单元(医生组)
/// </summary> /// </summary>
public string DoctorAccountingUnit { get; set; } public string DoctorAccountingUnit { get; set; }
......
...@@ -32,7 +32,7 @@ public class im_data ...@@ -32,7 +32,7 @@ public class im_data
public Nullable<int> SheetID { get; set; } public Nullable<int> SheetID { get; set; }
/// <summary> /// <summary>
/// 核算单元类别 1 医生组 2护理组 /// 核算单元类别 1 医生组 2护理组 3医技组
/// </summary> /// </summary>
public Nullable<int> UnitType { get; set; } public Nullable<int> UnitType { get; set; }
......
...@@ -42,6 +42,11 @@ public class mod_item ...@@ -42,6 +42,11 @@ public class mod_item
public Nullable<decimal> FactorValue2 { get; set; } public Nullable<decimal> FactorValue2 { get; set; }
/// <summary> /// <summary>
/// 医技系数
/// </summary>
public Nullable<decimal> FactorValue3 { get; set; }
/// <summary>
/// 抽取绩效值SQL /// 抽取绩效值SQL
/// </summary> /// </summary>
public Nullable<int> ExtractId { get; set; } public Nullable<int> ExtractId { get; set; }
......
...@@ -45,8 +45,8 @@ public class BaiscNormService : IAutoInjection ...@@ -45,8 +45,8 @@ public class BaiscNormService : IAutoInjection
{ {
PositionName = EnumHelper.GetDescription(item.reference), PositionName = EnumHelper.GetDescription(item.reference),
TotelNumber = count, TotelNumber = count,
TotelValue = dataList.Sum(t => t.GiveFee), TotelValue = dataList?.Sum(t => t.GiveFee),
AvgValue = dataList.Sum(t => t.GiveFee) / count AvgValue = dataList?.Sum(t => t.GiveFee) / count
}; };
baiscnormList.Add(baiscnorm); baiscnormList.Add(baiscnorm);
} }
......
...@@ -243,7 +243,7 @@ private PerSheet ComputeDoctor(IEnumerable<PerDataAccountBaisc> dataList, List<P ...@@ -243,7 +243,7 @@ private PerSheet ComputeDoctor(IEnumerable<PerDataAccountBaisc> dataList, List<P
var data = new List<PerDataAccountDoctor>(); var data = new List<PerDataAccountDoctor>();
foreach (var dept in dataList) foreach (var dept in dataList.Where(t => t.UnitType == 1))
{ {
if (string.IsNullOrEmpty(dept.DoctorAccountingUnit)) continue; if (string.IsNullOrEmpty(dept.DoctorAccountingUnit)) continue;
...@@ -311,24 +311,24 @@ private PerSheet ComputeNurse(IEnumerable<PerDataAccountBaisc> dataList, List<Pe ...@@ -311,24 +311,24 @@ private PerSheet ComputeNurse(IEnumerable<PerDataAccountBaisc> dataList, List<Pe
var data = new List<PerDataAccountNurse>(); var data = new List<PerDataAccountNurse>();
foreach (var dept in dataList) foreach (var dept in dataList.Where(t => t.UnitType == 2))
{ {
if (string.IsNullOrEmpty(dept.NurseAccountingUnit)) continue; if (string.IsNullOrEmpty(dept.DoctorAccountingUnit)) continue;
var econNurse = economicData.FirstOrDefault(t => t.UnitType == "护理组" && t.AccountingUnit == dept.Department); var econNurse = economicData.FirstOrDefault(t => t.UnitType == "护理组" && t.AccountingUnit == dept.Department);
var workNurse = workloadData.FirstOrDefault(t => t.UnitType == "护理组" && t.AccountingUnit == dept.Department); var workNurse = workloadData.FirstOrDefault(t => t.UnitType == "护理组" && t.AccountingUnit == dept.Department);
var nurse = new PerDataAccountNurse var nurse = new PerDataAccountNurse
{ {
AccountingUnit = dept.NurseAccountingUnit, AccountingUnit = dept.DoctorAccountingUnit,
Department = dept.Department, Department = dept.Department,
Number = dept.NurseNumber + dept.NurseHeadNumber, Number = dept.DoctorNumber + dept.DoctorDirectorNumber,
BasicFactor = dept.NurseBasicFactor, BasicFactor = dept.DoctorBasicFactor,
SlopeFactor = dept.NurseSlopeFactor, SlopeFactor = dept.DoctorSlopeFactor,
OtherPerfor1 = dept.NurseOtherPerfor1, OtherPerfor1 = dept.DoctorOtherPerfor1,
OtherPerfor2 = dept.NurseOtherPerfor2, OtherPerfor2 = dept.DoctorOtherPerfor2,
Extra = dept.NurseExtra, Extra = dept.DoctorExtra,
ScoringAverage = dept.NurseScoringAverage == 0m ? 1 : dept.NurseScoringAverage, ScoringAverage = dept.DoctorScoringAverage == 0m ? 1 : dept.DoctorScoringAverage,
AdjustFactor = dept.NurseAdjustFactor == 0m ? 1 : dept.NurseAdjustFactor, AdjustFactor = dept.DoctorAdjustFactor == 0m ? 1 : dept.DoctorAdjustFactor,
Income = econNurse?.CellValue ?? 0, Income = econNurse?.CellValue ?? 0,
WorkloadFee = workNurse?.CellValue ?? 0, WorkloadFee = workNurse?.CellValue ?? 0,
}; };
......
...@@ -15,8 +15,8 @@ public class PerSheetDataReadExpend : IPerSheetDataRead ...@@ -15,8 +15,8 @@ public class PerSheetDataReadExpend : IPerSheetDataRead
{ {
public PerSheetPoint Point => new PerSheetPoint public PerSheetPoint Point => new PerSheetPoint
{ {
HeaderFirstRowNum = 1, HeaderFirstRowNum = 4,
HeaderLastRowNum = 2, HeaderLastRowNum = 4,
HeaderFirstCellNum = 0, HeaderFirstCellNum = 0,
DataFirstRowNum = 5, DataFirstRowNum = 5,
AccountingUnit = new List<AccountingUnit> AccountingUnit = new List<AccountingUnit>
...@@ -24,16 +24,23 @@ public class PerSheetDataReadExpend : IPerSheetDataRead ...@@ -24,16 +24,23 @@ public class PerSheetDataReadExpend : IPerSheetDataRead
new AccountingUnit new AccountingUnit
{ {
AccountingUnitCellNum = 0, AccountingUnitCellNum = 0,
UnitType = "医组", UnitType = "医组",
DeptCellNum = 2, DeptCellNum = 3,
FactorRow = 4, FactorRow = 3,
}, },
new AccountingUnit new AccountingUnit
{ {
AccountingUnitCellNum = 1, AccountingUnitCellNum = 1,
UnitType = "医生组",
DeptCellNum = 3,
FactorRow = 2,
},
new AccountingUnit
{
AccountingUnitCellNum = 2,
UnitType = "护理组", UnitType = "护理组",
DeptCellNum = 2, DeptCellNum = 3,
FactorRow = 3, FactorRow = 1,
}, },
} }
}; };
......
...@@ -15,26 +15,34 @@ public class PerSheetDataReadIncome : IPerSheetDataRead ...@@ -15,26 +15,34 @@ public class PerSheetDataReadIncome : IPerSheetDataRead
{ {
public PerSheetPoint Point => new PerSheetPoint public PerSheetPoint Point => new PerSheetPoint
{ {
HeaderFirstRowNum = 3, HeaderFirstRowNum = 4,
HeaderLastRowNum = 3, HeaderLastRowNum = 4,
HeaderFirstCellNum = 0, HeaderFirstCellNum = 0,
DataFirstRowNum = 4, DataFirstRowNum = 5,
AccountingUnit = new List<AccountingUnit> AccountingUnit = new List<AccountingUnit>
{ {
//核算单元(医组) //核算单元(医组)
new AccountingUnit new AccountingUnit
{ {
AccountingUnitCellNum = 0, AccountingUnitCellNum = 0,
UnitType = "医技组",
DeptCellNum = 3,
FactorRow = 3,
},
//核算单元(医生组)
new AccountingUnit
{
AccountingUnitCellNum = 1,
UnitType = "医生组", UnitType = "医生组",
DeptCellNum = 2, DeptCellNum = 3,
FactorRow = 2, FactorRow = 2,
}, },
//核算单元(护理组) //核算单元(护理组)
new AccountingUnit new AccountingUnit
{ {
AccountingUnitCellNum = 1, AccountingUnitCellNum = 2,
UnitType = "护理组", UnitType = "护理组",
DeptCellNum = 2, DeptCellNum = 3,
FactorRow = 1, FactorRow = 1,
} }
} }
......
...@@ -15,26 +15,34 @@ public class PerSheetDataReadOtherIncome : IPerSheetDataRead ...@@ -15,26 +15,34 @@ public class PerSheetDataReadOtherIncome : IPerSheetDataRead
{ {
public PerSheetPoint Point => new PerSheetPoint public PerSheetPoint Point => new PerSheetPoint
{ {
HeaderFirstRowNum = 3, HeaderFirstRowNum = 4,
HeaderLastRowNum = 3, HeaderLastRowNum = 4,
HeaderFirstCellNum = 0, HeaderFirstCellNum = 0,
DataFirstRowNum = 4, DataFirstRowNum = 5,
AccountingUnit = new List<AccountingUnit> AccountingUnit = new List<AccountingUnit>
{ {
//核算单元(医组) //核算单元(医组)
new AccountingUnit new AccountingUnit
{ {
AccountingUnitCellNum = 0, AccountingUnitCellNum = 0,
UnitType = "医技组",
DeptCellNum = 3,
FactorRow = 3,
},
//核算单元(医生组)
new AccountingUnit
{
AccountingUnitCellNum = 1,
UnitType = "医生组", UnitType = "医生组",
DeptCellNum = 2, DeptCellNum = 3,
FactorRow = 2, FactorRow = 2,
}, },
//核算单元(护理组) //核算单元(护理组)
new AccountingUnit new AccountingUnit
{ {
AccountingUnitCellNum = 1, AccountingUnitCellNum = 2,
UnitType = "护理组", UnitType = "护理组",
DeptCellNum = 2, DeptCellNum = 3,
FactorRow = 1, FactorRow = 1,
} }
} }
......
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