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
7b15f709
Commit
7b15f709
authored
Aug 02, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预留管理保存
parent
543d34be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
performance/Performance.Services/BudgetService.cs
+5
-2
No files found.
performance/Performance.Services/BudgetService.cs
View file @
7b15f709
...
...
@@ -109,7 +109,8 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
if
(
request
==
null
||
!
request
.
Any
(
t
=>
t
.
Type
==
1
)
||
!
request
.
Any
(
t
=>
t
.
Type
==
2
))
throw
new
PerformanceException
(
"提交数据中含无效数据"
);
var
amounts
=
perbudgetamountRepository
.
GetEntities
(
w
=>
request
.
Where
(
t
=>
t
.
Type
==
1
).
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
));
var
requestType1Ids
=
request
.
Where
(
t
=>
t
.
Type
==
1
).
Select
(
t
=>
t
.
Id
);
var
amounts
=
perbudgetamountRepository
.
GetEntities
(
w
=>
requestType1Ids
.
Contains
(
w
.
Id
));
if
(
amounts
!=
null
&&
amounts
.
Any
())
{
foreach
(
var
item
in
amounts
)
...
...
@@ -139,7 +140,9 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
perbudgetamountRepository
.
UpdateRange
(
amounts
.
ToArray
());
}
var
ratios
=
perbudgetratioRepository
.
GetEntities
(
w
=>
request
.
Where
(
t
=>
t
.
Type
==
2
).
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
));
var
requestType2Ids
=
request
.
Where
(
t
=>
t
.
Type
==
2
).
Select
(
t
=>
t
.
Id
);
var
ratios
=
perbudgetratioRepository
.
GetEntities
(
w
=>
requestType2Ids
.
Contains
(
w
.
Id
));
if
(
ratios
!=
null
&&
ratios
.
Any
())
{
foreach
(
var
item
in
ratios
)
...
...
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