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
f0f6869c
Commit
f0f6869c
authored
Mar 12, 2019
by
zry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel
parent
e56d886c
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
402 additions
and
168 deletions
+402
-168
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
+4
-0
performance/Performance.DtoModels/PerExcel/PerData.cs
+9
-5
performance/Performance.DtoModels/PerExcel/PerDataEmployee.cs
+75
-1
performance/Performance.DtoModels/PerExcel/PerDataExpend.cs
+1
-2
performance/Performance.DtoModels/PerExcel/PerDataIncome.cs
+1
-5
performance/Performance.DtoModels/PerExcel/PerDataOtherIncome.cs
+1
-1
performance/Performance.DtoModels/PerExcel/PerDataUnifyUnit.cs
+79
-0
performance/Performance.DtoModels/PerExcel/PerDataWorkload.cs
+1
-2
performance/Performance.DtoModels/PerExcel/PerSheet.cs
+1
-1
performance/Performance.Services/PerExcelService/PerExcelService.cs
+29
-29
performance/Performance.Services/PerExcelService/PerSheetService.cs
+18
-10
performance/Performance.Services/PerExcelService/SheetDataRead/IPerSheetDataRead.cs
+2
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataFactory.cs
+3
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
+27
-29
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
+10
-7
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
+47
-39
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOvertime.cs
+1
-1
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadUnifyUnit.cs
+59
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadWorkload.cs
+33
-34
No files found.
performance/Performance.DtoModels/PerExcel/ExcelEnum.cs
View file @
f0f6869c
...
@@ -27,5 +27,9 @@ public enum SheetType
...
@@ -27,5 +27,9 @@ public enum SheetType
Overtime
=
6
,
Overtime
=
6
,
[
Description
(
"工作量"
)]
[
Description
(
"工作量"
)]
Workload
=
7
,
Workload
=
7
,
[
Description
(
"特殊核算单元"
)]
SpecialUnit
=
8
,
[
Description
(
"核算单元统一系数"
)]
UnifyUnit
=
9
,
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerData.cs
View file @
f0f6869c
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
PerData
public
interface
IPerData
{
}
public
class
PerData
:
IPerData
{
{
/// <summary>
/// <summary>
/// 核算单元类别 (医生组/护理组)
/// 核算单元类别 (医生组/护理组)
...
@@ -26,12 +29,13 @@ public class PerData
...
@@ -26,12 +29,13 @@ public class PerData
/// 单元格备注
/// 单元格备注
/// </summary>
/// </summary>
public
string
Annotation
{
get
;
set
;
}
public
string
Annotation
{
get
;
set
;
}
}
public
class
PerData
<
TKey
>
:
PerData
{
/// <summary>
/// <summary>
/// 单元格value
/// 单元格value
/// </summary>
/// </summary>
public
TKey
CellValue
{
get
;
set
;
}
public
decimal
?
CellValue
{
get
;
set
;
}
/// <summary>
/// 系数值
/// </summary>
public
decimal
?
FactorValue
{
get
;
set
;
}
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataEmployee.cs
View file @
f0f6869c
...
@@ -4,7 +4,81 @@
...
@@ -4,7 +4,81 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
PerDataEmployee
:
PerData
<
string
>
public
class
PerDataEmployee
:
IPerData
{
{
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 绩效基数核算参考对象
/// </summary>
public
Nullable
<
decimal
>
FitPeople
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
/// 职称
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 岗位系数
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
/// 参加工作时间
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoreAverageRate
{
get
;
set
;
}
/// <summary>
/// 出勤率
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数
/// </summary>
public
Nullable
<
int
>
PeopleNumber
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
Workload
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
/// <summary>
/// 发放系数
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataExpend.cs
View file @
f0f6869c
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
PerDataExpend
:
PerData
<
decimal
>
public
class
PerDataExpend
:
PerData
{
{
public
string
ParentType
{
get
;
set
;
}
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataIncome.cs
View file @
f0f6869c
...
@@ -4,11 +4,7 @@
...
@@ -4,11 +4,7 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
PerDataIncome
:
PerData
<
decimal
?>
public
class
PerDataIncome
:
PerData
{
{
/// <summary>
/// 系数值
/// </summary>
public
decimal
?
FactorValue
{
get
;
set
;
}
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataOtherIncome.cs
View file @
f0f6869c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
PerDataOtherIncome
:
PerData
<
decimal
?>
public
class
PerDataOtherIncome
:
PerData
{
{
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataUnifyUnit.cs
0 → 100644
View file @
f0f6869c
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerDataUnifyUnit
:
IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 核算单元医生数量
/// </summary>
public
Nullable
<
int
>
DoctorNumber
{
get
;
set
;
}
/// <summary>
/// 医生预设总系数
/// </summary>
public
Nullable
<
decimal
>
DoctorFactor
{
get
;
set
;
}
/// <summary>
/// 其他绩效1
/// </summary>
public
Nullable
<
decimal
>
DoctorOtherPerfor1
{
get
;
set
;
}
/// <summary>
/// 其他绩效2
/// </summary>
public
Nullable
<
decimal
>
DoctorOtherPerfor2
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
DoctorExtra
{
get
;
set
;
}
/// <summary>
/// 考核对分率
/// </summary>
public
Nullable
<
decimal
>
DoctorScoringAverage
{
get
;
set
;
}
/// <summary>
/// 核算单元护士数量
/// </summary>
public
Nullable
<
int
>
NurseNumber
{
get
;
set
;
}
/// <summary>
/// 护理预设总系数
/// </summary>
public
Nullable
<
decimal
>
NurseFactor
{
get
;
set
;
}
/// <summary>
/// 其他绩效1
/// </summary>
public
Nullable
<
decimal
>
NurseOtherPerfor1
{
get
;
set
;
}
/// <summary>
/// 其他绩效2
/// </summary>
public
Nullable
<
decimal
>
NurseOtherPerfor2
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
NurseExtra
{
get
;
set
;
}
/// <summary>
/// 考核对分率
/// </summary>
public
Nullable
<
decimal
>
NurseScoringAverage
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/PerExcel/PerDataWorkload.cs
View file @
f0f6869c
...
@@ -4,8 +4,7 @@
...
@@ -4,8 +4,7 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
PerDataWorkload
:
PerData
<
decimal
?>
public
class
PerDataWorkload
:
PerData
{
{
public
decimal
?
FactorValue
{
get
;
set
;
}
}
}
}
}
performance/Performance.DtoModels/PerExcel/PerSheet.cs
View file @
f0f6869c
...
@@ -25,6 +25,6 @@ public class PerSheet
...
@@ -25,6 +25,6 @@ public class PerSheet
/// <summary>
/// <summary>
/// sheet数据
/// sheet数据
/// </summary>
/// </summary>
public
List
<
PerData
>
PerData
{
get
;
set
;
}
public
List
<
I
PerData
>
PerData
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/PerExcelService/PerExcelService.cs
View file @
f0f6869c
...
@@ -51,36 +51,36 @@ public PerExcel Import(string path)
...
@@ -51,36 +51,36 @@ public PerExcel Import(string path)
}
}
}
}
private
List
<
im_employee
>
C
(
List
<
PerData
>
dataList
)
//
private List<im_employee> C(List<PerData> dataList)
{
//
{
List
<
im_employee
>
result
=
new
List
<
im_employee
>();
//
List<im_employee> result = new List<im_employee>();
var
empList
=
dataList
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
Department
})
//
var empList = dataList.GroupBy(t => new { t.AccountingUnit, t.Department })
.
Select
(
t
=>
new
{
t
.
Key
,
Employee
=
t
.
Select
(
p
=>
(
PerDataEmployee
)
p
)
});
//
.Select(t => new { t.Key, Employee = t.Select(p => (PerDataEmployee)p) });
foreach
(
var
gkey
in
empList
)
//
foreach (var gkey in empList)
{
//
{
im_employee
employee
=
new
im_employee
//
im_employee employee = new im_employee
{
//
{
AccountingUnit
=
gkey
.
Key
.
AccountingUnit
,
//
AccountingUnit = gkey.Key.AccountingUnit,
Department
=
gkey
.
Key
.
Department
,
//
Department = gkey.Key.Department,
DoctorName
=
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"医生姓名"
).
CellValue
,
//
DoctorName = gkey.Employee.FirstOrDefault(t => t.TypeName == "医生姓名").CellValue,
FitPeople
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"绩效基数核算参考对象"
)?.
CellValue
),
//
FitPeople = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "绩效基数核算参考对象")?.CellValue),
JobTitle
=
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"职称"
)?.
CellValue
,
//
JobTitle = gkey.Employee.FirstOrDefault(t => t.TypeName == "职称")?.CellValue,
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"岗位系数"
)?.
CellValue
),
//
PostCoefficient = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "岗位系数")?.CellValue),
WorkTime
=
ConvertHelper
.
To
<
DateTime
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"考核得分率"
)?.
CellValue
),
//
WorkTime = ConvertHelper.To<DateTime?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "考核得分率")?.CellValue),
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"医生姓名"
)?.
CellValue
),
//
ScoreAverageRate = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "医生姓名")?.CellValue),
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"出勤率"
)?.
CellValue
),
//
Attendance = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "出勤率")?.CellValue),
PeopleNumber
=
ConvertHelper
.
To
<
int
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"核算单元医生数"
)?.
CellValue
),
//
PeopleNumber = ConvertHelper.To<int?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "核算单元医生数")?.CellValue),
Workload
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"工作量绩效"
)?.
CellValue
),
//
Workload = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "工作量绩效")?.CellValue),
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"其他绩效"
)?.
CellValue
),
//
OthePerfor = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "其他绩效")?.CellValue),
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"医院奖罚"
)?.
CellValue
),
//
Punishment = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "医院奖罚")?.CellValue),
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"调节系数"
)?.
CellValue
),
//
Adjust = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "调节系数")?.CellValue),
Grant
=
ConvertHelper
.
To
<
decimal
?>(
gkey
.
Employee
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
"发放系数"
)?.
CellValue
)
//
Grant = ConvertHelper.To<decimal?>(gkey.Employee.FirstOrDefault(t => t.TypeName == "发放系数")?.CellValue)
};
//
};
result
.
Add
(
employee
);
//
result.Add(employee);
}
//
}
return
result
;
//
return result;
}
//
}
public
void
Copy
(
int
iD
)
public
void
Copy
(
int
iD
)
{
{
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
f0f6869c
...
@@ -37,18 +37,26 @@ public PerSheet Sheet(ISheet sheet)
...
@@ -37,18 +37,26 @@ public PerSheet Sheet(ISheet sheet)
return
perSheet
;
return
perSheet
;
}
}
/// <summary>
/// 判断sheet适用模板类型
/// </summary>
/// <param name="sheetName"></param>
/// <returns></returns>
public
SheetType
GetSheetType
(
string
sheetName
)
public
SheetType
GetSheetType
(
string
sheetName
)
{
{
if
(
sheetName
.
StartsWith
(
"医院人员名单"
))
//if (sheetName.StartsWith("医院人员名单"))
return
SheetType
.
Employee
;
// return SheetType.Employee;
else
if
(
sheetName
.
StartsWith
(
"1.0"
))
//else if (sheetName.StartsWith("1.0"))
return
SheetType
.
OtherIncome
;
// return SheetType.OtherIncome;
else
if
(
sheetName
.
StartsWith
(
"1."
))
//else if (sheetName.StartsWith("1."))
return
SheetType
.
Income
;
// return SheetType.Income;
else
if
(
sheetName
.
StartsWith
(
"2."
))
////else if (sheetName.StartsWith("2."))
return
SheetType
.
Expend
;
//// return SheetType.Expend;
else
if
(
sheetName
.
StartsWith
(
"3."
))
//else if (sheetName.StartsWith("3."))
return
SheetType
.
Workload
;
// return SheetType.Workload;
//else
if
(
sheetName
.
StartsWith
(
"4.1"
))
return
SheetType
.
UnifyUnit
;
return
SheetType
.
Unidentifiable
;
return
SheetType
.
Unidentifiable
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/IPerSheetDataRead.cs
View file @
f0f6869c
...
@@ -12,12 +12,13 @@ public interface IPerSheetDataRead
...
@@ -12,12 +12,13 @@ public interface IPerSheetDataRead
/// excel 列头及数据 配置信息
/// excel 列头及数据 配置信息
/// </summary>
/// </summary>
PerSheetPoint
Point
{
get
;
}
PerSheetPoint
Point
{
get
;
}
/// <summary>
/// <summary>
/// 读取数据
/// 读取数据
/// </summary>
/// </summary>
/// <param name="sheet"></param>
/// <param name="sheet"></param>
/// <param name="perHeader"></param>
/// <param name="perHeader"></param>
/// <returns></returns>
/// <returns></returns>
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
);
List
<
I
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
);
}
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataFactory.cs
View file @
f0f6869c
...
@@ -38,6 +38,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
...
@@ -38,6 +38,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
case
SheetType
.
Workload
:
case
SheetType
.
Workload
:
dataread
=
new
PerSheetDataReadWorkload
();
dataread
=
new
PerSheetDataReadWorkload
();
break
;
break
;
case
SheetType
.
UnifyUnit
:
dataread
=
new
PerSheetDataReadUnifyUnit
();
break
;
}
}
return
dataread
;
return
dataread
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
View file @
f0f6869c
using
NPOI.SS.UserModel
;
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -18,43 +19,40 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
...
@@ -18,43 +19,40 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
HeaderLastRowNum
=
0
,
HeaderLastRowNum
=
0
,
HeaderFirstCellNum
=
0
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
1
,
DataFirstRowNum
=
1
,
AccountingUnit
=
new
List
<
AccountingUnit
>
{
new
AccountingUnit
{
AccountingUnitCellNum
=
0
,
DeptCellNum
=
1
}
}
};
};
public
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
I
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
PerData
>
dataList
=
new
List
<
PerData
>();
List
<
IPerData
>
dataList
=
new
List
<
I
PerData
>();
for
each
(
var
unit
in
Point
.
AccountingUnit
)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++
)
{
{
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
!=
unit
.
AccountingUnitCellNum
&&
t
.
PointCell
!=
unit
.
DeptCellNum
).
OrderBy
(
t
=>
t
.
PointCell
);
var
row
=
sheet
.
GetRow
(
r
);
var
accountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元"
).
PointCell
).
ToString
();
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
PerDataEmployee
employee
=
new
PerDataEmployee
{
{
var
row
=
sheet
.
GetRow
(
r
);
AccountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元"
).
PointCell
).
ToString
(),
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
Department
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"科室"
).
PointCell
).
ToString
(),
{
DoctorName
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"医生姓名"
).
PointCell
).
ToString
(),
//PerData data = sheetRead.GetPerData(row, vhead.ElementAt(c));
JobTitle
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"职称"
).
PointCell
).
ToString
(),
PerData
data
=
new
PerDataEmployee
FitPeople
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"绩效基数核算参考对象"
).
PointCell
).
ToString
()),
{
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"岗位系数"
).
PointCell
).
ToString
()),
AccountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
(),
WorkTime
=
ConvertHelper
.
To
<
DateTime
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"考核得分率"
).
PointCell
).
ToString
()),
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"医生姓名"
).
PointCell
).
ToString
()),
TypeName
=
vhead
.
ElementAt
(
c
)?.
CellName
,
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"出勤率"
).
PointCell
).
ToString
()),
CellValue
=
row
.
GetCell
(
vhead
.
ElementAt
(
c
).
PointCell
)?.
ToString
(),
PeopleNumber
=
ConvertHelper
.
To
<
int
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元医生数"
).
PointCell
).
ToString
()),
Annotation
=
row
.
GetCell
(
vhead
.
ElementAt
(
c
).
PointCell
)?.
CellComment
?.
String
?.
String
,
Workload
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"工作量绩效"
).
PointCell
).
ToString
()),
};
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"其他绩效"
).
PointCell
).
ToString
()),
dataList
.
Add
(
data
);
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"医院奖罚"
).
PointCell
).
ToString
()),
}
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"调节系数"
).
PointCell
).
ToString
()),
}
Grant
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"发放系数"
).
PointCell
).
ToString
()),
};
dataList
.
Add
(
employee
);
}
}
return
dataList
;
return
dataList
;
}
}
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadExpend.cs
View file @
f0f6869c
...
@@ -23,7 +23,7 @@ public class PerSheetDataReadExpend : IPerSheetDataRead
...
@@ -23,7 +23,7 @@ public class PerSheetDataReadExpend : IPerSheetDataRead
//DeptCellNum = 4
//DeptCellNum = 4
};
};
public
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
I
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
//throw new NotImplementedException();
//throw new NotImplementedException();
return
null
;
return
null
;
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
View file @
f0f6869c
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
namespace
Performance.Services
namespace
Performance.Services
{
{
/// <summary>
/// 收入
/// </summary>
public
class
PerSheetDataReadIncome
:
IPerSheetDataRead
public
class
PerSheetDataReadIncome
:
IPerSheetDataRead
{
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
public
PerSheetPoint
Point
=>
new
PerSheetPoint
...
@@ -35,18 +38,17 @@ public class PerSheetDataReadIncome : IPerSheetDataRead
...
@@ -35,18 +38,17 @@ public class PerSheetDataReadIncome : IPerSheetDataRead
FactorRow
=
1
,
FactorRow
=
1
,
}
}
}
}
//AccountingUnitCellNum = 0,
//DeptCellNum = 1,
//FactorRow = 1,
};
};
public
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
PerData
>
dataList
=
new
List
<
PerData
>();
List
<
IPerData
>
dataList
=
new
List
<
I
PerData
>();
//循环 当前有几个核算单元
//循环 当前有几个核算单元
foreach
(
var
unit
in
Point
.
AccountingUnit
)
foreach
(
var
unit
in
Point
.
AccountingUnit
)
{
{
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
...
@@ -54,11 +56,12 @@ public List<PerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -54,11 +56,12 @@ public List<PerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
{
//获取当前核算单元名称
var
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
var
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
//核算单元空值跳过
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
continue
;
var
athead
=
vhead
.
ElementAt
(
c
);
var
athead
=
vhead
.
ElementAt
(
c
);
//PerData data = sheetRead.GetPerData(row, vhead.ElementAt(c));
PerData
data
=
new
PerDataIncome
PerData
data
=
new
PerDataIncome
{
{
AccountingUnit
=
accountingUnit
,
AccountingUnit
=
accountingUnit
,
...
@@ -66,7 +69,7 @@ public List<PerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -66,7 +69,7 @@ public List<PerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
TypeName
=
athead
?.
CellName
,
TypeName
=
athead
?.
CellName
,
CellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
ToString
()),
CellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
ToString
()),
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
UnitType
=
unit
.
UnitType
,
UnitType
=
unit
.
UnitType
,
//手动匹配
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
};
};
dataList
.
Add
(
data
);
dataList
.
Add
(
data
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOtherIncome.cs
View file @
f0f6869c
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
namespace
Performance.Services
namespace
Performance.Services
{
{
/// <summary>
/// 其他收入
/// </summary>
public
class
PerSheetDataReadOtherIncome
:
IPerSheetDataRead
public
class
PerSheetDataReadOtherIncome
:
IPerSheetDataRead
{
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
public
PerSheetPoint
Point
=>
new
PerSheetPoint
...
@@ -26,53 +29,58 @@ public class PerSheetDataReadOtherIncome : IPerSheetDataRead
...
@@ -26,53 +29,58 @@ public class PerSheetDataReadOtherIncome : IPerSheetDataRead
}
}
};
};
public
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
I
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
PerData
>
dataList
=
new
List
<
PerData
>();
List
<
IPerData
>
dataList
=
new
List
<
I
PerData
>();
foreach
(
var
unit
in
Point
.
AccountingUnit
)
var
unit
=
Point
.
AccountingUnit
.
First
();
{
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
!=
unit
.
AccountingUnitCellNum
&&
t
.
PointCell
!=
unit
.
DeptCellNum
).
OrderBy
(
t
=>
t
.
PointCell
);
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
!=
unit
.
AccountingUnitCellNum
&&
t
.
PointCell
!=
unit
.
DeptCellNum
).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
{
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
{
//获取当前核算单元名称
var
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
//核算单元空值跳过
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
var
athead
=
vhead
.
ElementAt
(
c
);
PerData
data
=
new
PerDataOtherIncome
{
{
var
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
AccountingUnit
=
accountingUnit
,
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
continue
;
TypeName
=
athead
?.
CellName
,
var
athead
=
vhead
.
ElementAt
(
c
);
CellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
ToString
()),
PerData
data
=
new
PerDataOtherIncome
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
{
UnitType
=
GetUnitType
(
sheet
.
SheetName
,
perHeader
)
AccountingUnit
=
accountingUnit
,
};
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
TypeName
=
athead
?.
CellName
,
CellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
ToString
()),
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
};
if
(
sheet
.
SheetName
.
Contains
(
"医生组"
))
{
data
.
UnitType
=
"医生组"
;
}
else
if
(
sheet
.
SheetName
.
Contains
(
"护理组"
))
{
data
.
UnitType
=
"护理组"
;
}
else
if
(
perHeader
.
Any
(
t
=>
t
.
CellName
.
Contains
(
"核算单元"
)
&&
t
.
CellName
.
Contains
(
"医生组"
)))
{
data
.
UnitType
=
"医生组"
;
}
else
if
(
perHeader
.
Any
(
t
=>
t
.
CellName
.
Contains
(
"核算单元"
)
&&
t
.
CellName
.
Contains
(
"护理组"
)))
{
data
.
UnitType
=
"护理组"
;
}
dataList
.
Add
(
data
);
dataList
.
Add
(
data
);
}
}
}
}
}
return
dataList
;
return
dataList
;
}
}
/// <summary>
/// 获取核算单元类型
/// </summary>
/// <param name="sheet"></param>
/// <param name="perHeader"></param>
private
string
GetUnitType
(
string
sheetName
,
List
<
PerHeader
>
perHeader
)
{
if
(
sheetName
.
Contains
(
"医生组"
))
return
"医生组"
;
else
if
(
sheetName
.
Contains
(
"护理组"
))
return
"护理组"
;
else
if
(
perHeader
.
Any
(
t
=>
t
.
CellName
.
Contains
(
"核算单元"
)
&&
t
.
CellName
.
Contains
(
"医生组"
)))
return
"医生组"
;
else
if
(
perHeader
.
Any
(
t
=>
t
.
CellName
.
Contains
(
"核算单元"
)
&&
t
.
CellName
.
Contains
(
"护理组"
)))
return
"护理组"
;
return
""
;
}
}
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadOvertime.cs
View file @
f0f6869c
...
@@ -13,7 +13,7 @@ public class PerSheetDataReadOvertime : IPerSheetDataRead
...
@@ -13,7 +13,7 @@ public class PerSheetDataReadOvertime : IPerSheetDataRead
{
{
public
PerSheetPoint
Point
=>
throw
new
NotImplementedException
();
public
PerSheetPoint
Point
=>
throw
new
NotImplementedException
();
public
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
I
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
throw
new
NotImplementedException
();
throw
new
NotImplementedException
();
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadUnifyUnit.cs
0 → 100644
View file @
f0f6869c
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
/// <summary>
/// 临床科室单元核算表
/// </summary>
public
class
PerSheetDataReadUnifyUnit
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
0
,
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
var
accountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元"
).
PointCell
).
ToString
();
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
PerDataUnifyUnit
unifyUnit
=
new
PerDataUnifyUnit
{
AccountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元"
).
PointCell
).
ToString
(),
Department
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"科室"
).
PointCell
).
ToString
(),
DoctorNumber
=
ConvertHelper
.
To
<
int
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元医生数量"
&&
p
.
Parent
.
CellName
==
"医生组"
).
PointCell
).
ToString
()),
DoctorFactor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"医生预设总系数"
&&
p
.
Parent
.
CellName
==
"医生组"
).
PointCell
).
ToString
()),
DoctorOtherPerfor1
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"其他绩效1"
&&
p
.
Parent
.
CellName
==
"医生组"
).
PointCell
).
ToString
()),
DoctorOtherPerfor2
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"其他绩效2"
&&
p
.
Parent
.
CellName
==
"医生组"
).
PointCell
).
ToString
()),
DoctorExtra
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"医院奖罚"
&&
p
.
Parent
.
CellName
==
"医生组"
).
PointCell
).
ToString
()),
DoctorScoringAverage
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"考核对分率"
&&
p
.
Parent
.
CellName
==
"医生组"
).
PointCell
).
ToString
()),
NurseNumber
=
ConvertHelper
.
To
<
int
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"核算单元护士数量"
&&
p
.
Parent
.
CellName
==
"护理组"
).
PointCell
).
ToString
()),
NurseFactor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"护理预设总系数"
&&
p
.
Parent
.
CellName
==
"护理组"
).
PointCell
).
ToString
()),
NurseOtherPerfor1
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"其他绩效1"
&&
p
.
Parent
.
CellName
==
"护理组"
).
PointCell
).
ToString
()),
NurseOtherPerfor2
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"其他绩效2"
&&
p
.
Parent
.
CellName
==
"护理组"
).
PointCell
).
ToString
()),
NurseExtra
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"医院奖罚"
&&
p
.
Parent
.
CellName
==
"护理组"
).
PointCell
).
ToString
()),
NurseScoringAverage
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellName
==
"考核对分率"
&&
p
.
Parent
.
CellName
==
"护理组"
).
PointCell
).
ToString
()),
};
dataList
.
Add
(
unifyUnit
);
}
return
dataList
;
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadWorkload.cs
View file @
f0f6869c
...
@@ -30,47 +30,46 @@ public class PerSheetDataReadWorkload : IPerSheetDataRead
...
@@ -30,47 +30,46 @@ public class PerSheetDataReadWorkload : IPerSheetDataRead
}
}
};
};
public
List
<
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
I
PerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
PerData
>
dataList
=
new
List
<
PerData
>();
List
<
IPerData
>
dataList
=
new
List
<
I
PerData
>();
//循环 当前有几个核算单元
var
unit
=
Point
.
AccountingUnit
.
First
();
foreach
(
var
unit
in
Point
.
AccountingUnit
)
//查询除了 核算单元 科室名称 有效数据列头位置
var
vhead
=
perHeader
.
Where
(
t
=>
t
.
PointCell
!=
unit
.
AccountingUnitCellNum
&&
t
.
PointCell
!=
unit
.
DeptCellNum
).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
{
var
vhead
=
perHeader
.
Where
(
t
=>
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
AccountingUnitCellNum
).
Contains
(
t
.
PointCell
)
var
row
=
sheet
.
GetRow
(
r
);
&&
!
Point
.
AccountingUnit
.
Select
(
p
=>
p
.
DeptCellNum
).
Contains
(
t
.
PointCell
)).
OrderBy
(
t
=>
t
.
PointCell
);
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
{
var
row
=
sheet
.
GetRow
(
r
);
//获取当前核算单元名称
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
var
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
//核算单元空值跳过
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
var
athead
=
vhead
.
ElementAt
(
c
);
PerData
data
=
new
PerDataWorkload
{
{
var
accountingUnit
=
row
.
GetCell
(
unit
.
AccountingUnitCellNum
.
Value
)?.
ToString
();
AccountingUnit
=
accountingUnit
,
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
continue
;
TypeName
=
athead
?.
CellName
,
var
athead
=
vhead
.
ElementAt
(
c
);
CellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
ToString
()),
//PerData data = sheetRead.GetPerData(row, vhead.ElementAt(c));
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
PerData
data
=
new
PerDataWorkload
UnitType
=
unit
.
UnitType
,
{
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
AccountingUnit
=
accountingUnit
,
};
Department
=
row
.
GetCell
(
unit
.
DeptCellNum
.
Value
)?.
ToString
(),
if
(
sheet
.
SheetName
.
Contains
(
"医生组"
))
TypeName
=
athead
?.
CellName
,
data
.
UnitType
=
"医生组"
;
CellValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
athead
.
PointCell
)?.
ToString
()),
else
if
(
sheet
.
SheetName
.
Contains
(
"护理组"
))
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
data
.
UnitType
=
"护理组"
;
UnitType
=
unit
.
UnitType
,
FactorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
unit
.
FactorRow
.
Value
).
GetCell
(
athead
.
PointCell
)?.
ToString
()),
dataList
.
Add
(
data
);
};
if
(
sheet
.
SheetName
.
Contains
(
"医生组"
))
{
data
.
UnitType
=
"医生组"
;
}
else
if
(
sheet
.
SheetName
.
Contains
(
"护理组"
))
{
data
.
UnitType
=
"护理组"
;
}
dataList
.
Add
(
data
);
}
}
}
}
}
return
dataList
;
return
dataList
;
}
}
}
}
...
...
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