Commit b1134383 by lcx

Merge branch 'v2020morge-graphql' of http://192.168.18.110:8880/zry/performance…

Merge branch 'v2020morge-graphql' of http://192.168.18.110:8880/zry/performance into v2020morge-graphql
parents 4ef65305 b41036ab
......@@ -44,7 +44,7 @@ public ApiResponse CustomExtract(int allotId)
{
var userId = _claim.GetUserId();
if (!_extractService.CheckConfigScript(userId, allotId))
return new ApiResponse(ResponseType.Fail, "配置信息错误");
return new ApiResponse(ResponseType.Fail, "未配置自定义抽取,请联系绩效管理人员。");
_backgroundTaskQueue.QueueBackgroundWorkItem(async token =>
{
......
......@@ -214,8 +214,8 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
NightShiftWorkPerforFee = nightShift,
};
res.PerforTotal = (sumValue ?? 0) + res.AssessBeforeOtherFee;
res.GiveFee = Math.Round(res.PerforTotal * res.ScoringAverage + res.AssessLaterOtherFee ?? 0);
res.RealGiveFee = Math.Round(res.GiveFee * res.Adjust + res.Punishment + res.AdjustLaterOtherFee ?? 0);
res.GiveFee = Math.Round(res.PerforTotal * res.ScoringAverage + dept.MedicineExtra + dept.MaterialsExtra + res.Punishment + res.AssessLaterOtherFee ?? 0);
res.RealGiveFee = Math.Round(res.GiveFee * res.Adjust + res.AdjustLaterOtherFee ?? 0);
res.Avg = Math.Round((group.Number != 0 ? res.GiveFee / group.Number : null) ?? 0);
res.ResultsTotalFee = Math.Round(sumValue ?? 0);
......
using Performance.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Performance.Services
{
public class AprAmountService : IAutoInjection
{
private readonly PerforPeremployeeRepository _peremployeeRepository;
private readonly PerforPerapramountRepository _perapramountRepository;
public AprAmountService(
PerforPeremployeeRepository peremployeeRepository,
PerforPerapramountRepository perapramountRepository)
{
_peremployeeRepository = peremployeeRepository;
_perapramountRepository = perapramountRepository;
}
/// <summary>
/// 获取医院其他绩效 默认审核通过 status = 3
/// 科室及核算组别使用人员字典
/// </summary>
/// <param name="allotId"></param>
/// <param name="status"></param>
/// <returns></returns>
public List<AprAmount> GetAprAmount(int allotId, int status = 3)
{
var perapramounts = _perapramountRepository.GetEntities(t => t.AllotId == allotId && t.Status == status);
var employees = _peremployeeRepository.GetEntities(t => t.AllotId == allotId);
var result = perapramounts.Join(employees, amt => amt.PersonnelNumber, epy => epy.PersonnelNumber,
(amt, epy) => new AprAmount
{
AccountingUnit = epy.AccountingUnit,
UnitType = epy.UnitType,
PersonnelNumber = amt.PersonnelNumber,
DoctorName = amt.DoctorName,
PerforType = amt.PerforType,
Amount = amt.Amount
});
return result?.ToList() ?? new List<AprAmount>();
}
}
public class AprAmount
{
/// <summary>
/// 核算单元
/// </summary>
public string UnitType { get; set; }
/// <summary>
/// 人员工号
/// </summary>
public string PersonnelNumber { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
///
/// </summary>
public string PerforType { get; set; }
/// <summary>
/// 金额
/// </summary>
public Nullable<decimal> Amount { get; set; }
/// <summary>
/// 核算单元
/// </summary>
public string AccountingUnit { get; set; }
}
}
......@@ -738,17 +738,17 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
// 二次分配默认 调节系数100%
var adjust = item.Source == "二次绩效" ? 1 : (item.Adjust ?? 1);
// 计算调节后业绩绩效、管理绩效
item.PerforSumFee = Math.Round((item.PerforSumFee * adjust ?? 0), 0, MidpointRounding.AwayFromZero);
item.PerforManagementFee = Math.Round((item.PerforManagementFee * adjust ?? 0), 0, MidpointRounding.AwayFromZero);
item.PerforSumFee = Math.Round((item.PerforSumFee * adjust ?? 0), 2, MidpointRounding.AwayFromZero);
item.PerforManagementFee = Math.Round((item.PerforManagementFee * adjust ?? 0), 2, MidpointRounding.AwayFromZero);
var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0) + (item.AdjustLaterOtherFee ?? 0), 0);
var real = Math.Round((item.PerforSumFee ?? 0) + (item.PerforManagementFee ?? 0) + (item.AdjustLaterOtherFee ?? 0), 2, MidpointRounding.AwayFromZero);
item.OthePerfor = Math.Round((item.OthePerfor ?? 0), 0, MidpointRounding.AwayFromZero);
item.NightWorkPerfor = Math.Round((item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round(real + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 0, MidpointRounding.AwayFromZero);
item.OthePerfor = Math.Round((item.OthePerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.NightWorkPerfor = Math.Round((item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.ShouldGiveFee = Math.Round(real + (item.OthePerfor ?? 0) + (item.NightWorkPerfor ?? 0), 2, MidpointRounding.AwayFromZero);
item.ReservedRatio = empDic?.FirstOrDefault(w => w.PersonnelNumber == item.JobNumber)?.ReservedRatio ?? 0;
item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 0, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 0, MidpointRounding.AwayFromZero);
item.ReservedRatioFee = Math.Round(real * (item.ReservedRatio ?? 0), 2, MidpointRounding.AwayFromZero);
item.RealGiveFee = Math.Round(item.ShouldGiveFee - (item.ReservedRatioFee ?? 0) ?? 0, 2, MidpointRounding.AwayFromZero);
}
}
......
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