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
a5ee5e64
Commit
a5ee5e64
authored
Dec 15, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复绩效抽取特殊科室数据补充跳过
parent
fcc538f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
+22
-15
No files found.
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
View file @
a5ee5e64
...
@@ -182,7 +182,7 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
...
@@ -182,7 +182,7 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
row
.
SetRowStyle
(
rowStyle
);
row
.
SetRowStyle
(
rowStyle
);
var
department
=
row
.
GetCell
(
dict
[
SpecialUnitColumns
.
Department
]).
GetDecodeEscapes
();
var
department
=
row
.
GetCell
(
dict
[
SpecialUnitColumns
.
Department
]).
GetDecodeEscapes
();
CheckMergedRegions
(
rowIndex
,
department
,
ranges
);
CheckMergedRegions
(
rowIndex
,
department
,
ranges
,
dict
[
SpecialUnitColumns
.
Department
]
);
var
special
=
specials
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
Target
==
target
);
var
special
=
specials
.
FirstOrDefault
(
t
=>
t
.
Department
==
department
&&
t
.
Target
==
target
);
if
(
special
!=
null
)
if
(
special
!=
null
)
...
@@ -205,26 +205,33 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
...
@@ -205,26 +205,33 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
/// <param name="rowIndex"></param>
/// <param name="rowIndex"></param>
/// <param name="department"></param>
/// <param name="department"></param>
/// <param name="ranges"></param>
/// <param name="ranges"></param>
private
void
CheckMergedRegions
(
int
rowIndex
,
string
department
,
List
<
SpecialCellRange
>
ranges
)
private
void
CheckMergedRegions
(
int
rowIndex
,
string
department
,
List
<
SpecialCellRange
>
ranges
,
int
departmentColumnIndex
)
{
{
var
range
=
ranges
.
FirstOrDefault
(
t
=>
t
.
FirstRow
<=
rowIndex
&&
t
.
LastRow
>=
rowIndex
);
try
if
(
range
==
null
)
{
{
if
(
rowIndex
==
0
)
return
;
var
range
=
ranges
.
FirstOrDefault
(
t
=>
t
.
FirstRow
<=
rowIndex
&&
t
.
LastRow
>=
rowIndex
);
if
(
range
==
null
)
int
prevRowIndex
=
rowIndex
-
1
;
range
=
ranges
.
FirstOrDefault
(
t
=>
t
.
FirstRow
<=
prevRowIndex
&&
t
.
LastRow
>=
prevRowIndex
);
if
(
range
!=
null
&&
range
.
Single
==
department
)
range
.
LastRow
=
rowIndex
;
else
{
{
var
columnIndex
=
ranges
.
First
().
FirstColumn
;
if
(
rowIndex
==
0
)
return
;
ranges
.
Add
(
new
SpecialCellRange
(
new
CellRangeAddress
(
rowIndex
,
rowIndex
,
columnIndex
,
columnIndex
))
int
prevRowIndex
=
rowIndex
-
1
;
range
=
ranges
.
FirstOrDefault
(
t
=>
t
.
FirstRow
<=
prevRowIndex
&&
t
.
LastRow
>=
prevRowIndex
);
if
(
range
!=
null
&&
range
.
Single
==
department
)
range
.
LastRow
=
rowIndex
;
else
{
{
Single
=
department
var
columnIndex
=
ranges
.
FirstOrDefault
()?.
FirstColumn
??
departmentColumnIndex
;
});
ranges
.
Add
(
new
SpecialCellRange
(
new
CellRangeAddress
(
rowIndex
,
rowIndex
,
columnIndex
,
columnIndex
))
{
Single
=
department
});
}
}
}
}
}
catch
(
Exception
ex
)
{
logger
.
LogError
(
"CheckMergedRegions: "
+
ex
);
}
}
}
/// <summary>
/// <summary>
...
...
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