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
e218731d
Commit
e218731d
authored
Sep 07, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排序
parent
487cd7d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
performance/Performance.Api/Controllers/CollectController.cs
+7
-0
No files found.
performance/Performance.Api/Controllers/CollectController.cs
View file @
e218731d
...
...
@@ -7,6 +7,7 @@
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
...
...
@@ -67,11 +68,17 @@ public ApiResponse GetCollectSheet(int hospitalId)
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
var
regex
=
new
Regex
(
"^[0-9]"
);
var
userId
=
claim
.
GetUserId
();
var
result
=
collectService
.
GetCollectSheet
(
hospitalId
,
userId
)
?.
Select
(
w
=>
new
{
w
.
SheetType
,
w
.
SheetName
})
.
Distinct
()
.
ToList
();
result
?.
Add
(
new
{
SheetType
=
-
1
,
SheetName
=
"预留比例"
});
result
=
result
.
OrderBy
(
w
=>
regex
.
IsMatch
(
w
.
SheetName
)
?
w
.
SheetName
:
$"0
{
w
.
SheetName
}
"
)
.
ThenBy
(
w
=>
w
.
SheetType
)
.
ToList
();
return
new
ApiResponse
(
ResponseType
.
OK
,
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