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
44bd199e
Commit
44bd199e
authored
Mar 18, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特殊核算组写入数据跳过公式
parent
0e43e273
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+4
-2
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
+6
-3
No files found.
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
44bd199e
...
...
@@ -139,6 +139,7 @@ private void WriteDataToFile(IWorkbook workbook, int allotId, Dictionary<ExDataD
for
(
int
sheetIndex
=
0
;
sheetIndex
<
workbook
.
NumberOfSheets
;
sheetIndex
++)
{
var
sheet
=
workbook
.
GetSheetAt
(
sheetIndex
);
string
sheetName
=
sheet
.
SheetName
.
NoBlank
();
ratio
+=
40
m
/
workbook
.
NumberOfSheets
;
var
sheetType
=
perSheetService
.
GetSheetType
(
sheet
.
SheetName
);
...
...
@@ -151,13 +152,14 @@ private void WriteDataToFile(IWorkbook workbook, int allotId, Dictionary<ExDataD
if
(
sheetType
==
SheetType
.
OtherWorkload
)
point
=
PerSheetDataFactory
.
GetDataRead
(
SheetType
.
Workload
)?.
Point
;
if
(
types
.
Contains
(
sheetType
)
&&
point
!=
null
&&
point
.
DataFirstCellNum
.
HasValue
)
{
logger
.
LogInformation
(
$"
{
sheetName
}
开始清除历史数据。point:
{
JsonHelper
.
Serialize
(
point
)}
"
);
ExtractHelper
.
ClearSheetPartialData
(
sheet
,
point
,
sheetType
);
}
var
customer
=
factory
.
GetWriteData
(
sheetType
,
logger
);
if
(
customer
!=
null
)
{
string
sheetName
=
sheet
.
SheetName
.
NoBlank
();
var
collects
=
collectData
?.
Where
(
t
=>
t
.
SheetName
.
NoBlank
()
==
sheetName
).
ToList
();
customer
.
WriteCollectData
(
sheet
,
point
,
sheetType
,
style
,
collects
);
...
...
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
View file @
44bd199e
...
...
@@ -188,10 +188,13 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
if
(
special
!=
null
)
{
var
cell
=
row
.
GetOrCreate
(
quantityIndex
);
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
<
double
>(
special
.
Quantity
);
cell
.
CellStyle
=
cellStyle
;
if
(
cell
.
CellType
!=
CellType
.
Formula
)
{
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
<
double
>(
special
.
Quantity
);
cell
.
CellStyle
=
cellStyle
;
}
specials
.
Remove
(
special
);
}
dataFirstRowNum
=
rowIndex
+
1
;
...
...
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