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
69d9b7ea
Commit
69d9b7ea
authored
Dec 14, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自定义提取清除历史数据
parent
725c5e5b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+8
-8
performance/Performance.Services/ExtractExcelService/SheetDataWrite/CustomDataWrite.cs
+31
-1
No files found.
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
69d9b7ea
...
@@ -324,14 +324,14 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
...
@@ -324,14 +324,14 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
Department
=
t
.
Key
.
Department
,
Department
=
t
.
Key
.
Department
,
Category
=
t
.
Key
.
Category
,
Category
=
t
.
Key
.
Category
,
Value
=
t
.
Sum
(
group
=>
group
.
Value
)
==
0
?
null
:
t
.
Sum
(
group
=>
group
.
Value
),
Value
=
t
.
Sum
(
group
=>
group
.
Value
)
==
0
?
null
:
t
.
Sum
(
group
=>
group
.
Value
),
OutDoctorAccounting
=
t
.
First
()
.
OutDoctorAccounting
,
OutDoctorAccounting
=
t
.
First
OrDefault
()?
.
OutDoctorAccounting
,
OutNurseAccounting
=
t
.
First
()
.
OutNurseAccounting
,
OutNurseAccounting
=
t
.
First
OrDefault
()?
.
OutNurseAccounting
,
OutTechnicAccounting
=
t
.
First
()
.
OutTechnicAccounting
,
OutTechnicAccounting
=
t
.
First
OrDefault
()?
.
OutTechnicAccounting
,
InpatDoctorAccounting
=
t
.
First
()
.
InpatDoctorAccounting
,
InpatDoctorAccounting
=
t
.
First
OrDefault
()?
.
InpatDoctorAccounting
,
InpatNurseAccounting
=
t
.
First
()
.
InpatNurseAccounting
,
InpatNurseAccounting
=
t
.
First
OrDefault
()?
.
InpatNurseAccounting
,
InpatTechnicAccounting
=
t
.
First
()
.
InpatTechnicAccounting
,
InpatTechnicAccounting
=
t
.
First
OrDefault
()?
.
InpatTechnicAccounting
,
SpecialAccounting
=
t
.
First
()
.
SpecialAccounting
,
SpecialAccounting
=
t
.
First
OrDefault
()?
.
SpecialAccounting
,
EName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
EName
)).
EName
EName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
EName
))
?
.
EName
});
});
return
groupdata
.
ToList
();
return
groupdata
.
ToList
();
...
...
performance/Performance.Services/ExtractExcelService/SheetDataWrite/CustomDataWrite.cs
View file @
69d9b7ea
...
@@ -63,7 +63,7 @@ public void WriteDataToCustom(IWorkbook workbook, per_allot allot, ExcelStyle st
...
@@ -63,7 +63,7 @@ public void WriteDataToCustom(IWorkbook workbook, per_allot allot, ExcelStyle st
sheet
=
workbook
.
CreateSheet
(
module
.
ModuleName
);
sheet
=
workbook
.
CreateSheet
(
module
.
ModuleName
);
workbook
.
SetSheetOrder
(
sheet
.
SheetName
,
workbook
.
NumberOfSheets
-
1
);
workbook
.
SetSheetOrder
(
sheet
.
SheetName
,
workbook
.
NumberOfSheets
-
1
);
}
}
ClearSheetData
(
sheet
);
var
exscript
=
exscripts
.
FirstOrDefault
(
t
=>
t
.
TypeId
==
module
.
TypeId
);
var
exscript
=
exscripts
.
FirstOrDefault
(
t
=>
t
.
TypeId
==
module
.
TypeId
);
if
(
exscript
==
null
)
continue
;
if
(
exscript
==
null
)
continue
;
...
@@ -116,5 +116,35 @@ public void WriteDataToCustom(IWorkbook workbook, per_allot allot, ExcelStyle st
...
@@ -116,5 +116,35 @@ public void WriteDataToCustom(IWorkbook workbook, per_allot allot, ExcelStyle st
}
}
}
}
}
}
private
void
ClearSheetData
(
ISheet
sheet
)
{
try
{
for
(
int
i
=
Point
.
DataFirstRowNum
.
Value
;
i
<
sheet
.
LastRowNum
+
1
;
i
++)
{
var
row
=
sheet
.
GetRow
(
i
);
if
(
row
!=
null
)
{
row
.
ZeroHeight
=
false
;
//取消隐藏行
int
dataFirstCellRowNum
=
Point
.
DataFirstCellNum
.
Value
;
//跳过核算单元和科室
for
(
int
j
=
dataFirstCellRowNum
;
j
<
row
.
LastCellNum
;
j
++)
{
var
cell
=
row
.
GetCell
(
j
);
if
(
cell
!=
null
&&
cell
.
CellType
!=
CellType
.
Formula
)
{
cell
.
RemoveCellComment
();
row
.
RemoveCell
(
cell
);
}
}
}
}
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
ex
.
Message
);
}
}
}
}
}
}
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