Commit 5896236d by ruyun.zhang@suvalue.com

Merge branch 'hotfix/下发功能重做'

parents af4df4a3 d6f5dde2
...@@ -425,18 +425,36 @@ public ApiResponse Issued([FromBody] AllotRequest request) ...@@ -425,18 +425,36 @@ public ApiResponse Issued([FromBody] AllotRequest request)
if (null == allot) if (null == allot)
throw new PerformanceException("当前绩效记录不存在"); throw new PerformanceException("当前绩效记录不存在");
// 科室下发 var seconds = _resultComputeService.GetSeconds(allot);
bool isIssued = false; if (request.isIssued == 1)
var result = _resultComputeService.IssuedPrompt(allot, request, ref isIssued); {
// 确认下发
//绩效状态修改;绩效划拨,下发驳回 var isIssued = _resultComputeService.IssuedChangeSecond(allot, seconds);
if (request.isIssued == 1 && isIssued) if (isIssued)
{ {
_allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed)); _allotService.UpdateAllotStates(allot.ID, (int)AllotStates.GenerateSucceed, EnumHelper.GetDescription(AllotStates.GenerateSucceed));
costTransferService.RejectedApplicat(allot.ID); costTransferService.RejectedApplicat(allot.ID);
return new ApiResponse(ResponseType.OK, "下发成功");
}
else
{
return new ApiResponse(ResponseType.Fail, "下发失败");
}
} }
else
{
// 获取二次分配差异数据
var orgChangeSecond = _resultComputeService.GetChangeSecond(seconds);
return new ApiResponse(ResponseType.OK, result); if (!string.IsNullOrEmpty(request.SearchQuery))
orgChangeSecond = orgChangeSecond?.Where(t => t.Department.Contains(request.SearchQuery)).ToList() ?? new List<IssuedPromptResponse>();
if (!string.IsNullOrEmpty(request.QueryStatus.ToString()))
orgChangeSecond = orgChangeSecond?.Where(t => t.IssueStatus == request.QueryStatus).ToList() ?? new List<IssuedPromptResponse>();
orgChangeSecond.ForEach(item => item.UnitType = UnitTypeUtil.GetOffice(item.UnitType));
orgChangeSecond = orgChangeSecond?.OrderBy(t => t.IssueStatus).ToList();
return new ApiResponse(ResponseType.OK, orgChangeSecond);
}
} }
/// <summary> /// <summary>
......
...@@ -1199,7 +1199,7 @@ ...@@ -1199,7 +1199,7 @@
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGatherHands(System.Int32,Performance.DtoModels.GatherRequest)">
<summary> <summary>
手工录入 手工录入 - 录入界面
</summary> </summary>
<param name="allotId"></param> <param name="allotId"></param>
<param name="request"></param> <param name="request"></param>
...@@ -1215,7 +1215,15 @@ ...@@ -1215,7 +1215,15 @@
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)"> <member name="M:Performance.Api.Controllers.EmployeeController.GetGather(System.Int32,Performance.DtoModels.PersonParamsRequest)">
<summary> <summary>
手工录入列表 手工录入列表 - 明细
</summary>
<param name="allotId"></param>
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetGatherTotal(System.Int32,Performance.DtoModels.PersonParamsRequest)">
<summary>
手工录入列表 - 汇总
</summary> </summary>
<param name="allotId"></param> <param name="allotId"></param>
<param name="request"></param> <param name="request"></param>
......
...@@ -450,8 +450,8 @@ public void Generate(per_allot allot) ...@@ -450,8 +450,8 @@ public void Generate(per_allot allot)
//logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在生成绩效", "保存预留绩效金额", 1, allot.ID, "ReceiveMessage", true);
//resultComputeService.SaveReserved(allot, allot.HospitalId); //resultComputeService.SaveReserved(allot, allot.HospitalId);
// 科室下发 //// 科室下发
resultComputeService.GenerateSecondAllot(allot); //resultComputeService.GenerateSecondAllot(allot);
UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate); UpdateAllotStates(allot.ID, (int)AllotStates.GenerateAccomplish, EnumHelper.GetDescription(AllotStates.GenerateAccomplish), generate);
perforCofdirectorRepository.SupplementaryData(allot.ID); perforCofdirectorRepository.SupplementaryData(allot.ID);
...@@ -465,7 +465,6 @@ public void Generate(per_allot allot) ...@@ -465,7 +465,6 @@ public void Generate(per_allot allot)
//logManageService.WriteMsg("正在生成报表数据", $"报表数据生成完成;受影响:{res}行", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在生成报表数据", $"报表数据生成完成;受影响:{res}行", 1, allot.ID, "ReceiveMessage", true);
//reportService.ExecProc("call proc_report_performance(@hospitalid, @year, @month);", new { allot.HospitalId, allot.Year, allot.Month }); //reportService.ExecProc("call proc_report_performance(@hospitalid, @year, @month);", new { allot.HospitalId, allot.Year, allot.Month });
////发送邮件 ////发送邮件
//logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true); //logManageService.WriteMsg("正在发送邮件", "正在发送邮件", 1, allot.ID, "ReceiveMessage", true);
//SendEmail(allot, mail, 1, time); //SendEmail(allot, mail, 1, time);
......
...@@ -31,6 +31,16 @@ public static bool IsOffice(string unit) ...@@ -31,6 +31,16 @@ public static bool IsOffice(string unit)
} }
/// <summary> /// <summary>
/// 获得标准名 行政后勤/工勤
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public static string GetOffice(string unit)
{
return string.IsNullOrEmpty(unit) ? "" : unit.Replace("行政后勤", "行政工勤");
}
/// <summary>
/// 核算单元类型是否相同 /// 核算单元类型是否相同
/// </summary> /// </summary>
/// <param name="left"></param> /// <param name="left"></param>
......
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