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
202c9746
Commit
202c9746
authored
Nov 21, 2023
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
读取Ecxel(FactorValue如果没值就赋null) -补充
parent
71b0221b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
14 deletions
+12
-14
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
+3
-5
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
+2
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
+2
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
+2
-2
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadWorkload.cs
+3
-3
No files found.
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadBillIncome.cs
View file @
202c9746
...
...
@@ -72,7 +72,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
cellValue
=
ConvertHelper
.
ToDecimalOrNull
(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
var
cell
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
);
var
factorValue
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
).
GetValue
(
);
PerData
data
=
new
PerData
{
RowNumber
=
r
,
...
...
@@ -84,7 +84,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
//Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType
=
unit
.
UnitType
,
//手动匹配
//FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell).GetValue()),
FactorValue
=
!
string
.
IsNullOrEmpty
(
cell
?.
GetValue
())
?
ConvertHelper
.
ToDecimalOrNull
(
cell
?.
GetValue
()
)
:
null
,
FactorValue
=
!
string
.
IsNullOrEmpty
(
factorValue
)
?
ConvertHelper
.
ToDecimalOrNull
(
factorValue
)
:
null
,
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
...
...
@@ -105,7 +105,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
cellValue
=
technicianRow
.
GetCell
(
athead
.
PointCell
).
StringCellValue
;
if
(
string
.
IsNullOrEmpty
(
cellValue
))
continue
;
var
cell
=
sheet
.
GetRow
(
tunit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
);
PerData
data
=
new
PerData
{
RowNumber
=
rownum
,
...
...
@@ -116,8 +115,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
CellValue
=
(
dataList
.
Select
(
t
=>
(
PerData
)
t
)?.
Where
(
t
=>
t
.
TypeName
==
athead
.
CellValue
).
Sum
(
t
=>
t
.
CellValue
)
??
0
)
/
2
,
//Annotation = technicianRow.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType
=
tunit
.
UnitType
,
//手动匹配
//FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(tunit.FactorRow.Value).GetCell(athead.PointCell)?.ToString()),
FactorValue
=
!
string
.
IsNullOrEmpty
(
cell
?.
GetValue
())
?
ConvertHelper
.
ToDecimalOrNull
(
cell
?.
ToString
())
:
null
,
FactorValue
=
ConvertHelper
.
ToDecimalOrNull
(
sheet
.
GetRow
(
tunit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
IsFactor
=
true
,
};
dataList
.
Add
(
data
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
View file @
202c9746
...
...
@@ -74,7 +74,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
cellValue
=
ConvertHelper
.
ToDecimalOrNull
(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
var
cell
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
);
var
factorValue
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
).
GetValue
(
);
PerData
data
=
new
PerData
{
...
...
@@ -87,7 +87,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
//Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType
=
unit
.
UnitType
,
//手动匹配
//FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue),
FactorValue
=
!
string
.
IsNullOrEmpty
(
cell
?.
GetValue
())
?
ConvertHelper
.
ToDecimalOrNull
(
cell
?.
NumericCell
Value
)
:
null
,
FactorValue
=
!
string
.
IsNullOrEmpty
(
factorValue
)
?
ConvertHelper
.
ToDecimalOrNull
(
factor
Value
)
:
null
,
IsFactor
=
true
,
};
var
lastcell
=
vhead
.
OrderByDescending
(
t
=>
t
.
PointCell
).
First
();
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
View file @
202c9746
...
...
@@ -81,13 +81,13 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
CellValue
=
cellValue
,
//Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType
=
unit
.
UnitType
,
//手动匹配
FactorValue
=
?
ConvertHelper
.
ToDecimalOrNull
(
factorValue
)
:
null
,
//FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue),
FactorValue
=
!
string
.
IsNullOrEmpty
(
factorValue
)
?
ConvertHelper
.
ToDecimalOrNull
(
factorValue
)
:
null
,
IsFactor
=
true
,
};
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
continue
;
dataList
.
Add
(
data
);
}
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
View file @
202c9746
...
...
@@ -71,7 +71,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
cellValue
=
ConvertHelper
.
ToDecimalOrNull
(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
var
cell
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
);
var
factorValue
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
).
GetValue
(
);
PerData
data
=
new
PerData
{
RowNumber
=
r
,
...
...
@@ -83,7 +83,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
//Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType
=
unit
.
UnitType
,
//手动匹配
//FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell)?.NumericCellValue),
FactorValue
=
!
string
.
IsNullOrEmpty
(
cell
.
GetValue
())
?
ConvertHelper
.
ToDecimalOrNull
(
cell
.
NumericCell
Value
)
:
null
,
FactorValue
=
!
string
.
IsNullOrEmpty
(
factorValue
)
?
ConvertHelper
.
ToDecimalOrNull
(
factor
Value
)
:
null
,
IsFactor
=
true
,
};
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadWorkload.cs
View file @
202c9746
...
...
@@ -49,7 +49,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
cellValue
=
ConvertHelper
.
ToDecimalOrNull
(
row
.
GetCell
(
athead
.
PointCell
).
GetValue
());
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
//var cell = sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell
);
var
factorValue
=
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
)?.
GetCell
(
athead
.
PointCell
).
GetValue
(
);
PerData
data
=
new
PerData
{
RowNumber
=
r
,
...
...
@@ -60,8 +60,8 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
CellValue
=
cellValue
,
//Annotation = row.GetCell(athead.PointCell)?.CellComment?.String?.String,
UnitType
=
unit
.
UnitType
,
FactorValue
=
ConvertHelper
.
ToDecimalOrNull
(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
).
GetValue
()),
//FactorValue = !string.IsNullOrEmpty(cell.GetValue()) ? ConvertHelper.ToDecimalOrNull(cell.GetValue()
) : null,
//
FactorValue = ConvertHelper.ToDecimalOrNull(sheet.GetRow(unit.FactorRow.Value).GetCell(athead.PointCell).GetValue()),
FactorValue
=
!
string
.
IsNullOrEmpty
(
factorValue
)
?
ConvertHelper
.
ToDecimalOrNull
(
factorValue
)
:
null
,
IsFactor
=
true
,
};
if
(
sheet
.
SheetName
.
Contains
(
"医生组"
))
...
...
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