撤回提交

parent a97c9350
...@@ -833,9 +833,9 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request) ...@@ -833,9 +833,9 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
} }
return new ApiResponse(ResponseType.Fail, "提交失败"); return new ApiResponse(ResponseType.Fail, "提交失败");
} }
catch (PerformanceException ex) catch (PerformanceException)
{ {
throw ex; throw;
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -843,6 +843,21 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request) ...@@ -843,6 +843,21 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
return new ApiResponse(ResponseType.Fail, "提交失败"); return new ApiResponse(ResponseType.Fail, "提交失败");
} }
} }
/// <summary>
/// 二次绩效撤回提交
/// </summary>
/// <returns></returns>
[Route("api/second/redistribution/rollback/{secondId}")]
[HttpPost]
public ApiResponse RedistributionRollback(int secondId)
{
var result = secondAllotService.RollbackSubmit(secondId);
if (result)
return new ApiResponse(ResponseType.OK, "提交成功");
return new ApiResponse(ResponseType.Fail, "提交失败");
}
/// <summary> /// <summary>
/// 二次分配人员字典带出 /// 二次分配人员字典带出
/// </summary> /// </summary>
......
...@@ -1656,6 +1656,29 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) ...@@ -1656,6 +1656,29 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
} }
/// <summary> /// <summary>
/// 二次绩效撤回提交
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
/// <exception cref="PerformanceException"></exception>
public bool RollbackSubmit(int secondId)
{
var second = agsecondallotRepository.GetEntity(t => t.Id == secondId);
if (second == null)
throw new PerformanceException("二次分配记录不存在,请确认后重试");
if (second.Status != 2)
throw new PerformanceException("该绩效未提交至审核,请确认后重试");
second.UseTempId = null;
second.Status = 1;
second.NursingDeptStatus = 1;
second.SubmitType = null;
second.SubmitTime = null;
return agsecondallotRepository.Update(second);
}
/// <summary>
/// 审核 /// 审核
/// </summary> /// </summary>
/// <param name="userId">用户ID</param> /// <param name="userId">用户ID</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