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
6680b8fa
Commit
6680b8fa
authored
Jul 28, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返回列表添加状态
parent
560f4bda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
performance/Performance.Services/CollectService.cs
+31
-5
No files found.
performance/Performance.Services/CollectService.cs
View file @
6680b8fa
...
...
@@ -406,7 +406,7 @@ public HandsonTable GetCollectData(int userId, int allotId, string sheetName)
HandsonTable
handson
=
new
HandsonTable
(
sheet
.
SheetType
.
Value
,
cols
,
permissions
);
handson
.
SetRowData
(
rowDatas
,
(
collectdata
!=
null
));
if
(
collectdata
!=
null
&&
collectdata
.
Any
(
t
=>
t
.
Status
==
2
))
if
(
collectdata
!=
null
&&
collectdata
.
Any
(
t
=>
new
int
[]
{
2
,
3
}.
Contains
(
t
.
Status
)
))
{
handson
.
Columns
?.
ForEach
(
t
=>
t
.
ReadOnly
=
true
);
handson
.
ReadOnly
=
true
;
...
...
@@ -941,14 +941,40 @@ public void SubmitCollectData(int allotId, string sheetName, int userId)
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
public
List
<
per_allot
>
CollectDataList
(
int
hospitalId
)
public
object
CollectDataList
(
int
hospitalId
)
{
var
allots
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
if
(
allots
==
null
||
!
allots
.
Any
())
return
new
List
<
per_allot
>();
var
data
=
perforcollectdataRepository
.
GetEntities
(
t
=>
allots
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotID
));
allots
=
allots
.
OrderByDescending
(
t
=>
t
.
Year
).
ThenByDescending
(
t
=>
t
.
Month
).
ToList
();
return
allots
;
return
allots
.
Select
(
t
=>
new
{
t
.
ID
,
t
.
Year
,
t
.
Month
,
Status
=
GetStatus
(
data
.
Where
(
s
=>
s
.
AllotID
==
t
.
ID
))
});
}
private
int
GetStatus
(
IEnumerable
<
collect_data
>
data
)
{
if
(
data
==
null
||
!
data
.
Any
())
return
1
;
if
(
data
.
Count
(
t
=>
t
.
Status
==
3
)
==
data
.
Count
())
return
3
;
else
if
(
data
.
Any
(
t
=>
t
.
Status
==
4
))
return
4
;
else
if
(
data
.
Any
(
t
=>
t
.
Status
==
2
))
return
2
;
return
1
;
}
/// <summary>
...
...
@@ -1013,7 +1039,7 @@ public SheetExportResponse DepartmentTable(int allotId, int userId)
};
int
index
=
4
;
var
sheetnames
=
data
.
Select
(
t
=>
t
.
SheetName
).
Distinct
();
var
sheetnames
=
data
.
Select
(
t
=>
t
.
SheetName
).
Distinct
()
.
OrderBy
(
t
=>
t
)
;
foreach
(
var
sheetname
in
sheetnames
)
{
var
sheetColumns
=
data
.
Where
(
t
=>
t
.
SheetName
==
sheetname
).
Select
(
t
=>
t
.
TypeName
).
Distinct
().
OrderBy
(
t
=>
t
);
...
...
@@ -1103,7 +1129,7 @@ public HandsonTableBase DepartmentList(int allotId, int userId)
#
region
headers
columns
var
sheets
=
data
.
Select
(
t
=>
t
.
SheetName
).
Distinct
();
var
sheets
=
data
.
Select
(
t
=>
t
.
SheetName
).
Distinct
()
.
OrderBy
(
t
=>
t
).
ToList
()
;
var
mergeCells
=
new
List
<
NestedHeader
>
{
new
NestedHeader
(
""
,
1
),
...
...
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