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
40d2f569
Commit
40d2f569
authored
Aug 31, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handsontable
parent
16e726ae
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
974 additions
and
253 deletions
+974
-253
performance/Performance.Api/Controllers/CollectController.cs
+108
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+25
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+25
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+121
-0
performance/Performance.DtoModels/HandsonTable.cs
+128
-0
performance/Performance.DtoModels/Response/CollectPermission.cs
+34
-0
performance/Performance.DtoModels/SaveCollectData.cs
+14
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+4
-0
performance/Performance.EntityModels/Entity/collect_data.cs
+77
-0
performance/Performance.EntityModels/Entity/collect_permission.cs
+59
-0
performance/Performance.Infrastructure/Helper/JsonHelper.cs
+23
-0
performance/Performance.Repository/Repository/PerforcollectdataRepository.cs
+20
-0
performance/Performance.Repository/Repository/PerforcollectpermissionRepository.cs
+20
-0
performance/Performance.Services/AllotCompute/ImportDataService.cs
+48
-33
performance/Performance.Services/CollectService.cs
+0
-0
performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
+89
-0
performance/Performance.Services/PerExcelService/RecognitionDataFormat.cs
+69
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
+29
-48
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
+23
-83
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
+21
-44
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadLogisticsEmployee.cs
+18
-35
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
+19
-10
No files found.
performance/Performance.Api/Controllers/CollectController.cs
0 → 100644
View file @
40d2f569
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.Extensions.Logging
;
using
Performance.DtoModels
;
using
Performance.DtoModels.Response
;
using
Performance.Services
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Performance.Api.Controllers
{
[
Route
(
"api/collect"
)]
[
ApiController
]
public
class
CollectController
:
ControllerBase
{
private
readonly
ILogger
<
CollectController
>
logger
;
private
readonly
ClaimService
claim
;
private
readonly
CollectService
collectService
;
public
CollectController
(
ILogger
<
CollectController
>
logger
,
ClaimService
claim
,
CollectService
collectService
)
{
this
.
logger
=
logger
;
this
.
claim
=
claim
;
this
.
collectService
=
collectService
;
}
/// <summary>
/// 查询采集内容
/// </summary>
[
HttpPost
]
[
Route
(
"getcollectcontent"
)]
public
ApiResponse
GetCollectContent
([
FromQuery
]
int
hospitalId
,
[
FromQuery
]
int
userId
)
{
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
var
result
=
collectService
.
GetCollectContent
(
hospitalId
,
userId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 设置采集录入权限
/// </summary>
[
HttpPost
]
[
Route
(
"setpermission/{userid}"
)]
public
ApiResponse
SetPermission
(
int
userid
,
[
FromBody
]
IEnumerable
<
CollectPermission
>
collects
)
{
if
(
collects
==
null
||
!
collects
.
Any
())
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
collectService
.
SetPermission
(
userid
,
collects
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 获取采集SHEET名称
/// </summary>
[
HttpPost
]
[
Route
(
"getcollectsheet/{hospitalId}"
)]
public
ApiResponse
GetCollectSheet
(
int
hospitalId
)
{
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
var
userId
=
claim
.
GetUserId
();
var
result
=
collectService
.
GetCollectSheet
(
hospitalId
,
userId
)
?.
Select
(
w
=>
new
{
w
.
SheetType
,
w
.
SheetName
})
.
Distinct
()
.
ToList
();
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 加载采集内容
/// </summary>
[
HttpPost
]
[
Route
(
"getcollectdata/{allotId}"
)]
public
ApiResponse
GetCollectData
(
int
allotId
,
[
FromQuery
]
string
sheetName
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
var
userId
=
claim
.
GetUserId
();
var
result
=
collectService
.
GetCollectData
(
userId
,
allotId
,
sheetName
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 保存采集内容
/// </summary>
[
HttpPost
]
[
Route
(
"savecollectdata/{allotId}"
)]
public
ApiResponse
SaveCollectData
(
int
allotId
,
[
FromBody
]
SaveCollectData
request
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
collectService
.
SaveCollectData
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
}
\ No newline at end of file
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
40d2f569
...
...
@@ -284,6 +284,31 @@
<param
name=
"id"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.CollectController.GetCollectContent(System.Int32,System.Int32)"
>
<summary>
查询采集内容
</summary>
</member>
<member
name=
"M:Performance.Api.Controllers.CollectController.SetPermission(System.Int32,System.Collections.Generic.IEnumerable{Performance.DtoModels.Response.CollectPermission})"
>
<summary>
设置采集录入权限
</summary>
</member>
<member
name=
"M:Performance.Api.Controllers.CollectController.GetCollectSheet(System.Int32)"
>
<summary>
获取采集SHEET名称
</summary>
</member>
<member
name=
"M:Performance.Api.Controllers.CollectController.GetCollectData(System.Int32,System.String)"
>
<summary>
加载采集内容
</summary>
</member>
<member
name=
"M:Performance.Api.Controllers.CollectController.SaveCollectData(System.Int32,Performance.DtoModels.SaveCollectData)"
>
<summary>
保存采集内容
</summary>
</member>
<member
name=
"M:Performance.Api.Controllers.ComputeController.GetCompute(Performance.DtoModels.ComputerRequest)"
>
<summary>
获取绩效发放列表
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
40d2f569
...
...
@@ -2311,6 +2311,31 @@
医院总收支结余
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Response.CollectPermission.HeadName"
>
<summary>
列头名称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Response.CollectPermission.BanChange"
>
<summary>
禁止修改
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Response.CollectPermission.Readnoly"
>
<summary>
0 可读可写 1 只读
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Response.CollectPermission.Visible"
>
<summary>
是否可见 0 不可见 1 可见
</summary>
</member>
<member
name=
"P:Performance.DtoModels.Response.CollectPermission.AttachLast"
>
<summary>
是否附带上次绩效 0 不附带 1 附带
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.Source"
>
<summary>
来源
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
40d2f569
...
...
@@ -97,6 +97,12 @@
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.cof_workyear"
>
<summary>
工龄对应绩效系数配置
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.collect_data"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.collect_permission"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.PerformanceDbContext.ex_item"
>
<summary>
</summary>
</member>
...
...
@@ -1499,6 +1505,121 @@
绩效系数
</summary>
</member>
<member
name=
"T:Performance.EntityModels.collect_data"
>
<summary>
采集数据
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.AllotID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.SheetName"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.UnitType"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.RowNumber"
>
<summary>
行号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.EmployeeName"
>
<summary>
人员姓名
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.JobNumber"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.AccountingUnitTechnician"
>
<summary>
核算单元名称 医技
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.AccountingUnitNurse"
>
<summary>
核算单元名称 护士
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.AccountingUnitDoctor"
>
<summary>
核算单元名称 医生
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.Department"
>
<summary>
科室名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.TypeName"
>
<summary>
列头类型名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_data.CellValue"
>
<summary>
单元格value
</summary>
</member>
<member
name=
"T:Performance.EntityModels.collect_permission"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.ID"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.HospitalId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.UserId"
>
<summary>
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.SheetName"
>
<summary>
列头类型名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.HeadName"
>
<summary>
列头名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.Readnoly"
>
<summary>
0 可读可写 1 只读
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.AttachLast"
>
<summary>
是否附带上次绩效 0 不附带 1 附带
</summary>
</member>
<member
name=
"P:Performance.EntityModels.collect_permission.Visible"
>
<summary>
0 可见 1 不可见
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ex_item"
>
<summary>
...
...
performance/Performance.DtoModels/HandsonTable.cs
0 → 100644
View file @
40d2f569
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
namespace
Performance.DtoModels
{
public
class
HandsonTable
{
private
IEnumerable
<
collect_permission
>
_permissions
;
private
List
<
Dictionary
<
string
,
string
>>
_data
;
public
HandsonTable
(
int
sheetType
,
string
[]
cols
,
List
<
collect_permission
>
permissions
)
{
_permissions
=
permissions
;
_data
=
new
List
<
Dictionary
<
string
,
string
>>();
InitColHeaders
(
sheetType
,
cols
);
InitColumns
(
permissions
);
}
public
string
[]
ColHeaders
{
get
;
private
set
;
}
public
List
<
Dictionary
<
string
,
string
>>
Data
=>
_data
;
public
HandsonColumn
[]
Columns
{
get
;
private
set
;
}
public
void
SetRowData
(
IEnumerable
<
HandsonRowData
>
datas
)
{
foreach
(
var
dt
in
datas
)
{
var
dic
=
CreateDataRow
(
"编号"
,
dt
.
Row
.
ToString
());
foreach
(
var
item
in
dt
.
CellData
)
{
if
(
dic
.
ContainsKey
(
item
.
Name
)
&&
_permissions
.
Any
(
w
=>
w
.
HeadName
==
item
.
Name
&&
w
.
AttachLast
>
0
))
dic
[
item
.
Name
]
=
item
.
Value
?.
ToString
();
}
_data
.
Add
(
dic
);
}
}
private
void
InitColHeaders
(
int
sheetType
,
string
[]
cols
)
{
var
defaluts
=
new
DefalutHandsonHeader
[]
{
new
DefalutHandsonHeader
{
SheetType
=
SheetType
.
OtherIncome
,
Necessity
=
new
[]
{
"核算单元(医技组)"
,
"核算单元(医生组)"
,
"核算单元(护理组)"
,
"科室名称"
}
},
new
DefalutHandsonHeader
{
SheetType
=
SheetType
.
Expend
,
Necessity
=
new
[]
{
"核算单元(医技组)"
,
"核算单元(医生组)"
,
"核算单元(护理组)"
,
"科室名称"
}
},
new
DefalutHandsonHeader
{
SheetType
=
SheetType
.
Workload
,
Necessity
=
new
[]
{
"核算单元"
,
"科室名称"
}
},
//new DefalutHandsonHeader{ SheetType = SheetType.AccountExtra, Necessity = new[] { "核算单元","科室名称" } },
//new DefalutHandsonHeader{ SheetType = SheetType.PersonExtra, Necessity = new[] { "核算单元","科室名称" } },
};
var
necessitys
=
defaluts
.
FirstOrDefault
(
w
=>
sheetType
==
(
int
)
w
.
SheetType
)?.
Necessity
.
ToList
();
necessitys
=
necessitys
??
new
List
<
string
>();
foreach
(
var
item
in
cols
)
{
if
(!
necessitys
.
Contains
(
item
))
necessitys
.
Add
(
item
);
if
(!
_permissions
.
Any
(
w
=>
w
.
HeadName
==
item
&&
w
.
Visible
==
0
))
necessitys
.
Remove
(
item
);
}
ColHeaders
=
necessitys
.
ToArray
();
}
private
void
InitColumns
(
List
<
collect_permission
>
permissions
)
{
List
<
HandsonColumn
>
columns
=
new
List
<
HandsonColumn
>();
foreach
(
var
item
in
ColHeaders
)
{
var
readnoly
=
_permissions
.
FirstOrDefault
(
f
=>
f
.
HeadName
==
item
)?.
Readnoly
==
1
;
columns
.
Add
(
new
HandsonColumn
(
item
,
readnoly
));
}
Columns
=
columns
.
ToArray
();
}
private
Dictionary
<
string
,
string
>
CreateDataRow
(
string
key
,
string
value
)
{
var
temp
=
new
Dictionary
<
string
,
string
>()
{
{
key
,
value
}
};
foreach
(
var
item
in
ColHeaders
)
{
if
(!
temp
.
ContainsKey
(
item
))
temp
.
Add
(
item
,
""
);
}
return
temp
;
}
}
public
class
HandsonColumn
{
public
HandsonColumn
(
string
data
,
bool
readOnly
=
false
)
{
Data
=
data
;
ReadOnly
=
readOnly
;
}
public
string
Data
{
get
;
set
;
}
public
bool
ReadOnly
{
get
;
set
;
}
}
public
class
DefalutHandsonHeader
{
public
SheetType
SheetType
{
get
;
set
;
}
public
string
[]
Necessity
{
get
;
set
;
}
}
public
class
HandsonRowData
{
public
HandsonRowData
(
int
row
,
IEnumerable
<
HandsonCellData
>
cellData
)
{
Row
=
row
;
CellData
=
cellData
;
}
public
int
Row
{
get
;
set
;
}
public
IEnumerable
<
HandsonCellData
>
CellData
{
get
;
set
;
}
}
public
class
HandsonCellData
{
public
HandsonCellData
(
string
name
,
object
value
)
{
Name
=
name
;
Value
=
value
;
}
public
string
Name
{
get
;
set
;
}
public
object
Value
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Response/CollectPermission.cs
0 → 100644
View file @
40d2f569
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels.Response
{
public
class
CollectPermission
{
public
int
HospitalId
{
get
;
set
;
}
public
string
SheetName
{
get
;
set
;
}
public
int
?
PermissionId
{
get
;
set
;
}
/// <summary>
/// 列头名称
/// </summary>
public
string
HeadName
{
get
;
set
;
}
/// <summary>
/// 禁止修改
/// </summary>
public
bool
BanChange
{
get
;
set
;
}
/// <summary>
/// 0 可读可写 1 只读
/// </summary>
public
int
Readnoly
{
get
;
set
;
}
/// <summary>
/// 是否可见 0 不可见 1 可见
/// </summary>
public
int
Visible
{
get
;
set
;
}
/// <summary>
/// 是否附带上次绩效 0 不附带 1 附带
/// </summary>
public
int
AttachLast
{
get
;
set
;
}
public
int
SheetType
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/SaveCollectData.cs
0 → 100644
View file @
40d2f569
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
SaveCollectData
{
public
int
SheetType
{
get
;
set
;
}
public
string
SheetName
{
get
;
set
;
}
public
string
[]
ColHeaders
{
get
;
set
;
}
public
string
[][]
Data
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
40d2f569
...
...
@@ -75,6 +75,10 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> 工龄对应绩效系数配置 </summary>
public
virtual
DbSet
<
cof_workyear
>
cof_workyear
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
collect_data
>
collect_data
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
collect_permission
>
collect_permission
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
ex_item
>
ex_item
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
ex_module
>
ex_module
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/collect_data.cs
0 → 100644
View file @
40d2f569
//-----------------------------------------------------------------------
// <copyright file=" ag_data.cs">
// * FileName: 二次分配不固定数据.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// 采集数据
/// </summary>
[
Table
(
"collect_data"
)]
public
class
collect_data
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
AllotID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
SheetName
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 行号
/// </summary>
public
int
RowNumber
{
get
;
set
;
}
/// <summary>
/// 人员姓名
/// </summary>
public
string
EmployeeName
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 核算单元名称 医技
/// </summary>
public
string
AccountingUnitTechnician
{
get
;
set
;
}
/// <summary>
/// 核算单元名称 护士
/// </summary>
public
string
AccountingUnitNurse
{
get
;
set
;
}
/// <summary>
/// 核算单元名称 医生
/// </summary>
public
string
AccountingUnitDoctor
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 列头类型名称
/// </summary>
public
string
TypeName
{
get
;
set
;
}
/// <summary>
/// 单元格value
/// </summary>
public
string
CellValue
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/collect_permission.cs
0 → 100644
View file @
40d2f569
//-----------------------------------------------------------------------
// <copyright file=" ag_data.cs">
// * FileName: 二次分配不固定数据.cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"collect_permission"
)]
public
class
collect_permission
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// 列头类型名称
/// </summary>
public
string
SheetName
{
get
;
set
;
}
/// <summary>
/// 列头名称
/// </summary>
public
string
HeadName
{
get
;
set
;
}
/// <summary>
/// 0 可读可写 1 只读
/// </summary>
public
int
?
Readnoly
{
get
;
set
;
}
/// <summary>
/// 是否附带上次绩效 0 不附带 1 附带
/// </summary>
public
int
AttachLast
{
get
;
set
;
}
public
int
SheetType
{
get
;
set
;
}
/// <summary>
/// 0 可见 1 不可见
/// </summary>
public
int
Visible
{
get
;
set
;
}
}
}
performance/Performance.Infrastructure/Helper/JsonHelper.cs
View file @
40d2f569
...
...
@@ -54,6 +54,29 @@ public static T Deserialize<T>(string json)
}
/// <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全部设置为小写
/// </summary>
/// <param name="json"></param>
/// <returns></returns>
public
static
SortedDictionary
<
string
,
object
>
Deserialize
(
object
@object
)
{
var
json
=
JsonConvert
.
SerializeObject
(
@object
,
Formatting
.
None
,
_jsonSettings
);
return
Deserialize
<
SortedDictionary
<
string
,
object
>>(
json
);
}
/// <summary>
/// 将转换后的Key全部设置为小写
/// </summary>
/// <param name="json"></param>
...
...
performance/Performance.Repository/Repository/PerforcollectdataRepository.cs
0 → 100644
View file @
40d2f569
//-----------------------------------------------------------------------
// <copyright file=" ag_againsituation.cs">
// * FileName: ag_againsituation.cs
// </copyright>
//-----------------------------------------------------------------------
using
Performance.EntityModels
;
using
System
;
namespace
Performance.Repository
{
/// <summary>
/// collect_data Repository
/// </summary>
public
partial
class
PerforcollectdataRepository
:
PerforRepository
<
collect_data
>
{
public
PerforcollectdataRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/Repository/PerforcollectpermissionRepository.cs
0 → 100644
View file @
40d2f569
//-----------------------------------------------------------------------
// <copyright file=" ag_againsituation.cs">
// * FileName: ag_againsituation.cs
// </copyright>
//-----------------------------------------------------------------------
using
Performance.EntityModels
;
using
System
;
namespace
Performance.Repository
{
/// <summary>
/// collect_permission Repository
/// </summary>
public
partial
class
PerforcollectpermissionRepository
:
PerforRepository
<
collect_permission
>
{
public
PerforcollectpermissionRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/AllotCompute/ImportDataService.cs
View file @
40d2f569
...
...
@@ -140,7 +140,7 @@ private PerExcel Import(per_allot allot)
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveEmployee
(
PerSheet
sheet
,
int
allotId
)
private
int
SaveEmployee
(
PerSheet
sheet
,
int
allotId
)
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
...
...
@@ -171,6 +171,7 @@ private void SaveEmployee(PerSheet sheet, int allotId)
addList
.
Add
(
imdata
);
}
perforImEmployeeRepository
.
AddRange
(
addList
.
ToArray
());
return
imsheet
.
ID
;
}
/// <summary>
...
...
@@ -179,7 +180,7 @@ private void SaveEmployee(PerSheet sheet, int allotId)
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveClinicEmployee
(
PerSheet
sheet
,
int
allotId
)
private
int
SaveClinicEmployee
(
PerSheet
sheet
,
int
allotId
)
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
...
...
@@ -210,6 +211,7 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
addList
.
Add
(
imdata
);
}
perforImemployeeclinicRepository
.
AddRange
(
addList
.
ToArray
());
return
imsheet
.
ID
;
}
/// <summary>
...
...
@@ -218,7 +220,7 @@ private void SaveClinicEmployee(PerSheet sheet, int allotId)
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveLogisticsEmployee
(
PerSheet
sheet
,
int
allotId
)
private
int
SaveLogisticsEmployee
(
PerSheet
sheet
,
int
allotId
)
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
...
...
@@ -249,6 +251,7 @@ private void SaveLogisticsEmployee(PerSheet sheet, int allotId)
addList
.
Add
(
imdata
);
}
perforImemployeelogisticsRepository
.
AddRange
(
addList
.
ToArray
());
return
imsheet
.
ID
;
}
/// <summary>
...
...
@@ -257,7 +260,7 @@ private void SaveLogisticsEmployee(PerSheet sheet, int allotId)
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveAccountBasic
(
PerSheet
sheet
,
int
allotId
)
private
int
SaveAccountBasic
(
PerSheet
sheet
,
int
allotId
)
{
//var imsheet = new per_sheet { AllotID = allotId, SheetName = sheet.SheetName, Source = 1, SheetType = (int)sheet.SheetType };
//perforPerSheetRepository.Add(imsheet);
...
...
@@ -285,6 +288,7 @@ private void SaveAccountBasic(PerSheet sheet, int allotId)
addList
.
Add
(
imdata
);
}
perforImaccountbasicRepository
.
AddRange
(
addList
.
ToArray
());
return
imsheet
.
ID
;
}
/// <summary>
...
...
@@ -293,7 +297,7 @@ private void SaveAccountBasic(PerSheet sheet, int allotId)
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveSpecialUnit
(
PerSheet
sheet
,
int
allotId
)
private
int
SaveSpecialUnit
(
PerSheet
sheet
,
int
allotId
)
{
var
imsheet
=
new
per_sheet
{
AllotID
=
allotId
,
SheetName
=
sheet
.
SheetName
,
Source
=
1
,
SheetType
=
(
int
)
sheet
.
SheetType
};
perforPerSheetRepository
.
Add
(
imsheet
);
...
...
@@ -308,6 +312,7 @@ private void SaveSpecialUnit(PerSheet sheet, int allotId)
addList
.
Add
(
imdata
);
}
perforImspecialunitRepository
.
AddRange
(
addList
.
ToArray
());
return
imsheet
.
ID
;
}
/// <summary>
...
...
@@ -316,7 +321,7 @@ private void SaveSpecialUnit(PerSheet sheet, int allotId)
/// <param name="sheet"></param>
/// <param name="allotId"></param>
/// <returns></returns>
private
void
SaveCommon
(
PerSheet
sheet
,
int
allotId
)
private
int
SaveCommon
(
PerSheet
sheet
,
int
allotId
)
{
per_sheet
imsheet
=
null
;
List
<
int
>
types
=
new
List
<
int
>
{
(
int
)
SheetType
.
AccountBasicSpecial
,
(
int
)
SheetType
.
AccountBasic
};
...
...
@@ -336,27 +341,6 @@ private void SaveCommon(PerSheet sheet, int allotId)
perforPerSheetRepository
.
Add
(
imsheet
);
}
List
<
im_header
>
addHeadList
=
new
List
<
im_header
>();
foreach
(
var
header
in
sheet
.
PerHeader
)
{
var
imheader
=
Mapper
.
Map
<
im_header
>(
header
);
imheader
.
SheetID
=
imsheet
.
ID
;
imheader
.
AllotID
=
allotId
;
perforImHeaderRepository
.
Add
(
imheader
);
if
(
header
.
IsHasChildren
)
{
foreach
(
var
child
in
header
.
Children
)
{
var
imheaderChild
=
Mapper
.
Map
<
im_header
>(
child
);
imheaderChild
.
SheetID
=
imsheet
.
ID
;
imheaderChild
.
ParentID
=
imheader
.
ID
;
imheaderChild
.
AllotID
=
allotId
;
addHeadList
.
Add
(
imheaderChild
);
}
}
}
if
(
addHeadList
!=
null
&&
addHeadList
.
Any
())
perforImHeaderRepository
.
AddRange
(
addHeadList
.
ToArray
());
List
<
im_data
>
addDataList
=
new
List
<
im_data
>();
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerData
)
t
);
...
...
@@ -375,7 +359,32 @@ private void SaveCommon(PerSheet sheet, int allotId)
perforImDataRepository
.
AddRange
(
addDataList
.
Skip
(
rows
*
i
).
Take
(
rows
).
ToArray
());
}
}
return
imsheet
.
ID
;
}
private
void
SaveHeader
(
PerSheet
sheet
,
int
allotId
,
int
imsheetid
)
{
List
<
im_header
>
addHeadList
=
new
List
<
im_header
>();
foreach
(
var
header
in
sheet
.
PerHeader
)
{
var
imheader
=
Mapper
.
Map
<
im_header
>(
header
);
imheader
.
SheetID
=
imsheetid
;
imheader
.
AllotID
=
allotId
;
perforImHeaderRepository
.
Add
(
imheader
);
if
(
header
.
IsHasChildren
)
{
foreach
(
var
child
in
header
.
Children
)
{
var
imheaderChild
=
Mapper
.
Map
<
im_header
>(
child
);
imheaderChild
.
SheetID
=
imsheetid
;
imheaderChild
.
ParentID
=
imheader
.
ID
;
imheaderChild
.
AllotID
=
allotId
;
addHeadList
.
Add
(
imheaderChild
);
}
}
}
if
(
addHeadList
!=
null
&&
addHeadList
.
Any
())
perforImHeaderRepository
.
AddRange
(
addHeadList
.
ToArray
());
}
private
bool
Save
(
PerExcel
excel
,
int
allotId
)
...
...
@@ -385,27 +394,33 @@ private bool Save(PerExcel excel, int allotId)
logManageService
.
WriteMsg
(
"保存基础数据"
,
$"开始保存数据 --
{
sheet
.
SheetName
}
"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
if
(
sheet
.
SheetType
==
SheetType
.
Employee
)
{
SaveEmployee
(
sheet
,
allotId
);
var
imsheetid
=
SaveEmployee
(
sheet
,
allotId
);
SaveHeader
(
sheet
,
allotId
,
imsheetid
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
LogisticsEmployee
)
{
SaveLogisticsEmployee
(
sheet
,
allotId
);
var
imsheetid
=
SaveLogisticsEmployee
(
sheet
,
allotId
);
SaveHeader
(
sheet
,
allotId
,
imsheetid
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
ClinicEmployee
)
{
SaveClinicEmployee
(
sheet
,
allotId
);
var
imsheetid
=
SaveClinicEmployee
(
sheet
,
allotId
);
SaveHeader
(
sheet
,
allotId
,
imsheetid
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
AccountBasic
)
{
SaveAccountBasic
(
sheet
,
allotId
);
var
imsheetid
=
SaveAccountBasic
(
sheet
,
allotId
);
SaveHeader
(
sheet
,
allotId
,
imsheetid
);
}
else
if
(
sheet
.
SheetType
==
SheetType
.
SpecialUnit
)
{
SaveSpecialUnit
(
sheet
,
allotId
);
var
imsheetid
=
SaveSpecialUnit
(
sheet
,
allotId
);
SaveHeader
(
sheet
,
allotId
,
imsheetid
);
}
else
{
SaveCommon
(
sheet
,
allotId
);
var
imsheetid
=
SaveCommon
(
sheet
,
allotId
);
SaveHeader
(
sheet
,
allotId
,
imsheetid
);
}
}
logManageService
.
WriteMsg
(
"保存基础数据"
,
$"基础数据保存完成!"
,
1
,
allotId
,
"ReceiveMessage"
,
true
);
...
...
performance/Performance.Services/CollectService.cs
0 → 100644
View file @
40d2f569
This diff is collapsed.
Click to expand it.
performance/Performance.Services/PerExcelService/ExcelReadConfig.cs
0 → 100644
View file @
40d2f569
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
.
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/RecognitionDataFormat.cs
0 → 100644
View file @
40d2f569
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
public
enum
DataFormat
{
/// <summary> 普通格式 </summary>
普通格式
,
/// <summary> 小数 </summary>
小数
,
/// <summary> 货币 </summary>
货币
,
/// <summary> 百分比 </summary>
百分比
,
/// <summary> 科学计数 </summary>
科学计数
,
/// <summary> 分数 </summary>
分数
,
/// <summary> 日期 </summary>
日期
}
public
class
RecognitionDataFormat
{
/*
0 General General 18 Time h:mm AM/PM
1 Decimal 0 19 Time h:mm:ss AM/PM
2 Decimal 0.00 20 Time h:mm
3 Decimal #,##0 21 Time h:mm:ss
4 Decimal #,##0.00 2232 Date/Time M/D/YY h:mm
5 Currency "$"#,##0_);("$"#,##0) 37 Account. _(#,##0_);(#,##0)
6 Currency "$"#,##0_);[Red]("$"#,##0) 38 Account. _(#,##0_);[Red](#,##0)
7 Currency "$"#,##0.00_);("$"#,##0.00) 39 Account. _(#,##0.00_);(#,##0.00)
8 Currency "$"#,##0.00_);[Red]("$"#,##0.00) 40 Account. _(#,##0.00_);[Red](#,##0.00)
9 Percent 0% 4131 Currency _("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)
10 Percent 0.00% 4231 33 Currency _(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)
11 Scientific 0.00E+00 4331 Currency _("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)
12 Fraction # ?/? 4431 33 Currency _(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)
13 Fraction # ??/?? 45 Time mm:ss
14 Date M/D/YY 46 Time [h]:mm:ss
15 Date D-MMM-YY 47 Time mm:ss.0
16 Date D-MMM 48 Scientific ##0.0E+0
17 Date MMM-YY 49 Text @
*/
private
static
Dictionary
<
DataFormat
,
int
[
]>
dic
=
new
Dictionary
<
DataFormat
,
int
[
]>
{
{
DataFormat
.
普通格式
,
new
[]
{
0
}
},
{
DataFormat
.
小数
,
new
[]
{
1
,
2
,
3
,
4
}
},
{
DataFormat
.
货币
,
new
[]
{
5
,
6
,
7
,
8
}
},
{
DataFormat
.
百分比
,
new
[]
{
9
,
10
}
},
{
DataFormat
.
科学计数
,
new
[]
{
11
}
},
{
DataFormat
.
分数
,
new
[]
{
12
,
13
}
},
{
DataFormat
.
日期
,
new
[]
{
14
,
15
,
16
,
17
}
},
};
public
static
DataFormat
GetDataFormat
(
short
type
)
{
foreach
(
var
item
in
dic
.
Keys
)
{
if
(
dic
[
item
].
Contains
(
type
))
return
item
;
}
return
DataFormat
.
普通格式
;
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadClinicEmployee.cs
View file @
40d2f569
...
...
@@ -21,61 +21,42 @@ public class PerSheetDataReadClinicEmployee : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
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
++)
{
var
row
=
sheet
.
GetRow
(
r
);
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
;
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
);
var
employee
=
JsonHelper
.
Deserialize
<
PerDataClinicEmployee
>(
dic
);
if
(!
string
.
IsNullOrEmpty
(
clinicEmployee
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
clinicE
mployee
.
DoctorName
))
dataList
.
Add
(
clinicE
mployee
);
if
(!
string
.
IsNullOrEmpty
(
employee
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
e
mployee
.
DoctorName
))
dataList
.
Add
(
e
mployee
);
}
return
dataList
;
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadDeptAccounting.cs
View file @
40d2f569
...
...
@@ -24,99 +24,39 @@ public class PerSheetDataReadDeptAccounting : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
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
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
PerDataAccountBaisc
unifyUnit
=
new
PerDataAccountBaisc
();
unifyUnit
.
RowNumber
=
r
;
unifyUnit
.
UnitType
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元类型"
).
PointCell
)?.
StringCellValue
;
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
);
Dictionary
<
string
,
object
>
dic
=
new
Dictionary
<
string
,
object
>
{
{
nameof
(
PerDataAccountBaisc
.
RowNumber
),
r
}
};
//unifyUnit.NurseHeadNumber = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "核算单元护士长数量" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//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());
//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());
//unifyUnit.NurseEffic = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "效率绩效系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//unifyUnit.NurseGrant = ConvertHelper.To<decimal>(row.GetCell(perHeader.FirstOrDefault(p => p.CellValue == "管理绩效发放系数" && p.Parent.CellValue == "护理组").PointCell)?.ToString());
//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());
foreach
(
var
item
in
ExcelReadConfig
.
AccountBaisc
)
{
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
item
.
Description
,
out
int
point
))
{
object
@object
=
row
.
GetCell
(
point
).
GetValue
();
if
(
item
.
IsNumber
)
@object
=
ConvertHelper
.
To
<
decimal
?>(
@object
);
if
(!
string
.
IsNullOrEmpty
(
unifyUnit
.
UnitType
))
dataList
.
Add
(
unifyUnit
);
}
if
(
dic
.
Keys
.
Contains
(
item
.
Field
))
dic
[
item
.
Field
]
=
@object
;
else
dic
.
Add
(
item
.
Field
,
@object
);
}
}
return
dataList
;
}
var
baisc
=
JsonHelper
.
Deserialize
<
PerDataAccountBaisc
>(
dic
);
/// <summary>
/// 转换核算单元类型
/// </summary>
/// <param name="unitType"></param>
/// <returns></returns>
public
int
UnitType
(
string
unitType
)
{
switch
(
unitType
)
{
case
"医生组"
:
return
1
;
case
"护理组"
:
return
2
;
case
"医技组"
:
return
3
;
default
:
return
0
;
if
(!
string
.
IsNullOrEmpty
(
baisc
.
UnitType
))
dataList
.
Add
(
baisc
);
}
return
dataList
;
}
}
}
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadEmployee.cs
View file @
40d2f569
...
...
@@ -24,57 +24,34 @@ public class PerSheetDataReadEmployee : IPerSheetDataRead
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
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
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
PerDataEmployee
employee
=
new
PerDataEmployee
Dictionary
<
string
,
object
>
dic
=
new
Dictionary
<
string
,
object
>
{
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()),
{
nameof
(
PerDataEmployee
.
RowNumber
),
r
}
};
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
))
dataList
.
Add
(
employee
);
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadLogisticsEmployee.cs
View file @
40d2f569
...
...
@@ -30,44 +30,27 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
row
=
sheet
.
GetRow
(
r
);
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
;
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人员分类"
,
out
point
))
employee
.
AccountType
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"核算单元"
,
out
point
))
employee
.
AccountingUnit
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基数核算参考对象"
,
out
point
))
employee
.
FitPeople
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"绩效基础核算参考值"
,
out
point
))
employee
.
FitPeopleValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
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
))
employee
.
OthePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
foreach
(
var
item
in
ExcelReadConfig
.
LogisticsEmployee
)
{
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
<
PerDataLogisticsEmployee
>(
dic
);
if
(!
string
.
IsNullOrEmpty
(
employee
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
employee
.
FitPeople
))
dataList
.
Add
(
employee
);
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
View file @
40d2f569
...
...
@@ -50,19 +50,29 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
PerDataSpecialUnit
specialUnit
=
new
PerDataSpecialUnit
{
RowNumber
=
r
,
//AccountingUnit = accountingUnit,
//Department = accountingUnit,
QuantitativeIndicators
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"量化指标"
).
PointCell
)?.
StringCellValue
,
Quantity
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"数量"
).
PointCell
)?.
ToString
()),
QuantitativeIndicatorsValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"量化指标绩效分值"
).
PointCell
)?.
NumericCellValue
),
};
var
cell
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室"
).
PointCell
);
//?.ToString();
var
accountingUnit
=
NopiSevice
.
GetCellStringValue
(
cell
);
int
point
;
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"量化指标"
,
out
point
))
specialUnit
.
QuantitativeIndicators
=
row
.
GetCell
(
point
).
GetValue
();
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"数量"
,
out
point
))
specialUnit
.
Quantity
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"量化指标绩效分值"
,
out
point
))
specialUnit
.
QuantitativeIndicatorsValue
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
point
).
GetValue
());
if
(
NopiSevice
.
TryGetPoint
(
perHeader
,
"人数"
,
out
point
))
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
accountingUnit
=
cell
.
GetValue
();
if
(
cell
!=
null
&&
IsMergeCell
(
cell
,
out
Point
start
,
out
Point
end
)
&&
r
!=
start
.
X
)
{
row
=
sheet
.
GetRow
(
start
.
X
);
cell
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室"
).
PointCell
);
accountingUnit
=
cell
?.
StringCellValue
;
cell
=
row
.
GetCell
(
kspoint
);
accountingUnit
=
cell
.
GetValue
()
;
}
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
accountingUnit
=
lastAccount
;
...
...
@@ -72,7 +82,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
specialUnit
.
AccountingUnit
=
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.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);
...
...
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