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
8f6ab64c
Commit
8f6ab64c
authored
Jan 26, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配提交后验证数据正确性
parent
839c34c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
performance/Performance.Api/Controllers/SecondAllotController.cs
+5
-2
performance/Performance.Services/RedistributionService.cs
+15
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
8f6ab64c
...
...
@@ -765,7 +765,7 @@ public ApiResponse RedistributionSave([FromBody] SecondComputeDto request)
var
cleanDatas
=
request
.
Body
.
Where
(
w
=>
w
.
Count
>
0
&&
w
.
GetValue
(
nameof
(
ResponseType
),
""
)
==
ResponseType
.
OK
.
ToString
()).
ToList
();
if
(
cleanDatas
==
null
||
cleanDatas
.
Count
==
0
)
throw
new
PerformanceException
(
"提交参数都是无效数据,请重新填写数据后保存!"
);
// 计算提交数据结果
_redistributionService
.
ResultCompute
((
ComputeMode
)
request
.
ComputeMode
,
request
.
Head
,
cleanDatas
,
loads
,
workloadGroups
);
// 补充医院其他绩效
...
...
@@ -837,8 +837,11 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
// 重算部分数据
_redistributionService
.
RedistributionCompute
((
ComputeMode
)
request
.
ComputeMode
,
request
.
Head
,
cleanDatas
);
var
saveResult
=
secondAllotService
.
RedistributionSave
(
allot
,
second
,
request
.
Head
,
cleanDatas
);
var
res
=
_redistributionService
.
ValidationData
(
second
);
if
(!
string
.
IsNullOrEmpty
(
res
))
return
new
ApiResponse
(
ResponseType
.
Fail
,
$"提交数据中存在无效数据,已经被删除,确认正确后请重新提交;删除工号清单如下:
{
res
}
"
);
if
(
saveResult
)
{
var
userid
=
claimService
.
GetUserId
();
...
...
performance/Performance.Services/RedistributionService.cs
View file @
8f6ab64c
...
...
@@ -1542,5 +1542,20 @@ private IEnumerable<view_second_workload_result> GetSecondWorkloadByValue(int al
{
return
_perallotRepository
.
GetSecondWorkload
(
allotid
,
unittype
,
accountingunit
);
}
// 验证数据正确性
public
string
ValidationData
(
ag_secondallot
second
)
{
var
datas
=
_agbodysourceRepository
.
GetEntities
(
w
=>
w
.
SecondId
==
second
.
Id
);
var
invalid
=
datas
.
Where
(
w
=>
!
w
.
DistPerformance
.
HasValue
);
string
removeEmp
=
""
;
if
(
invalid
!=
null
&&
invalid
.
Count
()
>
0
)
{
removeEmp
=
string
.
Join
(
","
,
invalid
.
Select
(
w
=>
w
.
WorkNumber
).
ToArray
());
_agbodysourceRepository
.
RemoveRange
(
invalid
.
ToArray
());
}
return
removeEmp
;
}
}
}
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