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
52c8f1db
Commit
52c8f1db
authored
Sep 08, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预留比例,全院发放表等
parent
c3162559
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
175 additions
and
17 deletions
+175
-17
performance/Performance.Api/Controllers/ComputeController.cs
+5
-4
performance/Performance.Api/Controllers/SecondAllotController.cs
+12
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+15
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.DtoModels/Request/SecondEmpRequest.cs
+36
-0
performance/Performance.DtoModels/Response/ComputeResponse.cs
+29
-2
performance/Performance.EntityModels/Entity/ag_compute.cs
+20
-10
performance/Performance.Services/ComputeService.cs
+0
-0
performance/Performance.Services/SecondAllotService.cs
+42
-1
No files found.
performance/Performance.Api/Controllers/ComputeController.cs
View file @
52c8f1db
...
...
@@ -192,10 +192,11 @@ public ApiResponse AllCompute([FromBody] ComputerRequest request)
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
isShowManage
=
_computeService
.
IsShowManage
(
request
.
AllotId
);
var
list
=
isShowManage
==
1
?
_computeService
.
AllCompute
(
request
.
AllotId
)
:
_computeService
.
AllManageCompute
(
request
.
AllotId
);
//
var list = isShowManage == 1
//
? _computeService.AllCompute(request.AllotId)
//
: _computeService.AllManageCompute(request.AllotId);
var
list
=
_computeService
.
AllCompute
(
request
.
AllotId
,
isShowManage
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
...
...
@@ -211,7 +212,7 @@ public ApiResponse AllManageCompute([FromBody] ComputerRequest request)
var
allot
=
_allotService
.
GetAllot
(
request
.
AllotId
);
if
(
null
==
allot
)
throw
new
PerformanceException
(
"当前绩效记录不存在"
);
var
list
=
_computeService
.
All
ManageCompute
(
request
.
AllotId
);
var
list
=
_computeService
.
All
Compute
(
request
.
AllotId
,
1
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
...
...
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
52c8f1db
...
...
@@ -136,6 +136,18 @@ public ApiResponse SecondDetail([CustomizeValidator(RuleSet = "Refresh"), FromBo
//}
#
endregion
/// <summary>
/// 二次绩效录入页面自动补全
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/autocomplete"
)]
[
HttpPost
]
public
ApiResponse
AutoComplete
([
FromBody
]
SecondEmpRequest
request
)
{
var
result
=
secondAllotService
.
AutoComplete
(
request
,
claimService
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
#
region
模板使用
/// <summary>
/// 选择二次绩效模板
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
52c8f1db
...
...
@@ -1059,6 +1059,12 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.AutoComplete(Performance.DtoModels.SecondEmpRequest)"
>
<summary>
二次绩效录入页面自动补全
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.Temp(Performance.DtoModels.AllotDeptRequest)"
>
<summary>
选择二次绩效模板
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
52c8f1db
...
...
@@ -2356,6 +2356,21 @@
职位
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.PerforSumFee"
>
<summary>
绩效合计
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.OthePerfor"
>
<summary>
医院其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.NightWorkPerfor"
>
<summary>
实发绩效工资金额
</summary>
</member>
<member
name=
"P:Performance.DtoModels.ComputeResponse.RealGiveFee"
>
<summary>
实发绩效
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
52c8f1db
...
...
@@ -362,6 +362,16 @@
人员名称
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_compute.OthePerfor"
>
<summary>
医院其他绩效
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_compute.NightWorkPerfor"
>
<summary>
实发绩效工资金额
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_compute.RealGiveFee"
>
<summary>
实发金额
...
...
performance/Performance.DtoModels/Request/SecondEmpRequest.cs
0 → 100644
View file @
52c8f1db
using
FluentValidation
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
SecondEmpRequest
{
public
int
TempId
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
public
int
SecondId
{
get
;
set
;
}
public
string
EmployeeName
{
get
;
set
;
}
public
string
JobNumber
{
get
;
set
;
}
}
public
class
SecondEmpRequestValidator
:
AbstractValidator
<
SecondEmpRequest
>
{
public
SecondEmpRequestValidator
()
{
RuleFor
(
x
=>
x
.
TempId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
HospitalId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
Department
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
UnitType
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
SecondId
).
NotNull
().
GreaterThan
(
0
);
}
}
}
performance/Performance.DtoModels/Response/ComputeResponse.cs
View file @
52c8f1db
...
...
@@ -6,6 +6,19 @@ namespace Performance.DtoModels
{
public
class
ComputeResponse
{
public
ComputeResponse
()
{
}
public
ComputeResponse
(
string
source
,
string
accountingUnit
,
string
employeeName
,
string
jobNumber
,
string
jobTitle
,
decimal
?
perforSumFee
)
{
Source
=
source
;
AccountingUnit
=
accountingUnit
;
EmployeeName
=
employeeName
;
JobNumber
=
jobNumber
;
JobTitle
=
jobTitle
;
PerforSumFee
=
perforSumFee
;
}
/// <summary>
/// 来源
/// </summary>
...
...
@@ -33,6 +46,20 @@ public class ComputeResponse
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 绩效合计
/// </summary>
public
Nullable
<
decimal
>
PerforSumFee
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
/// <summary>
/// 实发绩效工资金额
/// </summary>
public
Nullable
<
decimal
>
NightWorkPerfor
{
get
;
set
;
}
/// <summary>
/// 实发绩效
...
...
@@ -42,11 +69,11 @@ public class ComputeResponse
/// <summary>
/// 预留比例
/// </summary>
public
decimal
ReservedRatio
{
get
;
set
;
}
public
Nullable
<
decimal
>
ReservedRatio
{
get
;
set
;
}
/// <summary>
/// 预留比例金额
/// </summary>
public
decimal
ReservedRatioFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
ReservedRatioFee
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/ag_compute.cs
View file @
52c8f1db
...
...
@@ -7,50 +7,60 @@
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
/// <summary>
/// 二次绩效结果表
/// </summary>
[
Table
(
"ag_compute"
)]
public
class
ag_compute
public
class
ag_compute
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 绩效ID
/// </summary>
public
Nullable
<
int
>
AllotId
{
get
;
set
;
}
/// <summary>
/// 二次绩效ID
/// </summary>
public
Nullable
<
int
>
SecondId
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 职称
/// </summary>
public
string
WorkPost
{
get
;
set
;
}
/// <summary>
/// 工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 人员名称
/// </summary>
public
string
PersonName
{
get
;
set
;
}
/// <summary>
/// 医院其他绩效
/// </summary>
public
Nullable
<
decimal
>
OthePerfor
{
get
;
set
;
}
/// <summary>
/// 实发绩效工资金额
/// </summary>
public
Nullable
<
decimal
>
NightWorkPerfor
{
get
;
set
;
}
/// <summary>
/// 实发金额
/// </summary>
...
...
performance/Performance.Services/ComputeService.cs
View file @
52c8f1db
This diff is collapsed.
Click to expand it.
performance/Performance.Services/SecondAllotService.cs
View file @
52c8f1db
...
...
@@ -33,6 +33,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforAgothersourceRepository
perforAgothersourceRepository
;
private
readonly
PerforAgworkloadtypeRepository
perforAgworkloadtypeRepository
;
private
readonly
PerforRoleRepository
roleRepository
;
private
readonly
PerforPerapramountRepository
perapramountRepository
;
private
readonly
PerforResspecialunitRepository
resspecialunitRepository
;
private
readonly
PersonService
personService
;
private
readonly
PerforRescomputeRepository
rescomputeRepository
;
...
...
@@ -55,6 +56,7 @@ public class SecondAllotService : IAutoInjection
PerforAgothersourceRepository
perforAgothersourceRepository
,
PerforAgworkloadtypeRepository
perforAgworkloadtypeRepository
,
PerforRoleRepository
roleRepository
,
PerforPerapramountRepository
perapramountRepository
,
PerforResspecialunitRepository
resspecialunitRepository
,
PersonService
personService
,
PerforRescomputeRepository
rescomputeRepository
)
...
...
@@ -76,6 +78,7 @@ public class SecondAllotService : IAutoInjection
this
.
perforAgothersourceRepository
=
perforAgothersourceRepository
;
this
.
perforAgworkloadtypeRepository
=
perforAgworkloadtypeRepository
;
this
.
roleRepository
=
roleRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
this
.
resspecialunitRepository
=
resspecialunitRepository
;
this
.
personService
=
personService
;
this
.
rescomputeRepository
=
rescomputeRepository
;
...
...
@@ -271,6 +274,31 @@ public List<SecondListResponse> GetSecondList(int userId)
#
endregion
/// <summary>
/// 二次绩效分配录入人员自动补全信息
/// </summary>
/// <param name="request"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
BodyItem
>
AutoComplete
(
SecondEmpRequest
request
,
int
userId
)
{
var
usetemp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
if
(
usetemp
==
null
)
throw
new
PerformanceException
(
"当前科室暂未配置绩效模板"
);
//获取固定模板列 + 工作量列
var
headItems
=
GetHeadItems
(
request
.
TempId
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"当前科室二次分配绩效信息无效"
);
var
bodyItems
=
GetEmployees
(
second
.
AllotId
.
Value
,
userId
,
headItems
,
request
.
EmployeeName
,
request
.
JobNumber
);
return
bodyItems
;
}
#
region
二次绩效详情
-
使用中
/// <summary>
/// 二次绩效详情
...
...
@@ -340,19 +368,30 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
};
}
private
List
<
BodyItem
>
GetEmployees
(
int
allotId
,
int
userId
,
List
<
HeadItem
>
heads
)
private
List
<
BodyItem
>
GetEmployees
(
int
allotId
,
int
userId
,
List
<
HeadItem
>
heads
,
string
empName
=
""
,
string
jobNumber
=
""
)
{
var
list
=
new
List
<
BodyItem
>();
var
employees
=
personService
.
GetPersons
(
allotId
,
userId
);
if
(
employees
==
null
||
!
employees
.
Any
())
return
list
;
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
==
empName
).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
?.
Where
(
w
=>
w
.
PersonnelNumber
==
jobNumber
).
ToList
();
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
perapramounts
?.
Where
(
w
=>
w
.
DoctorName
==
t
.
DoctorName
&&
w
.
PersonnelNumber
==
t
.
PersonnelNumber
)
?.
Sum
(
w
=>
w
.
Amount
);
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
dict
=
new
Dictionary
<(
string
,
string
),
Func
<
per_employee
,
object
>>
{
{
(
"姓名"
,
"FullName"
),
(
t
)
=>
t
.
DoctorName
},
{
(
"岗位"
,
"Post"
),
(
t
)
=>
!
string
.
IsNullOrEmpty
(
t
.
Duty
)
&&
(
t
.
Duty
.
IndexOf
(
"主任"
)
>
-
1
||
t
.
Duty
.
IndexOf
(
"护士长"
)
>
-
1
)
?
"主任"
:
"其他"
},
{
(
"出勤"
,
"ActualAttendance"
),
(
t
)
=>
t
.
AttendanceDay
},
{
(
"预留比例"
,
"ReservedRatio"
),
(
t
)
=>
t
.
ReservedRatio
},
{
(
"医院其他绩效"
,
"OtherPerformance"
),
(
t
)
=>
getAprAmount
(
t
)},
};
int
rowNumber
=
1
;
...
...
@@ -1192,6 +1231,8 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
JobNumber
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"人员工号"
)?.
ItemValue
,
WorkPost
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"岗位"
)?.
ItemValue
,
PersonName
=
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"姓名"
)?.
ItemValue
,
OthePerfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"医院其他绩效"
)?.
ItemValue
,
0
),
NightWorkPerfor
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"夜班工作量绩效"
)?.
ItemValue
,
0
),
RealGiveFee
=
ConvertHelper
.
TryDecimal
(
items
.
FirstOrDefault
(
t
=>
t
.
RowNumber
==
item
&&
t
.
ItemName
==
"实发绩效工资金额"
)?.
ItemValue
,
0
),
});
}
...
...
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