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
8baf43c4
Commit
8baf43c4
authored
Oct 14, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换数据来源
parent
62702fe7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
performance/Performance.Services/ExtractExcelService/ExtractHelper/WriteDataHelper.cs
+7
-3
No files found.
performance/Performance.Services/ExtractExcelService/ExtractHelper/WriteDataHelper.cs
View file @
8baf43c4
...
...
@@ -18,6 +18,10 @@ public enum UnitType
public
void
WriteSheetHeader
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
int
fixedCount
,
List
<
ExcelHeader
>
headers
)
{
if
(
headers
==
null
||
!
headers
.
Any
())
return
;
var
columns
=
headers
.
Select
(
t
=>
t
).
ToList
();
// 收入支出系数
var
nurseFactor
=
sheet
.
GetOrCreate
(
point
.
AccountingUnit
.
First
(
t
=>
t
.
UnitType
==
UnitType
.
护理组
.
ToString
()).
FactorRow
.
Value
);
var
doctorFactor
=
sheet
.
GetRow
(
point
.
AccountingUnit
.
First
(
t
=>
t
.
UnitType
==
UnitType
.
医生组
.
ToString
()).
FactorRow
.
Value
);
...
...
@@ -36,16 +40,16 @@ public void WriteSheetHeader(ISheet sheet, PerSheetPoint point, SheetType sheetT
var
column
=
columnHeader
.
GetCell
(
index
).
GetDecodeEscapes
();
if
(
string
.
IsNullOrEmpty
(
column
))
continue
;
header
s
.
RemoveAll
(
t
=>
t
.
ColumnName
==
column
);
column
s
.
RemoveAll
(
t
=>
t
.
ColumnName
==
column
);
if
(
index
>
headerFirstCellNum
)
headerFirstCellNum
=
index
+
1
;
}
}
if
(
headers
==
null
||
!
header
s
.
Any
())
return
;
if
(
columns
==
null
||
!
column
s
.
Any
())
return
;
// 补充excel中不存在的列
foreach
(
var
item
in
header
s
)
foreach
(
var
item
in
column
s
)
{
var
columnCell
=
columnHeader
.
GetOrCreate
(
headerFirstCellNum
);
columnCell
.
SetCellValue
(
item
.
ColumnName
);
...
...
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