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
7cd3c3b3
Commit
7cd3c3b3
authored
Nov 20, 2020
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020_1119' into v2020morge
parents
5b751ceb
8dd3403e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
218 additions
and
82 deletions
+218
-82
performance/Performance.Api/Controllers/SecondAllotController.cs
+20
-10
performance/Performance.Api/Startup.cs
+43
-26
performance/Performance.DtoModels/Response/SecondPerforResponse.cs
+27
-26
performance/Performance.Services/ComputeService.cs
+8
-13
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+3
-1
performance/Performance.Services/SecondAllotService.cs
+117
-6
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
7cd3c3b3
...
@@ -33,6 +33,7 @@ public class SecondAllotController : ControllerBase
...
@@ -33,6 +33,7 @@ public class SecondAllotController : ControllerBase
}
}
#
region
二次绩效列表、录入数据展示,保存数据
#
region
二次绩效列表、录入数据展示,保存数据
/// <summary>
/// <summary>
/// 二次绩效列表(没有需要初始化)
/// 二次绩效列表(没有需要初始化)
/// </summary>
/// </summary>
...
@@ -134,7 +135,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
...
@@ -134,7 +135,8 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
// var result = secondAllotService.GetSecondDetail(secondid);
// var result = secondAllotService.GetSecondDetail(secondid);
// return new ApiResponse(ResponseType.OK, result);
// return new ApiResponse(ResponseType.OK, result);
//}
//}
#
endregion
#
endregion
二次绩效列表、录入数据展示,保存数据
/// <summary>
/// <summary>
/// 二次绩效录入页面自动补全
/// 二次绩效录入页面自动补全
...
@@ -161,10 +163,11 @@ public ApiResponse OtherAutoComplete([FromBody] SecondEmpRequest request)
...
@@ -161,10 +163,11 @@ public ApiResponse OtherAutoComplete([FromBody] SecondEmpRequest request)
}
}
#
region
模板使用
#
region
模板使用
/// <summary>
/// <summary>
/// 选择二次绩效模板
/// 选择二次绩效模板
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"api/temp/list"
)]
[
Route
(
"api/temp/list"
)]
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
public
ApiResponse
<
List
<
SecondTempResponse
>>
Temp
([
FromBody
]
AllotDeptRequest
request
)
...
@@ -197,9 +200,11 @@ public ApiResponse RefreshTemp([CustomizeValidator(RuleSet = "Refresh"), FromBod
...
@@ -197,9 +200,11 @@ public ApiResponse RefreshTemp([CustomizeValidator(RuleSet = "Refresh"), FromBod
secondAllotService
.
RefreshTemp
(
request
);
secondAllotService
.
RefreshTemp
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
#
endregion
#
endregion
模板使用
#
region
二次绩效工作量配置
#
region
二次绩效工作量配置
/// <summary>
/// <summary>
/// 二次绩效工作量列表
/// 二次绩效工作量列表
/// </summary>
/// </summary>
...
@@ -300,9 +305,11 @@ public ApiResponse SingleDelete([CustomizeValidator(RuleSet = "Delete"), FromBod
...
@@ -300,9 +305,11 @@ public ApiResponse SingleDelete([CustomizeValidator(RuleSet = "Delete"), FromBod
var
result
=
secondAllotService
.
DeleteWorkType
(
request
);
var
result
=
secondAllotService
.
DeleteWorkType
(
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"删除成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"删除失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"删除成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"删除失败"
);
}
}
#
endregion
#
endregion
二次绩效工作量配置
#
region
二次绩效审核
#
region
二次绩效审核
/// <summary>
/// <summary>
/// 提交审核
/// 提交审核
/// </summary>
/// </summary>
...
@@ -352,7 +359,6 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
...
@@ -352,7 +359,6 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
}
/// <summary>
/// <summary>
/// 护理部二次绩效审核列表
/// 护理部二次绩效审核列表
/// </summary>
/// </summary>
...
@@ -377,9 +383,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
...
@@ -377,9 +383,11 @@ public ApiResponse NursingDeptAuditResult([FromBody] SecondAuditRequest request)
var
result
=
secondAllotService
.
NursingDeptAudit
(
userid
,
request
);
var
result
=
secondAllotService
.
NursingDeptAudit
(
userid
,
request
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
return
result
?
new
ApiResponse
(
ResponseType
.
OK
,
"操作成功"
)
:
new
ApiResponse
(
ResponseType
.
Fail
,
"操作失败"
);
}
}
#
endregion
#
endregion
二次绩效审核
#
region
二次绩效其他绩效
#
region
二次绩效其他绩效
/// <summary>
/// <summary>
/// 二次绩效其他绩效详情
/// 二次绩效其他绩效详情
/// </summary>
/// </summary>
...
@@ -408,7 +416,8 @@ public ApiResponse OtherSave([FromBody] AgOtherRequest request)
...
@@ -408,7 +416,8 @@ public ApiResponse OtherSave([FromBody] AgOtherRequest request)
var
result
=
secondAllotService
.
OtherSave
(
request
.
SecondId
,
request
.
Othersources
);
var
result
=
secondAllotService
.
OtherSave
(
request
.
SecondId
,
request
.
Othersources
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
#
endregion
#
endregion
二次绩效其他绩效
/// <summary>
/// <summary>
/// 二次绩效结果打印
/// 二次绩效结果打印
...
@@ -428,11 +437,11 @@ public ApiResponse SecondPrint(int secondid)
...
@@ -428,11 +437,11 @@ public ApiResponse SecondPrint(int secondid)
/// <returns></returns>
/// <returns></returns>
[
Route
(
"api/second/deptcompute/{allotId}"
)]
[
Route
(
"api/second/deptcompute/{allotId}"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
<
List
<
SecondPerforResponse
>>
DeptComputeDetail
(
int
allotId
)
public
ApiResponse
DeptComputeDetail
(
int
allotId
)
{
{
var
userId
=
claimService
.
GetUserId
();
var
userId
=
claimService
.
GetUserId
();
var
data
=
secondAllotService
.
DeptComputeDetail
(
userId
,
allotId
);
var
data
=
secondAllotService
.
DeptComputeDetail
(
userId
,
allotId
,
out
int
isShowManage
);
return
new
ApiResponse
<
List
<
SecondPerforResponse
>>(
ResponseType
.
OK
,
data
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
isShowManage
,
data
}
);
}
}
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Startup.cs
View file @
7cd3c3b3
...
@@ -52,17 +52,20 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -52,17 +52,20 @@ public void ConfigureServices(IServiceCollection services)
Encoding
.
RegisterProvider
(
CodePagesEncodingProvider
.
Instance
);
Encoding
.
RegisterProvider
(
CodePagesEncodingProvider
.
Instance
);
#
region
appsetting
注入
#
region
appsetting
注入
services
services
.
Configure
<
AppConnection
>(
Configuration
.
GetSection
(
"AppConnection"
))
.
Configure
<
AppConnection
>(
Configuration
.
GetSection
(
"AppConnection"
))
.
Configure
<
Application
>(
Configuration
.
GetSection
(
"Application"
))
.
Configure
<
Application
>(
Configuration
.
GetSection
(
"Application"
))
.
Configure
<
HuyiSmsConfig
>(
Configuration
.
GetSection
(
"HuyiSmsConfig"
))
.
Configure
<
HuyiSmsConfig
>(
Configuration
.
GetSection
(
"HuyiSmsConfig"
))
.
Configure
<
EmailOptions
>(
Configuration
.
GetSection
(
"EmailOptions"
))
.
Configure
<
EmailOptions
>(
Configuration
.
GetSection
(
"EmailOptions"
))
.
Configure
<
WebapiUrl
>(
Configuration
.
GetSection
(
"WebapiUrl"
));
.
Configure
<
WebapiUrl
>(
Configuration
.
GetSection
(
"WebapiUrl"
));
#
endregion
#
endregion
appsetting
注入
var
connection
=
services
.
BuildServiceProvider
().
GetService
<
IOptions
<
AppConnection
>>();
var
connection
=
services
.
BuildServiceProvider
().
GetService
<
IOptions
<
AppConnection
>>();
#
region
json
&
fluentvalidation
&
filter
#
region
json
&
fluentvalidation
&
filter
services
services
//筛选器配置
//筛选器配置
.
AddMvc
(
option
=>
.
AddMvc
(
option
=>
...
@@ -97,19 +100,23 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -97,19 +100,23 @@ public void ConfigureServices(IServiceCollection services)
fv
.
RegisterValidatorsFromAssemblyContaining
(
type
.
GetType
());
fv
.
RegisterValidatorsFromAssemblyContaining
(
type
.
GetType
());
}
}
});
});
#
endregion
#
endregion
json
&
fluentvalidation
&
filter
#
region
automapper
#
region
automapper
Mapper
.
Initialize
(
cfg
=>
cfg
.
AddProfile
<
AutoMapperConfigs
>());
Mapper
.
Initialize
(
cfg
=>
cfg
.
AddProfile
<
AutoMapperConfigs
>());
services
.
AddAutoMapper
();
services
.
AddAutoMapper
();
#
endregion
#
region
service
注入
repoitory
注入
#
endregion
automapper
#
region
service
注入
repoitory
注入
services
services
.
AddPerformanceService
()
.
AddPerformanceService
()
.
AddPerformanceRepoitory
();
.
AddPerformanceRepoitory
();
#
endregion
#
endregion
service
注入
repoitory
注入
#
region
custom
util
#
region
custom
util
...
@@ -118,7 +125,7 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -118,7 +125,7 @@ public void ConfigureServices(IServiceCollection services)
//用户身份信息服务
//用户身份信息服务
services
.
AddScoped
<
ClaimService
>();
services
.
AddScoped
<
ClaimService
>();
#
endregion
#
endregion
custom
util
#
region
email
#
region
email
...
@@ -132,22 +139,26 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -132,22 +139,26 @@ public void ConfigureServices(IServiceCollection services)
options
.
SmtpServer
=
emailOption
.
Value
.
SmtpServer
;
options
.
SmtpServer
=
emailOption
.
Value
.
SmtpServer
;
});
});
#
endregion
#
endregion
email
#
region
redis
#
region
redis
//var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString);
//var csredis = new CSRedis.CSRedisClient(connection.Value.RedisConnectionString);
//RedisHelper.Initialization(csredis);
//RedisHelper.Initialization(csredis);
#
endregion
#
endregion
redis
services
.
AddMemoryCache
();
services
.
AddMemoryCache
();
#
region
hangfire
#
region
hangfire
services
.
AddHangfire
(
config
=>
{
//services.AddHangfire(config =>
config
.
UseFilter
(
new
AutomaticRetryAttribute
{
Attempts
=
0
});
//{
config
.
UseStorage
(
new
MySqlStorage
(
connection
.
Value
.
HangfireConnectionString
));
// config.UseFilter(new AutomaticRetryAttribute { Attempts = 0 });
});
// config.UseStorage(new MySqlStorage(connection.Value.HangfireConnectionString));
#
endregion
//});
#
endregion
hangfire
services
.
AddSignalR
();
services
.
AddSignalR
();
services
.
AddCors
(
options
=>
services
.
AddCors
(
options
=>
...
@@ -158,15 +169,17 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -158,15 +169,17 @@ public void ConfigureServices(IServiceCollection services)
});
});
});
});
#
region
//ef配置
#
region
//ef配置
services
.
AddDbContext
<
PerformanceDbContext
>(
options
=>
services
.
AddDbContext
<
PerformanceDbContext
>(
options
=>
{
{
options
.
UseMySQL
(
connection
.
Value
.
PerformanceConnectionString
);
options
.
UseMySQL
(
connection
.
Value
.
PerformanceConnectionString
);
});
});
#
endregion
#
region
swagger
#
endregion
//ef配置
#
region
swagger
services
.
AddSwaggerGen
(
c
=>
services
.
AddSwaggerGen
(
c
=>
{
{
c
.
SwaggerDoc
(
"v1"
,
new
Info
{
Version
=
"v1.0"
,
Title
=
"绩效API接口"
});
c
.
SwaggerDoc
(
"v1"
,
new
Info
{
Version
=
"v1.0"
,
Title
=
"绩效API接口"
});
...
@@ -196,10 +209,10 @@ public void ConfigureServices(IServiceCollection services)
...
@@ -196,10 +209,10 @@ public void ConfigureServices(IServiceCollection services)
In
=
"HEADER"
In
=
"HEADER"
});
});
#
endregion
#
endregion
Token
绑定到
ConfigureServices
});
});
#
endregion
#
endregion
swagger
}
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
...
@@ -216,6 +229,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
...
@@ -216,6 +229,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
}
}
#
region
Swagger
#
region
Swagger
app
.
UseSwagger
();
app
.
UseSwagger
();
app
.
UseSwaggerUI
(
c
=>
app
.
UseSwaggerUI
(
c
=>
{
{
...
@@ -223,14 +237,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
...
@@ -223,14 +237,15 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
//c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1.0");
//c.SwaggerEndpoint("/swagger/v1/swagger.json", "v1.0");
c
.
RoutePrefix
=
""
;
c
.
RoutePrefix
=
""
;
});
});
#
endregion
#
endregion
Swagger
#
region
hangfire
#
region
hangfire
app
.
UseHangfireServer
();
//
app.UseHangfireServer();
app
.
UseHangfireDashboard
(
"/hangfire"
,
new
DashboardOptions
{
Authorization
=
new
[]
{
new
HangfireAuthorizationFilter
()
}
});
//
app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireAuthorizationFilter() } });
#
endregion
#
endregion
hangfire
app
.
UseCors
(
"SignalrCore"
);
app
.
UseCors
(
"SignalrCore"
);
app
.
UseSignalR
(
routes
=>
routes
.
MapHub
<
AllotLogHub
>(
"/performance/allotLogHub"
));
app
.
UseSignalR
(
routes
=>
routes
.
MapHub
<
AllotLogHub
>(
"/performance/allotLogHub"
));
...
@@ -250,5 +265,6 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context)
...
@@ -250,5 +265,6 @@ public bool Authorize(Hangfire.Dashboard.DashboardContext context)
return
true
;
return
true
;
}
}
}
}
#
endregion
}
#
endregion
hangfire
权限
}
\ No newline at end of file
performance/Performance.DtoModels/Response/SecondPerforResponse.cs
View file @
7cd3c3b3
...
@@ -4,22 +4,22 @@
...
@@ -4,22 +4,22 @@
namespace
Performance.DtoModels
namespace
Performance.DtoModels
{
{
public
class
SecondPerforResponse
public
class
SecondPerforResponse
:
ComputeResponse
{
{
/// <summary>
///
//
<summary>
/// 人员姓名
///
//
人员姓名
/// </summary>
///
//
</summary>
public
string
EmployeeName
{
get
;
set
;
}
//
public string EmployeeName { get; set; }
/// <summary>
///
//
<summary>
/// 职务
///
//
职务
/// </summary>
///
//
</summary>
public
string
JobTitle
{
get
;
set
;
}
//
public string JobTitle { get; set; }
/// <summary>
///
//
<summary>
/// 人员工号
///
//
人员工号
/// </summary>
///
//
</summary>
public
string
JobNumber
{
get
;
set
;
}
//
public string JobNumber { get; set; }
/// <summary>
/// <summary>
/// 效率绩效
/// 效率绩效
...
@@ -41,19 +41,19 @@ public class SecondPerforResponse
...
@@ -41,19 +41,19 @@ public class SecondPerforResponse
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
/// <summary>
///
//
<summary>
/// 应发管理绩效
///
//
应发管理绩效
/// </summary>
///
//
</summary>
public
Nullable
<
decimal
>
ShouldGiveFee
{
get
;
set
;
}
//
public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary>
///
//
<summary>
/// 绩效合计
///
//
绩效合计
/// </summary>
///
//
</summary>
public
Nullable
<
decimal
>
PerforSumFee
{
get
;
set
;
}
//
public Nullable<decimal> PerforSumFee { get; set; }
/// <summary>
///
//
<summary>
/// 考核对分率
///
//
考核对分率
/// </summary>
///
//
</summary>
public
Nullable
<
decimal
>
ScoreAverageRate
{
get
;
set
;
}
//
public Nullable<decimal> ScoreAverageRate { get; set; }
}
}
}
}
\ No newline at end of file
performance/Performance.Services/ComputeService.cs
View file @
7cd3c3b3
...
@@ -110,7 +110,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
...
@@ -110,7 +110,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
var
apramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
var
apramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
if
(
pairs
.
Keys
.
Any
(
t
=>
t
==
type
))
if
(
pairs
.
Keys
.
Any
(
t
=>
t
==
type
))
{
{
#
region
MyRegion
#
region
MyRegion
//var employees = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType));
//var employees = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType));
...
@@ -160,7 +159,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
...
@@ -160,7 +159,7 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
//data = Mapper.Map<List<ResComputeResponse>>(joinData);
//data = Mapper.Map<List<ResComputeResponse>>(joinData);
#
endregion
#
endregion
MyRegion
var
employees
=
_perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
pairs
[
type
].
Contains
(
t
.
UnitType
));
var
employees
=
_perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
pairs
[
type
].
Contains
(
t
.
UnitType
));
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
ResComputeResponse
>();
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
ResComputeResponse
>();
...
@@ -168,7 +167,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
...
@@ -168,7 +167,6 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
pairs
[
type
].
Contains
(
t
.
UnitType
));
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
pairs
[
type
].
Contains
(
t
.
UnitType
));
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
ResComputeResponse
>();
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
ResComputeResponse
>();
data
=
Mapper
.
Map
<
List
<
ResComputeResponse
>>(
computes
);
data
=
Mapper
.
Map
<
List
<
ResComputeResponse
>>(
computes
);
data
.
ForEach
(
t
=>
data
.
ForEach
(
t
=>
...
@@ -378,7 +376,6 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, string department, in
...
@@ -378,7 +376,6 @@ public DeptDetailResponse GetDepartmentDetail(int allotId, string department, in
return
null
;
return
null
;
}
}
/// <summary>
/// <summary>
/// 返回科室详情
/// 返回科室详情
/// </summary>
/// </summary>
...
@@ -573,7 +570,7 @@ private List<ComputeResponse> GetSecondPerformance(int allotId)
...
@@ -573,7 +570,7 @@ private List<ComputeResponse> GetSecondPerformance(int allotId)
/// </summary>
/// </summary>
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <param name="computes"></param>
/// <param name="computes"></param>
p
rivate
List
<
ComputeResponse
>
AddAprAmount
(
int
allotId
,
List
<
ComputeResponse
>
computes
)
p
ublic
List
<
ComputeResponse
>
AddAprAmount
(
int
allotId
,
List
<
ComputeResponse
>
computes
)
{
{
if
(
computes
==
null
||
!
computes
.
Any
())
if
(
computes
==
null
||
!
computes
.
Any
())
return
computes
;
return
computes
;
...
@@ -584,7 +581,7 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
...
@@ -584,7 +581,7 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
{
{
// 补充过一次就不在补充了
// 补充过一次就不在补充了
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
)
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
)
.
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
.
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
...
@@ -602,7 +599,6 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
...
@@ -602,7 +599,6 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
//}
//}
}
}
return
computes
;
return
computes
;
}
}
...
@@ -666,8 +662,9 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
...
@@ -666,8 +662,9 @@ private List<ComputeResponse> AddAprAmount(int allotId, List<ComputeResponse> co
// }
// }
// }
// }
// return result;
// return result;
//}
//}
#
endregion
#
endregion
绩效发放列表
public
res_compute
GetComputeSingle
(
int
computeid
)
public
res_compute
GetComputeSingle
(
int
computeid
)
{
{
...
@@ -728,7 +725,6 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -728,7 +725,6 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
DeptDataDetails
deptDetails
=
new
DeptDataDetails
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
{
ShowFormula
=
allot
.
ShowFormula
,
ShowFormula
=
allot
.
ShowFormula
,
...
@@ -896,7 +892,6 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
...
@@ -896,7 +892,6 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
return
dto
;
return
dto
;
}).
ToList
();
}).
ToList
();
}
}
var
headerData
=
headers
?.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
);
var
headerData
=
headers
?.
Where
(
t
=>
t
.
SheetID
==
sheet
.
ID
);
if
(
headerData
!=
null
&&
headerData
.
Any
())
if
(
headerData
!=
null
&&
headerData
.
Any
())
...
@@ -1003,6 +998,7 @@ private UnitType TypeConversion(int? unitType)
...
@@ -1003,6 +998,7 @@ private UnitType TypeConversion(int? unitType)
type
=
UnitType
.
护理组
;
type
=
UnitType
.
护理组
;
return
type
;
return
type
;
}
}
public
DeptDataDetails
DeptOfficeDetail
(
int
accountId
)
public
DeptDataDetails
DeptOfficeDetail
(
int
accountId
)
{
{
var
account
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
var
account
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
ID
==
accountId
);
...
@@ -1076,7 +1072,6 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
...
@@ -1076,7 +1072,6 @@ public DeptDataDetails DeptOfficeDetail(int accountId)
return
deptDetails
;
return
deptDetails
;
}
}
public
DeptDataDetails
SpecialDeptDetail
(
ag_secondallot
second
)
public
DeptDataDetails
SpecialDeptDetail
(
ag_secondallot
second
)
{
{
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
...
@@ -1243,7 +1238,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
...
@@ -1243,7 +1238,7 @@ public DeptDataDetails GetDoctorDetail(int computeId)
Scale
=
employee
.
Scale
??
0
,
//规模绩效系数
Scale
=
employee
.
Scale
??
0
,
//规模绩效系数
ScalePerfor
=
resCompute
.
Scale
??
0
,
//规模绩效
ScalePerfor
=
resCompute
.
Scale
??
0
,
//规模绩效
Management
=
employee
.
Management
,
//管理绩效发放系数
Management
=
employee
.
Management
,
//管理绩效发放系数
ShouldGiveFee
=
resCompute
.
ShouldGiveFee
??
0
,
//考核前管理绩效
ShouldGiveFee
=
resCompute
.
ShouldGiveFee
??
0
,
//考核前管理绩效
ScoringAverage
=
resCompute
.
ScoreAverageRate
??
1
,
//考核得分率
ScoringAverage
=
resCompute
.
ScoreAverageRate
??
1
,
//考核得分率
AssessLaterManagementFee
=
Math
.
Round
(
resCompute
.
ShouldGiveFee
*
resCompute
.
ScoreAverageRate
*
resCompute
.
Attendance
+
resCompute
.
Punishment
??
0
),
//考核后管理绩效
AssessLaterManagementFee
=
Math
.
Round
(
resCompute
.
ShouldGiveFee
*
resCompute
.
ScoreAverageRate
*
resCompute
.
Attendance
+
resCompute
.
Punishment
??
0
),
//考核后管理绩效
AdjustFactor
=
employee
?.
Adjust
??
1
,
//调节系数
AdjustFactor
=
employee
?.
Adjust
??
1
,
//调节系数
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
7cd3c3b3
...
@@ -86,6 +86,7 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
...
@@ -86,6 +86,7 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
var
row
=
sheet
.
GetRow
(
i
);
var
row
=
sheet
.
GetRow
(
i
);
if
(
row
!=
null
)
if
(
row
!=
null
)
{
{
row
.
ZeroHeight
=
false
;
//取消隐藏行
int
dataFirstCellRowNum
=
point
.
DataFirstCellNum
.
Value
;
int
dataFirstCellRowNum
=
point
.
DataFirstCellNum
.
Value
;
//跳过核算单元和科室
//跳过核算单元和科室
for
(
int
j
=
dataFirstCellRowNum
;
j
<
row
.
LastCellNum
;
j
++)
for
(
int
j
=
dataFirstCellRowNum
;
j
<
row
.
LastCellNum
;
j
++)
...
@@ -101,4 +102,4 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
...
@@ -101,4 +102,4 @@ public static void ClearSheetPartialData(ISheet sheet, PerSheetPoint point, Shee
}
}
}
}
}
}
}
}
\ No newline at end of file
performance/Performance.Services/SecondAllotService.cs
View file @
7cd3c3b3
...
@@ -37,7 +37,10 @@ public class SecondAllotService : IAutoInjection
...
@@ -37,7 +37,10 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforPerapramountRepository
perapramountRepository
;
private
readonly
PerforPerapramountRepository
perapramountRepository
;
private
readonly
PerforResspecialunitRepository
resspecialunitRepository
;
private
readonly
PerforResspecialunitRepository
resspecialunitRepository
;
private
readonly
PersonService
personService
;
private
readonly
PersonService
personService
;
private
readonly
ComputeService
computeService
;
private
readonly
PerforRescomputeRepository
rescomputeRepository
;
private
readonly
PerforRescomputeRepository
rescomputeRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforImemployeeclinicRepository
imemployeeclinicRepository
;
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
public
SecondAllotService
(
IOptions
<
Application
>
application
,
public
SecondAllotService
(
IOptions
<
Application
>
application
,
...
@@ -61,7 +64,10 @@ public class SecondAllotService : IAutoInjection
...
@@ -61,7 +64,10 @@ public class SecondAllotService : IAutoInjection
PerforPerapramountRepository
perapramountRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforResspecialunitRepository
resspecialunitRepository
,
PerforResspecialunitRepository
resspecialunitRepository
,
PersonService
personService
,
PersonService
personService
,
PerforRescomputeRepository
rescomputeRepository
)
ComputeService
computeService
,
PerforRescomputeRepository
rescomputeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforImemployeeclinicRepository
imemployeeclinicRepository
)
{
{
this
.
application
=
application
.
Value
;
this
.
application
=
application
.
Value
;
this
.
hospitalRepository
=
hospitalRepository
;
this
.
hospitalRepository
=
hospitalRepository
;
...
@@ -84,7 +90,10 @@ public class SecondAllotService : IAutoInjection
...
@@ -84,7 +90,10 @@ public class SecondAllotService : IAutoInjection
this
.
perapramountRepository
=
perapramountRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
resspecialunitRepository
=
resspecialunitRepository
;
this
.
resspecialunitRepository
=
resspecialunitRepository
;
this
.
personService
=
personService
;
this
.
personService
=
personService
;
this
.
computeService
=
computeService
;
this
.
rescomputeRepository
=
rescomputeRepository
;
this
.
rescomputeRepository
=
rescomputeRepository
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
imemployeeclinicRepository
=
imemployeeclinicRepository
;
this
.
tempitems
=
perforAgtempitemRepository
.
GetEntities
();
this
.
tempitems
=
perforAgtempitemRepository
.
GetEntities
();
}
}
...
@@ -1715,15 +1724,17 @@ public List<SecPrintResponse> Print(int secondId)
...
@@ -1715,15 +1724,17 @@ public List<SecPrintResponse> Print(int secondId)
#
endregion
打印
#
endregion
打印
public
List
<
SecondPerforResponse
>
DeptComputeDetail
(
int
userId
,
int
allotId
)
public
List
<
SecondPerforResponse
>
DeptComputeDetail
(
int
userId
,
int
allotId
,
out
int
isShowManage
)
{
{
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
if
(
user
==
null
)
if
(
user
==
null
)
throw
new
NotImplementedException
(
"人员ID无效"
);
throw
new
NotImplementedException
(
"人员ID无效"
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
isShowManage
=
computeService
.
IsShowManage
(
allotId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
Dictionary
<
int
,
string
>
dict
=
new
Dictionary
<
int
,
string
>
Dictionary
<
int
,
string
>
dict
=
new
Dictionary
<
int
,
string
>
{
{
{
application
.
DirectorRole
,
AccountUnitType
.
科主任
.
ToString
()
},
{
application
.
DirectorRole
,
AccountUnitType
.
科主任
.
ToString
()
},
...
@@ -1733,10 +1744,109 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
...
@@ -1733,10 +1744,109 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId)
if
(!
dict
.
Keys
.
Contains
(
role
.
Type
.
Value
))
return
new
List
<
SecondPerforResponse
>();
if
(!
dict
.
Keys
.
Contains
(
role
.
Type
.
Value
))
return
new
List
<
SecondPerforResponse
>();
var
data
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
AccountingUnit
==
user
.
Department
&&
t
.
AccountType
==
dict
[
role
.
Type
.
Value
]);
var
computes
=
rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
AccountingUnit
==
user
.
Department
&&
t
.
AccountType
==
dict
[
role
.
Type
.
Value
]);
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecondPerforResponse
>();
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
SecondPerforResponse
>();
var
data
=
GetAllotPerformance
(
allotId
,
computes
,
isShowManage
);
// 补充医院其他绩效
var
result
=
AddAprAmount
(
allotId
,
data
);
// 预留比例
if
(
result
!=
null
)
{
var
empDic
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
foreach
(
var
item
in
result
)
{
var
perfor
=
((
item
.
GiveFee
??
0
)
!=
0
?
item
.
GiveFee
:
item
.
PerforSumFee
)
??
0
;
item
.
PerforSumFee
=
Math
.
Round
(
item
.
PerforSumFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
PerforManagementFee
=
Math
.
Round
(
item
.
PerforManagementFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
GiveFee
=
Math
.
Round
(
perfor
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
AdjustLaterOtherFee
=
Math
.
Round
(
item
.
AdjustLaterOtherFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
OthePerfor
=
Math
.
Round
(
item
.
OthePerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
NightWorkPerfor
=
Math
.
Round
(
item
.
NightWorkPerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ShouldGiveFee
=
Math
.
Round
((
perfor
+
item
.
AdjustLaterOtherFee
+
item
.
NightWorkPerfor
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
((
perfor
+
item
.
AdjustLaterOtherFee
+
item
.
NightWorkPerfor
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
}
}
return
result
;
}
/// <summary>
/// 获取一次次绩效结果
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
private
List
<
SecondPerforResponse
>
GetAllotPerformance
(
int
allotId
,
List
<
res_compute
>
computes
,
int
isShowManage
)
{
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
SecondPerforResponse
>();
var
types1
=
new
List
<
string
>
{
AccountUnitType
.
护士长
.
ToString
(),
AccountUnitType
.
科主任
.
ToString
()
};
var
types2
=
new
List
<
string
>
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
// 业务中层人员信息
var
empolyeeList
=
imemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
computes
.
Select
(
t
=>
{
var
comp
=
new
SecondPerforResponse
()
{
AccountingUnit
=
t
.
AccountingUnit
,
EmployeeName
=
t
.
EmployeeName
,
JobNumber
=
t
.
JobNumber
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
AccountType
,
Scale
=
t
.
Scale
,
Efficiency
=
t
.
Efficiency
,
Grant
=
t
.
Grant
,
Punishment
=
t
.
Punishment
,
ShouldGiveFee
=
t
.
ShouldGiveFee
,
PerforSumFee
=
t
.
PerforSumFee
,
GiveFee
=
t
.
GiveFee
*
t
.
Adjust
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
??
0
,
OthePerfor
=
t
.
OtherPerfor
,
RealGiveFee
=
t
.
RealGiveFee
};
if
(
types1
.
Contains
(
t
.
AccountType
))
comp
.
PerforManagementFee
=
((
t
.
Efficiency
+
t
.
Scale
)
*
t
.
Grant
+
t
.
OtherManagePerfor
)
*
t
.
Attendance
*
t
.
ScoreAverageRate
;
else
comp
.
PerforManagementFee
=
t
.
RealGiveFee
;
// 行政中层 行政高层 补充 夜班费
if
(
types2
.
Contains
(
t
.
AccountType
))
comp
.
NightWorkPerfor
=
t
.
NightWorkPerfor
;
// 获取科主任系数,解决共用科主任重复计算人均问题
var
basics
=
empolyeeList
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
AccountingUnit
&&
w
.
DoctorName
==
t
.
EmployeeName
&&
w
.
PersonnelNumber
==
t
.
JobNumber
)?.
Basics
;
// 仅显示管理绩效
if
(
isShowManage
==
2
)
comp
.
PerforSumFee
=
0
;
else
comp
.
PerforSumFee
=
Math
.
Round
((
t
.
Avg
*
(
basics
??
1
))
+
t
.
ShouldGiveFee
+
t
.
AssessBeforeOtherFee
??
0
);
return
comp
;
}).
ToList
();
}
public
List
<
SecondPerforResponse
>
AddAprAmount
(
int
allotId
,
List
<
SecondPerforResponse
>
computes
)
{
if
(
computes
==
null
||
!
computes
.
Any
())
return
computes
;
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
);
if
(
list
==
null
||
!
list
.
Any
())
return
computes
;
foreach
(
var
item
in
computes
.
GroupBy
(
w
=>
new
{
w
.
AccountingUnit
,
w
.
JobNumber
}))
{
// 补充过一次就不在补充了
var
emp
=
computes
.
Where
(
w
=>
w
.
AccountingUnit
==
item
.
Key
.
AccountingUnit
&&
w
.
JobNumber
==
item
.
Key
.
JobNumber
)
.
OrderByDescending
(
w
=>
w
.
Source
).
FirstOrDefault
();
var
apramount
=
list
.
Where
(
t
=>
t
.
AccountingUnit
==
emp
.
AccountingUnit
&&
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
emp
.
JobNumber
?.
Trim
()
==
t
.
PersonnelNumber
?.
Trim
());
emp
.
OthePerfor
=
apramount
?.
Sum
(
w
=>
w
.
Amount
)
??
0
;
}
return
Mapper
.
Map
<
List
<
SecondPerforResponse
>>(
data
)
;
return
computes
;
}
}
}
}
}
}
\ No newline at end of file
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