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
5121d1fc
Commit
5121d1fc
authored
Jun 07, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
9c8dd029
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
performance/Performance.Api/Controllers/PersonController.cs
+3
-1
performance/Performance.Repository/PerforPeremployeeRepository.cs
+1
-1
performance/Performance.Services/PersonService.cs
+1
-5
performance/Performance.Services/SecondAllotService.cs
+2
-2
No files found.
performance/Performance.Api/Controllers/PersonController.cs
View file @
5121d1fc
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure.Models
;
using
Performance.Services
;
using
Performance.Services
;
namespace
Performance.Api.Controllers
namespace
Performance.Api.Controllers
...
@@ -36,7 +37,8 @@ public PersonController(PersonService personService, ClaimService claimService)
...
@@ -36,7 +37,8 @@ public PersonController(PersonService personService, ClaimService claimService)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetPersons
([
FromRoute
]
int
allotId
,
[
FromBody
]
PersonParamsRequest
request
)
public
ApiResponse
GetPersons
([
FromRoute
]
int
allotId
,
[
FromBody
]
PersonParamsRequest
request
)
{
{
var
list
=
personService
.
GetPersons
(
allotId
,
claimService
.
GetUserId
(),
request
);
var
list
=
personService
.
GetPersons
(
allotId
,
claimService
.
GetUserId
(),
request
)
??
new
PageList
<
per_employee
>(
new
List
<
per_employee
>(),
0
,
request
.
PageNumber
,
request
.
PageSize
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
{
list
.
CurrentPage
,
list
.
CurrentPage
,
...
...
performance/Performance.Repository/PerforPeremployeeRepository.cs
View file @
5121d1fc
...
@@ -18,7 +18,7 @@ public partial class PerforPeremployeeRepository : PerforRepository<per_employee
...
@@ -18,7 +18,7 @@ public partial class PerforPeremployeeRepository : PerforRepository<per_employee
{
{
public
new
PageList
<
per_employee
>
GetEntitiesForPaging
(
int
pageNumber
,
int
pageSize
,
Expression
<
Func
<
per_employee
,
bool
>>
exp
)
public
new
PageList
<
per_employee
>
GetEntitiesForPaging
(
int
pageNumber
,
int
pageSize
,
Expression
<
Func
<
per_employee
,
bool
>>
exp
)
{
{
IQueryable
<
per_employee
>
queryableAuthors
=
context
.
Set
<
per_employee
>().
Where
(
exp
);
IQueryable
<
per_employee
>
queryableAuthors
=
context
.
Set
<
per_employee
>().
Where
(
exp
)
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
Id
)
;
return
PageList
<
per_employee
>.
Create
(
queryableAuthors
,
pageNumber
,
pageSize
);
return
PageList
<
per_employee
>.
Create
(
queryableAuthors
,
pageNumber
,
pageSize
);
}
}
...
...
performance/Performance.Services/PersonService.cs
View file @
5121d1fc
...
@@ -213,11 +213,7 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
...
@@ -213,11 +213,7 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
var
result
=
new
List
<
per_employee
>();
var
result
=
new
List
<
per_employee
>();
var
list
=
peremployeeRepository
.
GetEntitiesForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
return
peremployeeRepository
.
GetEntitiesForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
if
(
list
!=
null
&&
list
.
Any
())
result
=
list
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
Id
).
ToList
();
return
new
PageList
<
per_employee
>(
result
,
list
?.
TotalCount
??
0
,
request
.
PageNumber
,
request
.
PageSize
);
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
5121d1fc
...
@@ -1590,7 +1590,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
...
@@ -1590,7 +1590,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
??
0
+
t
.
NightWorkPerformance
??
0
);
// 其他模板 = 可分配绩效 + 夜班绩效
var
total
=
data
.
Sum
(
t
=>
(
t
.
DistPerformance
??
0
)
+
(
t
.
NightWorkPerformance
??
0
)
);
// 其他模板 = 可分配绩效 + 夜班绩效
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
}
}
...
@@ -1611,7 +1611,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
...
@@ -1611,7 +1611,7 @@ bool VerifySubmissioAmount(decimal? submitDataAmount, decimal? realGiveFee)
if
(
data
==
null
||
!
data
.
Any
())
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
var
total
=
data
.
Sum
(
t
=>
t
.
DistPerformance
??
0
+
t
.
NightWorkPerformance
??
0
);
var
total
=
data
.
Sum
(
t
=>
(
t
.
DistPerformance
??
0
)
+
(
t
.
NightWorkPerformance
??
0
)
);
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
if
(!
VerifySubmissioAmount
(
total
,
second
.
RealGiveFee
))
throw
new
PerformanceException
(
$"总金额与考核后金额不一致!可分配金额:
{
second
.
RealGiveFee
}
,提交金额:
{
total
}
"
);
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