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
01642ec8
Commit
01642ec8
authored
Aug 06, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新抽取样式微调
parent
1259ae48
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
performance/Performance.Services/NewExtractService.cs
+10
-8
No files found.
performance/Performance.Services/NewExtractService.cs
View file @
01642ec8
...
@@ -139,10 +139,8 @@ public string ExtractData(int allotId, string email, int hospitalId)
...
@@ -139,10 +139,8 @@ public string ExtractData(int allotId, string email, int hospitalId)
//前景色
//前景色
style
.
FillForegroundColor
=
NPOI
.
HSSF
.
Util
.
HSSFColor
.
SkyBlue
.
Index
;
style
.
FillForegroundColor
=
NPOI
.
HSSF
.
Util
.
HSSFColor
.
SkyBlue
.
Index
;
style
.
FillPattern
=
FillPattern
.
SolidForeground
;
style
.
FillPattern
=
FillPattern
.
SolidForeground
;
#
endregion
#
endregion
for
(
int
i
=
0
;
i
<
workbook
.
NumberOfSheets
;
i
++)
for
(
int
i
=
0
;
i
<
workbook
.
NumberOfSheets
;
i
++)
{
{
var
sheet
=
workbook
.
GetSheetAt
(
i
);
var
sheet
=
workbook
.
GetSheetAt
(
i
);
...
@@ -213,7 +211,7 @@ private static void CreateNotExistSheet(List<mod_module> modulesList, IWorkbook
...
@@ -213,7 +211,7 @@ private static void CreateNotExistSheet(List<mod_module> modulesList, IWorkbook
{
{
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
if
(
sheetIndex
==
0
)
if
(
sheetIndex
==
0
)
sheetIndex
=
item
.
Value
;
sheetIndex
=
item
.
Value
+
1
;
var
copysheet
=
workbook
.
GetSheet
(
item
.
Key
);
var
copysheet
=
workbook
.
GetSheet
(
item
.
Key
);
var
newSheet
=
copysheet
.
CopySheet
(
item
.
Key
,
true
);
var
newSheet
=
copysheet
.
CopySheet
(
item
.
Key
,
true
);
workbook
.
SetSheetOrder
(
newSheet
.
SheetName
,
sheetIndex
);
workbook
.
SetSheetOrder
(
newSheet
.
SheetName
,
sheetIndex
);
...
@@ -293,17 +291,17 @@ private void WriteIncome(ISheet sheet, int allotLastId, IPerSheetDataRead sheetR
...
@@ -293,17 +291,17 @@ private void WriteIncome(ISheet sheet, int allotLastId, IPerSheetDataRead sheetR
{
{
var
headName
=
head
.
GetCell
(
i
).
StringCellValue
;
var
headName
=
head
.
GetCell
(
i
).
StringCellValue
;
var
newCell
=
row
.
CreateCell
(
i
);
var
newCell
=
row
.
CreateCell
(
i
);
if
(
headName
==
"核算单元(医生组)"
)
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(医生组)"
)
{
{
var
dept
=
importData
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
UnitType
==
1
)?.
AccountingUnit
;
var
dept
=
importData
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
UnitType
==
1
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
}
}
else
if
(
headName
==
"核算单元(护理组)"
)
else
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(护理组)"
)
{
{
var
dept
=
importData
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
UnitType
==
2
)?.
AccountingUnit
;
var
dept
=
importData
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
UnitType
==
2
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
}
}
else
if
(
headName
==
"核算单元(医技组)"
)
else
if
(
headName
.
Replace
(
"\n"
,
""
)
==
"核算单元(医技组)"
)
{
{
var
dept
=
importData
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
UnitType
==
3
)?.
AccountingUnit
;
var
dept
=
importData
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
UnitType
==
3
)?.
AccountingUnit
;
newCell
.
SetCellValue
(
dept
??
""
);
newCell
.
SetCellValue
(
dept
??
""
);
...
@@ -363,8 +361,8 @@ private void WriteWorkload(ISheet sheet, int allotLastId, IPerSheetDataRead shee
...
@@ -363,8 +361,8 @@ private void WriteWorkload(ISheet sheet, int allotLastId, IPerSheetDataRead shee
var
itemList
=
perforModitemRepository
.
GetEntities
(
t
=>
t
.
ModuleId
==
module
.
Id
);
var
itemList
=
perforModitemRepository
.
GetEntities
(
t
=>
t
.
ModuleId
==
module
.
Id
);
if
(
itemList
==
null
||
!
itemList
.
Any
())
return
;
if
(
itemList
==
null
||
!
itemList
.
Any
())
return
;
var
head
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
1
);
var
head
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
0
);
var
factor
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
2
);
var
factor
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
1
);
//写入列头信息
//写入列头信息
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
2
;
int
cellStartIndex
=
sheetRead
.
Point
.
HeaderFirstCellNum
.
Value
+
2
;
...
@@ -644,6 +642,10 @@ private void WriteAccountBasic(ISheet sheet, int allotLastId, IPerSheetDataRead
...
@@ -644,6 +642,10 @@ private void WriteAccountBasic(ISheet sheet, int allotLastId, IPerSheetDataRead
{
{
var
item
=
dictionary
.
FirstOrDefault
(
t
=>
t
.
Key
==
cell
.
StringCellValue
);
var
item
=
dictionary
.
FirstOrDefault
(
t
=>
t
.
Key
==
cell
.
StringCellValue
);
var
value
=
(
item
.
Value
.
Invoke
(
dataList
[
i
])
??
""
).
ToString
();
var
value
=
(
item
.
Value
.
Invoke
(
dataList
[
i
])
??
""
).
ToString
();
if
(
cell
.
StringCellValue
==
"核算单元类型"
)
{
value
=
value
==
"1"
?
"医生组"
:
value
==
"2"
?
"护理组"
:
"医技组"
;
}
var
newCell
=
importRow
.
CreateCell
(
cell
.
ColumnIndex
);
var
newCell
=
importRow
.
CreateCell
(
cell
.
ColumnIndex
);
newCell
.
SetCellValue
(
Verify
(
value
));
newCell
.
SetCellValue
(
Verify
(
value
));
newCell
.
CellStyle
=
style
;
newCell
.
CellStyle
=
style
;
...
...
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