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
76217558
Commit
76217558
authored
Oct 14, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改导出excel版本,重新计算合计,人员字典单元格类型修改
parent
d37d2479
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
72 deletions
+76
-72
performance/Performance.Services/DownloadService.cs
+68
-67
performance/Performance.Services/PersonService.cs
+8
-5
No files found.
performance/Performance.Services/DownloadService.cs
View file @
76217558
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
NPOI.HSSF.UserModel
;
using
NPOI.HSSF.UserModel
;
using
NPOI.SS.UserModel
;
using
NPOI.SS.UserModel
;
using
NPOI.XSSF.UserModel
;
using
Performance.DtoModels
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Infrastructure
;
...
@@ -85,7 +86,7 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
...
@@ -85,7 +86,7 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
FileStream
stream
=
new
FileStream
(
filepath
,
FileMode
.
Create
);
FileStream
stream
=
new
FileStream
(
filepath
,
FileMode
.
Create
);
try
try
{
{
HSSFWorkbook
workbook
=
new
H
SSFWorkbook
();
XSSFWorkbook
workbook
=
new
X
SSFWorkbook
();
//设置单元格样式
//设置单元格样式
ICellStyle
style
=
workbook
.
CreateCellStyle
();
ICellStyle
style
=
workbook
.
CreateCellStyle
();
style
.
Alignment
=
HorizontalAlignment
.
Center
;
style
.
Alignment
=
HorizontalAlignment
.
Center
;
...
@@ -104,10 +105,10 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
...
@@ -104,10 +105,10 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
int
cellIndex
=
1
;
int
cellIndex
=
1
;
foreach
(
var
item
in
headList
)
foreach
(
var
item
in
headList
)
{
{
if
(
headShow
.
Contains
(
item
.
Item
2
))
if
(
headShow
.
Contains
(
item
.
Item
1
))
continue
;
continue
;
row1
.
CreateCell
(
cellIndex
).
SetCellValue
(
item
.
Item
2
);
row1
.
CreateCell
(
cellIndex
).
SetCellValue
(
item
.
Item
1
);
row1
.
GetCell
(
cellIndex
).
CellStyle
=
style
;
row1
.
GetCell
(
cellIndex
).
CellStyle
=
style
;
sheet
.
SetColumnWidth
(
cellIndex
,
14
*
256
);
sheet
.
SetColumnWidth
(
cellIndex
,
14
*
256
);
cellIndex
++;
cellIndex
++;
...
@@ -123,11 +124,11 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
...
@@ -123,11 +124,11 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
serial
.
CellStyle
=
style
;
serial
.
CellStyle
=
style
;
foreach
(
var
field
in
headList
)
foreach
(
var
field
in
headList
)
{
{
if
(
headShow
.
Contains
(
field
.
Item
2
))
if
(
headShow
.
Contains
(
field
.
Item
1
))
continue
;
continue
;
var
cell
=
row
.
CreateCell
(
cellIndex
);
var
cell
=
row
.
CreateCell
(
cellIndex
);
cell
.
SetCellOValue
(
field
.
Item
3
?.
Invoke
(
item
));
cell
.
SetCellOValue
(
field
.
Item
2
?.
Invoke
(
item
));
cell
.
CellStyle
=
style
;
cell
.
CellStyle
=
style
;
cellIndex
++;
cellIndex
++;
}
}
...
@@ -141,11 +142,11 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
...
@@ -141,11 +142,11 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
totalSerial
.
CellStyle
=
style
;
totalSerial
.
CellStyle
=
style
;
foreach
(
var
value
in
headList
)
foreach
(
var
value
in
headList
)
{
{
if
(
headShow
.
Contains
(
value
.
Item
2
))
if
(
headShow
.
Contains
(
value
.
Item
1
))
continue
;
continue
;
var
cell
=
totalRow
.
CreateCell
(
cellIndex
);
var
cell
=
totalRow
.
CreateCell
(
cellIndex
);
cell
.
SetCell
Formula
(
string
.
Format
(
value
.
Item4
,
startIndex
));
cell
.
SetCell
OValue
(
value
.
Item3
?.
Invoke
(
allData
));
cell
.
CellStyle
=
style
;
cell
.
CellStyle
=
style
;
cellIndex
++;
cellIndex
++;
}
}
...
@@ -163,45 +164,44 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
...
@@ -163,45 +164,44 @@ public string AllComputerReport(int allotId, List<ComputeResponse> allData, bool
return
filepath
;
return
filepath
;
}
}
public
static
List
<(
string
,
string
,
Func
<
ComputeResponse
,
object
>,
string
)>
AllCompute
{
get
;
}
=
new
List
<(
string
,
string
,
Func
<
ComputeResponse
,
object
>,
string
)>
public
static
List
<(
string
,
Func
<
ComputeResponse
,
object
>,
Func
<
List
<
ComputeResponse
>,
decimal
>)>
AllCompute
{
get
;
}
=
new
List
<(
string
,
Func
<
ComputeResponse
,
object
>,
Func
<
List
<
ComputeResponse
>,
decimal
>
)>
{
{
(
nameof
(
ComputeResponse
.
Source
),
"来源"
,
t
=>
t
.
Source
,
""
),
(
"来源"
,
t
=>
t
.
Source
,
null
),
(
nameof
(
ComputeResponse
.
UnitType
),
"科室类别"
,
t
=>
t
.
UnitType
,
""
),
(
"科室类别"
,
t
=>
t
.
UnitType
,
null
),
(
nameof
(
ComputeResponse
.
AccountingUnit
),
"核算单元"
,
t
=>
t
.
AccountingUnit
,
""
),
(
"核算单元"
,
t
=>
t
.
AccountingUnit
,
null
),
(
nameof
(
ComputeResponse
.
JobNumber
),
"员工号"
,
t
=>
t
.
JobNumber
,
""
),
(
"员工号"
,
t
=>
t
.
JobNumber
,
null
),
(
nameof
(
ComputeResponse
.
EmployeeName
),
"人员姓名"
,
t
=>
t
.
EmployeeName
,
""
),
(
"人员姓名"
,
t
=>
t
.
EmployeeName
,
null
),
(
nameof
(
ComputeResponse
.
JobTitle
),
"职务"
,
t
=>
t
.
JobTitle
,
""
),
(
"职务"
,
t
=>
t
.
JobTitle
,
null
),
(
nameof
(
ComputeResponse
.
Batch
),
"批次"
,
t
=>
t
.
Batch
,
""
),
(
"批次"
,
t
=>
t
.
Batch
,
null
),
(
nameof
(
ComputeResponse
.
PerforSumFee
),
"调节后业绩绩效"
,
t
=>
t
.
PerforSumFee
,
"SUM(I2:I{0})"
),
(
"调节后业绩绩效"
,
t
=>
t
.
PerforSumFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
PerforSumFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
PerforManagementFee
),
"调节后实发管理绩效"
,
t
=>
t
.
PerforManagementFee
,
"SUM(J2:J{0})"
),
(
"调节后实发管理绩效"
,
t
=>
t
.
PerforManagementFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
PerforManagementFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
AdjustLaterOtherFee
),
"调节后其他绩效"
,
t
=>
t
.
AdjustLaterOtherFee
,
"SUM(K2:K{0})"
),
(
"调节后其他绩效"
,
t
=>
t
.
AdjustLaterOtherFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AdjustLaterOtherFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
NightWorkPerfor
),
"夜班费"
,
t
=>
t
.
NightWorkPerfor
,
"SUM(L2:L{0})"
),
(
"夜班费"
,
t
=>
t
.
NightWorkPerfor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
NightWorkPerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
OthePerfor
),
"医院其他绩效"
,
t
=>
t
.
OthePerfor
,
"SUM(M2:M{0})"
),
(
"医院其他绩效"
,
t
=>
t
.
OthePerfor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
OthePerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
HideOtherPerfor
),
"不公示其他绩效"
,
t
=>
t
.
HideOtherPerfor
,
"SUM(N2:N{0})"
),
(
"不公示其他绩效"
,
t
=>
t
.
HideOtherPerfor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
HideOtherPerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
ShouldGiveFee
),
"应发小计"
,
t
=>
t
.
ShouldGiveFee
,
"SUM(O2:O{0})"
),
(
"应发小计"
,
t
=>
t
.
ShouldGiveFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
ShouldGiveFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
ReservedRatioFee
),
"预留绩效"
,
t
=>
t
.
ReservedRatioFee
,
"SUM(P2:P{0})"
),
(
"预留绩效"
,
t
=>
t
.
ReservedRatioFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
ReservedRatioFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
RealGiveFee
),
"实发绩效"
,
t
=>
t
.
RealGiveFee
,
"SUM(Q2:Q{0})"
),
(
"实发绩效"
,
t
=>
t
.
RealGiveFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
RealGiveFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
BankCard
),
"银行卡号"
,
t
=>
t
.
BankCard
,
""
),
(
"银行卡号"
,
t
=>
t
.
BankCard
,
null
),
(
nameof
(
ComputeResponse
.
JobCategory
),
"正式/临聘"
,
t
=>
t
.
JobCategory
,
""
),
(
"正式/临聘"
,
t
=>
t
.
JobCategory
,
null
),
(
nameof
(
ComputeResponse
.
Duty
),
"职务"
,
t
=>
t
.
Duty
,
""
),
(
"职务"
,
t
=>
t
.
Duty
,
null
),
(
nameof
(
ComputeResponse
.
TitlePosition
),
"职称"
,
t
=>
t
.
TitlePosition
,
""
),
(
"职称"
,
t
=>
t
.
TitlePosition
,
null
),
};
};
public
static
List
<(
string
,
Func
<
ComputeResponse
,
object
>,
Func
<
List
<
ComputeResponse
>,
decimal
>)>
Person
{
get
;
}
=
new
List
<(
string
,
Func
<
ComputeResponse
,
object
>,
Func
<
List
<
ComputeResponse
>,
decimal
>)>
public
static
List
<(
string
,
string
,
Func
<
ComputeResponse
,
object
>,
string
)>
Person
{
get
;
}
=
new
List
<(
string
,
string
,
Func
<
ComputeResponse
,
object
>,
string
)>
{
{
(
nameof
(
ComputeResponse
.
UnitType
),
"科室类别"
,
t
=>
t
.
UnitType
,
""
),
(
"科室类别"
,
t
=>
t
.
UnitType
,
null
),
(
nameof
(
ComputeResponse
.
AccountingUnit
),
"核算单元"
,
t
=>
t
.
AccountingUnit
,
""
),
(
"核算单元"
,
t
=>
t
.
AccountingUnit
,
null
),
(
nameof
(
ComputeResponse
.
JobNumber
),
"员工号"
,
t
=>
t
.
JobNumber
,
""
),
(
"员工号"
,
t
=>
t
.
JobNumber
,
null
),
(
nameof
(
ComputeResponse
.
EmployeeName
),
"人员姓名"
,
t
=>
t
.
EmployeeName
,
""
),
(
"人员姓名"
,
t
=>
t
.
EmployeeName
,
null
),
(
nameof
(
ComputeResponse
.
PerforSumFee
),
"调节后业绩绩效"
,
t
=>
t
.
PerforSumFee
,
"SUM(F2:F{0})"
),
(
"调节后业绩绩效"
,
t
=>
t
.
PerforSumFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
PerforSumFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
PerforManagementFee
),
"调节后实发管理绩效"
,
t
=>
t
.
PerforManagementFee
,
"SUM(G2:G{0})"
),
(
"调节后实发管理绩效"
,
t
=>
t
.
PerforManagementFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
PerforManagementFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
AdjustLaterOtherFee
),
"调节后其他绩效"
,
t
=>
t
.
AdjustLaterOtherFee
,
"SUM(H2:H{0})"
),
(
"调节后其他绩效"
,
t
=>
t
.
AdjustLaterOtherFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AdjustLaterOtherFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
NightWorkPerfor
),
"夜班费"
,
t
=>
t
.
NightWorkPerfor
,
"SUM(I2:I{0})"
),
(
"夜班费"
,
t
=>
t
.
NightWorkPerfor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
NightWorkPerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
OthePerfor
),
"医院其他绩效"
,
t
=>
t
.
OthePerfor
,
"SUM(J2:J{0})"
),
(
"医院其他绩效"
,
t
=>
t
.
OthePerfor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
OthePerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
HideOtherPerfor
),
"不公示其他绩效"
,
t
=>
t
.
HideOtherPerfor
,
"SUM(K2:K{0})"
),
(
"不公示其他绩效"
,
t
=>
t
.
HideOtherPerfor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
HideOtherPerfor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
ShouldGiveFee
),
"应发小计"
,
t
=>
t
.
ShouldGiveFee
,
"SUM(L2:L{0})"
),
(
"应发小计"
,
t
=>
t
.
ShouldGiveFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
ShouldGiveFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
ReservedRatioFee
),
"预留绩效"
,
t
=>
t
.
ReservedRatioFee
,
"SUM(M2:M{0})"
),
(
"预留绩效"
,
t
=>
t
.
ReservedRatioFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
ReservedRatioFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
ComputeResponse
.
RealGiveFee
),
"实发绩效"
,
t
=>
t
.
RealGiveFee
,
"SUM(N2:N{0})"
),
(
"实发绩效"
,
t
=>
t
.
RealGiveFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
RealGiveFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
))
};
};
#
endregion
#
endregion
...
@@ -228,7 +228,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
...
@@ -228,7 +228,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
FileStream
stream
=
new
FileStream
(
filepath
,
FileMode
.
Create
);
FileStream
stream
=
new
FileStream
(
filepath
,
FileMode
.
Create
);
try
try
{
{
H
SSFWorkbook
workbook
=
new
HSSFWorkbook
();
X
SSFWorkbook
workbook
=
new
HSSFWorkbook
();
//设置单元格样式
//设置单元格样式
ICellStyle
style
=
workbook
.
CreateCellStyle
();
ICellStyle
style
=
workbook
.
CreateCellStyle
();
style
.
Alignment
=
HorizontalAlignment
.
Center
;
style
.
Alignment
=
HorizontalAlignment
.
Center
;
...
@@ -242,7 +242,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
...
@@ -242,7 +242,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
IRow
row1
=
sheet
.
CreateRow
(
0
);
IRow
row1
=
sheet
.
CreateRow
(
0
);
int
cellIndex
=
0
;
int
cellIndex
=
0
;
foreach
(
var
item
in
HosData
.
Select
(
t
=>
t
.
Item
2
))
foreach
(
var
item
in
HosData
.
Select
(
t
=>
t
.
Item
1
))
{
{
row1
.
CreateCell
(
cellIndex
).
SetCellValue
(
item
);
row1
.
CreateCell
(
cellIndex
).
SetCellValue
(
item
);
row1
.
GetCell
(
cellIndex
).
CellStyle
=
style
;
row1
.
GetCell
(
cellIndex
).
CellStyle
=
style
;
...
@@ -255,7 +255,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
...
@@ -255,7 +255,7 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
{
{
var
row
=
sheet
.
CreateRow
(
startIndex
);
var
row
=
sheet
.
CreateRow
(
startIndex
);
cellIndex
=
0
;
cellIndex
=
0
;
foreach
(
var
field
in
HosData
.
Select
(
t
=>
t
.
Item
3
))
foreach
(
var
field
in
HosData
.
Select
(
t
=>
t
.
Item
2
))
{
{
var
cell
=
row
.
CreateCell
(
cellIndex
);
var
cell
=
row
.
CreateCell
(
cellIndex
);
cell
.
SetCellOValue
(
field
?.
Invoke
(
item
));
cell
.
SetCellOValue
(
field
?.
Invoke
(
item
));
...
@@ -269,13 +269,13 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
...
@@ -269,13 +269,13 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
cellIndex
=
0
;
cellIndex
=
0
;
var
totalRow
=
sheet
.
CreateRow
(
startIndex
);
var
totalRow
=
sheet
.
CreateRow
(
startIndex
);
foreach
(
var
value
in
HosData
.
Select
(
t
=>
t
.
Item
4
))
foreach
(
var
value
in
HosData
.
Select
(
t
=>
t
.
Item
3
))
{
{
var
cell
=
totalRow
.
CreateCell
(
cellIndex
);
var
cell
=
totalRow
.
CreateCell
(
cellIndex
);
if
(
cellIndex
==
0
)
if
(
cellIndex
==
0
)
cell
.
SetCellOValue
(
"合计"
);
cell
.
SetCellOValue
(
"合计"
);
else
else
cell
.
SetCell
Formula
(
string
.
Format
(
value
,
startIndex
));
cell
.
SetCell
OValue
(
value
?.
Invoke
(
deptData
));
cell
.
CellStyle
=
style
;
cell
.
CellStyle
=
style
;
cellIndex
++;
cellIndex
++;
}
}
...
@@ -294,27 +294,28 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
...
@@ -294,27 +294,28 @@ public string DeptReport(int allotId, List<DeptResponse> deptData)
return
filepath
;
return
filepath
;
}
}
public
static
List
<(
string
,
string
,
Func
<
DeptResponse
,
object
>,
string
)>
HosData
{
get
;
}
=
new
List
<(
string
,
string
,
Func
<
DeptResponse
,
object
>,
string
)>
public
static
List
<(
string
,
Func
<
DeptResponse
,
object
>,
Func
<
List
<
DeptResponse
>,
decimal
>)>
HosData
{
get
;
}
=
new
List
<(
string
,
Func
<
DeptResponse
,
object
>,
Func
<
List
<
DeptResponse
>,
decimal
>
)>
{
{
(
nameof
(
DeptResponse
.
UnitName
),
"核算群体"
,
t
=>
t
.
UnitName
,
""
),
(
"核算群体"
,
t
=>
t
.
UnitName
,
null
),
(
nameof
(
DeptResponse
.
AccountingUnit
),
"核算单元"
,
t
=>
t
.
AccountingUnit
,
""
),
(
"核算单元"
,
t
=>
t
.
AccountingUnit
,
null
),
(
nameof
(
DeptResponse
.
PerforFee
),
"业绩绩效"
,
t
=>
t
.
PerforFee
,
"SUM(C2:C{0})"
),
(
"业绩绩效"
,
t
=>
t
.
PerforFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
PerforFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
WorkloadFee
),
"工作量绩效"
,
t
=>
t
.
WorkloadFee
,
"SUM(D2:D{0})"
),
(
"工作量绩效"
,
t
=>
t
.
WorkloadFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
WorkloadFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
AssessBeforeOtherFee
),
"考核前其他绩效"
,
t
=>
t
.
AssessBeforeOtherFee
,
"SUM(E2:E{0})"
),
(
"考核前其他绩效"
,
t
=>
t
.
AssessBeforeOtherFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AssessBeforeOtherFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
PerforTotal
),
"考核前绩效合计"
,
t
=>
t
.
PerforTotal
,
"SUM(F2:F{0})"
),
(
"考核前绩效合计"
,
t
=>
t
.
PerforTotal
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
PerforTotal
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
ScoringAverage
),
"科室考核得分"
,
t
=>
t
.
ScoringAverage
,
"SUM(G2:G{0})"
),
(
"科室考核得分"
,
t
=>
t
.
ScoringAverage
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
ScoringAverage
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
MedicineExtra
),
"药占比奖罚"
,
t
=>
t
.
MedicineExtra
,
"SUM(H2:H{0})"
),
(
"药占比奖罚"
,
t
=>
t
.
MedicineExtra
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
MedicineExtra
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
MaterialsExtra
),
"材料占比奖罚"
,
t
=>
t
.
MaterialsExtra
,
"SUM(I2:I{0})"
),
(
"材料占比奖罚"
,
t
=>
t
.
MaterialsExtra
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
MaterialsExtra
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
Extra
),
"医院奖罚"
,
t
=>
t
.
Extra
,
"SUM(J2:J{0})"
),
(
"医院奖罚"
,
t
=>
t
.
Extra
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
Extra
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
ScoringPerfor
),
"考核后其他绩效"
,
t
=>
t
.
ScoringPerfor
,
"SUM(K2:K{0})"
),
(
"考核后其他绩效"
,
t
=>
t
.
AssessLaterOtherFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AssessLaterOtherFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
AssessLaterOtherFee
),
"考核后绩效"
,
t
=>
t
.
AssessLaterOtherFee
,
"SUM(L2:L{0})"
),
(
"考核后绩效"
,
t
=>
t
.
AssessLaterPerforTotal
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AssessLaterPerforTotal
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
AdjustFactor
),
"调节系数"
,
t
=>
t
.
AdjustFactor
,
"SUM(M2:M{0})"
),
(
"调节系数"
,
t
=>
t
.
AdjustFactor
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AdjustFactor
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
AdjustLaterOtherFee
),
"调节后其他绩效"
,
t
=>
t
.
AdjustLaterOtherFee
,
"SUM(N2:N{0})"
),
(
"调节后其他绩效"
,
t
=>
t
.
AdjustLaterOtherFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AdjustLaterOtherFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
AssessLaterManagementFee
),
"科主任实发管理绩效"
,
t
=>
t
.
AssessLaterManagementFee
,
"SUM(O2:O{0})"
),
(
"科主任实发管理绩效"
,
t
=>
t
.
AssessLaterManagementFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AssessLaterManagementFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
AprPerforAmount
),
"医院其他绩效"
,
t
=>
t
.
AprPerforAmount
,
"SUM(P2:P{0})"
),
(
"医院其他绩效"
,
t
=>
t
.
AprPerforAmount
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
AprPerforAmount
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
HideAprOtherPerforAmount
),
"不公示其他绩效"
,
t
=>
t
.
HideAprOtherPerforAmount
,
"SUM(Q2:Q{0})"
),
(
"不公示其他绩效"
,
t
=>
t
.
HideAprOtherPerforAmount
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
HideAprOtherPerforAmount
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
(
nameof
(
DeptResponse
.
RealGiveFee
),
"实发绩效"
,
t
=>
t
.
RealGiveFee
,
"SUM(R2:R{0})"
),
(
"实发绩效"
,
t
=>
t
.
RealGiveFee
,(
t
)
=>
Math
.
Round
(
t
.
Sum
(
item
=>
item
.
RealGiveFee
??
0
),
2
,
MidpointRounding
.
AwayFromZero
)
),
};
};
#
endregion
#
endregion
}
}
}
}
performance/Performance.Services/PersonService.cs
View file @
76217558
...
@@ -658,8 +658,11 @@ public HandsonTable GetBatchPersonStructrue(int hospitalId)
...
@@ -658,8 +658,11 @@ public HandsonTable GetBatchPersonStructrue(int hospitalId)
var
ss
=
deptdics
?.
Where
(
t
=>
!
new
string
[]
{
UnitType
.
专家组
.
ToString
()
}.
Contains
(
t
.
UnitType
));
var
ss
=
deptdics
?.
Where
(
t
=>
!
new
string
[]
{
UnitType
.
专家组
.
ToString
()
}.
Contains
(
t
.
UnitType
));
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
{
{
var
columns
=
new
[]
{
"核算单元"
,
"科室名称"
,
"姓名"
,
"员工工号"
};
foreach
(
var
column
in
result
.
Columns
)
foreach
(
var
column
in
result
.
Columns
)
{
{
if
(
columns
.
Contains
(
column
.
Data
))
column
.
Type
=
"text"
;
if
(
column
.
Data
==
"人员类别"
)
if
(
column
.
Data
==
"人员类别"
)
{
{
...
@@ -734,13 +737,13 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -734,13 +737,13 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
var
dicData
=
CreateDataRow
(
request
,
dict
);
var
dicData
=
CreateDataRow
(
request
,
dict
);
List
<
per_employee
>
employees
=
new
List
<
per_employee
>();
List
<
per_employee
>
employees
=
new
List
<
per_employee
>();
var
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
AllotId
);
var
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
AllotId
);
var
delPersonsNum
=
new
List
<
string
>();
var
delPersonsNum
=
new
List
<
string
>();
foreach
(
var
item
in
dicData
)
foreach
(
var
item
in
dicData
)
{
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
item
[
"AttendanceDay"
])
&&
!
string
.
IsNullOrEmpty
(
item
[
"ReservedRatio"
]))
if
(!
string
.
IsNullOrEmpty
(
item
[
"AttendanceDay"
])
&&
!
string
.
IsNullOrEmpty
(
item
[
"ReservedRatio"
]))
{
{
decimal
attendanceDay
=
ConvertHelper
.
To
<
decimal
>(
item
[
"AttendanceDay"
]),
reservedRatio
=
ConvertHelper
.
To
<
decimal
>(
item
[
"ReservedRatio"
]);
decimal
attendanceDay
=
ConvertHelper
.
To
<
decimal
>(
item
[
"AttendanceDay"
]),
reservedRatio
=
ConvertHelper
.
To
<
decimal
>(
item
[
"ReservedRatio"
]);
...
@@ -772,7 +775,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -772,7 +775,7 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
if
(
employees
!=
null
&&
employees
.
Any
())
if
(
employees
!=
null
&&
employees
.
Any
())
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
peremployeeRepository
.
AddRange
(
employees
.
ToArray
());
//个人绩效查询用户添加
//个人绩效查询用户添加
SaveQueryRole
(
HospitalId
,
request
);
SaveQueryRole
(
HospitalId
,
request
);
return
true
;
return
true
;
}
}
...
@@ -1130,12 +1133,12 @@ public void SaveQueryRole(int hospitalId, SaveCollectData request)
...
@@ -1130,12 +1133,12 @@ public void SaveQueryRole(int hospitalId, SaveCollectData request)
var
role
=
perforRoleRepository
.
GetEntity
(
t
=>
t
.
RoleName
==
"绩效查询"
);
var
role
=
perforRoleRepository
.
GetEntity
(
t
=>
t
.
RoleName
==
"绩效查询"
);
var
userRole
=
perforUserroleRepository
.
GetEntities
(
t
=>
t
.
RoleID
==
role
.
ID
)?.
Select
(
t
=>
t
.
UserID
);
var
userRole
=
perforUserroleRepository
.
GetEntities
(
t
=>
t
.
RoleID
==
role
.
ID
)?.
Select
(
t
=>
t
.
UserID
);
var
users
=
perforUserRepository
.
GetEntities
(
t
=>
userRole
.
Contains
(
t
.
ID
));
var
users
=
perforUserRepository
.
GetEntities
(
t
=>
userRole
.
Contains
(
t
.
ID
));
var
newUsers
=
new
List
<
string
[
]>
();
var
newUsers
=
new
List
<
string
[
]>
();
foreach
(
var
item
in
dicData
)
foreach
(
var
item
in
dicData
)
{
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
if
(
hospital
.
IsOwnerQuery
==
1
)
if
(
hospital
.
IsOwnerQuery
==
1
)
{
{
var
isNewRole
=
!
string
.
IsNullOrEmpty
(
data
.
PersonnelNumber
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
item
[
"Password"
]);
var
isNewRole
=
!
string
.
IsNullOrEmpty
(
data
.
PersonnelNumber
?.
Trim
())
&&
!
string
.
IsNullOrEmpty
(
item
[
"Password"
]);
...
...
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