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
e9c758d0
Commit
e9c758d0
authored
Jul 30, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效中可查看科主任、护士长的绩效发放明细,抽取收入清除科室,从第1行开始抽取数据,科主任/护士长绩效发放获取数据方式修改,部分值计算取整
parent
bf89d4ee
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
237 additions
and
58 deletions
+237
-58
performance/Performance.Api/Controllers/SecondAllotController.cs
+14
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+50
-0
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+3
-0
performance/Performance.DtoModels/Response/SecondPerforResponse.cs
+59
-0
performance/Performance.EntityModels/Entity/res_compute.cs
+6
-1
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+4
-4
performance/Performance.Services/ComputeService.cs
+55
-41
performance/Performance.Services/DFExtractService.cs
+3
-3
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+8
-8
performance/Performance.Services/SecondAllotService.cs
+29
-1
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
e9c758d0
...
...
@@ -363,5 +363,18 @@ public ApiResponse SecondPrint(int secondid)
var
result
=
secondAllotService
.
Print
(
secondid
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
/// <summary>
/// 科主任/护士长绩效发布
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/deptcompute/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
SecondPerforResponse
>>
DeptComputeDetail
(
int
allotId
)
{
var
userId
=
claimService
.
GetUserId
();
var
data
=
secondAllotService
.
DeptComputeDetail
(
userId
,
allotId
);
return
new
ApiResponse
<
List
<
SecondPerforResponse
>>(
ResponseType
.
OK
,
data
);
}
}
}
\ No newline at end of file
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
e9c758d0
...
...
@@ -1079,6 +1079,12 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SecondAllotController.DeptComputeDetail(System.Int32)"
>
<summary>
科主任/护士长绩效发布
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.SheetController.SheetList(Performance.DtoModels.SheetRequest)"
>
<summary>
sheet 列表
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
e9c758d0
...
...
@@ -2816,6 +2816,56 @@
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<summary>
是否归档
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.EmployeeName"
>
<summary>
人员姓名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.JobTitle"
>
<summary>
职务
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.JobNumber"
>
<summary>
人员工号
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.Efficiency"
>
<summary>
效率绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.Scale"
>
<summary>
规模绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.PostCoefficient"
>
<summary>
岗位系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.Grant"
>
<summary>
发放系数
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.ShouldGiveFee"
>
<summary>
应发管理绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.PerforSumFee"
>
<summary>
绩效合计
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondPerforResponse.ScoreAverageRate"
>
<summary>
考核对分率
</summary>
</member>
<member
name=
"P:Performance.DtoModels.HeadItem.IsBring"
>
<summary>
1 带出历史数据 2不带出
</summary>
</member>
...
...
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
e9c758d0
...
...
@@ -220,6 +220,9 @@ public AutoMapperConfigs()
.
ForMember
(
dest
=>
dest
.
PersonName
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Name
))
.
ForMember
(
dest
=>
dest
.
TitlePerfor
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
TitlePerformance
))
.
ReverseMap
();
CreateMap
<
res_compute
,
SecondPerforResponse
>()
.
ReverseMap
();
}
}
}
performance/Performance.DtoModels/Response/SecondPerforResponse.cs
0 → 100644
View file @
e9c758d0
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
SecondPerforResponse
{
/// <summary>
/// 人员姓名
/// </summary>
public
string
EmployeeName
{
get
;
set
;
}
/// <summary>
/// 职务
/// </summary>
public
string
JobTitle
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
JobNumber
{
get
;
set
;
}
/// <summary>
/// 效率绩效
/// </summary>
public
Nullable
<
decimal
>
Efficiency
{
get
;
set
;
}
/// <summary>
/// 规模绩效
/// </summary>
public
Nullable
<
decimal
>
Scale
{
get
;
set
;
}
/// <summary>
/// 岗位系数
/// </summary>
public
Nullable
<
decimal
>
PostCoefficient
{
get
;
set
;
}
/// <summary>
/// 发放系数
/// </summary>
public
Nullable
<
decimal
>
Grant
{
get
;
set
;
}
/// <summary>
/// 应发管理绩效
/// </summary>
public
Nullable
<
decimal
>
ShouldGiveFee
{
get
;
set
;
}
/// <summary>
/// 绩效合计
/// </summary>
public
Nullable
<
decimal
>
PerforSumFee
{
get
;
set
;
}
/// <summary>
/// 考核对分率
/// </summary>
public
Nullable
<
decimal
>
ScoreAverageRate
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/res_compute.cs
View file @
e9c758d0
...
...
@@ -30,7 +30,12 @@ public class res_compute
/// sheet页id
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
/// <summary>
/// 核算单元分类
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
/// 核算单元类型(医技科室、临床科室等)
/// </summary>
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
e9c758d0
...
...
@@ -269,8 +269,8 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
var
pairs
=
new
[]
{
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
,
UnitType
.
其他医技组
,
UnitType
.
其他医生组
,
UnitType
.
其他护理组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
}
},
new
{
Name
=
"医生组临床科室单元核算表"
,
Data
=
doctorWorkloadData
,
SheetType
=
SheetType
.
ComputeDoctorAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
医生组
,
UnitType
.
医技组
,
UnitType
.
专家组
,
UnitType
.
其他医技组
,
UnitType
.
其他医生组
}
},
new
{
Name
=
"护理组临床科室单元核算表"
,
Data
=
nurseWorkloadData
,
SheetType
=
SheetType
.
ComputeNurseAccount
,
UnitTypes
=
new
List
<
UnitType
>
{
UnitType
.
护理组
,
UnitType
.
其他护理组
}
},
};
List
<
PerSheet
>
result
=
new
List
<
PerSheet
>();
foreach
(
var
info
in
pairs
)
...
...
@@ -318,8 +318,8 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, List<res_
dept
.
Income
=
econDoctor
?.
CellValue
??
0
;
dept
.
WorkloadFee
=
dept
.
WorkSlopeFactor
*
(
workDoctor
?.
CellValue
??
0
);
dept
.
PerforFee
=
dept
.
Income
*
(
dept
.
BasicFactor
+
dept
.
SlopeFactor
);
dept
.
PerforTotal
=
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
);
dept
.
RealGiveFee
=
(
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
;
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
OtherPerfor1
+
(
dept
.
MinimumFee
??
0
))
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
(((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
OtherPerfor2
)
*
dept
.
AdjustFactor
)
??
0
)
;
dept
.
Avg
=
dept
.
ManagerNumber
+
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
(
dept
.
ManagerNumber
+
dept
.
Number
);
}
...
...
performance/Performance.Services/ComputeService.cs
View file @
e9c758d0
...
...
@@ -100,59 +100,73 @@ public List<ResComputeResponse> GetCompute(int allotId, int type)
if
(
pairs
.
Keys
.
Any
(
t
=>
t
==
type
))
{
#
region
MyRegion
//var employees = _perforImemployeeclinicRepository.GetEntities(t => t.AllotID == allotId && pairs[type].Contains(t.UnitType));
//if (employees == null || !employees.Any()) return new List<ResComputeResponse>();
//string[] accountunittype = new string[] { AccountUnitType.行政中层.ToString(), AccountUnitType.行政工勤.ToString(), AccountUnitType.行政高层.ToString() };
//var computes = _perforRescomputeRepository.GetEntities(t => t.AllotID == allotId && !accountunittype.Contains(t.AccountType));
//if (computes == null || !computes.Any()) return new List<ResComputeResponse>();
//var joinData = employees.Join(computes, outer => new { outer.AccountingUnit, EmployeeName = outer.DoctorName },
// inner => new { inner.AccountingUnit, inner.EmployeeName }, (outer, inner) => inner).ToList();
//if (joinData == null || !joinData.Any()) return new List<ResComputeResponse>();
//if (type != (int)AccountUnitType.Null)
//{
// var accountUnit = computes.Where(t => t.AccountType == ((AccountUnitType)type).ToString() && joinData.Select(join => join.EmployeeName).Contains(t.EmployeeName));
// if (accountUnit != null && accountUnit.Any())
// {
// accountUnit.ToList().ForEach(t =>
// {
// var compute = joinData.First(join => join.EmployeeName == t.EmployeeName);
// if (compute.AccountingUnit != t.AccountingUnit && !joinData.Any(w => w.EmployeeName == t.EmployeeName && w.AccountingUnit == t.AccountingUnit))
// joinData.Add(t);
// });
// }
//}
//else
//{
// var accountUnit = computes.Where(t => joinData.Select(join => join.EmployeeName).Contains(t.EmployeeName));
// if (accountUnit != null && accountUnit.Any())
// {
// var delData = new List<res_compute>();
// foreach (var item in joinData)
// {
// accountUnit.Where(join => join.EmployeeName == item.EmployeeName).ToList().ForEach(t =>
// {
// if (item.AccountType == t.AccountType && item.AccountingUnit != t.AccountingUnit)
// delData.Add(item);
// });
// }
// if (delData.Count > 0)
// joinData.RemoveAll(t => delData.Select(d => d.ID).Contains(t.ID));
// }
//}
//if (joinData == null || !joinData.Any()) return new List<ResComputeResponse>();
//data = Mapper.Map<List<ResComputeResponse>>(joinData);
#
endregion
var
employees
=
_perforImemployeeclinicRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
pairs
[
type
].
Contains
(
t
.
UnitType
));
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
ResComputeResponse
>();
string
[]
accountunittype
=
new
string
[]
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政工勤
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
};
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
!
accountunittype
.
Contains
(
t
.
AccountType
));
var
computes
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
pairs
[
type
].
Contains
(
t
.
UnitType
));
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
ResComputeResponse
>();
var
joinData
=
employees
.
Join
(
computes
,
outer
=>
new
{
outer
.
AccountingUnit
,
EmployeeName
=
outer
.
DoctorName
},
inner
=>
new
{
inner
.
AccountingUnit
,
inner
.
EmployeeName
},
(
outer
,
inner
)
=>
inner
).
ToList
();
if
(
joinData
==
null
||
!
joinData
.
Any
())
return
new
List
<
ResComputeResponse
>();
if
(
type
!=
(
int
)
AccountUnitType
.
Null
)
{
var
accountUnit
=
computes
.
Where
(
t
=>
t
.
AccountType
==
((
AccountUnitType
)
type
).
ToString
()
&&
joinData
.
Select
(
join
=>
join
.
EmployeeName
).
Contains
(
t
.
EmployeeName
));
if
(
accountUnit
!=
null
&&
accountUnit
.
Any
())
{
accountUnit
.
ToList
().
ForEach
(
t
=>
{
var
compute
=
joinData
.
First
(
join
=>
join
.
EmployeeName
==
t
.
EmployeeName
);
if
(
compute
.
AccountingUnit
!=
t
.
AccountingUnit
&&
!
joinData
.
Any
(
w
=>
w
.
EmployeeName
==
t
.
EmployeeName
&&
w
.
AccountingUnit
==
t
.
AccountingUnit
))
joinData
.
Add
(
t
);
});
}
}
else
{
var
accountUnit
=
computes
.
Where
(
t
=>
joinData
.
Select
(
join
=>
join
.
EmployeeName
).
Contains
(
t
.
EmployeeName
));
if
(
accountUnit
!=
null
&&
accountUnit
.
Any
())
{
var
delData
=
new
List
<
res_compute
>();
foreach
(
var
item
in
joinData
)
{
accountUnit
.
Where
(
join
=>
join
.
EmployeeName
==
item
.
EmployeeName
).
ToList
().
ForEach
(
t
=>
{
if
(
item
.
AccountType
==
t
.
AccountType
&&
item
.
AccountingUnit
!=
t
.
AccountingUnit
)
delData
.
Add
(
item
);
});
}
if
(
delData
.
Count
>
0
)
joinData
.
RemoveAll
(
t
=>
delData
.
Select
(
d
=>
d
.
ID
).
Contains
(
t
.
ID
));
}
}
if
(
joinData
==
null
||
!
joinData
.
Any
())
return
new
List
<
ResComputeResponse
>();
data
=
Mapper
.
Map
<
List
<
ResComputeResponse
>>(
computes
);
data
=
Mapper
.
Map
<
List
<
ResComputeResponse
>>(
joinData
);
data
.
ForEach
(
t
=>
{
t
.
WorkTime
=
string
.
IsNullOrEmpty
(
t
.
WorkTime
)
?
null
:
Convert
.
ToDateTime
(
t
.
WorkTime
).
ToString
(
"yyyy-MM-dd"
);
if
(
isShowManage
==
2
)
{
t
.
PerforSumFee
=
t
.
ShouldGiveFee
;
var
employee
=
employees
.
FirstOrDefault
(
e
=>
e
.
DoctorName
==
t
.
EmployeeName
&&
e
.
AccountingUnit
==
t
.
AccountingUnit
);
var
employee
=
employees
.
FirstOrDefault
(
e
=>
e
.
DoctorName
==
t
.
EmployeeName
&&
e
.
AccountingUnit
==
t
.
AccountingUnit
&&
pairs
[
type
].
Contains
(
e
.
UnitType
)
);
var
scoreAverageRate
=
t
.
ScoreAverageRate
??
employee
.
ScoreAverageRate
??
0
;
var
attendance
=
t
.
Attendance
??
employee
.
Attendance
??
0
;
t
.
GiveFee
=
t
.
ShouldGiveFee
*
scoreAverageRate
*
attendance
+
t
.
OtherPerfor
;
...
...
performance/Performance.Services/DFExtractService.cs
View file @
e9c758d0
...
...
@@ -397,7 +397,7 @@ public string AlllotExecute(string email, sys_hospital hospital, List<sys_hospit
WriteOtherIncome
(
sheet
,
sheetRead
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
Income
:
ClearData
(
sheet
,
5
,
7
,
true
);
ClearData
(
sheet
,
5
,
3
,
true
);
WriteIncome
(
sheet
,
sheetRead
,
modules
,
items
,
extracts
,
false
);
break
;
case
SheetType
.
Expend
:
...
...
@@ -1303,7 +1303,7 @@ private void WriteSheetData(ISheet sheet, IPerSheetDataRead sheetRead, List<NewE
var
head
=
GetOrCreate
(
sheet
,
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
);
var
rowIndex
=
sheetRead
.
Point
.
HeaderFirstRowNum
.
Value
+
1
;
if
(!
isNewTemp
)
if
(!
isNewTemp
&&
!
isIncom
)
{
#
region
给历史模板已有科室补充数据
for
(
int
i
=
rowIndex
;
i
<
sheet
.
LastRowNum
+
1
;
i
++)
...
...
@@ -1347,7 +1347,7 @@ private void WriteSheetData(ISheet sheet, IPerSheetDataRead sheetRead, List<NewE
if
(
allExtract
==
null
||
!
allExtract
.
Any
())
return
;
#
region
补充新的科室及数据
var
lastrowIndex
=
isNewTemp
?
rowIndex
:
sheet
.
LastRowNum
+
1
;
var
lastrowIndex
=
(
isNewTemp
||
isIncom
)
?
rowIndex
:
sheet
.
LastRowNum
+
1
;
foreach
(
var
department
in
allExtract
.
Select
(
t
=>
t
.
Department
).
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
)).
Distinct
())
{
var
row
=
sheet
.
CreateRow
(
lastrowIndex
);
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
e9c758d0
...
...
@@ -388,15 +388,15 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
Attendance
=
empolyee
.
Attendance
};
//应发管理绩效
compute
.
ShouldGiveFee
=
(
compute
.
Efficiency
+
compute
.
Scale
)
*
(
compute
.
Grant
??
0
);
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
(
compute
.
Grant
??
0
)
??
0
);
//绩效合计
compute
.
PerforSumFee
=
(
compute
.
Avg
*
(
empolyee
.
Basics
??
0
))
+
compute
.
ShouldGiveFee
;
compute
.
PerforSumFee
=
Math
.
Round
((
compute
.
Avg
*
(
empolyee
.
Basics
??
0
))
+
compute
.
ShouldGiveFee
??
0
)
;
//应发绩效
//compute.GiveFee = compute.PerforSumFee;
compute
.
GiveFee
=
compute
.
PerforSumFee
*
compute
.
ScoreAverageRate
*
(
compute
.
Attendance
??
0
)
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforSumFee
*
compute
.
ScoreAverageRate
*
(
compute
.
Attendance
??
0
)
+
(
compute
.
Punishment
??
0
)
+
(
compute
.
OtherPerfor
??
0
)
??
0
);
//实发绩效
//compute.RealGiveFee = (compute.GiveFee * compute.ScoreAverageRate * (compute.Attendance ?? 0) + (compute.Punishment ?? 0) + (compute.OtherPerfor ?? 0)) * (compute.Adjust ?? 1m);
compute
.
RealGiveFee
=
compute
.
GiveFee
*
(
compute
.
Adjust
??
1
m
);
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
(
compute
.
Adjust
??
1
m
)
??
0
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
...
...
@@ -465,12 +465,12 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
}
}
//添加参数计算
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
==
null
||
item
.
FitPeopleRatio
==
0
?
1
:
item
.
FitPeopleRatio
);
compute
.
BaiscNormValue
=
baiscnorm
*
(
item
.
FitPeopleRatio
??
0
);
//应发绩效
compute
.
GiveFee
=
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
(
compute
.
WorkYear
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
+
(
compute
.
OtherPerfor
??
0
)
+
(
compute
.
Punishment
??
0
);
compute
.
GiveFee
=
Math
.
Round
((
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
(
compute
.
WorkYear
??
1
)
*
compute
.
Attendance
*
compute
.
ScoreAverageRate
+
(
compute
.
OtherPerfor
??
0
)
+
(
compute
.
Punishment
??
0
)
)
??
0
)
;
//实发绩效
compute
.
RealGiveFee
=
compute
.
GiveFee
*
(
itemAdjust
??
1
);
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
(
itemAdjust
??
1
))
??
0
);
computeList
.
Add
(
compute
);
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
e9c758d0
...
...
@@ -35,6 +35,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforRoleRepository
roleRepository
;
private
readonly
PerforResspecialunitRepository
resspecialunitRepository
;
private
readonly
PersonService
personService
;
private
readonly
PerforRescomputeRepository
rescomputeRepository
;
private
readonly
List
<
ag_tempitem
>
tempitems
=
new
List
<
ag_tempitem
>();
public
SecondAllotService
(
IOptions
<
Application
>
application
,
...
...
@@ -55,7 +56,8 @@ public class SecondAllotService : IAutoInjection
PerforAgworkloadtypeRepository
perforAgworkloadtypeRepository
,
PerforRoleRepository
roleRepository
,
PerforResspecialunitRepository
resspecialunitRepository
,
PersonService
personService
)
PersonService
personService
,
PerforRescomputeRepository
rescomputeRepository
)
{
this
.
application
=
application
.
Value
;
this
.
perforUserRepository
=
perforUserRepository
;
...
...
@@ -76,6 +78,7 @@ public class SecondAllotService : IAutoInjection
this
.
roleRepository
=
roleRepository
;
this
.
resspecialunitRepository
=
resspecialunitRepository
;
this
.
personService
=
personService
;
this
.
rescomputeRepository
=
rescomputeRepository
;
this
.
tempitems
=
perforAgtempitemRepository
.
GetEntities
();
}
...
...
@@ -1372,6 +1375,7 @@ public List<ag_othersource> OtherSave(int secondId, List<ag_othersource> request
}
#
endregion
#
region
打印
public
List
<
SecPrintResponse
>
Print
(
int
secondId
)
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
...
...
@@ -1424,5 +1428,29 @@ public List<SecPrintResponse> Print(int secondId)
return
result
.
OrderBy
(
t
=>
t
.
RowNumber
).
ToList
();
}
}
#
endregion
public
List
<
SecondPerforResponse
>
DeptComputeDetail
(
int
userId
,
int
allotId
)
{
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
if
(
user
==
null
)
throw
new
NotImplementedException
(
"人员ID无效"
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
Dictionary
<
int
,
string
>
dict
=
new
Dictionary
<
int
,
string
>
{
{
application
.
DirectorRole
,
AccountUnitType
.
科主任
.
ToString
()
},
{
application
.
NurseRole
,
AccountUnitType
.
护士长
.
ToString
()
},
};
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
]);
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecondPerforResponse
>();
return
Mapper
.
Map
<
List
<
SecondPerforResponse
>>(
data
);
}
}
}
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