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
486171b6
Commit
486171b6
authored
Oct 10, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备注
parent
f708e889
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletions
+34
-1
performance/Performance.Services/SecondAllotService.cs
+34
-1
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
486171b6
...
...
@@ -46,6 +46,11 @@ public class SecondAllotService : IAutoInjection
this
.
perforAgtempitemRepository
=
perforAgtempitemRepository
;
}
/// <summary>
/// 获取二次绩效列表
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
ag_secondallot
>
GetSecondList
(
int
userId
)
{
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
...
...
@@ -66,6 +71,7 @@ public List<ag_secondallot> GetSecondList(int userId)
//取得未生成二次绩效的绩效id
var
exceptListId
=
secondList
==
null
?
allotListId
:
allotListId
.
Except
(
secondList
.
Select
(
t
=>
t
.
AllotId
.
Value
));
#
region
初始化二次绩效
List
<
ag_secondallot
>
newSecond
=
new
List
<
ag_secondallot
>();
foreach
(
var
item
in
exceptListId
)
{
...
...
@@ -91,6 +97,8 @@ public List<ag_secondallot> GetSecondList(int userId)
};
newSecond
.
Add
(
second
);
}
#
endregion
if
(
newSecond
.
Count
>
0
)
{
perforAgsecondallotRepository
.
AddRange
(
newSecond
.
ToArray
());
...
...
@@ -103,6 +111,11 @@ public List<ag_secondallot> GetSecondList(int userId)
return
secondList
;
}
/// <summary>
/// 获取模板列表
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
ag_temp
>
GetTemp
(
int
userId
)
{
return
perforAgtempRepository
.
GetEntities
();
...
...
@@ -113,14 +126,24 @@ public bool UseTemp(int tempId)
var
temp
=
perforAgtempRepository
.
GetEntity
(
t
=>
t
.
Id
==
tempId
);
var
tempItems
=
perforAgtempitemRepository
.
GetEntities
(
t
=>
t
.
TempId
==
tempId
);
return
;
return
;
}
/// <summary>
/// 获取工作量列表
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
List
<
ag_workload
>
GetWorkloadList
(
int
secondId
)
{
return
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
}
/// <summary>
/// 新增
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
WorkloadAdd
(
WorkloadRequest
request
)
{
var
workloadList
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
...
...
@@ -144,6 +167,11 @@ public bool WorkloadAdd(WorkloadRequest request)
return
result
;
}
/// <summary>
/// 修改
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
WorkloadUpdate
(
WorkloadRequest
request
)
{
var
workloadList
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
...
...
@@ -161,6 +189,11 @@ public bool WorkloadUpdate(WorkloadRequest request)
return
perforAgworkloadRepository
.
Update
(
workload
);
}
/// <summary>
/// 删除
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public
bool
WorkloadDelete
(
int
id
)
{
var
workload
=
perforAgworkloadRepository
.
GetEntity
(
t
=>
t
.
Id
==
id
);
...
...
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