Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
5f9204fa
Commit
5f9204fa
authored
Jun 01, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效提交审核,后端进行金额校验
parent
e7d020d7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
25 deletions
+43
-25
performance/Performance.Api/Properties/PublishProfiles/FolderProfile.pubxml
+8
-11
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.DtoModels/Request/AccoungingRequest.cs
+5
-0
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+2
-0
performance/Performance.Services/SecondAllotService.cs
+18
-14
No files found.
performance/Performance.Api/Properties/PublishProfiles/FolderProfile.pubxml
View file @
5f9204fa
<?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">
<PropertyGroup>
<WebPublishMethod>
FileSystem
</WebPublishMethod>
<PublishProvider>
FileSystem
</PublishProvider>
<DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>bin\Release\netcoreapp2.2\publish\</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>
True
</LaunchSiteAfterPublish>
<ExcludeApp_Data>
False
</ExcludeApp_Data>
<TargetFramework>netcoreapp2.2</TargetFramework>
<ProjectGuid>3ae00ff5-f0ba-4d72-a23b-770186309327</ProjectGuid>
<SelfContained>false</SelfContained>
<_IsPortable>
true
</_IsPortable>
<publishUrl>
D:\publish\jx.suvalue.com2
</publishUrl>
<DeleteExistingFiles>
True
</DeleteExistingFiles>
</PropertyGroup>
</Project>
\ No newline at end of file
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
5f9204fa
...
...
@@ -1829,6 +1829,11 @@
绩效Id
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.HospitalId"
>
<summary>
绩效Id
</summary>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.Type"
>
<summary>
1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
5f9204fa
...
...
@@ -4306,6 +4306,11 @@
是否在抽取数据0 否、1 是、2 抽取成功、3 抽取失败
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.ExtractTime"
>
<summary>
数据抽取起始时间
</summary>
</member>
<member
name=
"P:Performance.EntityModels.per_allot.Generate"
>
<summary>
1、人事科提交重新生成 2、生成成功 3、原始数据修改
...
...
performance/Performance.DtoModels/Request/AccoungingRequest.cs
View file @
5f9204fa
...
...
@@ -8,6 +8,11 @@ public class AccoungingRequest
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 绩效Id
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
/// 1 返回accounting列表 2 返回核算单元类型 3 返回核算单元
/// </summary>
public
int
Type
{
get
;
set
;
}
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
5f9204fa
...
...
@@ -55,6 +55,8 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
Workload_Ratio_Default
=
0.8
m
,
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
));
var
headDynamic
=
agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
headDynamic
!=
null
&&
headDynamic
.
Any
())
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
5f9204fa
...
...
@@ -1572,14 +1572,14 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if
(
temp
==
null
)
throw
new
PerformanceException
(
"选择模板不可用,请确定模板及数据是否存在!"
);
//bool method
(decimal? submitDataAmount, decimal? realGiveFee)
//
{
//
if (!submitDataAmount.HasValue || !realGiveFee.HasValue)
//
return false;
bool
VerifySubmissioAmount
(
decimal
?
submitDataAmount
,
decimal
?
realGiveFee
)
{
if
(!
submitDataAmount
.
HasValue
||
!
realGiveFee
.
HasValue
)
return
false
;
// decimal floatValue = 0.5
m;
//
return submitDataAmount >= (realGiveFee - floatValue) && submitDataAmount <= (realGiveFee + floatValue);
//
}
decimal
floatValue
=
0.1
m
;
return
submitDataAmount
>=
(
realGiveFee
-
floatValue
)
&&
submitDataAmount
<=
(
realGiveFee
+
floatValue
);
}
if
(
temp
.
UseTempId
==
6
)
{
...
...
@@ -1587,9 +1587,9 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
//var total = data.Sum(t => t.RealAmount);
//if (!method
(total, second.RealGiveFee))
// throw new PerformanceException("总金额与考核后金额不一致!
");
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
+
t
.
NightWorkPerformance
);
// 其他模板 = 可分配绩效 + 夜班绩效
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
else
if
(
new
int
[]
{
7
,
8
}.
Contains
(
temp
.
UseTempId
.
Value
))
{
...
...
@@ -1597,16 +1597,20 @@ public bool AuditSubmit(ag_secondallot second, int userId)
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
//var total = data.Where(t => t.ItemName == "实发绩效工资金额"
&& t.RowNumber > -1).GroupBy(t => t.RowNumber)
//
.Sum(t => ConvertHelper.To<decimal>(t.OrderByDescending(o => o.ID).FirstOrDefault().ItemValue));
//if (!method
(total, second.RealGiveFee))
// throw new PerformanceException("总金额与考核后金额不一致!
");
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
));
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
else
if
(
new
int
[]
{
9
,
10
}.
Contains
(
temp
.
UseTempId
.
Value
))
{
var
data
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
data
==
null
||
!
data
.
Any
())
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
.
Status
=
2
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment