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
356f0a1e
Commit
356f0a1e
authored
Mar 26, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特殊科室计算
parent
c5bdeb1a
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
404 additions
and
1 deletions
+404
-1
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+1
-0
performance/Performance.DtoModels/PerExcel/PerDataSpecialUnit.cs
+60
-0
performance/Performance.EntityModels/Entity/im_specialunit.cs
+85
-0
performance/Performance.EntityModels/Entity/res_specialunit.cs
+100
-0
performance/Performance.Repository/PerforImspecialunitRepository.cs
+21
-0
performance/Performance.Repository/PerforResspecialunitRepository.cs
+21
-0
performance/Performance.Services/PerExcelService/PerExcelService.cs
+58
-1
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
+3
-0
performance/Performance.Services/PerExcelService/PerSheetService.cs
+2
-0
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
+53
-0
No files found.
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
356f0a1e
...
@@ -96,6 +96,7 @@ public AutoMapperConfigs()
...
@@ -96,6 +96,7 @@ public AutoMapperConfigs()
.
ForMember
(
dest
=>
dest
.
AdjustFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
NurseAdjustFactor
));
.
ForMember
(
dest
=>
dest
.
AdjustFactor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
NurseAdjustFactor
));
CreateMap
<
PerDataAccountBaisc
,
im_accountbasic
>();
CreateMap
<
PerDataAccountBaisc
,
im_accountbasic
>();
CreateMap
<
PerDataSpecialUnit
,
im_specialunit
>();
CreateMap
<
PerDataAccountDoctor
,
res_accountdoctor
>();
CreateMap
<
PerDataAccountDoctor
,
res_accountdoctor
>();
CreateMap
<
PerDataAccountNurse
,
res_accountnurse
>();
CreateMap
<
PerDataAccountNurse
,
res_accountnurse
>();
...
...
performance/Performance.DtoModels/PerExcel/PerDataSpecialUnit.cs
0 → 100644
View file @
356f0a1e
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
PerDataSpecialUnit
:
IPerData
{
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 量化指标
/// </summary>
public
string
QuantitativeIndicators
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
Nullable
<
decimal
>
Quantity
{
get
;
set
;
}
/// <summary>
/// 量化指标绩效分值
/// </summary>
public
Nullable
<
decimal
>
QuantitativeIndicatorsValue
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
public
int
RowNumber
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/im_specialunit.cs
0 → 100644
View file @
356f0a1e
//-----------------------------------------------------------------------
// <copyright file=" im_specialunit.cs">
// * FileName: im_specialunit.cs
// * history : 2019-03-26 09:51:09
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// im_specialunit Entity Model
/// </summary>
[
Table
(
"im_specialunit"
)]
public
class
im_specialunit
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 量化指标
/// </summary>
public
string
QuantitativeIndicators
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
Nullable
<
decimal
>
Quantity
{
get
;
set
;
}
/// <summary>
/// 量化指标绩效分值
/// </summary>
public
Nullable
<
decimal
>
QuantitativeIndicatorsValue
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/res_specialunit.cs
0 → 100644
View file @
356f0a1e
//-----------------------------------------------------------------------
// <copyright file=" res_specialunit.cs">
// * FileName: res_specialunit.cs
// * history : 2019-03-26 10:25:00
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
/// res_specialunit Entity Model
/// </summary>
[
Table
(
"res_specialunit"
)]
public
class
res_specialunit
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
ID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 科室名称
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 人数
/// </summary>
public
Nullable
<
decimal
>
Number
{
get
;
set
;
}
/// <summary>
/// 量化指标
/// </summary>
public
string
QuantitativeIndicators
{
get
;
set
;
}
/// <summary>
/// 数量
/// </summary>
public
Nullable
<
decimal
>
Quantity
{
get
;
set
;
}
/// <summary>
/// 量化指标绩效分值
/// </summary>
public
Nullable
<
decimal
>
QuantitativeIndicatorsValue
{
get
;
set
;
}
/// <summary>
/// 考核得分率
/// </summary>
public
Nullable
<
decimal
>
ScoringAverage
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
OtherPerfor
{
get
;
set
;
}
/// <summary>
/// 医院奖罚
/// </summary>
public
Nullable
<
decimal
>
Punishment
{
get
;
set
;
}
/// <summary>
/// 调节系数
/// </summary>
public
Nullable
<
decimal
>
Adjust
{
get
;
set
;
}
/// <summary>
/// 人均绩效
/// </summary>
public
Nullable
<
decimal
>
Avg
{
get
;
set
;
}
/// <summary>
/// 应发绩效
/// </summary>
public
Nullable
<
decimal
>
ShouldFee
{
get
;
set
;
}
/// <summary>
/// 实发绩效
/// </summary>
public
Nullable
<
decimal
>
GiveFee
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforImspecialunitRepository.cs
0 → 100644
View file @
356f0a1e
//-----------------------------------------------------------------------
// <copyright file=" im_specialunit.cs">
// * FileName: im_specialunit.cs
// * history : Created by T4 2019-03-26 09:51:44
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// im_specialunit Repository
/// </summary>
public
class
PerforImspecialunitRepository
:
PerforRepository
<
im_specialunit
>
{
public
PerforImspecialunitRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Repository/PerforResspecialunitRepository.cs
0 → 100644
View file @
356f0a1e
//-----------------------------------------------------------------------
// <copyright file=" res_specialunit.cs">
// * FileName: res_specialunit.cs
// * history : Created by T4 2019-03-26 10:25:06
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
Performance.EntityModels
;
namespace
Performance.Repository
{
/// <summary>
/// res_specialunit Repository
/// </summary>
public
class
PerforResspecialunitRepository
:
PerforRepository
<
res_specialunit
>
{
public
PerforResspecialunitRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/PerExcelService/PerExcelService.cs
View file @
356f0a1e
...
@@ -31,6 +31,8 @@ public class PerExcelService : IAutoInjection
...
@@ -31,6 +31,8 @@ public class PerExcelService : IAutoInjection
private
PerforResAccountnurseRepository
_perforResAccountnurseRepository
;
private
PerforResAccountnurseRepository
_perforResAccountnurseRepository
;
private
PerforResbaiscnormRepository
_perforResbaiscnormRepository
;
private
PerforResbaiscnormRepository
_perforResbaiscnormRepository
;
private
PerforRescomputeRepository
_perforRescomputeRepository
;
private
PerforRescomputeRepository
_perforRescomputeRepository
;
private
PerforImspecialunitRepository
_perforImspecialunitRepository
;
private
PerforResspecialunitRepository
_perforResspecialunitRepository
;
public
PerExcelService
(
PerSheetService
perSheetService
,
public
PerExcelService
(
PerSheetService
perSheetService
,
PerHeaderService
perHeaderService
,
PerHeaderService
perHeaderService
,
PerforPerSheetRepository
perforImSheetRepository
,
PerforPerSheetRepository
perforImSheetRepository
,
...
@@ -45,7 +47,9 @@ public class PerExcelService : IAutoInjection
...
@@ -45,7 +47,9 @@ public class PerExcelService : IAutoInjection
PerforResAccountnurseRepository
perforResAccountnurseRepository
,
PerforResAccountnurseRepository
perforResAccountnurseRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforResbaiscnormRepository
perforResbaiscnormRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforRescomputeRepository
perforRescomputeRepository
,
PerforCofworkyearRepository
perforCofworkyearRepository
)
PerforCofworkyearRepository
perforCofworkyearRepository
,
PerforImspecialunitRepository
perforImspecialunitRepository
,
PerforResspecialunitRepository
perforResspecialunitRepository
)
{
{
_perSheetService
=
perSheetService
;
_perSheetService
=
perSheetService
;
_perHeaderService
=
perHeaderService
;
_perHeaderService
=
perHeaderService
;
...
@@ -62,6 +66,8 @@ public class PerExcelService : IAutoInjection
...
@@ -62,6 +66,8 @@ public class PerExcelService : IAutoInjection
_perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
_perforResbaiscnormRepository
=
perforResbaiscnormRepository
;
_perforRescomputeRepository
=
perforRescomputeRepository
;
_perforRescomputeRepository
=
perforRescomputeRepository
;
_perforCofworkyearRepository
=
perforCofworkyearRepository
;
_perforCofworkyearRepository
=
perforCofworkyearRepository
;
_perforImspecialunitRepository
=
perforImspecialunitRepository
;
_perforResspecialunitRepository
=
perforResspecialunitRepository
;
}
}
public
void
Execute
(
per_allot
allot
)
public
void
Execute
(
per_allot
allot
)
...
@@ -82,11 +88,49 @@ public void Execute(per_allot allot)
...
@@ -82,11 +88,49 @@ public void Execute(per_allot allot)
// 计算最总数据
// 计算最总数据
Compute
(
allot
,
excel
,
baiscnorm
);
Compute
(
allot
,
excel
,
baiscnorm
);
SpecialUnitCompute
(
excel
,
allot
);
//发送邮件
//发送邮件
SendEmail
(
allot
);
SendEmail
(
allot
);
}
}
/// <summary>
/// 特殊科室绩效计算
/// </summary>
/// <param name="excel"></param>
/// <param name="allot"></param>
private
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
)
{
var
specialUnit
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
SpecialUnit
);
if
(
specialUnit
==
null
||
specialUnit
.
PerData
.
Count
==
0
)
return
;
var
dataList
=
specialUnit
.
PerData
.
Select
(
t
=>
(
PerDataSpecialUnit
)
t
);
var
resDataList
=
dataList
.
Select
(
t
=>
new
res_specialunit
{
AllotID
=
allot
.
ID
,
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
AccountingUnit
,
Number
=
t
.
Number
,
QuantitativeIndicators
=
t
.
QuantitativeIndicators
,
Quantity
=
t
.
Quantity
,
QuantitativeIndicatorsValue
=
t
.
QuantitativeIndicatorsValue
,
ScoringAverage
=
t
.
ScoringAverage
,
OtherPerfor
=
t
.
OtherPerfor
,
Punishment
=
t
.
Punishment
,
Adjust
=
t
.
Adjust
,
Avg
=
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
/
t
.
Number
,
ShouldFee
=
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
,
GiveFee
=
(
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
+
t
.
OtherPerfor
+
t
.
Punishment
)
*
t
.
Adjust
,
});
_perforResspecialunitRepository
.
AddRange
(
resDataList
.
ToArray
());
}
/// <summary>
/// 获取临床护士平均绩效
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
private
res_baiscnorm
NurseBaiscnorm
(
List
<
PerSheet
>
list
)
private
res_baiscnorm
NurseBaiscnorm
(
List
<
PerSheet
>
list
)
{
{
var
sheet
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseAccount
);
var
sheet
=
list
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
ComputeNurseAccount
);
...
@@ -198,6 +242,19 @@ public void Save(List<PerSheet> perSheets, int allotId, int source)
...
@@ -198,6 +242,19 @@ public void Save(List<PerSheet> perSheets, int allotId, int source)
}
}
_perforImaccountbasicRepository
.
AddRange
(
addList
.
ToArray
());
_perforImaccountbasicRepository
.
AddRange
(
addList
.
ToArray
());
}
}
else
if
(
sheet
.
SheetType
==
SheetType
.
SpecialUnit
)
{
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataSpecialUnit
)
t
);
List
<
im_specialunit
>
addList
=
new
List
<
im_specialunit
>();
foreach
(
var
data
in
dataList
)
{
var
imdata
=
Mapper
.
Map
<
im_specialunit
>(
data
);
imdata
.
SheetID
=
imsheet
.
ID
;
imdata
.
AllotID
=
allotId
;
addList
.
Add
(
imdata
);
}
_perforImspecialunitRepository
.
AddRange
(
addList
.
ToArray
());
}
else
if
(
sheet
.
SheetType
==
SheetType
.
ComputeDoctorAccount
)
else
if
(
sheet
.
SheetType
==
SheetType
.
ComputeDoctorAccount
)
{
{
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountDoctor
)
t
);
var
dataList
=
sheet
.
PerData
.
Select
(
t
=>
(
PerDataAccountDoctor
)
t
);
...
...
performance/Performance.Services/PerExcelService/PerSheetDataFactory.cs
View file @
356f0a1e
...
@@ -41,6 +41,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
...
@@ -41,6 +41,9 @@ public static IPerSheetDataRead GetDataRead(SheetType sheetType)
case
SheetType
.
DeptAccounting
:
case
SheetType
.
DeptAccounting
:
dataread
=
new
PerSheetDataReadDeptAccountingt
();
dataread
=
new
PerSheetDataReadDeptAccountingt
();
break
;
break
;
case
SheetType
.
SpecialUnit
:
dataread
=
new
PerSheetDataReadSpecialUnit
();
break
;
}
}
return
dataread
;
return
dataread
;
}
}
...
...
performance/Performance.Services/PerExcelService/PerSheetService.cs
View file @
356f0a1e
...
@@ -67,6 +67,8 @@ public SheetType GetSheetType(string sheetName)
...
@@ -67,6 +67,8 @@ public SheetType GetSheetType(string sheetName)
return
SheetType
.
Workload
;
return
SheetType
.
Workload
;
else
if
(
sheetName
.
StartsWith
(
"4.1"
))
else
if
(
sheetName
.
StartsWith
(
"4.1"
))
return
SheetType
.
DeptAccounting
;
return
SheetType
.
DeptAccounting
;
else
if
(
sheetName
.
StartsWith
(
"4.2"
))
return
SheetType
.
SpecialUnit
;
return
SheetType
.
Unidentifiable
;
return
SheetType
.
Unidentifiable
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadSpecialUnit.cs
0 → 100644
View file @
356f0a1e
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.Infrastructure
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services
{
public
class
PerSheetDataReadSpecialUnit
:
IPerSheetDataRead
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
HeaderFirstRowNum
=
0
,
HeaderLastRowNum
=
0
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
1
,
};
public
List
<
IPerData
>
ReadData
(
ISheet
sheet
,
List
<
PerHeader
>
perHeader
)
{
List
<
IPerData
>
dataList
=
new
List
<
IPerData
>();
for
(
int
r
=
Point
.
DataFirstRowNum
.
Value
;
r
<
sheet
.
LastRowNum
+
1
;
r
++)
{
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
var
accountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"核算单元"
).
PointCell
).
ToString
();
if
(
string
.
IsNullOrEmpty
(
accountingUnit
))
continue
;
PerDataSpecialUnit
employee
=
new
PerDataSpecialUnit
{
RowNumber
=
r
,
AccountingUnit
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室"
).
PointCell
).
ToString
(),
Department
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"科室"
).
PointCell
).
ToString
(),
Number
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"人数"
).
PointCell
).
ToString
()),
QuantitativeIndicators
=
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"量化指标"
).
PointCell
).
ToString
(),
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
).
ToString
()),
ScoringAverage
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"考核得分率"
).
PointCell
).
ToString
()),
OtherPerfor
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"其他绩效"
).
PointCell
).
ToString
()),
Punishment
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"医院奖罚"
).
PointCell
).
ToString
()),
Adjust
=
ConvertHelper
.
To
<
decimal
?>(
row
.
GetCell
(
perHeader
.
FirstOrDefault
(
p
=>
p
.
CellValue
==
"调节系数"
).
PointCell
).
ToString
()),
};
dataList
.
Add
(
employee
);
}
return
dataList
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment