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
ae0981df
Commit
ae0981df
authored
Jul 28, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/审核
parents
6680b8fa
cf59fc2e
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
211 additions
and
82 deletions
+211
-82
performance/Performance.Api/Controllers/PersonController.cs
+17
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+8
-0
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+3
-1
performance/Performance.DtoModels/Response/ComputeResponse.cs
+0
-3
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
+5
-1
performance/Performance.Repository/PerforPerAllotRepository.cs
+18
-20
performance/Performance.Services/AllotCompute/ProcessComputService.cs
+4
-4
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+12
-12
performance/Performance.Services/ComputeService.cs
+1
-0
performance/Performance.Services/ConfigService.cs
+6
-3
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+20
-14
performance/Performance.Services/PersonService.cs
+70
-0
performance/Performance.Services/RedistributionService.cs
+22
-11
performance/Performance.Services/SecondAllotService.cs
+15
-9
performance/Performance.Services/SheetSevice.cs
+9
-3
performance/Performance.Services/UnitTypeUtil.cs
+1
-1
No files found.
performance/Performance.Api/Controllers/PersonController.cs
View file @
ae0981df
...
...
@@ -269,5 +269,22 @@ public ApiResponse SaveDeptHands(int hospitalId, SaveCollectData request)
personService
.
SaveDeptDicHands
(
hospitalId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 重新加载人员字典
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"peson/{hospitalId}/reloadPersonnel/{allotId}"
)]
public
ApiResponse
ReloadPersonnel
(
int
hospitalId
,
int
allotId
)
{
var
result
=
personService
.
ReloadPersonnel
(
hospitalId
,
allotId
);
if
(
result
)
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
else
return
new
ApiResponse
(
ResponseType
.
Error
,
result
);
}
}
}
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
ae0981df
...
...
@@ -1403,6 +1403,14 @@
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.PersonController.ReloadPersonnel(System.Int32,System.Int32)"
>
<summary>
重新加载人员字典
</summary>
<param
name=
"hospitalId"
></param>
<param
name=
"allotId"
></param>
<returns></returns>
</member>
<member
name=
"T:Performance.Api.Controllers.ReportController"
>
<summary>
报表
...
...
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
ae0981df
...
...
@@ -241,7 +241,9 @@ public AutoMapperConfigs()
CreateMap
<
cost_transfer
,
cost_transfer
>(
).
ForMember
(
back
=>
back
.
Id
,
n
=>
n
.
Ignore
());
CreateMap
<
ag_headsource
,
SecPrintHeaderResponse
>().
ReverseMap
();
CreateMap
<
ag_headsource
,
SecPrintHeaderResponse
>()
.
ForMember
(
dest
=>
dest
.
TheTotalAllocationOfPerformanceResults
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
TotalDeptReward
))
.
ReverseMap
();
}
}
}
performance/Performance.DtoModels/Response/ComputeResponse.cs
View file @
ae0981df
...
...
@@ -126,8 +126,5 @@ public ComputeResponse(string source, string accountingUnit, string employeeName
/// </summary>
public
string
TitlePosition
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
View file @
ae0981df
namespace
Performance.EntityModels
using
System
;
namespace
Performance.EntityModels
{
public
class
view_per_apr_amount
:
per_apr_amount
{
...
...
@@ -44,5 +46,7 @@ public view_per_total_amount(string unitType, string accountingUnit, string pers
/// 是否被使用 默认false
/// </summary>
public
bool
Use
{
get
;
set
;
}
public
DateTime
AuditTime
{
get
;
set
;
}
}
}
performance/Performance.Repository/PerforPerAllotRepository.cs
View file @
ae0981df
...
...
@@ -182,15 +182,12 @@ public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, stri
string
unittype
=
unittypes
.
Any
(
t
=>
!
string
.
IsNullOrEmpty
(
t
)
&&
t
.
Contains
(
"医生"
))
?
"医生组"
:
unittypes
.
Any
(
t
=>
!
string
.
IsNullOrEmpty
(
t
)
&&
t
.
Contains
(
"护理"
))
?
"护理组"
:
"其他组"
;
string
clear
=
@"SELECT DISTINCT t3.AccountingUnit as Department,ifnull(t1.DoctorName, '未知') DoctorName,t1.PersonnelNumber,t1.Category,SUM(t1.Fee) Fee FROM ex_result t1
JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName
WHERE t1.allotid = @allotid
AND t3.unittype in @unittypes
AND t3.accountingunit = @accountingunit
AND (t1.Source LIKE CONCAT('%',@unittype,'工作量%') OR t1.Source = '通用工作量')
AND T1.IsDelete = 0
GROUP BY ifnull(t1.DoctorName, '未知'),t1.PersonnelNumber,t1.Category
ORDER BY t1.doctorname,t1.Category;"
;
string
clear
=
@"
SELECT DISTINCT AccountingUnit as Department,if(ifnull(DoctorName,'')='', '未知',DoctorName) DoctorName,PersonnelNumber,Category,ROUND(SUM(Fee),2) Fee
FROM view_second_report_workload
WHERE AllotId = @allotid AND UnitType in @unittypes AND AccountingUnit = @accountingunit
GROUP BY AccountingUnit,DoctorName,PersonnelNumber,Category
ORDER BY doctorname,Category;"
;
return
connection
.
Query
<
report_original_workload
>(
clear
,
new
{
allotid
,
accountingunit
,
unittypes
,
unittype
,
hospitalid
},
commandTimeout
:
60
*
60
);
}
catch
(
Exception
ex
)
...
...
@@ -204,23 +201,24 @@ public IEnumerable<report_original_workload> QueryWorkloadData(int allotid, stri
/// 查询门诊收入数据
/// </summary>
/// <param name="allotid"></param>
public
IEnumerable
<
ex_result
>
QueryIncomeData
(
int
allotid
,
string
source
,
string
accountingunit
,
string
[]
unittype
,
int
hospitalid
)
public
IEnumerable
<
ex_result
>
QueryIncomeData
(
int
allotid
,
string
source
,
string
accountingunit
,
string
[]
unittype
s
,
int
hospitalid
)
{
using
(
var
connection
=
context
.
Database
.
GetDbConnection
())
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
try
{
string
clear
=
$@"SELECT DISTINCT t3.AccountingUnit as Department,ifnull(t1.DoctorName, '未知') DoctorName,t1.PersonnelNumber,t1.Category,SUM(t1.Fee) Fee FROM ex_result t1
JOIN (select distinct AccountingUnit,HISDeptName,unittype from per_dept_dic where HospitalId = @hospitalid) t3 ON t1.Department = t3.HISDeptName
WHERE t1.allotid = @allotid
AND t3.unittype in @unittype
AND t3.accountingunit = @accountingunit
AND (t1.Source like '%
{
source
}
开单%' OR t1.Source like '%
{
source
}
就诊%')
AND T1.IsDelete = 0
GROUP BY ifnull(t1.DoctorName, '未知'),t1.PersonnelNumber,t1.Category
ORDER BY t1.doctorname,t1.Category;"
;
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
allotid
,
accountingunit
,
unittype
,
hospitalid
},
commandTimeout
:
60
*
60
);
var
tableName
=
(
source
==
"门诊"
)
?
"view_second_report_income_out"
:
"view_second_report_income_inpat"
;
string
clear
=
$@"
SELECT DISTINCT AccountingUnit as Department,if(ifnull(DoctorName,'')='', '未知',DoctorName) DoctorName,PersonnelNumber,Category,ROUND(SUM(Fee),2) Fee
FROM
{
tableName
}
WHERE AllotId = @allotid AND UnitType in @unittypes AND AccountingUnit = @accountingunit
GROUP BY AccountingUnit,DoctorName,PersonnelNumber,Category
ORDER BY doctorname,Category;"
;
return
connection
.
Query
<
ex_result
>(
clear
,
new
{
allotid
,
accountingunit
,
unittypes
,
hospitalid
},
commandTimeout
:
60
*
60
);
}
catch
(
Exception
ex
)
{
...
...
performance/Performance.Services/AllotCompute/ProcessComputService.cs
View file @
ae0981df
...
...
@@ -324,7 +324,7 @@ public List<PerSheet> Compute(PerExcel excel, List<PerSheet> perSheet, per_allot
dept
.
PerforFee
=
dept
.
Income
*
dept
.
BasicFactor
;
//dept.PerforTotal = Math.Round((dept.PerforFee + dept.WorkloadFee + dept.OtherPerfor1 + dept.AssessBeforeOtherFee) ?? 0);
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
AssessBeforeOtherFee
)
??
0
);
dept
.
PerforTotal
=
Math
.
Round
((
dept
.
PerforFee
+
dept
.
WorkloadFee
+
dept
.
AssessBeforeOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
dept
.
AssessLaterPerforTotal
=
Math
.
Round
((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
+
dept
.
AssessLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
...
...
@@ -418,9 +418,9 @@ public void ComputeOffice(per_allot allot, PerExcel excel)
dept
.
PerforFee
=
empolyees
.
Sum
(
w
=>
w
.
PerforTotal
??
0
);
dept
.
PerforTotal
=
Math
.
Round
(
empolyees
.
Sum
(
w
=>
w
.
GiveFee
??
0
));
dept
.
AssessLaterPerforTotal
=
Math
.
Round
((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
)
??
0
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
);
dept
.
PerforTotal
=
Math
.
Round
(
empolyees
.
Sum
(
w
=>
w
.
GiveFee
??
0
)
,
MidpointRounding
.
AwayFromZero
);
dept
.
AssessLaterPerforTotal
=
Math
.
Round
((
dept
.
PerforTotal
*
dept
.
ScoringAverage
+
dept
.
MedicineExtra
+
dept
.
MaterialsExtra
+
dept
.
Extra
)
??
0
,
MidpointRounding
.
AwayFromZero
);
dept
.
RealGiveFee
=
Math
.
Round
((
dept
.
AssessLaterPerforTotal
*
dept
.
AdjustFactor
+
dept
.
AdjustLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
//dept.Avg = dept.ManagerNumber + dept.Number == 0 ? 0 : dept.PerforTotal / (dept.ManagerNumber + dept.Number);
dept
.
Avg
=
dept
.
Number
==
0
?
0
:
dept
.
PerforTotal
/
dept
.
Number
;
...
...
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
ae0981df
...
...
@@ -98,12 +98,12 @@ public List<res_baiscnorm> Compute(per_allot allot, List<PerSheet> accountSheet)
var
empolyeeList2
=
perforImEmployeeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
computeEmployees2
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList2
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"行政中高层 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees2
,
allot
,
baiscnormList
);
var
computResult2
=
computeDirector
.
Compute
(
computeEmployees2
,
allot
,
baiscnormList
,
accountbasicList
);
var
empolyeeList3
=
perforImemployeelogisticsRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
computeEmployees3
=
Mapper
.
Map
<
List
<
ComputeEmployee
>>(
empolyeeList3
);
logManageService
.
WriteMsg
(
"正在生成绩效"
,
"行政后勤 最终绩效数据计算"
,
1
,
allot
.
ID
,
"ReceiveMessage"
);
var
computResult3
=
computeDirector
.
Compute
(
computeEmployees3
,
allot
,
baiscnormList
);
var
computResult3
=
computeDirector
.
Compute
(
computeEmployees3
,
allot
,
baiscnormList
,
accountbasicList
);
//计算 行政中高层 平均值
baiscNormService
.
ComputeOtherAvg
(
baiscnormList
,
computResult2
,
empolyeeList2
);
...
...
@@ -179,7 +179,7 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
//var scoreAverage = accountScoreAverages?.FirstOrDefault(w => w.UnitType == UnitType.特殊核算组.ToString() && w.AccountingUnit == dept?.AccountingUnit)?.TotelValue;
// 夜班绩效 从医院奖罚的明细项中获取
var
nightShift
=
adjustLaterOtherFee
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
.
UnitType
&&
w
.
AccountingUnit
==
dept
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
var
nightShift
=
adjustLaterOtherFee
?.
FirstOrDefault
(
w
=>
w
.
UnitType
==
dept
?.
UnitType
&&
w
.
AccountingUnit
==
dept
?
.
AccountingUnit
&&
w
.
TypeName
?.
Trim
()
==
"夜班绩效"
)?.
CellValue
??
0
;
decimal
?
headcount
=
null
;
if
(
typeList
.
Any
(
o
=>
o
.
Description
==
item
.
QuantitativeIndicators
))
...
...
@@ -219,11 +219,11 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
NightShiftWorkPerforFee
=
nightShift
,
};
logger
.
LogInformation
(
$"特殊核算组-
{
group
.
AccountingUnit
}
,sumValue:
{
sumValue
}
,预算比例:
{
dept
?.
BasicFactor
??
-
100
}
"
);
res
.
ResultsTotalFee
=
Math
.
Round
((
sumValue
*
(
dept
?.
BasicFactor
??
1
m
))
??
0
);
res
.
ResultsTotalFee
=
Math
.
Round
((
sumValue
*
(
dept
?.
BasicFactor
??
1
m
))
??
0
,
MidpointRounding
.
AwayFromZero
);
res
.
PerforTotal
=
res
.
ResultsTotalFee
+
res
.
AssessBeforeOtherFee
;
res
.
GiveFee
=
Math
.
Round
((
res
.
PerforTotal
*
res
.
ScoringAverage
+
res
.
MedicineExtra
+
res
.
MaterialsExtra
+
res
.
Punishment
+
res
.
AssessLaterOtherFee
)
??
0
);
res
.
RealGiveFee
=
Math
.
Round
(
res
.
GiveFee
*
res
.
Adjust
+
res
.
AdjustLaterOtherFee
??
0
);
res
.
Avg
=
Math
.
Round
((
res
.
Number
!=
0
?
res
.
PerforTotal
/
res
.
Number
:
null
)
??
0
);
res
.
GiveFee
=
Math
.
Round
((
res
.
PerforTotal
*
res
.
ScoringAverage
+
res
.
MedicineExtra
+
res
.
MaterialsExtra
+
res
.
Punishment
+
res
.
AssessLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
res
.
RealGiveFee
=
Math
.
Round
(
res
.
GiveFee
*
res
.
Adjust
+
res
.
AdjustLaterOtherFee
??
0
,
MidpointRounding
.
AwayFromZero
);
res
.
Avg
=
Math
.
Round
((
res
.
Number
!=
0
?
res
.
PerforTotal
/
res
.
Number
:
null
)
??
0
,
MidpointRounding
.
AwayFromZero
);
resDataList
.
Add
(
res
);
...
...
@@ -276,17 +276,17 @@ public void SpecialUnitCompute(PerExcel excel, per_allot allot, List<res_baiscno
compute
.
Avg
=
avg
*
(
empolyee
.
Basics
??
0
)
*
compute
.
Attendance
;
// 考核前管理绩效
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
);
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后管理绩效
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
);
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核前绩效
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
);
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后绩效
compute
.
GiveFee
=
Math
.
Round
(
compute
.
Avg
+
compute
.
AssessLaterManagementFee
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
compute
.
Avg
+
compute
.
AssessLaterManagementFee
??
0
,
MidpointRounding
.
AwayFromZero
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
// 实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
Avg
+
compute
.
AssessLaterManagementFee
)
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
Avg
+
compute
.
AssessLaterManagementFee
)
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
??
0
,
MidpointRounding
.
AwayFromZero
);
//compute.Efficiency = compute.Avg * (empolyee.Efficiency ?? 1);
//compute.Scale = compute.PerforTotal * (empolyee.Scale ?? 1);
...
...
performance/Performance.Services/ComputeService.cs
View file @
ae0981df
...
...
@@ -902,6 +902,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
item
.
JobCategory
=
emps
?.
JobCategory
??
""
;
item
.
Duty
=
emps
?.
Duty
??
""
;
item
.
TitlePosition
=
emps
?.
JobTitle
??
""
;
// 人员信息使用人员字典中数据
if
(
isEmpDic
)
{
...
...
performance/Performance.Services/ConfigService.cs
View file @
ae0981df
...
...
@@ -1357,11 +1357,13 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
{
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
2
,
MergeRow
=
1
,
MergeCell
=
1
},
};
var
cells
=
new
List
<
Cell
>
{
new
Cell
{
CellType
=
"header"
,
CellValue
=
"项目小类(测算表)"
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
"费用大类(大屏展示)"
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
}
new
Cell
{
CellType
=
"header"
,
CellValue
=
"序号"
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
"项目小类(测算表)"
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
"费用大类(大屏展示)"
,
PointCell
=
2
,
MergeRow
=
1
,
MergeCell
=
1
}
};
var
defaultColumns
=
new
Dictionary
<
string
,
string
>
...
...
@@ -1374,7 +1376,7 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
int
index
=
0
;
foreach
(
var
model
in
models
)
{
mergeCells
.
Add
(
new
Cell
{
CellType
=
"header"
,
CellValue
=
model
.
ModuleName
,
PointCell
=
2
+
index
*
3
,
MergeRow
=
1
,
MergeCell
=
defaultColumns
.
Count
});
mergeCells
.
Add
(
new
Cell
{
CellType
=
"header"
,
CellValue
=
model
.
ModuleName
,
PointCell
=
3
+
index
*
3
,
MergeRow
=
1
,
MergeCell
=
defaultColumns
.
Count
});
int
i
=
0
;
cells
.
AddRange
(
defaultColumns
.
Select
(
t
=>
...
...
@@ -1419,6 +1421,7 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
{
var
rowcells
=
new
List
<
Cell
>
{
new
Cell
{
CellType
=
"body"
,
CellValue
=
index
+
1
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"body"
,
CellValue
=
charge
.
Charge
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"body"
,
CellValue
=
charge
.
ChargeType
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
};
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
ae0981df
...
...
@@ -407,17 +407,17 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
compute
.
Avg
=
avg
*
(
empolyee
.
Basics
??
0
)
*
compute
.
Attendance
;
compute
.
Punishment
=
(
empolyee
?.
Punishment
??
0
);
// 考核前管理绩效
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
);
compute
.
ShouldGiveFee
=
Math
.
Round
((
compute
.
Efficiency
+
compute
.
Scale
)
*
compute
.
Grant
+
compute
.
OtherManagePerfor
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后管理绩效
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
);
compute
.
AssessLaterManagementFee
=
Math
.
Round
(
compute
.
ShouldGiveFee
*
compute
.
ScoreAverageRate
*
compute
.
Attendance
+
compute
.
Punishment
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核前绩效
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
);
compute
.
PerforSumFee
=
compute
.
Attendance
==
0
?
Math
.
Round
(
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
)
:
Math
.
Round
(
compute
.
Avg
/
compute
.
Attendance
+
compute
.
ShouldGiveFee
??
0
,
MidpointRounding
.
AwayFromZero
);
// 考核后绩效
compute
.
GiveFee
=
Math
.
Round
((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
));
compute
.
GiveFee
=
Math
.
Round
((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
)
,
MidpointRounding
.
AwayFromZero
);
// 参考基数专用绩效合计
compute
.
BaiscNormPerforTotal
=
compute
.
PerforSumFee
;
// 实发绩效
compute
.
RealGiveFee
=
Math
.
Round
(((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
))
*
compute
.
Adjust
+
(
compute
.
AdjustLaterOtherFee
??
0
)
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
(((
compute
.
Avg
??
0
)
+
(
compute
.
AssessLaterManagementFee
??
0
))
*
compute
.
Adjust
+
(
compute
.
AdjustLaterOtherFee
??
0
)
??
0
,
MidpointRounding
.
AwayFromZero
);
////绩效合计
//compute.PerforSumFee = Math.Round((compute.Avg * (empolyee.Basics ?? 0)) + compute.ShouldGiveFee + compute.AssessBeforeOtherFee ?? 0);
...
...
@@ -442,11 +442,8 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<PerS
/// <param name="empolyeeList"></param>
/// <param name="baiscnormList"></param>
/// <returns></returns>
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
)
public
List
<
ComputeResult
>
Compute
(
List
<
ComputeEmployee
>
empolyeeList
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
,
List
<
im_accountbasic
>
accountbasicList
=
null
)
{
////年资系数
//var workyearList = perforCofworkyearRepository.GetEntities(t => t.AllotID == allot.ID);
List
<
ComputeResult
>
computeList
=
new
List
<
ComputeResult
>();
if
(
empolyeeList
==
null
)
return
computeList
;
...
...
@@ -517,22 +514,31 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, per_allot
// 行政高层 行政中层 夜班费
compute
.
NightWorkPerfor
=
item
.
NightWorkPerfor
;
//考核前绩效
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
AssessBeforeOtherFee
??
0
);
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
AssessBeforeOtherFee
??
0
,
MidpointRounding
.
AwayFromZero
);
//考核后绩效
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforTotal
*
compute
.
ScoreAverageRate
+
compute
.
Punishment
??
0
);
compute
.
GiveFee
=
Math
.
Round
(
compute
.
PerforTotal
*
compute
.
ScoreAverageRate
+
compute
.
Punishment
??
0
,
MidpointRounding
.
AwayFromZero
);
//实发绩效
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
)
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
((
compute
.
GiveFee
*
compute
.
Adjust
+
compute
.
AdjustLaterOtherFee
)
??
0
,
MidpointRounding
.
AwayFromZero
);
}
else
if
(
AccountUnitType
.
行政工勤
.
ToString
()
==
involve
)
{
// 行政工勤 根据测算表判读是否需要二次分配 默认不需要
compute
.
NeedSecondAllot
=
string
.
IsNullOrWhiteSpace
(
item
.
NeedSecondAllot
)
?
"否"
:
item
.
NeedSecondAllot
;
#
region
禅道
137
// 行政后勤人员不需要二次分配的时候,个人的考核得分及调节系数取4.1表里面的科室的考核得分和调节系数
if
(
compute
.
NeedSecondAllot
==
"否"
)
{
var
resAccount
=
accountbasicList
?.
FirstOrDefault
(
t
=>
UnitTypeUtil
.
IsOffice
(
t
.
UnitType
)
&&
t
.
DoctorAccountingUnit
==
compute
.
AccountingUnit
);
compute
.
ScoreAverageRate
=
resAccount
?.
DoctorScoringAverage
??
1
;
compute
.
Adjust
=
resAccount
?.
DoctorAdjustFactor
??
1
m
;
}
#
endregion
//考核前绩效
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
OtherPerfor
??
0
);
compute
.
PerforTotal
=
Math
.
Round
(
compute
.
BaiscNormValue
*
compute
.
PostCoefficient
*
compute
.
Attendance
+
compute
.
OtherPerfor
??
0
,
MidpointRounding
.
AwayFromZero
);
//考核后绩效 更加开关来控制显示
compute
.
GiveFee
=
compute
.
PerforTotal
*
compute
.
ScoreAverageRate
;
//实发绩效 更加开关来控制显示
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
compute
.
Adjust
??
0
);
compute
.
RealGiveFee
=
Math
.
Round
(
compute
.
GiveFee
*
compute
.
Adjust
??
0
,
MidpointRounding
.
AwayFromZero
);
}
computeList
.
Add
(
compute
);
//// 行政高层 行政中层 夜班费
...
...
performance/Performance.Services/PersonService.cs
View file @
ae0981df
...
...
@@ -1000,5 +1000,75 @@ public string GetPersonDictFile(int allotId, int userId)
}
return
filepath
;
}
public
bool
ReloadPersonnel
(
int
hospitalId
,
int
allotId
)
{
var
allotList
=
perallotRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
)?.
OrderBy
(
s
=>
s
.
Year
).
ThenBy
(
s
=>
s
.
Month
).
ToList
();
if
(
allotList
==
null
||
!
allotList
.
Any
())
throw
new
PerformanceException
(
"加载失败,绩效记录不存在!"
);
var
allot
=
allotList
.
FirstOrDefault
(
w
=>
w
.
ID
==
allotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"加载失败,绩效记录不存在!"
);
var
index
=
allotList
.
IndexOf
(
allot
);
if
(
index
==
0
)
throw
new
PerformanceException
(
"加载失败,绩效记录不存在!"
);
var
prevAllot
=
allotList
[
index
-
1
];
if
(
prevAllot
==
null
)
prevAllot
.
ID
=
-
1
;
var
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
AllotId
==
prevAllot
.
ID
);
if
(
persons
==
null
||
!
persons
.
Any
())
throw
new
PerformanceException
(
"加载失败,未查询到上月人员信息!"
);
var
i
=
peremployeeRepository
.
Execute
(
$@"DELETE FROM per_employee WHERE HospitalId=@HospitalId and AllotId=@AllotId;"
,
new
{
hospitalId
,
allotId
});
if
(
i
<=
0
)
throw
new
PerformanceException
(
"加载失败,人员信息重置失败!"
);
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
data
=
persons
.
Select
(
t
=>
{
var
entity
=
new
per_employee
{
HospitalId
=
t
.
HospitalId
,
AllotId
=
allotId
,
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
Department
,
DoctorName
=
t
.
DoctorName
,
JobCategory
=
t
.
JobCategory
,
Duty
=
t
.
Duty
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
UnitType
,
AttendanceDay
=
day
,
Attendance
=
1
,
PermanentStaff
=
t
.
PermanentStaff
,
EfficiencyNumber
=
t
.
EfficiencyNumber
,
WorkTime
=
t
.
WorkTime
,
BirthDate
=
t
.
BirthDate
,
Age
=
t
.
Age
,
ReservedRatio
=
t
.
ReservedRatio
,
BankCard
=
t
.
BankCard
,
Remark
=
t
.
Remark
,
CreateTime
=
DateTime
.
Now
,
};
if
(!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
!
string
.
IsNullOrEmpty
(
t
.
JobNumber
))
{
entity
.
PersonnelNumber
=
t
.
PersonnelNumber
;
entity
.
JobNumber
=
t
.
JobNumber
;
}
else
{
string
number
=
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
?
t
.
PersonnelNumber
:
t
.
JobNumber
;
entity
.
PersonnelNumber
=
number
;
entity
.
JobNumber
=
number
;
}
return
entity
;
}).
ToList
();
SaveAllotPersons
(
data
);
return
true
;
}
}
}
performance/Performance.Services/RedistributionService.cs
View file @
ae0981df
...
...
@@ -123,7 +123,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
}
var
head
=
LoadHead
(
computeMode
,
allot
,
second
);
var
dic
=
GetTableHeaderDictionary
(
computeMode
,
allot
,
second
,
loads
);
var
dic
=
GetTableHeaderDictionary
(
computeMode
,
allot
,
second
,
loads
,
isAttachFactor
:
false
);
return
new
SecondDetailDto
{
Head
=
head
,
Body
=
handson
,
Dic
=
dic
};
}
...
...
@@ -160,7 +160,7 @@ public HandsonTableBase GetHandsonTable(ComputeMode computeMode, List<TitleValue
/// <param name="second"></param>
/// <param name="loads"></param>
/// <returns></returns>
public
List
<
SecondColumnDictionary
>
GetTableHeaderDictionary
(
ComputeMode
computeMode
,
per_allot
allot
,
ag_secondallot
second
,
List
<
TitleValue
<
string
,
decimal
?>>
loads
,
List
<
SecondWorkLoadDto
>
workloadGroups
=
null
)
public
List
<
SecondColumnDictionary
>
GetTableHeaderDictionary
(
ComputeMode
computeMode
,
per_allot
allot
,
ag_secondallot
second
,
List
<
TitleValue
<
string
,
decimal
?>>
loads
,
List
<
SecondWorkLoadDto
>
workloadGroups
=
null
,
bool
isAttachFactor
=
true
)
{
/*
此处数据需要额外注意,前端显示规则:通过isTrue=true显示,显示名称为label
...
...
@@ -170,14 +170,8 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
new
SecondColumnDictionary
(
"人员工号"
,
nameof
(
ag_bodysource
.
WorkNumber
),
true
,
100
),
new
SecondColumnDictionary
(
"姓名"
,
nameof
(
ag_bodysource
.
Name
),
true
,
100
),
new
SecondColumnDictionary
(
"科室"
,
nameof
(
ag_bodysource
.
Department
),
true
,
100
),
new
SecondColumnDictionary
(
"领取平均绩效"
,
nameof
(
ag_bodysource
.
Post
),
true
,
100
),
new
SecondColumnDictionary
(
"人员系数"
,
nameof
(
ag_bodysource
.
StaffCoefficient
),
false
,
200
,
color
:
"title_color"
),
new
SecondColumnDictionary
(
"出勤"
,
nameof
(
ag_bodysource
.
ActualAttendance
),
false
,
201
,
color
:
"title_color"
),
new
SecondColumnDictionary
(
"职称"
,
nameof
(
ag_bodysource
.
JobTitle
),
false
,
202
,
color
:
"title_color"
),
new
SecondColumnDictionary
(
"职称系数"
,
nameof
(
ag_bodysource
.
TitleCoefficient
),
false
,
203
,
color
:
"title_color"
),
new
SecondColumnDictionary
(
"职称绩效得分"
,
nameof
(
ag_bodysource
.
TitlePerformanceScore
),
false
,
204
,
color
:
"title_color"
),
new
SecondColumnDictionary
(
"职称绩效"
,
nameof
(
ag_bodysource
.
TitlePerformance
),
true
,
299
),
new
SecondColumnDictionary
(
"职称绩效"
,
nameof
(
ag_bodysource
.
TitlePerformance
),
true
,
299
),
new
SecondColumnDictionary
(
"工作量绩效合计"
,
nameof
(
ag_bodysource
.
WorkPerformance
),
true
,
399
),
new
SecondColumnDictionary
(
"单项奖励合计"
,
nameof
(
ag_bodysource
.
DeptReward
),
true
,
499
),
...
...
@@ -194,6 +188,17 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
new
SecondColumnDictionary
(
"实发绩效"
,
nameof
(
ag_bodysource
.
ReferToRealAmount
),
false
,
802
,
color
:
"referto_color"
),
new
SecondColumnDictionary
(
"备注"
,
nameof
(
ag_bodysource
.
Remark
),
false
,
803
,
width
:
200
),
};
// 填报模板不含一下展示信息
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
{
maps
.
Add
(
new
SecondColumnDictionary
(
"领取平均绩效"
,
nameof
(
ag_bodysource
.
Post
),
true
,
100
));
maps
.
Add
(
new
SecondColumnDictionary
(
"人员系数"
,
nameof
(
ag_bodysource
.
StaffCoefficient
),
false
,
200
,
color
:
"title_color"
));
maps
.
Add
(
new
SecondColumnDictionary
(
"出勤"
,
nameof
(
ag_bodysource
.
ActualAttendance
),
false
,
201
,
color
:
"title_color"
));
maps
.
Add
(
new
SecondColumnDictionary
(
"职称"
,
nameof
(
ag_bodysource
.
JobTitle
),
false
,
202
,
color
:
"title_color"
));
maps
.
Add
(
new
SecondColumnDictionary
(
"职称系数"
,
nameof
(
ag_bodysource
.
TitleCoefficient
),
false
,
203
,
color
:
"title_color"
));
maps
.
Add
(
new
SecondColumnDictionary
(
"职称绩效得分"
,
nameof
(
ag_bodysource
.
TitlePerformanceScore
),
false
,
204
,
color
:
"title_color"
));
}
// 工作量
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
...
...
@@ -212,7 +217,11 @@ public List<SecondColumnDictionary> GetTableHeaderDictionary(ComputeMode compute
.
Where
(
w
=>
w
.
Items
==
null
||
w
.
Items
.
Count
==
0
)
.
Any
(
w
=>
item
.
Title
.
EqualsIgnoreCase
(
w
.
WorkloadScore
)
||
item
.
Title
.
EqualsIgnoreCase
(
w
.
AssessmentScore
)
||
item
.
Title
.
EqualsIgnoreCase
(
w
.
WorkPerformance
));
if
(!
isExist
)
maps
.
Add
(
new
SecondColumnDictionary
(
item
.
Value
,
item
.
Title
,
false
,
++
workloadSort
,
type
:
"Workload"
,
color
:
$"workload_color
{
index
}
"
));
{
string
factor
=
item
.
Title
.
StartsWith
(
"Workload_"
)
?
$"(
{
item
.
State
??
0
:
0.
####
}
)"
:
""
;
var
label
=
isAttachFactor
==
true
?
$"
{
item
.
Value
}{
factor
}
"
:
item
.
Value
;
maps
.
Add
(
new
SecondColumnDictionary
(
label
,
item
.
Title
,
false
,
++
workloadSort
,
type
:
"Workload"
,
color
:
$"workload_color
{
index
}
"
));
}
}
// 多工作量加载
...
...
@@ -714,7 +723,7 @@ public void SupplementOtherPerfor(ag_secondallot second, List<Dictionary<string,
foreach
(
var
row
in
rows
)
{
var
personnelNumber
=
row
.
GetString
(
nameof
(
ag_bodysource
.
WorkNumber
));
var
amounts
=
perapramounts
.
Where
(
w
=>
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
());
var
amounts
=
perapramounts
.
Where
(
w
=>
UnitTypeUtil
.
IsEqualsUnitType
(
w
.
UnitType
,
second
.
UnitType
)
&&
w
.
AccountingUnit
==
second
.
Department
&&
w
.
PersonnelNumber
?.
Trim
()
==
personnelNumber
?.
Trim
());
row
.
AddOrUpdate
(
nameof
(
ag_bodysource
.
OtherPerformance
),
amounts
.
Sum
(
w
=>
w
.
Amount
??
0
));
}
...
...
@@ -770,6 +779,8 @@ public void ResultCompute(ComputeMode computeMode, Dictionary<string, object> he
{
// 清空无效数据
clearPerformanceWorkload
(
rows
,
workloadGroups
);
// 行内计算单项奖励
deptRewardCalculate
(
rows
);
// 行内可分配绩效
distPerformanceCalculate
(
rows
);
// 行内实发绩效
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
ae0981df
...
...
@@ -1788,7 +1788,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
WorkPost
=
item
.
Post
,
WorkPost
=
item
.
JobTitle
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Name
,
PerforSumFee
=
item
.
DistPerformance
,
...
...
@@ -2128,12 +2128,18 @@ public dynamic Print(int secondId)
var
second
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
return
new
List
<
SecPrintResponse
>();
//var computes = agcomputeRepository.GetEntities(t => t.SecondId == secondId);
//if (computes == null || !computes.Any())
// return new List<SecPrintResponse>();
var
status
=
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
};
if
(!
second
.
Status
.
HasValue
||
!
status
.
Contains
(
second
.
Status
.
Value
))
throw
new
PerformanceException
(
"当前科室分配结果未提交,无法打印!"
);
if
(!
second
.
UseTempId
.
HasValue
)
throw
new
PerformanceException
(
"当前科室分配模板信息错误!"
);
var
useTempId
=
second
.
UseTempId
.
Value
;
List
<
SecPrintResponse
>
result
=
new
List
<
SecPrintResponse
>();
SecPrintHeaderResponse
header
=
new
SecPrintHeaderResponse
();
if
(
second
.
UseTempId
.
HasValue
&&
second
.
U
seTempId
==
6
)
if
(
u
seTempId
==
6
)
{
var
data
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
...
...
@@ -2145,7 +2151,7 @@ public dynamic Print(int secondId)
header
.
NightShiftWorkPerforTotal
=
result
.
Sum
(
t
=>
t
.
NightWorkPerformance
??
0
);
header
.
TotalPerformance
=
result
.
Sum
(
t
=>
t
.
DistPerformance
??
0
);
}
else
if
(
second
.
UseTempId
.
HasValue
&&
(
new
int
[]
{
9
,
10
}).
Contains
(
second
.
UseTempId
.
Value
))
else
if
(
(
new
int
[]
{
9
,
10
}).
Contains
(
useTempId
))
{
var
data
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
data
==
null
||
!
data
.
Any
())
return
new
List
<
SecPrintResponse
>();
...
...
@@ -2173,7 +2179,7 @@ public dynamic Print(int secondId)
header
=
Mapper
.
Map
<
SecPrintHeaderResponse
>(
headerdata
);
//header.HosOtherPerformance = result.Sum(t => t.OtherPerformance ?? 0);
}
else
if
(
second
.
UseTempId
.
HasValue
&&
(
new
int
[]
{
7
,
8
}).
Contains
(
second
.
UseTempId
.
Value
))
else
if
(
(
new
int
[]
{
7
,
8
}).
Contains
(
useTempId
))
{
var
itemname
=
new
List
<
string
>
{
"人员工号"
,
"姓名"
,
"职称"
,
"职称绩效"
,
"工作量绩效工资"
,
"单项奖励小计"
,
"可分配绩效"
,
"医院其他绩效"
,
"夜班工作量绩效"
};
var
fixaitems
=
agfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
&&
itemname
.
Contains
(
t
.
ItemName
));
...
...
@@ -2232,9 +2238,9 @@ public dynamic Print(int secondId)
PersonName
=
w
.
Name
,
Department
=
w
.
Department
,
RealAmount
=
w
.
RealAmount
,
WorkPost
=
w
.
Post
,
WorkPost
=
w
.
JobTitle
,
TitlePerfor
=
w
.
TitlePerformance
,
WorkPerformance
=
bodyDynamic
?.
Where
(
b
=>
b
.
BodyId
==
w
.
Id
&&
b
.
ItemId
.
StartsWith
(
"WorkPerformance_"
)).
Sum
(
b
=>
b
.
Value
)
??
0
,
WorkPerformance
=
w
.
WorkPerformance
,
DeptReward
=
w
.
DeptReward
,
DistPerformance
=
w
.
DistPerformance
,
OtherPerformance
=
w
.
OtherPerformance
,
...
...
performance/Performance.Services/SheetSevice.cs
View file @
ae0981df
...
...
@@ -113,7 +113,8 @@ public SheetExportResponse SheetExport(int sheetID)
}
else
{
CommonExport
(
sheetID
,
response
);
CommonExport
(
sheetID
,
response
,
sheet
.
SheetType
);
//response.Header = response.Header.Select(t => t.Data.ToDistinct(c => c.CellValue)).ToList();
if
(
new
int
[]
{
(
int
)
SheetType
.
Income
,
(
int
)
SheetType
.
OtherIncome
,
(
int
)
SheetType
.
Expend
,
(
int
)
SheetType
.
Workload
}.
Contains
(
sheet
.
SheetType
.
Value
))
{
var
point
=
0
;
...
...
@@ -141,10 +142,15 @@ public SheetExportResponse SheetExport(int sheetID)
return
response
;
}
private
void
CommonExport
(
int
sheetID
,
SheetExportResponse
response
)
private
void
CommonExport
(
int
sheetID
,
SheetExportResponse
response
,
int
?
sheetType
)
{
var
headList
=
_perforImHeaderRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderBy
(
t
=>
t
.
PointCell
)
.
ToDistinct
(
t
=>
t
.
CellValue
)
;
var
headList
=
_perforImHeaderRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderBy
(
t
=>
t
.
PointCell
);
if
(
headList
==
null
)
return
;
if
(
sheetType
==
(
int
)
SheetType
.
AccountBasic
)
headList
=
headList
.
ToDistinct
(
t
=>
t
.
CellValue
).
OrderBy
(
t
=>
t
.
PointCell
);
var
dataList
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
SheetID
==
sheetID
)?.
OrderByDescending
(
t
=>
t
.
AccountingUnit
).
ToList
();
var
sheet
=
_perforImSheetRepository
.
GetEntity
(
t
=>
t
.
ID
==
sheetID
);
...
...
performance/Performance.Services/UnitTypeUtil.cs
View file @
ae0981df
...
...
@@ -12,7 +12,7 @@ public class UnitTypeUtil
/// </summary>
/// <param name="unit"></param>
/// <returns></returns>
public
static
bool
IsOffice
(
int
unit
)
public
static
bool
IsOffice
(
int
?
unit
)
{
return
unit
==
(
int
)
UnitType
.
行政后勤
;
}
...
...
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