Commit 98666b1c by ruyun.zhang@suvalue.com

Merge branch 'v20201230yubei' into v2020morge-graphql

parents a10db34d 89216bde
......@@ -966,7 +966,7 @@
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.BasicFactor">
<summary>
医生基础系数
预算比例
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.AssessBeforeOtherFee">
......
......@@ -54,7 +54,7 @@ public class PerDataAccountBaisc : IPerData
public decimal Number { get; set; }
/// <summary>
/// 医生基础系数
/// 预算比例
/// </summary>
public decimal BasicFactor { get; set; }
......
......@@ -381,7 +381,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.Income = empolyees.Sum(w => w.PerforTotal ?? 0);
dept.NeedSecondAllot = empolyees.Any(w => w.NeedSecondAllot == "是") ? "是" : "否";
if (resAccount?.UnitType == UnitType.行政后勤.ToString() && resAccount?.NeedSecondAllot == "是")
if (UnitTypeUtil.IsOffice(resAccount?.UnitType) && dept.NeedSecondAllot == "是")
{
dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage;
dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1;
......@@ -392,7 +392,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.AssessBeforeOtherFee = resAccount?.AssessBeforeOtherFee ?? 0;
dept.AssessLaterOtherFee = resAccount?.AssessLaterOtherFee ?? 0;
// 行政后勤 没有 调节后其他绩效
//dept.AdjustLaterOtherFee = resAccount?.AdjustLaterOtherFee ?? 0;
dept.AdjustLaterOtherFee = resAccount?.AdjustLaterOtherFee ?? 0;
}
else
{
......
......@@ -555,8 +555,34 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
}).Distinct();
result.AddRange(specialResult);
// 需要二次分配的行政科室
var needSecond = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && t.UnitType.Value == (int)UnitType.行政后勤 && t.NeedSecondAllot == "是") ?? new List<res_account>();
var needSecondResult = needSecond.Select(t => new DeptResponse
{
UnitName = ((UnitType)t.UnitType).ToString() == "行政后勤" ? "行政工勤" : ((UnitType)t.UnitType).ToString(),
AccountingUnit = t.AccountingUnit,
Department = t.AccountingUnit,
PerforFee = t.PerforFee,
WorkloadFee = t.WorkloadFee,
AssessBeforeOtherFee = t.AssessBeforeOtherFee,
PerforTotal = t.PerforTotal,
ScoringAverage = t.ScoringAverage,
Extra = t.Extra,
MedicineExtra = t.MedicineExtra,
MaterialsExtra = t.MaterialsExtra,
AssessLaterOtherFee = t.AssessLaterOtherFee,
AssessLaterPerforTotal = t.AssessLaterPerforTotal,
AdjustFactor = t.AdjustFactor,
AdjustLaterOtherFee = t.AdjustLaterOtherFee,
AssessLaterManagementFee = clinicalComputes?.Where(w => w.AccountingUnit == t.AccountingUnit && w.UnitType == ((UnitType)t.UnitType).ToString())?.Sum(c => c.RealGiveFee),
RealGiveFee = t.RealGiveFee,
});
result.AddRange(needSecondResult);
// 不需要二次分配的行政科室
var officeTypes = new List<string> { "行政工勤", "行政高层", "行政中层" };
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && officeTypes.Contains(t.AccountType)) ?? new List<res_compute>();
var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && officeTypes.Contains(t.AccountType) && t.NeedSecondAllot == "否") ?? new List<res_compute>();
var officeResult = computes.GroupBy(t => new { t.AccountingUnit, t.AccountType, t.UnitType }).Select(t => new DeptResponse
{
......@@ -754,7 +780,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
//// 业务中层人员信息
//var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
// 一次绩效 获取特定人员绩效结果
var allot = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && mTypes.Contains(t.AccountType) && t.NeedSecondAllot == "否")?.OrderByDescending(t => t.AccountingUnit);
var allot = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && mTypes.Contains(t.AccountType) && (string.IsNullOrEmpty(t.NeedSecondAllot) || t.NeedSecondAllot == "否"))?.OrderByDescending(t => t.AccountingUnit);
//var apramounts = perapramountRepository.GetEntities(t => t.AllotId == allotId);
return allot?.Select(t =>
......
......@@ -90,7 +90,10 @@ public SecondResponse GetSecondDetails(int userId, int secondId, int hospitalId,
var userTemp = agusetempRepository.GetEntity(w => w.HospitalId == hospitalId && w.Department == secondAllot.Department && w.UnitType == secondAllot.UnitType);
if (userTemp != null) tempId = userTemp.UseTempId ?? (int)Temp.other;
//if (tempId == (int)Temp.other) return new SecondResponse();
if (new int[] { 2, 3 }.Contains(secondAllot.Status ?? 1)) //纪录被提交后,根据提交时的模板获取对应的数据
tempId = (secondAllot.UseTempId ?? 0) == 0 ? (int)Temp.other : secondAllot.UseTempId.Value;
if (tempId == (int)Temp.other) return new SecondResponse();
if (isArchive == 1 || new List<int> { (int)SecondAllotStatus.WaitReview, (int)SecondAllotStatus.PassAudit }.Contains(secondAllot.Status ?? (int)SecondAllotStatus.Uncommitted))
employeeSource = (int)EmployeeSource.Initial;
......
using Performance.DtoModels;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.Services
{
public class UnitTypeUtil
{
/// <summary>
/// 是否是行政后勤/工勤
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public static bool IsOffice(int unit)
{
return unit == (int)UnitType.行政后勤;
}
/// <summary>
/// 是否是行政后勤/工勤
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public static bool IsOffice(string unit)
{
return !string.IsNullOrEmpty(unit) && (unit == "行政后勤" || unit == "行政工勤");
}
}
}
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