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
3fdd62b3
Commit
3fdd62b3
authored
Sep 16, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充数据
parent
7e963c28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
performance/Performance.Services/DFExtractService.cs
+25
-0
No files found.
performance/Performance.Services/DFExtractService.cs
View file @
3fdd62b3
...
@@ -1426,6 +1426,31 @@ private void SupplySpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<e
...
@@ -1426,6 +1426,31 @@ private void SupplySpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<e
}
}
}
}
private
void
WriteSpecialCellValue
(
Dictionary
<
string
,
Func
<
ex_special
,
List
<
im_specialunit
>,
object
>>
dictionary
,
IRow
row
,
List
<
ICell
>
cellList
,
ex_special
special
,
List
<
im_specialunit
>
allotDataList
,
List
<
NewExtractDto
>
extractdata
)
{
foreach
(
var
cell
in
cellList
)
{
object
value
=
null
;
if
(
dictionary
.
ContainsKey
(
cell
.
StringCellValue
))
{
var
item
=
dictionary
.
First
(
t
=>
t
.
Key
==
cell
.
StringCellValue
);
value
=
item
.
Value
.
Invoke
(
special
,
allotDataList
)
??
""
;
}
if
(
cell
.
StringCellValue
==
"数量"
&&
special
?.
TypeId
>
0
)
{
value
=
extractdata
?.
FirstOrDefault
(
t
=>
t
.
Category
==
special
.
Target
)?.
Value
;
}
var
newCell
=
row
.
CreateCell
(
cellList
.
IndexOf
(
cell
));
//newCell.SetCellValue(Verify(value));
OutToExcelCell
(
newCell
,
value
);
if
(
dictionary
.
ContainsKey
(
cell
.
StringCellValue
)
||
(
cell
.
StringCellValue
==
"数量"
&&
!
string
.
IsNullOrEmpty
(
value
?.
ToString
())))
newCell
.
CellStyle
=
style
;
}
}
private
readonly
Func
<
ISheet
,
int
?,
List
<
CellRangeAddressAndValue
>>
mergefunc
=
(
sheet
,
beginrow
)
=>
private
readonly
Func
<
ISheet
,
int
?,
List
<
CellRangeAddressAndValue
>>
mergefunc
=
(
sheet
,
beginrow
)
=>
{
{
var
merges
=
new
List
<
CellRangeAddressAndValue
>();
var
merges
=
new
List
<
CellRangeAddressAndValue
>();
...
...
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