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
e4d05297
Commit
e4d05297
authored
Jun 02, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效审核
parent
92a110ee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
performance/Performance.Api/Controllers/SecondAllotController.cs
+2
-1
performance/Performance.Api/Startup.cs
+2
-2
performance/Performance.Services/SecondAllotService.cs
+3
-3
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
e4d05297
...
...
@@ -81,7 +81,8 @@ public ApiResponse SaveValue(int secondid, [FromBody] List<ag_fixatitem> request
if
(
unitTypeCount
!=
1
||
request
.
Any
(
t
=>
string
.
IsNullOrEmpty
(
t
.
UnitType
)))
throw
new
PerformanceException
(
"科室类型错误"
);
var
repetition
=
request
.
GroupBy
(
t
=>
new
{
t
.
RowNumber
,
t
.
ItemName
/*, WorkType = t.WorkType ?? 0*/
}).
Where
(
t
=>
t
.
Count
()
>
1
);
var
repetition
=
request
.
Where
(
t
=>
!
string
.
IsNullOrWhiteSpace
(
t
.
ItemName
))
.
GroupBy
(
t
=>
new
{
t
.
RowNumber
,
t
.
ItemName
/*, WorkType = t.WorkType ?? 0*/
}).
Where
(
t
=>
t
.
Count
()
>
1
);
if
(
repetition
.
Any
())
throw
new
PerformanceException
(
string
.
Join
(
";"
,
repetition
.
Select
(
t
=>
$"行
{
t
.
Key
.
RowNumber
}
项‘
{
t
.
Key
.
ItemName
}
’重复录入"
)));
...
...
performance/Performance.Api/Startup.cs
View file @
e4d05297
...
...
@@ -35,7 +35,7 @@ public void ConfigureServices(IServiceCollection services)
services
.
AddMemoryCache
();
// ratelimit
services
.
AddRateLimitConfiguration
(
Configuration
);
//
services.AddRateLimitConfiguration(Configuration);
// graphql
services
.
AddGraphQLSchemaAndTypes
();
...
...
@@ -108,7 +108,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app
.
UseSignalR
(
routes
=>
routes
.
MapHub
<
AllotLogHub
>(
"/performance/allotLogHub"
));
app
.
UseRateLimitSetup
();
//
app.UseRateLimitSetup();
app
.
UseMvc
();
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
e4d05297
...
...
@@ -1589,7 +1589,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
+
t
.
NightWorkPerformance
);
// 其他模板 = 可分配绩效 + 夜班绩效
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
??
0
+
t
.
NightWorkPerformance
??
0
);
// 其他模板 = 可分配绩效 + 夜班绩效
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
...
...
@@ -1600,7 +1600,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? 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
));
.
Sum
(
t
=>
t
.
Sum
(
item
=>
ConvertHelper
.
To
<
decimal
>(
item
.
ItemValue
)
));
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
...
...
@@ -1610,7 +1610,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
+
t
.
NightWorkPerformance
);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
??
0
+
t
.
NightWorkPerformance
??
0
);
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
...
...
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