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
4f7b6d4a
Commit
4f7b6d4a
authored
Jun 23, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配人员字典
parent
0875f445
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
22 deletions
+104
-22
performance/Performance.Api/Controllers/SecondAllotController.cs
+3
-19
performance/Performance.Api/wwwroot/Performance.Api.xml
+1
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+6
-1
performance/Performance.DtoModels/Second/SecondEmployeeDto.cs
+11
-0
performance/Performance.DtoModels/Second/SecondLoadDto.cs
+1
-1
performance/Performance.Services/RedistributionService.cs
+82
-0
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
4f7b6d4a
...
@@ -791,27 +791,11 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
...
@@ -791,27 +791,11 @@ public ApiResponse RedistributionSubmit([FromBody] SecondComputeDto request)
/// <returns></returns>
/// <returns></returns>
[
Route
(
"api/second/redistribution/employee"
)]
[
Route
(
"api/second/redistribution/employee"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
RedistributionEmployee
([
FromBody
]
Second
Comput
eDto
request
)
public
ApiResponse
RedistributionEmployee
([
FromBody
]
Second
Employe
eDto
request
)
{
{
// 返回信息
// 返回信息
//rownumber: 11
var
employees
=
_redistributionService
.
RedistributionEmployee
(
request
);
//secondid: 1472
return
new
ApiResponse
(
ResponseType
.
OK
,
employees
);
//department: "呼吸内科" nameof(ag_bodysource.Department);
//name: "付小锋" nameof(ag_bodysource.Name);
//jobtitle: "副高"
//post: "其他"
//worknumber: "197"
//workperformance: 6570.62
//titlecoefficient: 1
//actualattendance: 31
//staffcoefficient: 1
//动态
//assessmentscore_12: 100
//assessmentscore_default: 100
return
new
ApiResponse
(
ResponseType
.
Fail
,
"字典带出失败"
);
}
}
#
endregion
#
endregion
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
4f7b6d4a
...
@@ -1647,7 +1647,7 @@
...
@@ -1647,7 +1647,7 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionEmployee(Performance.DtoModels.Second
Comput
eDto)"
>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.RedistributionEmployee(Performance.DtoModels.Second
Employe
eDto)"
>
<summary>
<summary>
二次分配人员字典带出
二次分配人员字典带出
</summary>
</summary>
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
4f7b6d4a
...
@@ -3781,11 +3781,16 @@
...
@@ -3781,11 +3781,16 @@
纵向计算
纵向计算
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.Second
Load
Dto.ComputeMode"
>
<member
name=
"P:Performance.DtoModels.Second
Employee
Dto.ComputeMode"
>
<summary>
<summary>
计算方式:1 不计算 2 横向计算 3 纵向计算
计算方式:1 不计算 2 横向计算 3 纵向计算
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.SecondLoadDto.ComputeMode"
>
<summary>
计算方式:11 不计算 12 横向计算 13 纵向计算
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondLoadDto.OverrideMode"
>
<member
name=
"P:Performance.DtoModels.SecondLoadDto.OverrideMode"
>
<summary>
<summary>
数据加载方式:0 保存,1 上次,2 字典
数据加载方式:0 保存,1 上次,2 字典
...
...
performance/Performance.DtoModels/Second/SecondEmployeeDto.cs
0 → 100644
View file @
4f7b6d4a
namespace
Performance.DtoModels
{
public
class
SecondEmployeeDto
:
PersonParamsRequest
{
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// 计算方式:11 不计算 12 横向计算 13 纵向计算
/// </summary>
public
int
ComputeMode
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/Second/SecondLoadDto.cs
View file @
4f7b6d4a
...
@@ -4,7 +4,7 @@ public class SecondLoadDto
...
@@ -4,7 +4,7 @@ public class SecondLoadDto
{
{
public
int
SecondId
{
get
;
set
;
}
public
int
SecondId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 计算方式:1
不计算 2 横向计算
3 纵向计算
/// 计算方式:1
1 不计算 12 横向计算 1
3 纵向计算
/// </summary>
/// </summary>
public
int
ComputeMode
{
get
;
set
;
}
public
int
ComputeMode
{
get
;
set
;
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/RedistributionService.cs
View file @
4f7b6d4a
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq.Expressions
;
namespace
Performance.Services
namespace
Performance.Services
{
{
...
@@ -24,6 +25,7 @@ public class RedistributionService : IAutoInjection
...
@@ -24,6 +25,7 @@ public class RedistributionService : IAutoInjection
private
readonly
SecondAllotDetails
_secondAllotDetails
;
private
readonly
SecondAllotDetails
_secondAllotDetails
;
private
readonly
PerforPerallotRepository
_perallotRepository
;
private
readonly
PerforPerallotRepository
_perallotRepository
;
private
readonly
PerforPeremployeeRepository
_peremployeeRepository
;
private
readonly
PerforPeremployeeRepository
_peremployeeRepository
;
private
readonly
PerforRescomputeRepository
_rescomputeRepository
;
private
readonly
PerforAgsecondallotRepository
_secondallotRepository
;
private
readonly
PerforAgsecondallotRepository
_secondallotRepository
;
private
readonly
PerforPerapramountRepository
_perapramountRepository
;
private
readonly
PerforPerapramountRepository
_perapramountRepository
;
private
readonly
PerforAgothersourceRepository
_agothersourceRepository
;
private
readonly
PerforAgothersourceRepository
_agothersourceRepository
;
...
@@ -40,6 +42,7 @@ public class RedistributionService : IAutoInjection
...
@@ -40,6 +42,7 @@ public class RedistributionService : IAutoInjection
SecondAllotDetails
secondAllotDetails
,
SecondAllotDetails
secondAllotDetails
,
PerforPerallotRepository
perallotRepository
,
PerforPerallotRepository
perallotRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforRescomputeRepository
rescomputeRepository
,
PerforAgsecondallotRepository
secondallotRepository
,
PerforAgsecondallotRepository
secondallotRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforAgothersourceRepository
agothersourceRepository
,
PerforAgothersourceRepository
agothersourceRepository
,
...
@@ -55,6 +58,7 @@ public class RedistributionService : IAutoInjection
...
@@ -55,6 +58,7 @@ public class RedistributionService : IAutoInjection
_secondAllotDetails
=
secondAllotDetails
;
_secondAllotDetails
=
secondAllotDetails
;
_perallotRepository
=
perallotRepository
;
_perallotRepository
=
perallotRepository
;
_peremployeeRepository
=
peremployeeRepository
;
_peremployeeRepository
=
peremployeeRepository
;
_rescomputeRepository
=
rescomputeRepository
;
_secondallotRepository
=
secondallotRepository
;
_secondallotRepository
=
secondallotRepository
;
_perapramountRepository
=
perapramountRepository
;
_perapramountRepository
=
perapramountRepository
;
_agothersourceRepository
=
agothersourceRepository
;
_agothersourceRepository
=
agothersourceRepository
;
...
@@ -685,6 +689,84 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
...
@@ -685,6 +689,84 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
}
}
/// <summary>
/// <summary>
/// 科室查询人员字典
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
List
<
Dictionary
<
string
,
object
>>
RedistributionEmployee
(
SecondEmployeeDto
request
)
{
List
<
Dictionary
<
string
,
object
>>
result
=
new
List
<
Dictionary
<
string
,
object
>>();
var
second
=
_secondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数SecondId无效!"
);
var
allot
=
_perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效记录不存在!"
);
// 当前二次分配配置工作量
var
loads
=
GetWorkLoads
(
allot
.
HospitalId
,
second
.
UnitType
,
second
.
Department
);
Expression
<
Func
<
per_employee
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
second
.
AllotId
;
if
(
request
!=
null
&&
!
string
.
IsNullOrEmpty
(
request
.
SearchQuery
))
{
exp
=
exp
.
And
(
t
=>
true
&&
(
t
.
AccountingUnit
.
Contains
(
request
.
SearchQuery
)
||
t
.
PersonnelNumber
.
Contains
(
request
.
SearchQuery
)
||
t
.
DoctorName
.
Contains
(
request
.
SearchQuery
)
||
t
.
Department
.
Contains
(
request
.
SearchQuery
)));
}
// 分页查询
var
employees
=
_peremployeeRepository
.
GetEntitiesForPaging
(
request
.
PageNumber
,
request
.
PageSize
,
exp
);
if
(
employees
!=
null
)
{
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
emp
)
=>
0
;
// 不计算模板时,带出工作量绩效(一次分配中的应发绩效)
if
(
request
.
ComputeMode
==
(
int
)
ComputeMode
.
NotCalculate
)
{
if
(
UnitTypeUtil
.
IsOffice
(
second
.
UnitType
))
{
var
distPerformance
=
_rescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
employees
.
Select
(
s
=>
s
.
PersonnelNumber
).
Contains
(
t
.
JobNumber
));
getDistPerformance
=
(
emp
)
=>
{
if
(
second
.
Department
==
emp
.
AccountingUnit
)
return
distPerformance
?.
Where
(
w
=>
w
.
JobNumber
?.
Trim
()
==
emp
.
PersonnelNumber
?.
Trim
())?.
Sum
(
w
=>
w
.
GiveFee
);
return
0
;
};
}
}
var
monthDays
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
foreach
(
var
employee
in
employees
)
{
Dictionary
<
string
,
object
>
item
=
new
Dictionary
<
string
,
object
>();
// 不计算模板时,带出工作量绩效(一次分配中的应发绩效)
if
(
request
.
ComputeMode
==
(
int
)
ComputeMode
.
NotCalculate
)
{
item
.
Add
(
nameof
(
ag_bodysource
.
WorkPerformance
),
getDistPerformance
(
employee
));
}
item
.
Add
(
nameof
(
per_employee
.
UnitType
),
employee
.
UnitType
);
item
.
Add
(
nameof
(
ag_bodysource
.
SecondId
),
request
.
SecondId
);
item
.
Add
(
nameof
(
ag_bodysource
.
Department
),
employee
.
AccountingUnit
);
item
.
Add
(
nameof
(
ag_bodysource
.
Name
),
employee
.
DoctorName
);
item
.
Add
(
nameof
(
ag_bodysource
.
WorkNumber
),
employee
.
PersonnelNumber
);
item
.
Add
(
nameof
(
ag_bodysource
.
JobTitle
),
employee
.
JobTitle
);
item
.
Add
(
nameof
(
ag_bodysource
.
Post
),
"否"
);
item
.
Add
(
nameof
(
ag_bodysource
.
TitleCoefficient
),
1
);
item
.
Add
(
nameof
(
ag_bodysource
.
ActualAttendance
),
employee
.
AttendanceDay
>
monthDays
?
monthDays
:
employee
.
AttendanceDay
);
item
.
Add
(
nameof
(
ag_bodysource
.
StaffCoefficient
),
1
);
if
(
loads
!=
null
)
{
foreach
(
var
score
in
loads
.
Where
(
w
=>
w
.
Title
.
StartsWithIgnoreCase
(
"AssessmentScore_"
)).
ToList
())
{
if
(
score
.
Value
==
null
)
item
.
AddOrUpdate
(
score
.
Title
,
100
);
}
}
result
.
Add
(
item
);
}
}
return
result
;
}
/// <summary>
/// 重算顶部医院其他绩效、重算行内实发绩效、重算顶部工作量
/// 重算顶部医院其他绩效、重算行内实发绩效、重算顶部工作量
/// </summary>
/// </summary>
/// <param name="head"></param>
/// <param name="head"></param>
...
...
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