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
fa80f4ee
Commit
fa80f4ee
authored
Apr 02, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绩效初次计算完成
parent
96cec430
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
413 additions
and
22 deletions
+413
-22
performance/Performance.Api/Controllers/AgainAllotController.cs
+8
-18
performance/Performance.DtoModels/PerExcelAgain/PerAgainData.cs
+70
-0
performance/Performance.DtoModels/PerExcelAgain/PerAgainEmployee.cs
+80
-0
performance/Performance.DtoModels/PerExcelAgain/PerAgainExcel.cs
+13
-0
performance/Performance.DtoModels/PerExcelAgain/PerAgainSituation.cs
+64
-0
performance/Performance.DtoModels/Performance.DtoModels.csproj
+1
-0
performance/Performance.DtoModels/Request/AgainAllotRequest.cs
+1
-1
performance/Performance.DtoModels/Response/SheetExportResponse.cs
+29
-3
performance/Performance.DtoModels/Response/UserIdentity.cs
+10
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+8
-0
performance/Performance.Services/AgainAllot/AgainService.cs
+129
-0
performance/Performance.Services/AgainAllotService.cs
+0
-0
No files found.
performance/Performance.Api/Controllers/AgainAllotController.cs
View file @
fa80f4ee
...
...
@@ -27,24 +27,16 @@ namespace Performance.Api.Controllers
public
class
AgainAllotController
:
Controller
{
private
AgainAllotService
againAllotService
;
public
AgainAllotController
(
AgainAllotService
againAllotService
)
private
ClaimService
claimService
;
public
AgainAllotController
(
AgainAllotService
againAllotService
,
ClaimService
claimService
)
{
this
.
againAllotService
=
againAllotService
;
this
.
claimService
=
claimService
;
}
/// <summary>
/// 返回二次分配绩效列表
/// </summary>
/// <returns></returns>
[
Route
(
"list"
)]
[
HttpPost
]
public
ApiResponse
List
()
{
throw
new
NotImplementedException
();
}
/// <summary>
/// 返回当前用户医院下绩效下拉列表
/// 返回当前用户医院下绩效列表
/// </summary>
/// <returns></returns>
[
Route
(
"allotlist"
)]
...
...
@@ -70,11 +62,9 @@ public ApiResponse Import([FromForm] IFormCollection form)
[
HttpPost
]
public
ApiResponse
Generate
([
CustomizeValidator
(
RuleSet
=
"Generate"
),
FromBody
]
AgainAllotRequest
request
)
{
againAllotService
.
Generate
(
request
);
throw
new
NotImplementedException
();
var
user
=
claimService
.
At
(
request
);
var
result
=
againAllotService
.
Generate
(
request
,
user
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
}
performance/Performance.DtoModels/PerExcelAgain/PerAgainData.cs
0 → 100644
View file @
fa80f4ee
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerAgainData
{
/// <summary>
/// 行号
/// </summary>
public
Nullable
<
int
>
RowNumber
{
get
;
set
;
}
/// <summary>
/// 列头类型名称
/// </summary>
public
string
TypeName
{
get
;
set
;
}
/// <summary>
/// 单元格value
/// </summary>
public
Nullable
<
decimal
>
CellValue
{
get
;
set
;
}
/// <summary>
/// 1 汇总 2原始数据
/// </summary>
public
Nullable
<
int
>
IsTotal
{
get
;
set
;
}
/// <summary>
/// 是否带入系数计算 1 带入 2 不带入
/// </summary>
public
Nullable
<
int
>
IsFactor
{
get
;
set
;
}
/// <summary>
/// 系数值
/// </summary>
public
Nullable
<
decimal
>
FactorValue
{
get
;
set
;
}
/// <summary>
/// 单元格注释
/// </summary>
public
string
Annotation
{
get
;
set
;
}
/// <summary>
/// 单元格备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
SignID
{
get
;
set
;
}
public
PerAgainData
()
{
}
public
PerAgainData
(
int
rowNumber
,
string
typeName
,
decimal
?
cellValue
,
int
isTotal
,
int
isFactor
,
decimal
?
factorValue
,
string
annotation
,
string
remark
,
string
signID
)
{
this
.
RowNumber
=
rowNumber
;
this
.
TypeName
=
typeName
;
this
.
CellValue
=
cellValue
;
this
.
IsTotal
=
isTotal
;
this
.
IsFactor
=
isFactor
;
this
.
FactorValue
=
factorValue
;
this
.
Annotation
=
annotation
;
this
.
Remark
=
remark
;
this
.
SignID
=
signID
;
}
}
}
performance/Performance.DtoModels/PerExcelAgain/PerAgainEmployee.cs
0 → 100644
View file @
fa80f4ee
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerAgainEmployee
{
/// <summary>
/// 姓名
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 职务
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 职称系数
/// </summary>
public
Nullable
<
decimal
>
JobFactor
{
get
;
set
;
}
/// <summary>
/// 出勤
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 年资
/// </summary>
public
Nullable
<
decimal
>
YearFactor
{
get
;
set
;
}
/// <summary>
/// 重点奖励
/// </summary>
public
Nullable
<
decimal
>
Award
{
get
;
set
;
}
/// <summary>
/// 管理津贴
/// </summary>
public
Nullable
<
decimal
>
Allowance
{
get
;
set
;
}
/// <summary>
/// 单独核算人员绩效
/// </summary>
public
Nullable
<
decimal
>
AlonePerfor
{
get
;
set
;
}
/// <summary>
/// 夜班费
/// </summary>
public
Nullable
<
decimal
>
NightShift
{
get
;
set
;
}
/// <summary>
/// 职称出勤系数(需计算)
/// </summary>
public
Nullable
<
decimal
>
JobAttendanceFactor
{
get
;
set
;
}
/// <summary>
/// 年资出勤系数(需计算)
/// </summary>
public
Nullable
<
decimal
>
YearAttendanceFactor
{
get
;
set
;
}
/// <summary>
/// 职称出勤绩效(需计算)
/// </summary>
public
Nullable
<
decimal
>
JobAttendancePerfor
{
get
;
set
;
}
/// <summary>
/// 应发绩效(需计算)
/// </summary>
public
Nullable
<
decimal
>
GiveFee
{
get
;
set
;
}
/// <summary>
/// 实发绩效(需计算)
/// </summary>
public
Nullable
<
decimal
>
RealGiveFee
{
get
;
set
;
}
public
int
RowNumber
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/PerExcelAgain/PerAgainExcel.cs
0 → 100644
View file @
fa80f4ee
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerAgainExcel
{
public
PerHeader
Header
{
get
;
set
;
}
public
List
<
PerAgainData
>
AgainData
{
get
;
set
;
}
public
List
<
PerAgainEmployee
>
AgainEmployee
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/PerExcelAgain/PerAgainSituation.cs
0 → 100644
View file @
fa80f4ee
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerAgainSituation
{
/// <summary>
/// 夜班费
/// </summary>
public
Nullable
<
decimal
>
NightShift
{
get
;
set
;
}
/// <summary>
/// 科室总绩效
/// </summary>
public
Nullable
<
decimal
>
DepartmentTotal
{
get
;
set
;
}
/// <summary>
/// 护士长或科主任基础绩效
/// </summary>
public
Nullable
<
decimal
>
BossPerfor
{
get
;
set
;
}
/// <summary>
/// 重点奖励
/// </summary>
public
Nullable
<
decimal
>
Award
{
get
;
set
;
}
/// <summary>
/// 管理津贴
/// </summary>
public
Nullable
<
decimal
>
Allowance
{
get
;
set
;
}
/// <summary>
/// 业绩分配绩效
/// </summary>
public
Nullable
<
decimal
>
AllotPerfor
{
get
;
set
;
}
/// <summary>
/// 职称绩效
/// </summary>
public
Nullable
<
decimal
>
JobPerfor
{
get
;
set
;
}
/// <summary>
/// 工作量绩效
/// </summary>
public
Nullable
<
decimal
>
WorkloadPerfor
{
get
;
set
;
}
/// <summary>
/// 单独核算人员绩效
/// </summary>
public
Nullable
<
decimal
>
AlonePerfor
{
get
;
set
;
}
/// <summary>
/// 出勤
/// </summary>
public
Nullable
<
decimal
>
Attendance
{
get
;
set
;
}
/// <summary>
/// 科室系数人均
/// </summary>
public
Nullable
<
decimal
>
DepartmentFactorAvg
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Performance.DtoModels.csproj
View file @
fa80f4ee
...
...
@@ -16,6 +16,7 @@
<ItemGroup>
<ProjectReference Include="..\Performance.EntityModels\Performance.EntityModels.csproj" />
<ProjectReference Include="..\Performance.Infrastructure\Performance.Infrastructure.csproj" />
</ItemGroup>
</Project>
performance/Performance.DtoModels/Request/AgainAllotRequest.cs
View file @
fa80f4ee
...
...
@@ -8,7 +8,7 @@ namespace Performance.DtoModels
/// <summary>
/// 二次分配请求
/// </summary>
public
class
AgainAllotRequest
public
class
AgainAllotRequest
:
ApiRequest
{
/// <summary>
/// 二次分配ID
...
...
performance/Performance.DtoModels/Response/SheetExportResponse.cs
View file @
fa80f4ee
using
System
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
...
...
@@ -29,7 +30,17 @@ public class SheetExportResponse
/// </summary>
public
List
<
Row
>
Row
{
get
;
set
;
}
public
SheetExportResponse
()
{
}
public
SheetExportResponse
()
{
Header
=
new
List
<
Row
>();
Row
=
new
List
<
Row
>();
}
public
SheetExportResponse
(
string
sheetName
)
{
SheetName
=
sheetName
;
Header
=
new
List
<
Row
>();
Row
=
new
List
<
Row
>();
}
public
SheetExportResponse
(
int
sheetID
,
string
sheetName
,
int
sheetType
)
{
...
...
@@ -57,7 +68,22 @@ public Row(int rownumber)
public
class
Cell
{
public
int
PointCell
{
get
;
set
;
}
public
object
CellValue
{
get
;
set
;
}
private
object
cellValue
;
public
object
CellValue
{
get
{
var
value
=
ConvertHelper
.
To
<
decimal
?>(
cellValue
);
if
(
value
.
HasValue
&&
value
.
Value
>
0
)
return
Math
.
Round
(
value
.
Value
,
2
);
return
cellValue
;
}
set
{
cellValue
=
value
;
}
}
public
int
MergeRow
{
get
;
set
;
}
public
int
MergeCell
{
get
;
set
;
}
public
bool
IsTotal
{
get
;
set
;
}
...
...
performance/Performance.DtoModels/Response/UserIdentity.cs
View file @
fa80f4ee
...
...
@@ -16,7 +16,17 @@ public class UserIdentity
public
string
Mobile
{
get
;
set
;
}
public
int
States
{
get
;
set
;
}
public
bool
IsHome
{
get
;
set
;
}
/// <summary>
/// 用户科室
/// </summary>
public
string
Department
{
get
;
set
;
}
public
List
<
HospitalResponse
>
Hospital
{
get
;
set
;
}
public
List
<
RoleResponse
>
Role
{
get
;
set
;
}
public
UserIdentity
()
{
Hospital
=
new
List
<
HospitalResponse
>();
Role
=
new
List
<
RoleResponse
>();
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
fa80f4ee
...
...
@@ -12,6 +12,14 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
{
}
/// <summary> 二次分配不固定数据 <summary>
public
virtual
DbSet
<
ag_data
>
ag_data
{
get
;
set
;
}
/// <summary> 二次分配人员名单 <summary>
public
virtual
DbSet
<
ag_employee
>
ag_employee
{
get
;
set
;
}
/// <summary> 二次分配不固定列头数据 <summary>
public
virtual
DbSet
<
ag_header
>
ag_header
{
get
;
set
;
}
/// <summary> <summary>
public
virtual
DbSet
<
cof_again
>
cof_again
{
get
;
set
;
}
/// <summary> 规模绩效、效率绩效计算系数配置 <summary>
public
virtual
DbSet
<
cof_director
>
cof_director
{
get
;
set
;
}
/// <summary> 工作量门诊药占比系数 <summary>
...
...
performance/Performance.Services/AgainAllot/AgainService.cs
0 → 100644
View file @
fa80f4ee
using
NPOI.HSSF.UserModel
;
using
NPOI.SS.UserModel
;
using
NPOI.XSSF.UserModel
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
public
class
AgainService
:
IAutoInjection
{
private
PerHeaderService
perHeaderService
;
private
int
DataFirstRowNum
=
4
;
//数据起始行
private
int
FactorRow
=
3
;
//系数行
public
AgainService
(
PerHeaderService
perHeaderService
)
{
this
.
perHeaderService
=
perHeaderService
;
}
/// <summary>
/// 导入excel数据
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public
PerAgainExcel
ReadData
(
per_againallot
again
)
{
using
(
FileStream
fs
=
new
FileStream
(
again
.
Path
,
FileMode
.
Open
))
{
var
excelVersion
=
FileHelper
.
GetExtension
(
again
.
Path
)
==
".xlsx"
?
ExcelVersion
.
xlsx
:
ExcelVersion
.
xls
;
IWorkbook
workbook
=
(
excelVersion
==
ExcelVersion
.
xlsx
)
?
(
IWorkbook
)(
new
XSSFWorkbook
(
fs
))
:
(
IWorkbook
)(
new
HSSFWorkbook
(
fs
));
for
(
int
i
=
0
;
i
<
workbook
.
NumberOfSheets
;
i
++)
{
var
sheet
=
workbook
.
GetSheetAt
(
i
);
if
(
sheet
.
SheetName
==
"二次分配表"
)
{
var
point
=
new
PerSheetPoint
{
DataFirstRowNum
=
2
,
HeaderFirstCellNum
=
0
,
HeaderFirstRowNum
=
1
,
HeaderLastRowNum
=
2
};
var
perHeader
=
perHeaderService
.
GetPerHeader
(
sheet
,
point
);
var
results
=
ReadData
(
sheet
,
perHeader
);
return
new
PerAgainExcel
{
Header
=
results
.
Header
,
AgainData
=
results
.
AgainData
,
AgainEmployee
=
results
.
AgainEmployee
};
}
}
}
return
null
;
}
private
(
PerHeader
Header
,
List
<
PerAgainData
>
AgainData
,
List
<
PerAgainEmployee
>
AgainEmployee
)
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
PerAgainData
>
slideDataList
=
new
List
<
PerAgainData
>();
List
<
PerAgainEmployee
>
fixatDataList
=
new
List
<
PerAgainEmployee
>();
var
header
=
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"工作量绩效工资"
);
if
(
header
!=
null
&&
header
.
Children
!=
null
)
{
for
(
int
r
=
DataFirstRowNum
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
fixatDataList
.
Add
(
FixatRowRead
(
perHeader
,
r
,
row
));
slideDataList
.
AddRange
(
SlideRowRead
(
sheet
,
header
,
r
,
row
));
}
}
return
(
header
,
slideDataList
,
fixatDataList
);
}
/// <summary>
/// 可扩展列读取
/// </summary>
/// <param name="sheet"></param>
/// <param name="header"></param>
/// <param name="r"></param>
/// <param name="row"></param>
/// <returns></returns>
private
List
<
PerAgainData
>
SlideRowRead
(
ISheet
sheet
,
PerHeader
header
,
int
r
,
IRow
row
)
{
List
<
PerAgainData
>
slideDataList
=
new
List
<
PerAgainData
>();
for
(
int
c
=
0
;
c
<
header
.
Children
.
Count
();
c
++)
{
var
athead
=
header
.
Children
.
ElementAt
(
c
);
var
cellValue
=
NopiSevice
.
GetCellValue
(
row
.
GetCell
(
athead
.
PointCell
));
if
(!
cellValue
.
HasValue
||
cellValue
.
Value
==
0
)
continue
;
var
factorValue
=
ConvertHelper
.
To
<
decimal
?>(
sheet
.
GetRow
(
FactorRow
).
GetCell
(
athead
.
PointCell
)?.
ToString
());
PerAgainData
data
=
new
PerAgainData
{
RowNumber
=
r
,
TypeName
=
athead
?.
CellValue
,
CellValue
=
cellValue
,
IsTotal
=
2
,
IsFactor
=
factorValue
.
HasValue
?
1
:
2
,
FactorValue
=
factorValue
,
Annotation
=
row
.
GetCell
(
athead
.
PointCell
)?.
CellComment
?.
String
?.
String
,
SignID
=
athead
.
SignID
,
};
slideDataList
.
Add
(
data
);
}
return
slideDataList
;
}
/// <summary>
/// 固定列读取
/// </summary>
/// <param name="perHeader"></param>
/// <param name="r"></param>
/// <param name="row"></param>
/// <returns></returns>
private
static
PerAgainEmployee
FixatRowRead
(
List
<
PerHeader
>
perHeader
,
int
r
,
IRow
row
)
{
return
new
PerAgainEmployee
{
RowNumber
=
r
,
Name
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"姓名"
).
PointCell
)?.
ToString
(),
JobTitle
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"职务"
).
PointCell
)?.
ToString
(),
JobFactor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"职称系数"
).
PointCell
)?.
ToString
()),
Attendance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"出勤"
).
PointCell
)?.
ToString
()),
YearFactor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"年资"
).
PointCell
)?.
ToString
()),
Award
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"重点奖励"
).
PointCell
)?.
ToString
()),
Allowance
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"管理津贴"
).
PointCell
)?.
ToString
()),
AlonePerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"单独核算人员绩效"
).
PointCell
)?.
ToString
()),
NightShift
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"夜班费"
).
PointCell
)?.
ToString
()),
};
}
}
}
performance/Performance.Services/AgainAllotService.cs
View file @
fa80f4ee
This diff is collapsed.
Click to expand it.
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