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
c1e8bf54
Commit
c1e8bf54
authored
Oct 21, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效详情修改
parent
0ebc3fd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
performance/Performance.Services/SecondAllotService.cs
+16
-20
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
c1e8bf54
...
...
@@ -365,35 +365,31 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
headItems
.
AddRange
(
workDtos
);
}
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
};
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
,
BodyItems
=
new
List
<
BodyItem
>()
};
//获取数据
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
if
(
fixatList
!=
null
||
fixatList
.
Count
>
0
)
{
//补充数据
var
groupList
=
fixatList
.
GroupBy
(
t
=>
t
.
RowNumber
);
foreach
(
var
item
in
groupList
)
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
(
);
foreach
(
var
row
in
rows
)
{
var
newItem
=
headItems
.
Select
(
t
=>
t
.
FiledName
).
Except
(
item
?.
Select
(
i
=>
i
.
ItemName
));
if
(
newItem
!=
null
&&
newItem
.
Count
()
>
0
)
foreach
(
var
item
in
headItems
)
{
fixatList
.
AddRange
(
newItem
.
Select
(
t
=>
new
ag_fixati
tem
var
bodyItem
=
new
BodyI
tem
{
ItemName
=
t
,
ItemValue
=
null
,
RowNumber
=
item
.
Key
,
AllotId
=
fixatList
.
First
().
AllotId
,
SecondId
=
fixatList
.
First
().
SecondId
,
UnitType
=
fixatList
.
First
().
UnitType
,
Type
=
headItems
?.
FirstOrDefault
(
s
=>
s
.
FiledName
==
t
)?.
Type
,
SourceType
=
headItems
?.
FirstOrDefault
(
s
=>
s
.
FiledName
==
t
)?.
SourceType
,
Sort
=
headItems
?.
FirstOrDefault
(
s
=>
s
.
FiledName
==
t
)?.
Sort
,
FactorValue
=
headItems
?.
FirstOrDefault
(
s
=>
s
.
FiledName
==
t
)?.
FactorValue
,
}));
RowNumber
=
row
,
FiledId
=
item
.
FiledId
,
FiledName
=
item
.
FiledName
,
FactorValue
=
item
.
FactorValue
,
SourceType
=
item
.
SourceType
,
Type
=
item
.
Type
,
Sort
=
item
.
Sort
,
Value
=
fixatList
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
row
&&
t
.
ItemName
==
item
.
FiledName
)?.
ItemValue
};
result
.
BodyItems
.
Add
(
bodyItem
);
}
}
result
.
BodyItems
=
Mapper
.
Map
<
List
<
BodyItem
>>(
fixatList
);
result
.
BodyItems
.
ForEach
(
t
=>
{
t
.
FiledId
=
result
.
HeadItems
.
FirstOrDefault
(
s
=>
s
.
FiledName
==
t
.
FiledName
)?.
FiledId
;
});
}
return
result
;
}
...
...
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