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
8e69766d
Commit
8e69766d
authored
Apr 04, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全员绩效发放
parent
c14ecb96
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
99 additions
and
8 deletions
+99
-8
performance/Performance.Api/Controllers/ComputeController.cs
+19
-2
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+1
-0
performance/Performance.DtoModels/Response/ComputeResponse.cs
+34
-0
performance/Performance.Services/ComputeService.cs
+45
-6
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
8e69766d
...
...
@@ -34,13 +34,13 @@ public class ComputeController : Controller
/// <returns></returns>
[
Route
(
"getcompute"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
res_compute
>>
GetCompute
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
ComputerRequest
request
)
public
ApiResponse
GetCompute
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
ComputerRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
GetCompute
(
request
.
AllotId
,
request
.
Type
);
return
new
ApiResponse
<
List
<
res_compute
>>
(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
...
...
@@ -107,5 +107,21 @@ public ApiResponse<DeptDetailResponse> DeptDetail([FromBody]DeptDetailRequest re
DeptDetailResponse
response
=
_computeService
.
GetDepartmentDetail
(
request
);
return
new
ApiResponse
<
DeptDetailResponse
>(
ResponseType
.
OK
,
response
);
}
/// <summary>
/// 获取全院绩效列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"allcompute"
)]
[
HttpPost
]
public
ApiResponse
AllCompute
([
FromBody
]
ComputerRequest
request
)
{
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
AllCompute
(
request
.
AllotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
}
}
\ No newline at end of file
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
8e69766d
...
...
@@ -125,6 +125,7 @@ public AutoMapperConfigs()
CreateMap
<
ag_againsituation
,
PerAgainSituation
>();
CreateMap
<
per_againallot
,
AgainAllotResponse
>();
CreateMap
<
res_compute
,
ComputeResponse
>();
}
}
}
performance/Performance.DtoModels/Response/ComputeResponse.cs
0 → 100644
View file @
8e69766d
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
ComputeResponse
{
/// <summary>
/// 来源
/// </summary>
public
string
Source
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 人员名称
/// </summary>
public
string
EmployeeName
{
get
;
set
;
}
/// <summary>
/// 职位
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
RealGiveFee
{
get
;
set
;
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
8e69766d
...
...
@@ -18,12 +18,18 @@ public class ComputeService : IAutoInjection
private
PerforImdataRepository
_perforImDataRepository
;
private
PerforRescomputeRepository
_perforRescomputeRepository
;
private
PerforResspecialunitRepository
_perforResspecialunitRepository
;
private
PerforPeragainallotRepository
_perforPeragainallotRepository
;
private
PerforUserRepository
_perforUserRepository
;
private
PerforAgemployeeRepository
_perforAgemployeeRepository
;
public
ComputeService
(
PerforResaccountdoctorRepository
perforResAccountdoctorRepository
,
PerforResaccountnurseRepository
perforResAccountnurseRepository
,
PerforPersheetRepository
perforPerSheetRepository
,
PerforImdataRepository
perforImDataRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
)
PerforResspecialunitRepository
perforResspecialunitRepository
,
PerforPeragainallotRepository
perforPeragainallotRepository
,
PerforUserRepository
perforUserRepository
,
PerforAgemployeeRepository
perforAgemployeeRepository
)
{
_perforResAccountdoctorRepository
=
perforResAccountdoctorRepository
;
_perforResAccountnurseRepository
=
perforResAccountnurseRepository
;
...
...
@@ -31,6 +37,9 @@ public class ComputeService : IAutoInjection
_perforImDataRepository
=
perforImDataRepository
;
_perforRescomputeRepository
=
perforRescomputeRepository
;
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
_perforPeragainallotRepository
=
perforPeragainallotRepository
;
_perforUserRepository
=
perforUserRepository
;
_perforAgemployeeRepository
=
perforAgemployeeRepository
;
}
/// <summary>
...
...
@@ -57,11 +66,6 @@ public List<res_compute> GetCompute(int allotId, int type)
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
conList
.
Contains
(
t
.
FitPeople
))
.
OrderBy
(
t
=>
t
.
AccountingUnit
).
ThenBy
(
t
=>
t
.
FitPeople
).
ToList
();
}
else
if
(
type
==
99
)
{
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
.
OrderByDescending
(
t
=>
t
.
AccountingUnit
).
ThenBy
(
t
=>
t
.
FitPeople
).
ToList
();
}
else
{
throw
new
PerformanceException
(
"参数错误,type无效"
);
...
...
@@ -169,5 +173,40 @@ public DeptDetailResponse GetDepartmentDetail(DeptDetailRequest request)
return
null
;
}
/// <summary>
/// 返回绩效发放列表
/// </summary>
/// <param name="allotId">绩效ID</param>
/// <returns></returns>
public
List
<
ComputeResponse
>
AllCompute
(
int
allotId
)
{
var
list
=
new
List
<
ComputeResponse
>();
var
allot
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
list
=
Mapper
.
Map
<
List
<
ComputeResponse
>>(
allot
);
list
?.
ForEach
(
t
=>
t
.
Source
=
"一次绩效"
);
var
employee
=
_perforAgemployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
employee
!=
null
&&
employee
.
Count
>
0
)
{
var
again
=
_perforPeragainallotRepository
.
GetEntities
(
t
=>
employee
.
Select
(
e
=>
e
.
AgainAllotID
).
Contains
(
t
.
ID
));
if
(
again
!=
null
)
{
var
data
=
_perforUserRepository
.
GetEntities
(
t
=>
again
.
Select
(
a
=>
a
.
CreateUser
).
Contains
(
t
.
ID
)
&&
t
.
States
==
1
);
var
list1
=
from
e
in
employee
join
a
in
again
on
e
.
AgainAllotID
equals
a
.
ID
join
user
in
data
on
a
.
CreateUser
equals
user
.
ID
select
new
ComputeResponse
{
Source
=
"二次绩效"
,
AccountingUnit
=
a
.
Department
,
EmployeeName
=
user
.
RealName
,
JobTitle
=
e
.
JobTitle
,
RealGiveFee
=
e
.
RealGiveFee
};
list
=
list
.
Union
(
list1
.
OrderBy
(
t
=>
t
.
AccountingUnit
)).
ToList
();
}
}
return
list
;
}
}
}
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