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
c8156bab
Commit
c8156bab
authored
Nov 05, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效选择模板时补充数据
parent
ea9cb43a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
5 deletions
+39
-5
performance/Performance.Services/SecondAllotService.cs
+39
-5
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
c8156bab
...
@@ -168,7 +168,6 @@ public bool UseTemp(UseTempRequest request)
...
@@ -168,7 +168,6 @@ public bool UseTemp(UseTempRequest request)
{
{
entity
.
UseTempId
=
request
.
TempId
;
entity
.
UseTempId
=
request
.
TempId
;
result
=
perforAgusetempRepository
.
Update
(
entity
);
result
=
perforAgusetempRepository
.
Update
(
entity
);
//删除多余的数据
if
(
result
)
if
(
result
)
{
{
//获取固定模板列头
//获取固定模板列头
...
@@ -184,20 +183,55 @@ public bool UseTemp(UseTempRequest request)
...
@@ -184,20 +183,55 @@ public bool UseTemp(UseTempRequest request)
headItems
.
AddRange
(
workDtos
);
headItems
.
AddRange
(
workDtos
);
}
}
List
<
ag_fixatitem
>
list
=
new
List
<
ag_fixatitem
>();
List
<
ag_fixatitem
>
list
=
new
List
<
ag_fixatitem
>();
var
addList
=
new
List
<
ag_fixatitem
>();
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
secondList
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotList
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
.
Value
)));
secondList
?.
ForEach
(
t
=>
t
.
IsArchive
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
).
States
==
8
?
1
:
0
);
var
secondId
=
secondList
.
Where
(
s
=>
s
.
IsArchive
==
0
)?.
Select
(
s
=>
s
.
Id
);
//获取未归档的二次绩效
if
(
secondId
==
null
||
secondId
.
Count
()
<=
0
)
return
result
;
//获取数据
//获取数据
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
secondId
.
Contains
(
t
.
SecondId
.
Value
)
);
foreach
(
var
item
in
headItems
)
foreach
(
var
item
in
headItems
)
{
{
list
.
AddRange
(
fixatList
.
Where
(
t
=>
t
.
ItemName
==
item
.
FiledName
&&
t
.
Type
==
item
.
Type
));
//符合条件的数据(未归档)
var
exist
=
fixatList
.
Where
(
t
=>
t
.
ItemName
==
item
.
FiledName
&&
t
.
Type
==
item
.
Type
);
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
list
.
AddRange
(
exist
);
else
{
secondList
.
ForEach
(
t
=>
{
if
(
t
.
IsArchive
==
0
)
{
addList
.
Add
(
new
ag_fixatitem
{
ItemName
=
item
.
FiledName
,
RowNumber
=
-
1
,
Type
=
item
.
Type
,
SourceType
=
item
.
SourceType
,
Sort
=
item
.
Sort
,
FactorValue
=
item
.
FactorValue
,
UnitType
=
t
.
UnitType
,
AllotId
=
t
.
AllotId
,
SecondId
=
t
.
Id
});
}
});
}
}
}
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
var
delList
=
fixatList
.
Except
(
list
);
var
delList
=
fixatList
.
Except
(
list
);
perforAgfixatitemRepository
.
RemoveRange
(
delList
.
ToArray
());
perforAgfixatitemRepository
.
RemoveRange
(
delList
.
ToArray
());
}
if
(
addList
!=
null
&&
addList
.
Count
>
0
)
perforAgfixatitemRepository
.
AddRange
(
addList
.
ToArray
());
}
}
}
}
}
return
result
;
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