Commit 52f75cb8 by 李承祥

添加系数

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