Commit 5f9204fa by lcx

二次绩效提交审核,后端进行金额校验

parent e7d020d7
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件 https://go.microsoft.com/fwlink/?LinkID=208121.
自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。
--> -->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod> <DeleteExistingFiles>True</DeleteExistingFiles>
<PublishProvider>FileSystem</PublishProvider> <ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform> <LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\netcoreapp2.2\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish /> <SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid> <ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid>
<SelfContained>false</SelfContained> <SelfContained>false</SelfContained>
<_IsPortable>true</_IsPortable>
<publishUrl>D:\publish\jx.suvalue.com2</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
\ No newline at end of file
...@@ -1829,6 +1829,11 @@ ...@@ -1829,6 +1829,11 @@
绩效Id 绩效Id
</summary> </summary>
</member> </member>
<member name="P:Performance.DtoModels.AccoungingRequest.HospitalId">
<summary>
绩效Id
</summary>
</member>
<member name="P:Performance.DtoModels.AccoungingRequest.Type"> <member name="P:Performance.DtoModels.AccoungingRequest.Type">
<summary> <summary>
1 返回accounting列表 2 返回核算单元类型 3 返回核算单元 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
......
...@@ -4306,6 +4306,11 @@ ...@@ -4306,6 +4306,11 @@
是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败 是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.per_allot.ExtractTime">
<summary>
数据抽取起始时间
</summary>
</member>
<member name="P:Performance.EntityModels.per_allot.Generate"> <member name="P:Performance.EntityModels.per_allot.Generate">
<summary> <summary>
1、人事科提交重新生成 2、生成成功 3、原始数据修改 1、人事科提交重新生成 2、生成成功 3、原始数据修改
......
...@@ -8,6 +8,11 @@ public class AccoungingRequest ...@@ -8,6 +8,11 @@ public class AccoungingRequest
public int AllotId { get; set; } public int AllotId { get; set; }
/// <summary> /// <summary>
/// 绩效Id
/// </summary>
public int HospitalId { get; set; }
/// <summary>
/// 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元 /// 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
/// </summary> /// </summary>
public int Type { get; set; } public int Type { get; set; }
......
...@@ -55,6 +55,8 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl ...@@ -55,6 +55,8 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
Workload_Ratio_Default = 0.8m, Workload_Ratio_Default = 0.8m,
DaysFullAttendance = DateTime.DaysInMonth(allot.Year, allot.Month) DaysFullAttendance = DateTime.DaysInMonth(allot.Year, allot.Month)
}; };
head.TotalDistPerformance = second.RealGiveFee;
head.PaymentOfTheMonth = $"{allot.Year}{allot.Month.ToString().PadLeft(2, '0')}月";
JObject jObject = JObject.Parse(JsonConvert.SerializeObject(head)); JObject jObject = JObject.Parse(JsonConvert.SerializeObject(head));
var headDynamic = agworktypesourceRepository.GetEntities(t => t.SecondId == secondId); var headDynamic = agworktypesourceRepository.GetEntities(t => t.SecondId == secondId);
if (headDynamic != null && headDynamic.Any()) if (headDynamic != null && headDynamic.Any())
......
...@@ -1572,14 +1572,14 @@ public bool AuditSubmit(ag_secondallot second, int userId) ...@@ -1572,14 +1572,14 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if (temp == null) if (temp == null)
throw new PerformanceException("选择模板不可用,请确定模板及数据是否存在!"); throw new PerformanceException("选择模板不可用,请确定模板及数据是否存在!");
//bool method(decimal? submitDataAmount, decimal? realGiveFee) bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
//{ {
// if (!submitDataAmount.HasValue || !realGiveFee.HasValue) if (!submitDataAmount.HasValue || !realGiveFee.HasValue)
// return false; return false;
// decimal floatValue = 0.5m; decimal floatValue = 0.1m;
// return submitDataAmount >= (realGiveFee - floatValue) && submitDataAmount <= (realGiveFee + floatValue); return submitDataAmount >= (realGiveFee - floatValue) && submitDataAmount <= (realGiveFee + floatValue);
//} }
if (temp.UseTempId == 6) if (temp.UseTempId == 6)
{ {
...@@ -1587,9 +1587,9 @@ public bool AuditSubmit(ag_secondallot second, int userId) ...@@ -1587,9 +1587,9 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if (data == null || !data.Any()) if (data == null || !data.Any())
throw new PerformanceException("提交时未检测到数据!"); throw new PerformanceException("提交时未检测到数据!");
//var total = data.Sum(t => t.RealAmount); var total = data.Sum(t => t.DistPerformance + t.NightWorkPerformance); // 其他模板 = 可分配绩效 + 夜班绩效
//if (!method(total, second.RealGiveFee)) if (!VerifySubmissioAmount(total, second.RealGiveFee))
// throw new PerformanceException("总金额与考核后金额不一致!"); throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
} }
else if (new int[] { 7, 8 }.Contains(temp.UseTempId.Value)) else if (new int[] { 7, 8 }.Contains(temp.UseTempId.Value))
{ {
...@@ -1597,16 +1597,20 @@ public bool AuditSubmit(ag_secondallot second, int userId) ...@@ -1597,16 +1597,20 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if (data == null || !data.Any()) if (data == null || !data.Any())
throw new PerformanceException("提交时未检测到数据!"); throw new PerformanceException("提交时未检测到数据!");
//var total = data.Where(t => t.ItemName == "实发绩效工资金额" && t.RowNumber > -1).GroupBy(t => t.RowNumber) var total = data.Where(t => new string[] { "可分配绩效", "夜班工作量绩效" }.Contains(t.ItemName) && t.RowNumber > -1).GroupBy(t => t.RowNumber)
// .Sum(t => ConvertHelper.To<decimal>(t.OrderByDescending(o => o.ID).FirstOrDefault().ItemValue)); .Sum(t => ConvertHelper.To<decimal>(t.OrderByDescending(o => o.ID).FirstOrDefault().ItemValue));
//if (!method(total, second.RealGiveFee)) if (!VerifySubmissioAmount(total, second.RealGiveFee))
// throw new PerformanceException("总金额与考核后金额不一致!"); throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
} }
else if (new int[] { 9, 10 }.Contains(temp.UseTempId.Value)) else if (new int[] { 9, 10 }.Contains(temp.UseTempId.Value))
{ {
var data = agbodysourceRepository.GetEntities(t => t.SecondId == second.Id); var data = agbodysourceRepository.GetEntities(t => t.SecondId == second.Id);
if (data == null || !data.Any()) if (data == null || !data.Any())
throw new PerformanceException("提交时未检测到数据!"); throw new PerformanceException("提交时未检测到数据!");
var total = data.Sum(t => t.DistPerformance + t.NightWorkPerformance);
if (!VerifySubmissioAmount(total, second.RealGiveFee))
throw new PerformanceException($"总金额与考核后金额不一致!可分配金额:{second.RealGiveFee},提交金额:{total}");
} }
second.UseTempId = temp.UseTempId; second.UseTempId = temp.UseTempId;
second.Status = 2; second.Status = 2;
......
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