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
d61a092a
Commit
d61a092a
authored
Apr 15, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效详情返回head数据与模板不同, filedid存在空值
parent
2b497215
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
performance/Performance.Services/SecondAllotService.cs
+9
-2
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
d61a092a
...
...
@@ -31,6 +31,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforCofagainRepository
perforCofagainRepository
;
private
readonly
PerforAgothersourceRepository
perforAgothersourceRepository
;
private
readonly
PerforRoleRepository
roleRepository
;
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
public
SecondAllotService
(
IOptions
<
Application
>
application
,
PerforUserRepository
perforUserRepository
,
...
...
@@ -65,6 +66,7 @@ public class SecondAllotService : IAutoInjection
this
.
perforCofagainRepository
=
perforCofagainRepository
;
this
.
perforAgothersourceRepository
=
perforAgothersourceRepository
;
this
.
roleRepository
=
roleRepository
;
this
.
tempitems
=
perforAgtempitemRepository
.
GetEntities
();
}
#
region
二次绩效列表与数据保存
...
...
@@ -264,7 +266,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
//归档 或 等待审核、审核通过时,headItems不会随选择模板改动,带出已填写数据中的headItems
if
(
request
.
IsArchive
==
1
||
(
second
.
Status
??
1
)
==
3
)
if
(
request
.
IsArchive
==
1
||
new
List
<
int
>
{
2
,
3
}.
Contains
(
second
.
Status
??
1
)
)
{
if
(
fixatList
==
null
||
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
)
throw
new
PerformanceException
(
"提交时未添加数据。"
);
...
...
@@ -338,7 +340,8 @@ private List<BodyItem> GetBodyItems(List<ag_fixatitem> fixatitems, List<HeadItem
bodyItems
=
fixatitems
.
Select
(
t
=>
new
BodyItem
{
RowNumber
=
t
.
RowNumber
.
Value
,
FiledId
=
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
ItemName
&&
h
.
Type
==
t
.
Type
)?.
FiledId
??
$"
{
t
.
ItemName
}{
t
.
Type
}
"
,
FiledId
=
tempitems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
ItemName
&&
h
.
Type
==
t
.
Type
)?.
FiledId
??
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
ItemName
&&
h
.
Type
==
t
.
Type
)?.
FiledId
,
FiledName
=
t
.
ItemName
,
SourceType
=
t
.
SourceType
??
0
,
Type
=
t
.
Type
??
0
,
...
...
@@ -346,9 +349,13 @@ private List<BodyItem> GetBodyItems(List<ag_fixatitem> fixatitems, List<HeadItem
Sort
=
t
.
Sort
??
0
}).
ToList
();
}
// 删除多余的headvalue
bodyItems
.
RemoveAll
(
t
=>
!
headItems
.
Select
(
h
=>
h
.
FiledId
).
Contains
(
t
.
FiledId
)
&&
t
.
RowNumber
==
-
1
);
return
bodyItems
;
}
/// <summary>
/// 补充须带出的历史数据,如姓名、职称等
/// </summary>
...
...
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