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
a429e373
Commit
a429e373
authored
Jun 09, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改填充数据的起始cellindex值
parent
9471f209
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
performance/Performance.Services/DFExtractService1.cs
+13
-13
No files found.
performance/Performance.Services/DFExtractService1.cs
View file @
a429e373
...
...
@@ -270,7 +270,7 @@ private void ClearHistData(per_allot allot)
/// <returns></returns>
public
string
TemplateExecute
(
string
email
,
sys_hospital
hospital
,
List
<
sys_hospitalconfig
>
configs
,
List
<
ex_module
>
modules
,
List
<
ex_item
>
items
,
List
<
ex_special
>
specials
,
List
<
ex_result
>
data
)
{
string
originalPath
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"Template"
,
"
东方
医院绩效模板.xlsx"
);
string
originalPath
=
Path
.
Combine
(
AppDomain
.
CurrentDomain
.
BaseDirectory
,
"Template"
,
"医院绩效模板.xlsx"
);
var
(
tempPath
,
newPath
)
=
CopyOriginalFile
(
hospital
.
ID
,
originalPath
);
workbook
=
new
XSSFWorkbook
(
tempPath
);
...
...
@@ -356,19 +356,19 @@ public string AlllotExecute(string email, sys_hospital hospital, List<sys_hospit
switch
(
sheetType
)
{
case
SheetType
.
OtherIncome
:
ClearData
(
sheet
,
5
,
4
);
ClearData
(
sheet
,
5
,
7
);
WriteOtherIncome
(
sheet
,
sheetRead
,
unitList
,
configs
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
Income
:
ClearData
(
sheet
,
5
,
4
,
true
);
ClearData
(
sheet
,
5
,
7
,
true
);
WriteIncome
(
sheet
,
sheetRead
,
unitList
,
configs
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
Expend
:
ClearData
(
sheet
,
5
,
4
);
ClearData
(
sheet
,
5
,
7
);
WriteExpend
(
sheet
,
sheetRead
,
unitList
,
configs
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
Workload
:
ClearData
(
sheet
,
3
,
2
);
ClearData
(
sheet
,
3
,
3
);
WriteWorkload
(
sheet
,
sheetRead
,
unitList
,
configs
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
SpecialUnit
:
...
...
@@ -890,7 +890,7 @@ private void WriteHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRead, Lis
List
<
string
>
original
=
new
List
<
string
>();
#
region
过滤历史模板中已有的列头
//写入列头信息
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
;
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
+
3
;
for
(
int
i
=
cellStartIndex
;
i
<
head
.
LastCellNum
;
i
++)
{
var
cellvalue
=
head
.
GetCell
(
i
)?.
ToString
();
...
...
@@ -903,7 +903,7 @@ private void WriteHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRead, Lis
if
(
cellItems
==
null
||
!
cellItems
.
Any
())
return
;
#
region
新增模板中不存在的列头
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
:
head
.
LastCellNum
;
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
+
3
:
head
.
LastCellNum
;
foreach
(
var
item
in
cellItems
)
{
var
headcell
=
GetOrCreate
(
head
,
lastcellIndex
);
...
...
@@ -951,7 +951,7 @@ private void WriteIncomeHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRea
List
<
string
>
original
=
new
List
<
string
>();
#
region
过滤历史模板中已有的列头
//写入列头信息
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
;
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
+
3
;
for
(
int
i
=
cellStartIndex
;
i
<
head
.
LastCellNum
;
i
++)
{
var
cellvalue
=
head
.
GetCell
(
i
)?.
ToString
();
...
...
@@ -966,7 +966,7 @@ private void WriteIncomeHeaderAndFactor(ISheet sheet, IPerSheetDataRead sheetRea
logger
.
LogInformation
(
$"
{
sheet
.
SheetName
}
需要新增的列头有:"
+
string
.
Join
(
", "
,
items
));
#
region
新增模板中不存在的列头
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
:
head
.
LastCellNum
;
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
4
+
3
:
head
.
LastCellNum
;
foreach
(
var
item
in
items
)
{
var
headcell
=
GetOrCreate
(
head
,
lastcellIndex
);
...
...
@@ -1021,7 +1021,7 @@ private void WriteSheetData(ISheet sheet, IPerSheetDataRead sheetRead, List<Acco
var
deptData
=
allExtract
.
Where
(
t
=>
t
.
Department
==
department
);
if
(
deptData
==
null
||
!
deptData
.
Any
())
continue
;
for
(
int
j
=
4
;
j
<
head
.
LastCellNum
;
j
++)
for
(
int
j
=
7
;
j
<
head
.
LastCellNum
;
j
++)
{
var
headName
=
head
.
GetCell
(
j
).
StringCellValue
;
var
newCell
=
GetOrCreate
(
row
,
j
);
...
...
@@ -1122,7 +1122,7 @@ private void WriteWorkHeader(ISheet sheet, IPerSheetDataRead sheetRead, List<ex_
{
#
region
过滤历史模板中已有的列头
//写入列头信息
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
2
;
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
2
+
1
;
for
(
int
i
=
cellStartIndex
;
i
<
head
.
LastCellNum
;
i
++)
{
var
cellvalue
=
head
.
GetCell
(
i
)?.
ToString
();
...
...
@@ -1135,7 +1135,7 @@ private void WriteWorkHeader(ISheet sheet, IPerSheetDataRead sheetRead, List<ex_
if
(
cellItems
==
null
||
!
cellItems
.
Any
())
return
;
#
region
新增模板中不存在的列头
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
2
:
head
.
LastCellNum
;
var
lastcellIndex
=
isNewTemp
?
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
2
+
1
:
head
.
LastCellNum
;
foreach
(
var
item
in
cellItems
)
{
var
headcell
=
GetOrCreate
(
head
,
lastcellIndex
);
...
...
@@ -1178,7 +1178,7 @@ private void WriteWorkData(ISheet sheet, IPerSheetDataRead sheetRead, List<Accou
var
deptData
=
allExtract
.
Where
(
t
=>
t
.
Department
==
department
);
if
(
deptData
==
null
||
!
deptData
.
Any
())
continue
;
for
(
int
j
=
2
;
j
<
head
.
LastCellNum
;
j
++)
for
(
int
j
=
3
;
j
<
head
.
LastCellNum
;
j
++)
{
var
headName
=
head
.
GetCell
(
j
).
StringCellValue
;
var
newCell
=
GetOrCreate
(
row
,
j
);
...
...
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