Commit 134f7930 by ruyun.zhang@suvalue.com

Merge branch '行政科室新增是否需要二次分配' into v20201230yubei

parents e6a68d46 fb287116
......@@ -8,7 +8,7 @@
},
"AppConnection": {
//"PerformanceConnectionString": "server=112.124.13.17;database=db_performance;uid=suvalue;pwd=suvalue2016;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_performance;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"PerformanceConnectionString": "server=192.168.18.166;database=db_yubei;uid=root;pwd=1234qwer;pooling=true;charset=utf8;convert zero datetime=true;port=3306;connection timeout=120;max pool size=512;allow user variables=true;",
"HangfireConnectionString": "server=192.168.18.166;database=db_hangfire;uid=root;pwd=1234qwer;port=3306;allow user variables=true;",
"RedisConnectionString": "116.62.245.55:6379,defaultDatabase=2"
},
......
......@@ -536,6 +536,11 @@
夜班费
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeEmployee.NeedSecondAllot">
<summary>
是否需要二次分配
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResult.AccountType">
<summary>
科室类别(例如 医技科室 临床科室 其他科室)
......@@ -706,6 +711,11 @@
夜班费
</summary>
</member>
<member name="P:Performance.DtoModels.ComputeResult.NeedSecondAllot">
<summary>
是否需要二次分配
</summary>
</member>
<member name="T:Performance.DtoModels.UnitType">
<summary> 核算单元类型 </summary>
</member>
......@@ -1086,6 +1096,11 @@
实发绩效
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataAccountBaisc.NeedSecondAllot">
<summary>
是否需要二次分配
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataClinicEmployee.UnitType">
<summary>
核算单元分类
......@@ -1351,6 +1366,11 @@
调节后其他绩效
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataLogisticsEmployee.NeedSecondAllot">
<summary>
是否需要二次分配
</summary>
</member>
<member name="P:Performance.DtoModels.PerDataLogisticsEmployee.RowNumber">
<summary>
行号
......@@ -2043,11 +2063,6 @@
是否开启科室CMI占比 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.DtoModels.HospitalRequest.IsOpenLogisticsSecondAllot">
<summary>
是否开启行政后勤二次绩效分配 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.DtoModels.IncomeRequest.SheetNameKeyword">
<summary>
关键字匹配
......
......@@ -2640,6 +2640,11 @@
调节后其他绩效
</summary>
</member>
<member name="P:Performance.EntityModels.im_employee_logistics.NeedSecondAllot">
<summary>
是否需要二次分配
</summary>
</member>
<member name="T:Performance.EntityModels.im_header">
<summary>
......@@ -4410,6 +4415,11 @@
变更日志
</summary>
</member>
<member name="P:Performance.EntityModels.res_account.NeedSecondAllot">
<summary>
是否需要二次分配
</summary>
</member>
<member name="T:Performance.EntityModels.res_accountdoctor">
<summary>
医生科室核算结果
......@@ -4880,6 +4890,11 @@
调节后其他绩效
</summary>
</member>
<member name="P:Performance.EntityModels.res_compute.NeedSecondAllot">
<summary>
是否需要二次分配 是 否
</summary>
</member>
<member name="T:Performance.EntityModels.res_reserved">
<summary>
......@@ -5285,11 +5300,6 @@
是否显示二次绩效科主任1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.EntityModels.sys_hospital.IsOpenLogisticsSecondAllot">
<summary>
是否开启行政后勤二次绩效分配 1 启用 2 禁用
</summary>
</member>
<member name="P:Performance.EntityModels.sys_hospital.IsSingleProject">
<summary>
抽取项目是否在同一环境 1 是 2 否
......
......@@ -160,5 +160,10 @@ public class ComputeEmployee
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
}
}
......@@ -198,5 +198,10 @@ public class ComputeResult
/// 夜班费
/// </summary>
public Nullable<decimal> NightWorkPerfor { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
}
}
......@@ -232,6 +232,11 @@ public class PerDataAccountBaisc : IPerData
/// </summary>
public Nullable<decimal> RealGiveFee { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
#endregion 由计算得出
}
}
......@@ -67,6 +67,11 @@ public class PerDataLogisticsEmployee : IPerData
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
/// <summary>
/// 行号
/// </summary>
public int RowNumber { get; set; }
......
......@@ -60,10 +60,10 @@ public class HospitalRequest
/// </summary>
public Nullable<int> IsOpenCMIPercent { get; set; }
/// <summary>
/// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
///// <summary>
///// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
///// </summary>
//public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
}
public class HospitalRequestValidator : AbstractValidator<HospitalRequest>
......
......@@ -153,5 +153,10 @@ public class im_employee_logistics
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
}
}
......@@ -187,5 +187,10 @@ public class res_account
/// 变更日志
/// </summary>
public string ChangeLog { get; set; }
/// <summary>
/// 是否需要二次分配
/// </summary>
public string NeedSecondAllot { get; set; }
}
}
......@@ -223,5 +223,9 @@ public class res_compute
/// 调节后其他绩效
/// </summary>
public Nullable<decimal> AdjustLaterOtherFee { get; set; }
/// <summary>
/// 是否需要二次分配 是 否
/// </summary>
public string NeedSecondAllot { get; set; }
}
}
......@@ -101,10 +101,10 @@ public class sys_hospital
/// </summary>
public Nullable<int> IsShowSecondDirector { get; set; }
/// <summary>
/// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
/// </summary>
public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
///// <summary>
///// 是否开启行政后勤二次绩效分配 1 启用 2 禁用
///// </summary>
//public Nullable<int> IsOpenLogisticsSecondAllot { get; set; }
/// <summary>
/// 抽取项目是否在同一环境 1 是 2 否
......
......@@ -377,6 +377,7 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept.ScoringAverage = resAccount?.ScoringAverage == null ? 0 : resAccount.ScoringAverage;
dept.AdjustFactor = (isBudget ? adjust : resAccount?.AdjustFactor) ?? 1;
dept.Income = empolyees.Sum(w => w.PerforTotal ?? 0);
dept.NeedSecondAllot = empolyees.Any(w => w.NeedSecondAllot == "是") ? "是" : "否";
//dept.Extra = (extra ?? 0);
//dept.MedicineExtra = 0;// (drugExtra ?? 0);
//dept.MaterialsExtra = 0;//(materialsExtra ?? 0);
......
......@@ -514,13 +514,18 @@ public void GenerateSecondAllot(per_allot allot)
List<ag_secondallot> insSecond = new List<ag_secondallot>();
List<ag_secondallot> updSecond = new List<ag_secondallot>();
var types = new List<int> { (int)UnitType.行政高层, (int)UnitType.行政中层 };
// 获取医院是否开启后勤二次分配
var hospital = hospitalRepository.GetEntity(w => w.ID == allot.HospitalId);
if (hospital?.IsOpenLogisticsSecondAllot != 1)
types.Add((int)UnitType.行政后勤);
var types = new List<int> { (int)UnitType.行政高层, (int)UnitType.行政中层, (int)UnitType.行政后勤 };
//// 获取医院是否开启后勤二次分配
//var hospital = hospitalRepository.GetEntity(w => w.ID == allot.HospitalId);
//if (hospital?.IsOpenLogisticsSecondAllot != 1)
// types.Add((int)UnitType.行政后勤);
var accountUnit = perforResaccountRepository.GetEntities(t => t.AllotID == allot.ID && !types.Contains(t.UnitType.Value));
// 查询需要进行二次分配的行政后勤科室
var xzAccountUnit = perforResaccountRepository.GetEntities(t => t.AllotID == allot.ID && t.UnitType.Value == (int)UnitType.行政后勤 && t.NeedSecondAllot == "是");
if (xzAccountUnit != null && xzAccountUnit.Count > 0)
(accountUnit ?? new List<res_account>()).AddRange(xzAccountUnit);
var specialList = perforResspecialunitRepository.GetEntities(t => t.AllotID == allot.ID);
if (accountUnit != null)
......
......@@ -188,6 +188,8 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
else
{
var compute = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && t.AccountType == items.FirstOrDefault(p => p.Value == type).Name);
if (type == (int)AccountUnitType.行政工勤)
compute = compute?.Where(w => w.NeedSecondAllot == "否")?.ToList();
if (compute == null || !compute.Any()) return new List<ResComputeResponse>();
......@@ -292,7 +294,7 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
{
var unitType = new List<int> { (int)UnitType.行政后勤 };
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId)
var list = perforResaccountRepository.GetEntities(t => unitType.Contains(t.UnitType.Value) && t.AllotID == allotId && t.NeedSecondAllot == "是")
?.OrderBy(t => t.UnitType)
.ThenByDescending(t => t.AccountingUnit);
List<DeptResponse> other = Mapper.Map<List<DeptResponse>>(list);
......@@ -571,15 +573,20 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
/// <returns></returns>
private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, int isShowManage)
{
var mTypes = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
// 获取医院是否开启后勤二次分配
var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
if (hospital?.IsOpenLogisticsSecondAllot != 1)
mTypes.Add(AccountUnitType.行政工勤.ToString());
var mTypes = new List<string>
{
AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString(),
AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString(),
AccountUnitType.行政工勤.ToString()
};
//// 获取医院是否开启后勤二次分配
//var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
//if (hospital?.IsOpenLogisticsSecondAllot != 1)
// mTypes.Add(AccountUnitType.行政工勤.ToString());
var types1 = new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() };
var types2 = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() };
var types3 = (hospital?.IsOpenLogisticsSecondAllot != 1) ? new List<string> { AccountUnitType.行政工勤.ToString() } : new List<string>();
var types3 = new List<string> { AccountUnitType.行政工勤.ToString() };
//// 业务中层人员信息
//var empolyeeList = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId);
......@@ -614,7 +621,7 @@ private List<ComputeResponse> GetAllotPerformance(int allotId, int hospitalId, i
comp.PerforSumFee = t.Avg;
}
// 行政工勤
if (types3.Contains(t.AccountType))
if (types3.Contains(t.AccountType) && t.NeedSecondAllot.Trim() == "是")
{
comp.PerforSumFee = t.GiveFee;
comp.AdjustLaterOtherFee = 0;
......
......@@ -134,7 +134,7 @@ public HospitalResponse Update(HospitalRequest request)
hospital.IsOpenDrugprop = request.IsOpenDrugprop;
hospital.IsShowManage = request.IsShowManage;
hospital.IsOpenCMIPercent = request.IsOpenCMIPercent;
hospital.IsOpenLogisticsSecondAllot = request.IsOpenLogisticsSecondAllot;
//hospital.IsOpenLogisticsSecondAllot = request.IsOpenLogisticsSecondAllot;
//hospital.IsOpenIncome = request.IsOpenIncome;
if (!_hospitalRepository.Update(hospital))
......
......@@ -512,6 +512,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
if (AccountUnitType.行政高层.ToString() == involve || AccountUnitType.行政中层.ToString() == involve)
{
// 行政高层、行政中层 默认不需要二次分配
compute.NeedSecondAllot = "否";
// 行政高层 行政中层 夜班费
compute.NightWorkPerfor = item.NightWorkPerfor;
//考核前绩效
......@@ -523,6 +525,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
}
else if (AccountUnitType.行政工勤.ToString() == involve)
{
// 行政工勤 根据测算表判读是否需要二次分配 默认不需要
compute.NeedSecondAllot = string.IsNullOrWhiteSpace(item.NeedSecondAllot) ? "否" : item.NeedSecondAllot;
//考核前绩效
compute.PerforTotal = Math.Round(compute.BaiscNormValue * compute.PostCoefficient * compute.Attendance + compute.OtherPerfor ?? 0);
//考核后绩效 更加开关来控制显示
......
......@@ -70,6 +70,7 @@ public class ExcelReadConfig
new ColumnInfo(nameof(PerDataLogisticsEmployee.PostCoefficient), "岗位系数", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.Attendance), "出勤率", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.OthePerfor), "其他绩效", true),
new ColumnInfo(nameof(PerDataLogisticsEmployee.NeedSecondAllot), "是否需要二次分配"),
//new ColumnInfo(nameof(PerDataLogisticsEmployee.AdjustLaterOtherFee), "调节后其他绩效", true),
};
......
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