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
7e47f334
Commit
7e47f334
authored
Feb 19, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge' into v2020morge-graphql
parents
d9c5858d
cfddeca9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
34 deletions
+114
-34
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+21
-6
performance/Performance.DtoModels/Response/DeptResponse.cs
+20
-3
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+1
-1
performance/Performance.Services/ComputeService.cs
+70
-22
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
+2
-2
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
7e47f334
...
@@ -2880,19 +2880,19 @@
...
@@ -2880,19 +2880,19 @@
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.ID"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.ID"
>
<summary>
<summary>
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AllotID"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.AllotID"
>
<summary>
<summary>
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.SheetID"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.SheetID"
>
<summary>
<summary>
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.UnitName"
>
<member
name=
"P:Performance.DtoModels.DeptResponse.UnitName"
>
<summary>
<summary>
...
@@ -3034,6 +3034,21 @@
...
@@ -3034,6 +3034,21 @@
调节后其他绩效
调节后其他绩效
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AssessLaterPerforTotal"
>
<summary>
考核后绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AssessLaterManagementFee"
>
<summary>
考核后管理绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DeptResponse.AprPerforAmount"
>
<summary>
其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.DirectorResponse.TypeName"
>
<member
name=
"P:Performance.DtoModels.DirectorResponse.TypeName"
>
<summary>
<summary>
绩效类型
绩效类型
...
...
performance/Performance.DtoModels/Response/DeptResponse.cs
View file @
7e47f334
...
@@ -7,17 +7,17 @@ namespace Performance.DtoModels
...
@@ -7,17 +7,17 @@ namespace Performance.DtoModels
public
class
DeptResponse
public
class
DeptResponse
{
{
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
public
Nullable
<
int
>
SheetID
{
get
;
set
;
}
...
@@ -152,13 +152,30 @@ public class DeptResponse
...
@@ -152,13 +152,30 @@ public class DeptResponse
/// 考核前其他绩效
/// 考核前其他绩效
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
AssessBeforeOtherFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
AssessBeforeOtherFee
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 考核后其他绩效
/// 考核后其他绩效
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
AssessLaterOtherFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
AssessLaterOtherFee
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 调节后其他绩效
/// 调节后其他绩效
/// </summary>
/// </summary>
public
Nullable
<
decimal
>
AdjustLaterOtherFee
{
get
;
set
;
}
public
Nullable
<
decimal
>
AdjustLaterOtherFee
{
get
;
set
;
}
/// <summary>
/// 考核后绩效
/// </summary>
public
Nullable
<
decimal
>
AssessLaterPerforTotal
{
get
;
set
;
}
/// <summary>
/// 考核后管理绩效
/// </summary>
public
Nullable
<
decimal
>
AssessLaterManagementFee
{
get
;
set
;
}
/// <summary>
/// 其他绩效
/// </summary>
public
Nullable
<
decimal
>
AprPerforAmount
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
7e47f334
...
@@ -248,7 +248,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
...
@@ -248,7 +248,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
JobTitle
=
empolyee
.
JobTitle
,
JobTitle
=
empolyee
.
JobTitle
,
JobNumber
=
empolyee
.
JobNumber
,
JobNumber
=
empolyee
.
JobNumber
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
ScoreAverageRate
=
empolyee
.
ScoreAverageRate
,
Punishment
=
0
,
Punishment
=
empolyee
.
Punishment
??
0
,
//OtherPerfor = empolyee.OtherPerfor,
//OtherPerfor = empolyee.OtherPerfor,
OtherManagePerfor
=
empolyee
?.
OtherManagePerfor
??
0
,
OtherManagePerfor
=
empolyee
?.
OtherManagePerfor
??
0
,
Number
=
group
.
Number
,
Number
=
group
.
Number
,
...
...
performance/Performance.Services/ComputeService.cs
View file @
7e47f334
...
@@ -316,36 +316,84 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
...
@@ -316,36 +316,84 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
result
.
ForEach
(
t
=>
result
.
ForEach
(
t
=>
{
{
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
();
t
.
UnitName
=
((
UnitType
)
t
.
UnitType
).
ToString
();
t
.
ScoringPerfor
=
t
.
PerforFee
*
(
t
.
ScoringAverage
??
0
);
t
.
AssessLaterPerforTotal
=
Math
.
Round
((
t
.
PerforTotal
*
t
.
ScoringAverage
+
t
.
MedicineExtra
+
t
.
MaterialsExtra
+
t
.
Extra
+
t
.
AssessLaterOtherFee
)
??
0
);
});
});
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
}
}
var
accountType
=
new
List
<
AccountUnitType
>
{
AccountUnitType
.
行政高层
,
AccountUnitType
.
行政中层
,
AccountUnitType
.
行政工勤
};
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
accountType
.
Select
(
a
=>
a
.
ToString
()).
Contains
(
t
.
AccountType
));
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
List
<
DeptResponse
>
adminPerfor
=
list
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
})
var
isShowManage
=
IsShowManage
(
allotId
);
.
Select
(
t
=>
new
DeptResponse
{
Dictionary
<
string
,
string
>
dict
=
new
Dictionary
<
string
,
string
>
UnitName
=
t
.
Key
.
AccountType
,
{
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
{
"科主任"
,
"医生组"
},
Department
=
t
.
Key
.
AccountingUnit
,
{
"护士长"
,
"护理组"
},
Number
=
t
.
Count
(),
{
AccountUnitType
.
行政高层
.
ToString
(),
AccountUnitType
.
行政高层
.
ToString
()
},
//Extra = t.FirstOrDefault(group => group.Punishment > 0)?.Punishment, // 医院奖罚
{
AccountUnitType
.
行政中层
.
ToString
(),
AccountUnitType
.
行政中层
.
ToString
()
},
//ScoringAverage = t.FirstOrDefault(group => group.ScoreAverageRate > 0)?.ScoreAverageRate, //考核得分率
{
AccountUnitType
.
行政工勤
.
ToString
(),
AccountUnitType
.
行政工勤
.
ToString
()
}
//AdjustFactor = t.FirstOrDefault(group => group.Adjust > 0)?.Adjust, //调节系数
};
//WorkloadFee = t.Sum(group => group.Workload), //工作量绩效
//PerforTotal = t.Sum(group => group.RealGiveFee), //绩效合计
List
<
DeptResponse
>
adminPerfor
=
list
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
AccountType
}).
Select
(
t
=>
//ScoringPerfor = t.Sum(group => group.RealGiveFee) * (t.FirstOrDefault(group => group.ScoreAverageRate > 0)?.ScoreAverageRate ?? 0),
{
Avg
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
/
t
.
Count
(),
//人均绩效
string
unitName
=
result
.
Where
(
w
=>
!
dict
.
Values
.
Contains
(
w
.
UnitName
)).
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
)?.
UnitName
??
""
;
OtherPerfor1
=
t
.
Sum
(
group
=>
group
.
OtherPerfor
),
return
new
DeptResponse
RealGiveFee
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
+
t
.
Sum
(
group
=>
group
.
OtherPerfor
),
//实发绩效
{
}).
ToList
();
UnitName
=
!
dict
.
Values
.
Contains
(
unitName
)
&&
!
string
.
IsNullOrEmpty
(
unitName
)
?
unitName
:
dict
.
ContainsKey
(
t
.
Key
.
AccountType
)
?
dict
[
t
.
Key
.
AccountType
]
:
"未知"
,
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
adminPerfor
=
adminPerfor
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
).
Value
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
Department
=
t
.
Key
.
AccountingUnit
,
Number
=
t
.
Count
(),
// OtherPerfor1 = t.Sum(group => group.OtherPerfor),
AssessLaterManagementFee
=
isShowManage
==
1
?
t
.
Sum
(
group
=>
group
.
RealGiveFee
??
0
)
+
t
.
Sum
(
group
=>
group
.
OtherPerfor
??
0
)
//实发绩效
:
Math
.
Round
((
t
.
Max
(
m
=>
m
.
ShouldGiveFee
)
*
t
.
Max
(
m
=>
m
.
ScoreAverageRate
)
*
t
.
Max
(
m
=>
m
.
Attendance
)
??
0.0
M
)
+
t
.
Max
(
m
=>
m
.
Punishment
??
0.0
M
))
//考核后管理绩效
};
}).
ToList
();
result
.
AddRange
(
adminPerfor
);
result
.
AddRange
(
adminPerfor
);
var
aprAmounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Status
==
3
)
??
new
List
<
per_apr_amount
>();
var
employees
=
perforPeremployeeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
)
??
new
List
<
per_employee
>();
var
otherPerformances
=
aprAmounts
.
Join
(
employees
,
outer
=>
new
{
outer
.
AccountingUnit
,
outer
.
PersonnelNumber
},
inner
=>
new
{
inner
.
AccountingUnit
,
inner
.
PersonnelNumber
},
(
outer
,
inner
)
=>
new
{
AccountingUnit
=
outer
.
AccountingUnit
,
UnitType
=
inner
.
UnitType
,
PersonnelNumber
=
outer
.
PersonnelNumber
,
PersonnelName
=
inner
.
DoctorName
,
Amount
=
outer
.
Amount
})?.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitType
}).
Select
(
t
=>
new
{
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
UnitType
=
t
.
Key
.
UnitType
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
)
});
result
=
result
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
UnitName
}).
Select
(
t
=>
new
DeptResponse
{
UnitName
=
t
.
Key
.
UnitName
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Department
=
t
.
Key
.
AccountingUnit
,
PerforFee
=
t
.
Sum
(
group
=>
group
.
PerforFee
),
WorkloadFee
=
t
.
Sum
(
group
=>
group
.
WorkloadFee
),
AssessBeforeOtherFee
=
t
.
Sum
(
group
=>
group
.
AssessBeforeOtherFee
),
ScoringAverage
=
t
.
Sum
(
group
=>
group
.
ScoringAverage
),
MedicineExtra
=
t
.
Sum
(
group
=>
group
.
MedicineExtra
),
Extra
=
t
.
Sum
(
group
=>
group
.
Extra
),
AssessLaterOtherFee
=
t
.
Sum
(
group
=>
group
.
AssessLaterOtherFee
),
AdjustFactor
=
t
.
Sum
(
group
=>
group
.
AdjustFactor
),
AdjustLaterOtherFee
=
t
.
Sum
(
group
=>
group
.
AdjustLaterOtherFee
),
PerforTotal
=
t
.
Sum
(
group
=>
group
.
PerforTotal
),
AssessLaterPerforTotal
=
t
.
Sum
(
group
=>
group
.
AssessLaterPerforTotal
),
AssessLaterManagementFee
=
t
.
Sum
(
group
=>
group
.
AssessLaterManagementFee
),
AprPerforAmount
=
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
,
RealGiveFee
=
t
.
Sum
(
group
=>
group
.
RealGiveFee
)
+
t
.
Sum
(
group
=>
group
.
AssessLaterManagementFee
)
+
(
otherPerformances
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
Key
.
AccountingUnit
&&
w
.
UnitType
==
t
.
Key
.
UnitName
)?.
Amount
??
0
),
}).
ToList
();
var
enumItems
=
EnumHelper
.
GetItems
<
AccountUnitType
>();
result
=
result
.
OrderBy
(
t
=>
enumItems
.
FirstOrDefault
(
e
=>
e
.
Name
==
t
.
UnitName
)?.
Value
)
/*.ThenBy(t => t.AccountingUnit)*/
.
ToList
();
return
result
;
return
result
;
}
}
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadPersonExtra.cs
View file @
7e47f334
...
@@ -19,6 +19,7 @@ public class PerSheetDataReadPersonExtra : IPerSheetDataRead
...
@@ -19,6 +19,7 @@ public class PerSheetDataReadPersonExtra : IPerSheetDataRead
HeaderLastRowNum
=
1
,
HeaderLastRowNum
=
1
,
HeaderFirstCellNum
=
0
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
2
,
DataFirstRowNum
=
2
,
DataFirstCellNum
=
4
,
TotalCellNum
=
0
,
TotalCellNum
=
0
,
AccountingUnit
=
new
List
<
AccountingUnit
>
AccountingUnit
=
new
List
<
AccountingUnit
>
{
{
...
@@ -45,7 +46,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -45,7 +46,7 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
var
row
=
sheet
.
GetRow
(
r
);
var
row
=
sheet
.
GetRow
(
r
);
if
(
row
==
null
)
continue
;
if
(
row
==
null
)
continue
;
for
(
int
c
=
0
;
c
<
vhead
.
Count
();
c
++)
for
(
int
c
=
Point
.
DataFirstCellNum
.
Value
;
c
<
vhead
.
Count
();
c
++)
{
{
var
athead
=
vhead
.
ElementAt
(
c
);
var
athead
=
vhead
.
ElementAt
(
c
);
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
//var cellValue = NopiSevice.GetCellValue(row.GetCell(athead.PointCell));
...
@@ -74,7 +75,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
...
@@ -74,7 +75,6 @@ public List<IPerData> ReadData(ISheet sheet, List<PerHeader> perHeader)
if
(
unit
.
JobCellNum
.
HasValue
)
if
(
unit
.
JobCellNum
.
HasValue
)
data
.
JobNumber
=
row
.
GetCell
(
unit
.
JobCellNum
.
Value
).
GetValue
();
data
.
JobNumber
=
row
.
GetCell
(
unit
.
JobCellNum
.
Value
).
GetValue
();
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
if
(
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
string
.
IsNullOrEmpty
(
data
.
Department
))
continue
;
continue
;
dataList
.
Add
(
data
);
dataList
.
Add
(
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