Commit f6a324b8 by ruyun.zhang@suvalue.com

Merge branch 'feature/预留绩效' into develop

parents 2c6fcddc 225c7cd2
...@@ -388,11 +388,17 @@ public void SaveSecondReserved(int secondId) ...@@ -388,11 +388,17 @@ public void SaveSecondReserved(int secondId)
/// 绩效生成完成后修改绩效预留金额 /// 绩效生成完成后修改绩效预留金额
/// </summary> /// </summary>
/// <param name="allot"></param> /// <param name="allot"></param>
public void SaveReserved(per_allot allot) public void SaveReserved(per_allot allot, int hospitalId)
{ {
var mTypes = new[] { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString(), AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString() }; var mTypes = new List<string> { AccountUnitType.行政中层.ToString(), AccountUnitType.行政高层.ToString(), AccountUnitType.行政工勤.ToString() };
var resComputes = perforRescomputeRepository.GetEntities(t => t.AllotID == allot.ID && mTypes.Contains(t.AccountType))?.OrderByDescending(t => t.AccountingUnit); var hospital = hospitalRepository.GetEntity(w => w.ID == hospitalId);
if (hospital?.IsShowManage == 1)
mTypes.AddRange(new List<string> { AccountUnitType.护士长.ToString(), AccountUnitType.科主任.ToString() });
var resComputes = perforRescomputeRepository
.GetEntities(t => t.AllotID == allot.ID && mTypes.Contains(t.AccountType) && (string.IsNullOrEmpty(t.NeedSecondAllot) || t.NeedSecondAllot == "否"))
?.OrderByDescending(t => t.AccountingUnit);
if (resComputes != null && resComputes.Any()) if (resComputes != null && resComputes.Any())
{ {
......
...@@ -433,7 +433,7 @@ public void Generate(per_allot allot) ...@@ -433,7 +433,7 @@ public void Generate(per_allot allot)
// 保存预留绩效 // 保存预留绩效
logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true); logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
resultComputeService.SaveReserved(allot); resultComputeService.SaveReserved(allot, allot.HospitalId);
// 科室下发 // 科室下发
resultComputeService.GenerateSecondAllot(allot); resultComputeService.GenerateSecondAllot(allot);
......
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