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
91f4531a
Commit
91f4531a
authored
Jun 05, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下载样式
parent
8a4b5ea4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
16 deletions
+28
-16
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
+28
-16
No files found.
performance/Performance.Services/ComputeService.UniteDeptDetail.cs
View file @
91f4531a
...
@@ -628,10 +628,9 @@ public string ExcelDownload(UniteDeptDetailResponse uniteDeptDetail, string name
...
@@ -628,10 +628,9 @@ public string ExcelDownload(UniteDeptDetailResponse uniteDeptDetail, string name
worksheet
.
Cells
[
1
,
1
,
1
,
maxColIndex
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
worksheet
.
Cells
[
1
,
1
,
1
,
maxColIndex
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
worksheet
.
Cells
[
1
,
1
,
1
,
maxColIndex
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
worksheet
.
Cells
[
1
,
1
,
1
,
maxColIndex
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
var
rowIndex
=
2
;
var
rowIndex
=
2
;
WriteSheetCells
(
worksheet
,
maxColIndex
,
rowIndex
,
uniteDeptDetail
.
DetailItems
);
WriteSheetCells
(
worksheet
,
maxColIndex
,
rowIndex
,
uniteDeptDetail
.
DetailItems
);
package
.
Save
();
package
.
Save
();
}
}
return
filepath
;
return
filepath
;
...
@@ -661,15 +660,21 @@ int WriteSheetCells(ExcelWorksheet worksheet, int maxColIndex, int rowIndex, Lis
...
@@ -661,15 +660,21 @@ int WriteSheetCells(ExcelWorksheet worksheet, int maxColIndex, int rowIndex, Lis
{
{
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
headers
.
ElementAt
(
colIndex
));
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
headers
.
ElementAt
(
colIndex
));
var
toCol
=
colIndex
+
1
==
headers
.
Count
()
?
colIndex
:
maxColIndex
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Font
.
Bold
=
true
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Font
.
Size
=
16
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Merge
=
colIndex
+
1
==
headers
.
Count
(
);
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
);
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
Font
.
Bold
=
true
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
Font
.
Size
=
16
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
);
if
(
colIndex
+
1
==
headers
.
Count
())
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
{
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Merge
=
true
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
Font
.
Bold
=
true
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
Font
.
Size
=
16
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
);
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
}
}
}
foreach
(
var
row
in
item
.
Items
)
foreach
(
var
row
in
item
.
Items
)
{
{
...
@@ -678,13 +683,20 @@ int WriteSheetCells(ExcelWorksheet worksheet, int maxColIndex, int rowIndex, Lis
...
@@ -678,13 +683,20 @@ int WriteSheetCells(ExcelWorksheet worksheet, int maxColIndex, int rowIndex, Lis
{
{
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
row
[
headers
.
ElementAt
(
colIndex
)]);
worksheet
.
SetValue
(
rowIndex
,
colIndex
+
1
,
row
[
headers
.
ElementAt
(
colIndex
)]);
var
toCol
=
colIndex
+
1
==
headers
.
Count
()
?
colIndex
:
maxColIndex
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Font
.
Size
=
16
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
);
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
if
(
colIndex
+
1
==
headers
.
Count
())
{
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Merge
=
true
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Merge
=
colIndex
+
1
==
headers
.
Count
()
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
Font
.
Size
=
16
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
Font
.
Size
=
16
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
)
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
Border
.
BorderAround
(
ExcelBorderStyle
.
Thin
)
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
VerticalAlignment
=
ExcelVerticalAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
VerticalAlignment
=
ExcelVertic
alAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
maxColIndex
].
Style
.
HorizontalAlignment
=
ExcelHorizont
alAlignment
.
Center
;
worksheet
.
Cells
[
rowIndex
,
colIndex
+
1
,
rowIndex
,
toCol
+
1
].
Style
.
HorizontalAlignment
=
ExcelHorizontalAlignment
.
Center
;
}
}
}
}
}
}
}
...
...
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