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
5a804bfc
Commit
5a804bfc
authored
Sep 02, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
读取修改
parent
b6f8d144
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
200 additions
and
221 deletions
+200
-221
performance/Performance.Infrastructure/Helper/JsonHelper.cs
+12
-0
performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
+90
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
+29
-48
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+22
-82
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
+21
-44
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadLogisticsEmployee.cs
+17
-34
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
+9
-13
No files found.
performance/Performance.Infrastructure/Helper/JsonHelper.cs
View file @
5a804bfc
...
@@ -54,6 +54,18 @@ public static T Deserialize<T>(string json)
...
@@ -54,6 +54,18 @@ public static T Deserialize<T>(string json)
}
}
/// <summary>
/// <summary>
/// 将指定的 JSON 数据反序列化成指定对象。
/// </summary>
/// <typeparam name="T">对象类型。</typeparam>
/// <param name="json">JSON 数据。</param>
/// <returns></returns>
public
static
T
Deserialize
<
T
>(
Dictionary
<
string
,
object
>
@object
)
{
var
json
=
JsonConvert
.
SerializeObject
(
@object
,
Formatting
.
None
,
_jsonSettings
);
return
JsonConvert
.
DeserializeObject
<
T
>(
json
,
_jsonSettings
);
}
/// <summary>
/// 将转换后的Key全部设置为小写
/// 将转换后的Key全部设置为小写
/// </summary>
/// </summary>
/// <param name="json"></param>
/// <param name="json"></param>
...
...
performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
0 → 100644
View file @
5a804bfc
using
Performance.DtoModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.Services
{
public
class
ExcelReadConfig
{
public
static
ColumnInfo
[]
Employee
{
get
;
set
;
}
=
new
ColumnInfo
[]
{
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
AccountingUnit
),
"核算单元"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
Department
),
"核算单元"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
PersonnelNumber
),
"人员工号"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
DoctorName
),
"医生姓名"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
JobTitle
),
"职务分类"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
FitPeople
),
"绩效基数核算参考对象"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
FitPeopleValue
),
"绩效基础核算参考值"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
FitPeopleRatio
),
"绩效基数核算系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
AccountType
),
"人员分类"
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
PostCoefficient
),
"岗位系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
ScoreAverageRate
),
"考核得分率"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
Attendance
),
"出勤率"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataEmployee
.
Adjust
),
"调节系数"
,
true
),
};
public
static
ColumnInfo
[]
ClinicEmployee
{
get
;
set
;
}
=
new
ColumnInfo
[]
{
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
UnitType
),
"核算单元分类"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
AccountingUnit
),
"核算单元"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Department
),
"核算单元"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
PersonnelNumber
),
"人员工号"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
DoctorName
),
"医生姓名"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
JobTitle
),
"职务分类"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Basics
),
"基础绩效系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
PermanentStaff
),
"效率绩效人数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Efficiency
),
"效率绩效系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Scale
),
"规模绩效系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Management
),
"管理绩效发放系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
ScoreAverageRate
),
"考核得分率"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Attendance
),
"出勤率"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
OtheManagementPerfor
),
"其他管理绩效"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
OthePerfor
),
"其他绩效"
),
new
ColumnInfo
(
nameof
(
PerDataClinicEmployee
.
Adjust
),
"调节系数"
,
true
),
};
public
static
ColumnInfo
[]
LogisticsEmployee
{
get
;
set
;
}
=
new
ColumnInfo
[]
{
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
AccountType
),
"人员分类"
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
AccountingUnit
),
"核算单元"
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
FitPeople
),
"绩效基数核算参考对象"
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
FitPeopleValue
),
"绩效基础核算参考值"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
FitPeopleRatio
),
"绩效基数核算系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
JobNumber
),
"人员工号"
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
DoctorName
),
"人员姓名"
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
JobTitle
),
"职务分类"
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
PostCoefficient
),
"岗位系数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
Attendance
),
"出勤率"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataLogisticsEmployee
.
OthePerfor
),
"其他绩效"
,
true
),
};
public
static
ColumnInfo
[]
AccountBaisc
{
get
;
set
;
}
=
new
ColumnInfo
[]
{
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
UnitType
),
"核算单元类型"
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
AccountingUnit
),
"核算单元"
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
ManagerNumber
),
"科主任/护士长人数"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
Number
),
"核算单元人员数量"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
BasicFactor
),
"预算比例"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
OtherPerfor1
),
"其他绩效1"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
ScoringAverage
),
"考核得分率"
,
true
),
new
ColumnInfo
(
nameof
(
PerDataAccountBaisc
.
AdjustFactor
),
"调节系数"
,
true
),
};
}
public
class
ColumnInfo
{
public
ColumnInfo
(
string
field
,
string
description
,
bool
isNumber
=
false
)
{
Field
=
field
;
Description
=
description
;
IsNumber
=
isNumber
;
}
public
string
Field
{
get
;
set
;
}
public
string
Description
{
get
;
set
;
}
public
bool
IsNumber
{
get
;
set
;
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
View file @
5a804bfc
...
@@ -21,61 +21,42 @@ public class PerSheetDataReadClinicEmployee : IPerSheetDataRead
...
@@ -21,61 +21,42 @@ public class PerSheetDataReadClinicEmployee : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"核算单元分类"
,
"核算单元"
,
"核算单元"
,
"人员工号"
,
"医生姓名"
,
"职务分类"
,
"基础绩效系数"
,
//"岗位系数",
"效率绩效人数"
,
"效率绩效系数"
,
"规模绩效系数"
,
"管理绩效发放系数"
,
"考核得分率"
,
"出勤率"
,
"其他管理绩效"
,
//"其他绩效",
//"医院奖罚",
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"sheet '
{
sheet
.
SheetName
}
'中列'
{
item
}
'为空"
);
}
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
);
if
(
row
==
null
)
continue
;
if
(
row
==
null
)
continue
;
PerDataClinicEmployee
clinicEmployee
=
new
PerDataClinicEmployee
();
Dictionary
<
string
,
object
>
dic
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
PerDataClinicEmployee
.
RowNumber
),
r
}
};
foreach
(
var
item
in
ExcelReadConfig
.
ClinicEmployee
)
{
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
item
.
Description
,
out
int
point
))
{
//var cell = row.GetCell(point);
//if (cell == null) continue;
//// 获取单元格格式
//var xxs = cell.CellStyle.DataFormat;
//var dataFormat = RecognitionDataFormat.GetDataFormat(xxs);
object
@object
=
row
.
GetCell
(
point
).
GetValue
();
if
(
item
.
IsNumber
)
@object
=
ConvertHelper
.
To
<
decimal
?>(
@object
);
if
(
dic
.
Keys
.
Contains
(
item
.
Field
))
dic
[
item
.
Field
]
=
@object
;
else
dic
.
Add
(
item
.
Field
,
@object
);
}
}
clinicEmployee
.
RowNumber
=
r
;
var
employee
=
JsonHelper
.
Deserialize
<
PerDataClinicEmployee
>(
dic
);
clinicEmployee
.
UnitType
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元分类"
).
PointCell
));
clinicEmployee
.
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
));
clinicEmployee
.
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
));
clinicEmployee
.
PersonnelNumber
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"人员工号"
).
PointCell
));
clinicEmployee
.
DoctorName
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医生姓名"
).
PointCell
));
clinicEmployee
.
JobTitle
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"职务分类"
).
PointCell
));
clinicEmployee
.
Basics
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"基础绩效系数"
).
PointCell
)?.
NumericCellValue
);
//clinicEmployee.PostCoefficient = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "岗位系数").PointCell)?.NumericCellValue);
clinicEmployee
.
PermanentStaff
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"效率绩效人数"
).
PointCell
)?.
NumericCellValue
);
clinicEmployee
.
Efficiency
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"效率绩效系数"
).
PointCell
)?.
NumericCellValue
);
clinicEmployee
.
Scale
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"规模绩效系数"
).
PointCell
)?.
NumericCellValue
);
clinicEmployee
.
Management
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"管理绩效发放系数"
).
PointCell
)?.
NumericCellValue
);
clinicEmployee
.
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
);
clinicEmployee
.
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"出勤率"
).
PointCell
)?.
NumericCellValue
);
//clinicEmployee.OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue);
//clinicEmployee.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
clinicEmployee
.
OtheManagementPerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他管理绩效"
).
PointCell
)?.
NumericCellValue
);
clinicEmployee
.
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
);
if
(!
string
.
IsNullOrEmpty
(
clinicEmployee
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
clinicE
mployee
.
DoctorName
))
if
(!
string
.
IsNullOrEmpty
(
employee
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
e
mployee
.
DoctorName
))
dataList
.
Add
(
clinicE
mployee
);
dataList
.
Add
(
e
mployee
);
}
}
return
dataList
;
return
dataList
;
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
5a804bfc
...
@@ -24,99 +24,39 @@ public class PerSheetDataReadDeptAccounting : IPerSheetDataRead
...
@@ -24,99 +24,39 @@ public class PerSheetDataReadDeptAccounting : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"核算单元类型"
,
"核算单元"
,
//"科室名称",
//"效率绩效人数",
"科主任/护士长人数"
,
"核算单元人员数量"
,
"预算比例"
,
//"倾斜系数",
//"工作量倾斜系数",
//"保底绩效参考标准",
//"保底绩效系数",
//"其他绩效1",
//"其他绩效2",
//"药占比奖罚",
//"材料占比奖罚",
//"医院奖罚",
"考核得分率"
,
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"sheet '
{
sheet
.
SheetName
}
'中列'
{
item
}
'为空"
);
}
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
);
if
(
row
==
null
)
continue
;
if
(
row
==
null
)
continue
;
PerDataAccountBaisc
unifyUnit
=
new
PerDataAccountBaisc
();
Dictionary
<
string
,
object
>
dic
=
new
Dictionary
<
string
,
object
>
unifyUnit
.
RowNumber
=
r
;
{
unifyUnit
.
UnitType
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元类型"
).
PointCell
)?.
StringCellValue
;
{
nameof
(
PerDataAccountBaisc
.
RowNumber
),
r
}
unifyUnit
.
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
));
};
//unifyUnit.Department = NopiSevice.GetCellStringValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "科室名称").PointCell));
//unifyUnit.PermanentStaff = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效人数").PointCell)?.NumericCellValue);
unifyUnit
.
ManagerNumber
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科主任/护士长人数"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
Number
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元人员数量"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
BasicFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"预算比例"
).
PointCell
)?.
NumericCellValue
);
//unifyUnit.SlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数").PointCell)?.NumericCellValue);
//unifyUnit.Scale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数").PointCell)?.NumericCellValue);
//unifyUnit.Effic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数").PointCell)?.NumericCellValue);
//unifyUnit.Grant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数").PointCell)?.NumericCellValue);工作量倾斜系数
//unifyUnit.WorkSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量倾斜系数").PointCell)?.NumericCellValue);
//unifyUnit.MinimumReference = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效参考标准").PointCell)?.StringCellValue;
//unifyUnit.MinimumFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "保底绩效系数").PointCell)?.NumericCellValue);
unifyUnit
.
OtherPerfor1
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效1"
).
PointCell
)?.
NumericCellValue
);
//unifyUnit.OtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2").PointCell)?.NumericCellValue);
//unifyUnit.MedicineExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "药占比奖罚").PointCell)?.NumericCellValue);
//unifyUnit.MaterialsExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "材料占比奖罚").PointCell)?.NumericCellValue);
//unifyUnit.Extra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
unifyUnit
.
ScoringAverage
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
);
unifyUnit
.
AdjustFactor
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
);
//unifyUnit.NurseHeadNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元护士长数量" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
foreach
(
var
item
in
ExcelReadConfig
.
AccountBaisc
)
//unifyUnit.NurseNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元护士数量" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
{
//unifyUnit.NurseBasicFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "预算比例" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
item
.
Description
,
out
int
point
))
//unifyUnit.NurseSlopeFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "倾斜系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
{
//unifyUnit.NurseScale = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "规模绩效系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
object
@object
=
row
.
GetCell
(
point
).
GetValue
();
//unifyUnit.NurseEffic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
if
(
item
.
IsNumber
)
//unifyUnit.NurseGrant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
@object
=
ConvertHelper
.
To
<
decimal
?>(
@object
);
//unifyUnit.NurseOtherPerfor1 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效1" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//unifyUnit.NurseOtherPerfor2 = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效2" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//unifyUnit.NurseExtra = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//unifyUnit.NurseScoringAverage = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//unifyUnit.NurseAdjustFactor = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "调节系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
if
(!
string
.
IsNullOrEmpty
(
unifyUnit
.
UnitType
))
if
(
dic
.
Keys
.
Contains
(
item
.
Field
))
dataList
.
Add
(
unifyUnit
);
dic
[
item
.
Field
]
=
@object
;
else
dic
.
Add
(
item
.
Field
,
@object
);
}
}
return
dataList
;
}
}
/// <summary>
var
baisc
=
JsonHelper
.
Deserialize
<
PerDataAccountBaisc
>(
dic
);
/// 转换核算单元类型
/// </summary>
if
(!
string
.
IsNullOrEmpty
(
baisc
.
UnitType
))
/// <param name="unitType"></param>
dataList
.
Add
(
baisc
);
/// <returns></returns>
public
int
UnitType
(
string
unitType
)
{
switch
(
unitType
)
{
case
"医生组"
:
return
1
;
case
"护理组"
:
return
2
;
case
"医技组"
:
return
3
;
default
:
return
0
;
}
}
return
dataList
;
}
}
}
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
View file @
5a804bfc
...
@@ -24,57 +24,34 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
...
@@ -24,57 +24,34 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
string
[]
headers
=
new
string
[]
{
"核算单元"
,
"人员工号"
,
"医生姓名"
,
"职务分类"
,
"绩效基数核算参考对象"
,
"绩效基础核算参考值"
,
"绩效基数核算系数"
,
"人员分类"
,
"岗位系数"
,
//"参加工作时间",
"考核得分率"
,
"出勤率"
,
//"其他绩效",
//"医院奖罚",
"调节系数"
,
};
foreach
(
var
item
in
headers
)
{
if
(!
perHeader
.
Any
(
p
=>
p
.
CellValue
==
item
))
throw
new
NullReferenceException
(
$"sheet '
{
sheet
.
SheetName
}
'中列'
{
item
}
'为空"
);
}
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
);
if
(
row
==
null
)
continue
;
if
(
row
==
null
)
continue
;
PerDataEmployee
employee
=
new
PerDataEmployee
Dictionary
<
string
,
object
>
dic
=
new
Dictionary
<
string
,
object
>
{
{
RowNumber
=
r
,
{
nameof
(
PerDataEmployee
.
RowNumber
),
r
}
AccountingUnit
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
)),
Department
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
)),
PersonnelNumber
=
NopiSevice
.
GetCellStringValue
(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"人员工号"
).
PointCell
)),
DoctorName
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医生姓名"
).
PointCell
)?.
StringCellValue
,
JobTitle
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"职务分类"
).
PointCell
)?.
StringCellValue
,
FitPeople
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"绩效基数核算参考对象"
).
PointCell
)?.
StringCellValue
,
FitPeopleValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"绩效基础核算参考值"
).
PointCell
)?.
ToString
()),
FitPeopleRatio
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"绩效基数核算系数"
).
PointCell
)?.
NumericCellValue
),
AccountType
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"人员分类"
).
PointCell
)?.
StringCellValue
,
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"岗位系数"
).
PointCell
)?.
NumericCellValue
),
//WorkTime = NopiSevice.GetCellDatetimeValue(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "参加工作时间").PointCell)),
ScoreAverageRate
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
)?.
NumericCellValue
),
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"出勤率"
).
PointCell
)?.
NumericCellValue
),
//PeopleNumber = ConvertHelper.To<int?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元医生数").PointCell)?.ToString()),
//Workload = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "工作量绩效").PointCell)?.ToString()),
//OthePerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue),
//Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue),
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
)?.
NumericCellValue
),
//Grant = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "发放系数").PointCell)?.ToString()),
};
};
foreach
(
var
item
in
ExcelReadConfig
.
Employee
)
{
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
item
.
Description
,
out
int
point
))
{
object
@object
=
row
.
GetCell
(
point
).
GetValue
();
if
(
item
.
IsNumber
)
@object
=
ConvertHelper
.
To
<
decimal
?>(
@object
);
if
(
dic
.
Keys
.
Contains
(
item
.
Field
))
dic
[
item
.
Field
]
=
@object
;
else
dic
.
Add
(
item
.
Field
,
@object
);
}
}
var
employee
=
JsonHelper
.
Deserialize
<
PerDataEmployee
>(
dic
);
if
(!
string
.
IsNullOrEmpty
(
employee
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
employee
.
FitPeople
))
if
(!
string
.
IsNullOrEmpty
(
employee
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
employee
.
FitPeople
))
dataList
.
Add
(
employee
);
dataList
.
Add
(
employee
);
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadLogisticsEmployee.cs
View file @
5a804bfc
...
@@ -30,44 +30,27 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -30,44 +30,27 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
if
(
row
==
null
)
continue
;
PerDataLogisticsEmployee
employee
=
new
PerDataLogisticsEmployee
()
Dictionary
<
string
,
object
>
dic
=
new
Dictionary
<
string
,
object
>
{
{
RowNumber
=
r
,
{
nameof
(
PerDataLogisticsEmployee
.
RowNumber
),
r
}
};
};
int
point
=
0
;
foreach
(
var
item
in
ExcelReadConfig
.
LogisticsEmployee
)
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员分类"
,
out
point
))
{
employee
.
AccountType
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
item
.
Description
,
out
int
point
))
{
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"核算单元"
,
out
point
))
object
@object
=
row
.
GetCell
(
point
).
GetValue
();
employee
.
AccountingUnit
=
row
.
GetCell
(
point
).
GetValue
();
if
(
item
.
IsNumber
)
@object
=
ConvertHelper
.
To
<
decimal
?>(
@object
);
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基数核算参考对象"
,
out
point
))
employee
.
FitPeople
=
row
.
GetCell
(
point
).
GetValue
();
if
(
dic
.
Keys
.
Contains
(
item
.
Field
))
dic
[
item
.
Field
]
=
@object
;
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基础核算参考值"
,
out
point
))
else
employee
.
FitPeopleValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
dic
.
Add
(
item
.
Field
,
@object
);
}
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基数核算系数"
,
out
point
))
}
employee
.
FitPeopleRatio
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员工号"
,
out
point
))
employee
.
JobNumber
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员姓名"
,
out
point
))
employee
.
DoctorName
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"职务分类"
,
out
point
))
employee
.
JobTitle
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"岗位系数"
,
out
point
))
employee
.
PostCoefficient
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"出勤率"
,
out
point
))
employee
.
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"其他绩效"
,
out
point
))
var
employee
=
JsonHelper
.
Deserialize
<
PerDataLogisticsEmployee
>(
dic
);
employee
.
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(!
string
.
IsNullOrEmpty
(
employee
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
employee
.
FitPeople
))
if
(!
string
.
IsNullOrEmpty
(
employee
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
employee
.
FitPeople
))
dataList
.
Add
(
employee
);
dataList
.
Add
(
employee
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
View file @
5a804bfc
...
@@ -51,13 +51,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -51,13 +51,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
{
{
RowNumber
=
r
,
RowNumber
=
r
,
};
};
//AccountingUnit = accountingUnit,
int
point
;
//Department = accountingUnit,
//specialUnit.QuantitativeIndicators = row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标").PointCell)?.StringCellValue;
//specialUnit.Quantity = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "数量").PointCell)?.ToString());
//specialUnit.QuantitativeIndicatorsValue = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "量化指标绩效分值").PointCell)?.NumericCellValue);
int
point
=
0
;
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"量化指标"
,
out
point
))
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"量化指标"
,
out
point
))
specialUnit
.
QuantitativeIndicators
=
row
.
GetCell
(
point
).
GetValue
();
specialUnit
.
QuantitativeIndicators
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"数量"
,
out
point
))
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"数量"
,
out
point
))
...
@@ -67,14 +61,18 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -67,14 +61,18 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人数"
,
out
point
))
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人数"
,
out
point
))
specialUnit
.
Number
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
specialUnit
.
Number
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
ICell
cell
=
null
;
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"科室"
,
out
int
kspoint
))
cell
=
row
.
GetCell
(
kspoint
);
if
(
cell
==
null
)
continue
;
var
cell
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室"
).
PointCell
);
//?.ToString();
var
accountingUnit
=
cell
.
GetValue
();
var
accountingUnit
=
NopiSevice
.
GetCellStringValue
(
cell
);
if
(
cell
!=
null
&&
IsMergeCell
(
cell
,
out
Point
start
,
out
Point
end
)
&&
r
!=
start
.
X
)
if
(
cell
!=
null
&&
IsMergeCell
(
cell
,
out
Point
start
,
out
Point
end
)
&&
r
!=
start
.
X
)
{
{
row
=
sheet
.
GetRow
(
start
.
X
);
row
=
sheet
.
GetRow
(
start
.
X
);
cell
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室"
).
PointCell
);
cell
=
row
.
GetCell
(
kspoint
);
accountingUnit
=
cell
?.
StringCellValue
;
accountingUnit
=
cell
.
GetValue
()
;
}
}
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
accountingUnit
=
lastAccount
;
accountingUnit
=
lastAccount
;
...
@@ -84,8 +82,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -84,8 +82,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit
.
AccountingUnit
=
accountingUnit
;
specialUnit
.
AccountingUnit
=
accountingUnit
;
specialUnit
.
Department
=
accountingUnit
;
specialUnit
.
Department
=
accountingUnit
;
//specialUnit.Number = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "人数").PointCell)?.NumericCellValue);
//specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
//specialUnit.ScoringAverage = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "考核得分率").PointCell)?.NumericCellValue);
//specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue);
//specialUnit.OtherPerfor = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "其他绩效").PointCell)?.NumericCellValue);
//specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
//specialUnit.Punishment = ConvertHelper.To<decimal?>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "医院奖罚").PointCell)?.NumericCellValue);
...
...
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