二次分配提交

parent dcc21a32
...@@ -44,10 +44,10 @@ public List<view_second_compute_collect> GetComputeBySecond(int secondId) ...@@ -44,10 +44,10 @@ public List<view_second_compute_collect> GetComputeBySecond(int secondId)
return new List<view_second_compute_collect>(); return new List<view_second_compute_collect>();
} }
public int Submit(int secondId, int tempId, decimal realGiveFee, string remark = "") public int Submit(int secondId, int tempId, decimal realGiveFee, int submitType, string remark = "")
{ {
string sql = "UPDATE ag_secondallot SET UseTempId = @tempId,NursingDeptStatus = @status, Status = @status, SubmitTime = @date, Remark = @remark WHERE Id = @secondId AND RealGiveFee = @fee"; string sql = "UPDATE ag_secondallot SET UseTempId = @tempId,NursingDeptStatus = @status, Status = @status, SubmitType = @submitType,SubmitTime = @date, Remark = @remark WHERE Id = @secondId AND RealGiveFee = @fee";
return Execute(sql, new { secondId, tempId, status = 2, date = DateTime.Now, fee = realGiveFee, remark }); return Execute(sql, new { secondId, tempId, status = 2, date = DateTime.Now, fee = realGiveFee, submitType, remark });
} }
} }
} }
...@@ -1621,8 +1621,8 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) ...@@ -1621,8 +1621,8 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
if (!VerifySubmissioAmount(total, second.RealGiveFee)) if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}"); throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
var submitType = temp.UseTempId == 6 ? 2 : 1;
var res = agsecondallotRepository.Submit(second.Id, temp.UseTempId ?? 0, total); var res = agsecondallotRepository.Submit(second.Id, temp.UseTempId ?? 0, total, submitType);
if (res == 0) if (res == 0)
throw new PerformanceException($"提交失败,当前绩效分配可能发生改变!"); throw new PerformanceException($"提交失败,当前绩效分配可能发生改变!");
return true; return true;
...@@ -1638,7 +1638,8 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) ...@@ -1638,7 +1638,8 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
if (!VerifySubmissioAmount(total, second.RealGiveFee)) if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}"); throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
var res = agsecondallotRepository.Submit(second.Id, temp.UseTempId ?? 0, total); var submitType = temp.UseTempId == 6 ? 2 : 1;
var res = agsecondallotRepository.Submit(second.Id, temp.UseTempId ?? 0, total, submitType);
if (res == 0) if (res == 0)
throw new PerformanceException($"提交失败,当前绩效分配可能发生改变请刷新后重试!"); throw new PerformanceException($"提交失败,当前绩效分配可能发生改变请刷新后重试!");
return true; return true;
...@@ -1658,7 +1659,8 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) ...@@ -1658,7 +1659,8 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee:0.####},提交金额:{total:0.####}"); throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee:0.####},提交金额:{total:0.####}");
else else
{ {
var res = agsecondallotRepository.Submit(second.Id, temp.UseTempId ?? 0, total); var submitType = temp.UseTempId == 6 ? 2 : 1;
var res = agsecondallotRepository.Submit(second.Id, temp.UseTempId ?? 0, total, submitType);
if (res == 0) if (res == 0)
throw new PerformanceException($"提交失败,当前绩效分配可能发生改变,请刷新后重试!"); throw new PerformanceException($"提交失败,当前绩效分配可能发生改变,请刷新后重试!");
return true; return true;
...@@ -1670,7 +1672,7 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount) ...@@ -1670,7 +1672,7 @@ bool VerifySubmissioAmount(decimal? leftAmount, decimal? rightAmount)
//second.UseTempId = temp.UseTempId; //second.UseTempId = temp.UseTempId;
//second.Status = 2; //second.Status = 2;
//second.NursingDeptStatus = 2; //second.NursingDeptStatus = 2;
////second.SubmitType = temp.UseTempId == 6 ? 2 : 1; //second.SubmitType = temp.UseTempId == 6 ? 2 : 1;
//second.SubmitTime = DateTime.Now; //second.SubmitTime = DateTime.Now;
//second.Remark = "已提交审核,等待审核中"; //second.Remark = "已提交审核,等待审核中";
//return agsecondallotRepository.Update(second); //return agsecondallotRepository.Update(second);
...@@ -2455,17 +2457,17 @@ private List<SecondPerforResponse> GetAllotPerformance(int allotId, List<res_com ...@@ -2455,17 +2457,17 @@ private List<SecondPerforResponse> GetAllotPerformance(int allotId, List<res_com
ShouldGiveFee = t.ShouldGiveFee, ShouldGiveFee = t.ShouldGiveFee,
}; };
// 行政中层 行政高层 补充 夜班费 // 行政中层 行政高层 补充 夜班费
if (types2.Contains(t.AccountType)) if (types2.Contains(t.AccountType))
comp.NightWorkPerfor = t.NightWorkPerfor; comp.NightWorkPerfor = t.NightWorkPerfor;
// 科主任/护士长 // 科主任/护士长
if (types1.Contains(t.AccountType)) if (types1.Contains(t.AccountType))
{ {
// 等同于考核后管理绩效 AssessLaterManagementFee // 等同于考核后管理绩效 AssessLaterManagementFee
comp.PerforManagementFee = Math.Round(t.ShouldGiveFee * t.ScoreAverageRate * t.Attendance + t.Punishment ?? 0); comp.PerforManagementFee = Math.Round(t.ShouldGiveFee * t.ScoreAverageRate * t.Attendance + t.Punishment ?? 0);
// 仅显示管理绩效 // 仅显示管理绩效
if (isShowManage == 2) if (isShowManage == 2)
comp.PerforSumFee = 0; comp.PerforSumFee = 0;
else else
comp.PerforSumFee = t.Avg; comp.PerforSumFee = t.Avg;
......
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