Commit 3aedb7db by lcx

其他组改为其他医生/护理等,添加药/材料奖罚

parent 5c9af07b
......@@ -787,6 +787,16 @@
其他绩效2
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.MedicineExtra">
<summary>
药占比奖罚
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.MaterialsExtra">
<summary>
材料占比奖罚
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.Extra">
<summary>
医院奖罚
......
......@@ -1477,6 +1477,16 @@
其他绩效2
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.MedicineExtra">
<summary>
药占比奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.MaterialsExtra">
<summary>
材料占比奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.im_accountbasic.DoctorExtra">
<summary>
医院奖罚
......@@ -3272,6 +3282,16 @@
其他绩效2
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.MedicineExtra">
<summary>
药占比奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.MaterialsExtra">
<summary>
材料占比奖罚
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.Extra">
<summary>
医院奖罚
......
......@@ -23,10 +23,16 @@ public enum UnitType
医技组 = 3,
[Description("专家组")]
专家组 = 4,
[Description("其他")]
其他 = 5,
//[Description("其他")]
//其他 = 5,
[Description("特殊核算组")]
特殊核算组 = 6,
[Description("其他医生组")]
其他医生组 = 7,
[Description("其他护理组")]
其他护理组 = 8,
[Description("其他医技组")]
其他医技组 = 9,
}
public enum SheetType
......
......@@ -69,6 +69,16 @@ public class PerDataAccountBaisc : IPerData
public decimal OtherPerfor2 { get; set; }
/// <summary>
/// 药占比奖罚
/// </summary>
public decimal MedicineExtra { get; set; }
/// <summary>
/// 材料占比奖罚
/// </summary>
public decimal MaterialsExtra { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
public decimal Extra { get; set; }
......
......@@ -105,7 +105,17 @@ public class im_accountbasic
/// 其他绩效2
/// </summary>
public Nullable<decimal> DoctorOtherPerfor2 { get; set; }
/// <summary>
/// 药占比奖罚
/// </summary>
public Nullable<decimal> MedicineExtra { get; set; }
/// <summary>
/// 材料占比奖罚
/// </summary>
public Nullable<decimal> MaterialsExtra { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
......
......@@ -100,7 +100,17 @@ public class res_account
/// 其他绩效2
/// </summary>
public Nullable<decimal> OtherPerfor2 { get; set; }
/// <summary>
/// 药占比奖罚
/// </summary>
public Nullable<decimal> MedicineExtra { get; set; }
/// <summary>
/// 材料占比奖罚
/// </summary>
public Nullable<decimal> MaterialsExtra { get; set; }
/// <summary>
/// 医院奖罚
/// </summary>
......
......@@ -252,7 +252,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
var pairs = new[]
{
new { Name = "医生组临床科室单元核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount, UnitTypes = new List<UnitType> { UnitType.医生组, UnitType.医技组, UnitType.专家组, UnitType.其他 } },
new { Name = "医生组临床科室单元核算表", Data = doctorWorkloadData, SheetType = SheetType.ComputeDoctorAccount, UnitTypes = new List<UnitType> { UnitType.医生组, UnitType.医技组, UnitType.专家组, UnitType.其他医技组,UnitType.其他医生组,UnitType.其他护理组 } },
new { Name = "护理组临床科室单元核算表", Data = nurseWorkloadData, SheetType = SheetType.ComputeNurseAccount, UnitTypes = new List<UnitType> { UnitType.护理组 } },
};
List<PerSheet> result = new List<PerSheet>();
......@@ -270,7 +270,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
continue;
var econDoctor = economicData.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
var workDoctor = info.Data.FirstOrDefault(t => t.UnitType == unitType.ToString() && t.AccountingUnit == dept.Department);
if (UnitType.专家组 == unitType || UnitType.其他 == unitType)
if (UnitType.专家组 == unitType || UnitType.其他医技组 == unitType || UnitType.其他医生组 == unitType || UnitType.其他护理组 == unitType)
{
econDoctor = economicData.FirstOrDefault(t => t.AccountingUnit == dept.Department);
workDoctor = info.Data.FirstOrDefault(t => t.AccountingUnit == dept.Department);
......@@ -298,7 +298,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
dept.WorkloadFee = dept.WorkSlopeFactor * (workDoctor?.CellValue ?? 0);
dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor);
dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0);
dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
}
......@@ -464,7 +464,7 @@ public void ComputeCustomMinimum(PerExcel excel, List<PerSheet> perSheet, List<r
dept.WorkloadFee = workload?.CellValue ?? 0;
dept.PerforFee = dept.Income * (dept.BasicFactor + dept.SlopeFactor);
dept.PerforTotal = dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + (dept.MinimumFee ?? 0);
dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
dept.RealGiveFee = (dept.PerforTotal * dept.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + dept.Extra + dept.OtherPerfor2) * dept.AdjustFactor;
dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
totalValue += (dept.PerforTotal ?? 0);
......
......@@ -78,7 +78,14 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
{
{ (int)AccountUnitType.科主任, new List<string>{ UnitType.医生组.ToString(), UnitType.医技组.ToString() } },
{ (int)AccountUnitType.护士长, new List<string>{ UnitType.护理组.ToString() } },
{ (int)AccountUnitType.Null, new List<string>{ UnitType.特殊核算组.ToString(), UnitType.其他.ToString() } },
{ (int)AccountUnitType.Null, new List<string>
{
UnitType.特殊核算组.ToString(),
UnitType.其他医生组.ToString(),
UnitType.其他护理组.ToString(),
UnitType.其他医技组.ToString()
}
},
};
if (pairs.Keys.Any(t => t == type))
......@@ -189,7 +196,7 @@ public List<DeptResponse> GetNursePerformance(int allotId)
/// <returns></returns>
public List<DeptResponse> GetOtherPerformance(int allotId)
{
var unitType = new List<int> { (int)UnitType.其他, (int)UnitType.专家组 };
var unitType = new List<int> { (int)UnitType.其他医技组, (int)UnitType.其他医生组, (int)UnitType.其他护理组, (int)UnitType.专家组 };
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId)?.OrderBy(t => t.UnitType).ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> other = Mapper.Map<List<DeptResponse>>(list);
other?.ForEach(t => t.UnitName = ((UnitType)t.UnitType).ToString());
......@@ -385,7 +392,7 @@ public DeptDataDetails DeptDetail(int accountId)
Detail = new List<DetailDtos>()
};
int type = doctor.UnitType.Value;
if (type == (int)UnitType.专家组 || type == (int)UnitType.其他)
if (type == (int)UnitType.专家组 || type == (int)UnitType.其他医技组 || type == (int)UnitType.其他医生组 || type == (int)UnitType.其他护理组)
type = 1;
var basicData = _perforImDataRepository.GetEntities(t => t.AllotID == doctor.AllotID && t.UnitType == type && t.AccountingUnit == doctor.AccountingUnit);
var persheet = _perforPerSheetRepository.GetEntities(t => t.AllotID == doctor.AllotID);
......
......@@ -282,10 +282,13 @@ public class ComputeDirector : IAutoInjection
public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_accountbasic> accountbasicList, List<PerSheet> accountSheet, per_allot allot, bool isMinimum)
{
var basicRuleList = new[]
{
{
new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医生组 },
new { AccountUnitType = AccountUnitType.护士长, UnitType = UnitType.护理组 },
new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.医技组 },
new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.其他医生组 },
new { AccountUnitType = AccountUnitType.护士长, UnitType = UnitType.其他护理组 },
new { AccountUnitType = AccountUnitType.科主任, UnitType = UnitType.其他医技组 },
};
//取出科室
List<res_account> dataList = new List<res_account>();
......@@ -297,6 +300,13 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var isBudget = budgetService.GetAdjustAndGrant(allot, out decimal adjust, out decimal grant);
var unit = new[]
{
new { UnitType = UnitType.其他医生组, NewUnitType = UnitType.医生组.ToString() },
new { UnitType = UnitType.其他护理组, NewUnitType = UnitType.护理组.ToString() },
new { UnitType = UnitType.其他医技组, NewUnitType = UnitType.医技组.ToString() },
};
var empDis = empolyeeList.Select(w => new { w.DoctorName, w.JobNumber }).Distinct();
foreach (var emp in empDis)
{
......@@ -305,7 +315,13 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
{
var empolyee = empolyees.ElementAt(i);
var resAccount = dataList.FirstOrDefault(t => ((UnitType)t.UnitType).ToString() == empolyee.UnitType && t.AccountingUnit == empolyee.AccountingUnit);
string unitType = empolyee.UnitType;
if (unit.Select(t => t.UnitType.ToString()).Contains(empolyee.UnitType))
{
unitType = unit.FirstOrDefault(t => t.UnitType.ToString() == empolyee.UnitType)?.NewUnitType;
}
var resAccount = dataList.FirstOrDefault(t => ((UnitType)t.UnitType).ToString() == unitType && t.AccountingUnit == empolyee.AccountingUnit);
if (resAccount == null && empolyees.Count() > 1)
{
// 如果没有找到科室,则找相同用户的其他核算单元类型
......@@ -345,7 +361,7 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
var scale = resAccount.PerforTotal * (empolyee.Scale ?? 1);
var compute = new ComputeResult
{
UnitType = basicRule.UnitType.ToString(),
UnitType = empolyee.UnitType,
AccountingUnit = empolyee.AccountingUnit,
AccountType = basicRule.AccountUnitType.ToString(),
......
......@@ -71,6 +71,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
unifyUnit.MinimumFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效系数").PointCell)?.NumericCellValue);
unifyUnit.OtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1").PointCell)?.NumericCellValue);
unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.NumericCellValue);
unifyUnit.MedicineExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "药占比奖罚").PointCell)?.NumericCellValue);
unifyUnit.MaterialsExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "材料占比奖罚").PointCell)?.NumericCellValue);
unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
unifyUnit.ScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
unifyUnit.AdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数").PointCell)?.NumericCellValue);
......
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