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
14107b79
Commit
14107b79
authored
Mar 12, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v20201230yubei' into v2020morge
parents
a915da7e
5bee29a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
27 deletions
+45
-27
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+28
-10
performance/Performance.Services/ComputeService.cs
+16
-16
performance/Performance.Services/PerExcelService/NopiSevice.cs
+1
-1
No files found.
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
14107b79
...
@@ -375,28 +375,46 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
...
@@ -375,28 +375,46 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
//var materialsExtra = materialsExtras.FirstOrDefault(w => w.UnitType == account.AccountType.ToString() && w.AccountingUnit == resAccount.AccountingUnit)?.TotelValue;
//var materialsExtra = materialsExtras.FirstOrDefault(w => w.UnitType == account.AccountType.ToString() && w.AccountingUnit == resAccount.AccountingUnit)?.TotelValue;
var
dept
=
new
PerDataAccountBaisc
();
var
dept
=
new
PerDataAccountBaisc
();
//dept.ManagerNumber = resAccount?.ManagerNumber ?? 0;
dept
.
Number
=
empolyees
.
Count
();
dept
.
Number
=
empolyees
.
Count
();
dept
.
AccountingUnit
=
account
.
AccountingUnit
;
dept
.
AccountingUnit
=
account
.
AccountingUnit
;
dept
.
UnitType
=
account
.
AccountType
;
dept
.
UnitType
=
account
.
AccountType
;
dept
.
ScoringAverage
=
resAccount
?.
ScoringAverage
==
null
?
0
:
resAccount
.
ScoringAverage
;
dept
.
AdjustFactor
=
(
isBudget
?
adjust
:
resAccount
?.
AdjustFactor
)
??
1
;
dept
.
Income
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
dept
.
Income
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
dept
.
NeedSecondAllot
=
empolyees
.
Any
(
w
=>
w
.
NeedSecondAllot
==
"是"
)
?
"是"
:
"否"
;
dept
.
NeedSecondAllot
=
empolyees
.
Any
(
w
=>
w
.
NeedSecondAllot
==
"是"
)
?
"是"
:
"否"
;
if
(
resAccount
?.
UnitType
==
UnitType
.
行政后勤
.
ToString
()
&&
resAccount
?.
NeedSecondAllot
==
"是"
)
{
dept
.
ScoringAverage
=
resAccount
?.
ScoringAverage
==
null
?
0
:
resAccount
.
ScoringAverage
;
dept
.
AdjustFactor
=
(
isBudget
?
adjust
:
resAccount
?.
AdjustFactor
)
??
1
;
dept
.
Extra
=
resAccount
?.
Extra
??
0
;
dept
.
MedicineExtra
=
resAccount
?.
MedicineExtra
??
0
;
// (drugExtra ?? 0);
dept
.
MaterialsExtra
=
resAccount
?.
MaterialsExtra
??
0
;
//(materialsExtra ?? 0);
dept
.
AssessBeforeOtherFee
=
resAccount
?.
AssessBeforeOtherFee
??
0
;
dept
.
AssessLaterOtherFee
=
resAccount
?.
AssessLaterOtherFee
??
0
;
// 行政后勤 没有 调节后其他绩效
//dept.AdjustLaterOtherFee = resAccount?.AdjustLaterOtherFee ?? 0;
}
else
{
dept
.
ScoringAverage
=
1
;
dept
.
AdjustFactor
=
1
;
dept
.
Extra
=
empolyees
?.
Sum
(
w
=>
w
.
Punishment
)
??
0
;
dept
.
MedicineExtra
=
0
;
// (drugExtra ?? 0);
dept
.
MaterialsExtra
=
0
;
//(materialsExtra ?? 0);
dept
.
AssessBeforeOtherFee
=
empolyees
?.
Sum
(
w
=>
w
.
AssessBeforeOtherFee
)
??
0
;
dept
.
AssessLaterOtherFee
=
empolyees
?.
Sum
(
w
=>
w
.
AssessLaterOtherFee
)
??
0
;
dept
.
AdjustLaterOtherFee
=
empolyees
?.
Sum
(
w
=>
w
.
AdjustLaterOtherFee
)
??
0
;
}
//dept.Extra = (extra ?? 0);
//dept.Extra = (extra ?? 0);
//dept.MedicineExtra = 0;// (drugExtra ?? 0);
//dept.MedicineExtra = 0;// (drugExtra ?? 0);
//dept.MaterialsExtra = 0;//(materialsExtra ?? 0);
//dept.MaterialsExtra = 0;//(materialsExtra ?? 0);
dept
.
Extra
=
resAccount
?.
Extra
??
0
;
dept
.
MedicineExtra
=
resAccount
?.
MedicineExtra
??
0
;
// (drugExtra ?? 0);
dept
.
MaterialsExtra
=
resAccount
?.
MaterialsExtra
??
0
;
//(materialsExtra ?? 0);
dept
.
AssessBeforeOtherFee
=
resAccount
?.
AssessBeforeOtherFee
??
0
;
dept
.
AssessLaterOtherFee
=
resAccount
?.
AssessLaterOtherFee
??
0
;
dept
.
AdjustLaterOtherFee
=
resAccount
?.
AdjustLaterOtherFee
??
0
;
dept
.
PerforFee
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
dept
.
PerforFee
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
dept
.
PerforTotal
=
Math
.
Round
(
empolyees
.
Sum
(
w
=>
w
.
GiveFee
??
0
));
dept
.
PerforTotal
=
Math
.
Round
(
empolyees
.
Sum
(
w
=>
w
.
GiveFee
??
0
));
dept
.
RealGiveFee
=
Math
.
Round
(((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
)
*
dept
.
AdjustFactor
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
(((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
)
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
dept
.
Avg
=
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
dept
.
Number
;
dept
.
Avg
=
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
dept
.
Number
;
...
...
performance/Performance.Services/ComputeService.cs
View file @
14107b79
...
@@ -319,7 +319,8 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
...
@@ -319,7 +319,8 @@ public List<DeptResponse> GetOfficePerformance(int allotId)
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
public
List
<
DeptResponse
>
GetAdminPerformance
(
int
allotId
)
{
{
var
result
=
new
List
<
DeptResponse
>();
var
result
=
new
List
<
DeptResponse
>();
//var types = new[] { (int)UnitType.行政高层, (int)UnitType.行政中层 };
//var resData = perforResaccountRepository.GetEntities(t => t.AllotID == allotId && !types.Contains(t.UnitType ?? 0));
var
resData
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
resData
=
perforResaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
resData
!=
null
&&
resData
.
Any
())
if
(
resData
!=
null
&&
resData
.
Any
())
{
{
...
@@ -327,11 +328,10 @@ public List<DeptResponse> GetAdminPerformance(int allotId)
...
@@ -327,11 +328,10 @@ 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
.
AssessLaterPerforTotal
=
Math
.
Round
((
t
.
PerforTotal
*
t
.
ScoringAverage
+
t
.
MedicineExtra
+
t
.
MaterialsExtra
+
t
.
Extra
+
t
.
AssessLaterOtherFee
)
??
0
);
t
.
AssessLaterPerforTotal
=
Math
.
Round
((
t
.
PerforTotal
*
t
.
ScoringAverage
+
(
t
.
MedicineExtra
??
0
)
+
(
t
.
MaterialsExtra
??
0
)
+
(
t
.
Extra
??
0
)
+
(
t
.
AssessLaterOtherFee
??
0
)
)
??
0
);
});
});
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
result
=
result
.
OrderBy
(
t
=>
t
.
UnitType
).
ThenBy
(
t
=>
t
.
AccountingUnit
).
ToList
();
}
}
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
list
=
_perforRescomputeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
if
(
list
==
null
||
!
list
.
Any
())
return
result
;
...
@@ -1455,12 +1455,12 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
...
@@ -1455,12 +1455,12 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
List
<
per_apr_amount
>
employees
)
public
List
<
Dictionary
<
string
,
string
>>
GetOtherPerStats
(
List
<
per_apr_amount
>
employees
)
{
{
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
var
others
=
new
List
<
Dictionary
<
string
,
string
>>();
if
(
employees
==
null
)
if
(
employees
==
null
)
return
others
;
return
others
;
var
perForType
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PerforType
).
Distinct
();
var
perForType
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PerforType
).
Distinct
();
var
doctorNum
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
().
ToList
();
var
doctorNum
=
employees
.
Where
(
c
=>
c
.
Status
==
3
).
Select
(
t
=>
t
.
PersonnelNumber
).
Distinct
().
ToList
();
if
(!
doctorNum
.
Any
())
if
(!
doctorNum
.
Any
())
return
others
;
return
others
;
...
@@ -1470,21 +1470,21 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
...
@@ -1470,21 +1470,21 @@ public res_baiscnorm EditHospitalAvg(ComputerAvgRequest request)
var
amount
=
employees
.
Find
(
t
=>
t
.
PersonnelNumber
==
num
);
var
amount
=
employees
.
Find
(
t
=>
t
.
PersonnelNumber
==
num
);
if
(
amount
==
null
)
if
(
amount
==
null
)
continue
;
continue
;
dicData
.
Add
(
"核算单元"
,
amount
?.
AccountingUnit
??
""
);
dicData
.
Add
(
"核算单元"
,
amount
?.
AccountingUnit
??
""
);
dicData
.
Add
(
"工号"
,
amount
?.
PersonnelNumber
??
""
);
dicData
.
Add
(
"工号"
,
amount
?.
PersonnelNumber
??
""
);
dicData
.
Add
(
"人员姓名"
,
amount
?.
DoctorName
??
""
);
dicData
.
Add
(
"人员姓名"
,
amount
?.
DoctorName
??
""
);
foreach
(
var
type
in
perForType
)
foreach
(
var
type
in
perForType
)
{
{
var
emp
=
employees
.
Where
(
t
=>
t
.
PerforType
==
type
&&
t
.
PersonnelNumber
==
num
)?.
ToList
();
var
emp
=
employees
.
Where
(
t
=>
t
.
PerforType
==
type
&&
t
.
PersonnelNumber
==
num
)?.
ToList
();
if
(!
emp
.
Any
())
if
(!
emp
.
Any
())
dicData
.
Add
(
type
,
"0"
);
dicData
.
Add
(
type
,
"0"
);
else
else
dicData
.
Add
(
type
,
Math
.
Round
(
Convert
.
ToDecimal
(
emp
?.
First
()?.
Amount
),
0
).
ToString
());
dicData
.
Add
(
type
,
Math
.
Round
(
Convert
.
ToDecimal
(
emp
?.
First
()?.
Amount
),
0
).
ToString
());
}
}
var
sum
=
employees
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
var
sum
=
employees
.
Where
(
c
=>
c
.
PersonnelNumber
==
num
)?.
Sum
(
t
=>
t
.
Amount
);
dicData
.
Add
(
"合计"
,
Math
.
Round
(
Convert
.
ToDecimal
(
sum
),
0
).
ToString
());
dicData
.
Add
(
"合计"
,
Math
.
Round
(
Convert
.
ToDecimal
(
sum
),
0
).
ToString
());
others
.
Add
(
dicData
);
others
.
Add
(
dicData
);
}
}
...
...
performance/Performance.Services/PerExcelService/NopiSevice.cs
View file @
14107b79
...
@@ -74,7 +74,7 @@ public static string GetValue(this ICell cell)
...
@@ -74,7 +74,7 @@ public static string GetValue(this ICell cell)
return
cell
?.
StringCellValue
.
ToString
();
return
cell
?.
StringCellValue
.
ToString
();
case
CellType
.
Formula
:
case
CellType
.
Formula
:
cell
?.
SetCellType
(
CellType
.
String
);
cell
?.
SetCellType
(
CellType
.
String
);
return
cell
?.
StringCellValue
.
ToString
();
return
cell
?.
StringCellValue
?
.
ToString
();
case
CellType
.
Boolean
:
case
CellType
.
Boolean
:
return
cell
?.
BooleanCellValue
.
ToString
();
return
cell
?.
BooleanCellValue
.
ToString
();
case
CellType
.
Unknown
:
case
CellType
.
Unknown
:
...
...
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