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
2c276221
Commit
2c276221
authored
Nov 24, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效管理绩效列表,特殊科室合并值为文本
parent
bff24da9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
29 deletions
+29
-29
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
+13
-10
performance/Performance.Services/SecondAllotService.cs
+16
-19
No files found.
performance/Performance.Services/ExtractExcelService/SheetDataWrite/SpecialUnitDataWrite.cs
View file @
2c276221
...
...
@@ -14,7 +14,6 @@ public class SpecialUnitDataWrite : ISheetDataWrite
{
public
void
WriteCollectData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
List
<
collect_data
>
collects
)
{
}
public
void
WriteSheetData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
object
data
,
Dictionary
<
ExDataDict
,
object
>
exdict
=
null
)
...
...
@@ -53,7 +52,6 @@ public void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType sheetTyp
}
catch
(
Exception
)
{
}
}
...
...
@@ -119,14 +117,9 @@ private void SupplyMergedRegionData(ISheet sheet, ExcelStyle style, List<Special
var
basicStyle
=
style
.
GetCellStyle
();
foreach
(
var
merged
in
mergedRegions
.
Where
(
t
=>
t
.
FirstRow
>
1
))
{
string
value
=
""
;
CellType
cellType
=
CellType
.
Unknown
;
var
valueCell
=
sheet
.
GetRow
(
merged
.
FirstRow
)?.
GetCell
(
merged
.
FirstColumn
);
if
(
valueCell
!=
null
)
{
cellType
=
valueCell
.
CellType
;
valueCell
.
SetCellType
(
CellType
.
String
);
value
=
valueCell
.
StringCellValue
;
}
string
value
=
valueCell
!=
null
?
valueCell
.
ToString
()
:
""
;
merged
.
Single
=
value
;
if
(
string
.
IsNullOrEmpty
(
value
))
continue
;
...
...
@@ -187,6 +180,7 @@ private void SupplySpecialQuantity(ISheet sheet, ExcelStyle style, List<SpecialD
if
(
special
!=
null
)
{
var
cell
=
row
.
GetOrCreate
(
quantityIndex
);
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
<
double
>(
special
.
Quantity
);
cell
.
CellStyle
=
cellStyle
;
...
...
@@ -291,7 +285,10 @@ private void WriteSpecialData(IRow row, ICellStyle style, SpecialDto special, Li
if
(
new
string
[]
{
SpecialUnitColumns
.
Department
,
SpecialUnitColumns
.
Target
}.
Contains
(
item
.
Key
))
cell
.
SetCellValue
(
item
.
Value
.
Invoke
(
special
)?.
ToString
());
else
{
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
<
double
>(
item
.
Value
.
Invoke
(
special
));
}
cell
.
CellStyle
=
style
;
}
}
...
...
@@ -326,14 +323,20 @@ private void AddMergedRegion(ISheet sheet, List<SpecialCellRange> ranges, List<s
public
void
SetCellValue
(
ICell
cell
,
string
value
)
{
switch
(
value
)
if
(
string
.
IsNullOrEmpty
(
value
))
return
;
switch
(
value
.
Trim
())
{
case
string
reg
when
Regex
.
IsMatch
(
reg
,
@"^[+-]?\d*[.]?\d*$"
):
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
(
ConvertHelper
.
To
<
double
>(
value
));
break
;
case
string
reg
when
Regex
.
IsMatch
(
reg
,
@"^[+-]?\d*$"
):
cell
.
SetCellType
(
CellType
.
Numeric
);
cell
.
SetCellValue
(
ConvertHelper
.
To
<
int
>(
value
));
break
;
default
:
cell
.
SetCellValue
(
value
);
break
;
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
2c276221
...
...
@@ -1757,16 +1757,16 @@ public List<SecondPerforResponse> DeptComputeDetail(int userId, int allotId, out
var
empDic
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
allotId
);
foreach
(
var
item
in
result
)
{
var
perfor
=
((
item
.
GiveFee
??
0
)
!=
0
?
item
.
GiveFee
:
item
.
PerforSumFee
)
??
0
;
item
.
PerforSumFee
=
Math
.
Round
(
item
.
PerforSumFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
PerforManagementFee
=
Math
.
Round
(
item
.
PerforManagementFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
GiveFee
=
Math
.
Round
(
perfor
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
AdjustLaterOtherFee
=
Math
.
Round
(
item
.
AdjustLaterOtherFee
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
var
real
=
Math
.
Round
((
item
.
PerforSumFee
??
0
)
+
(
item
.
PerforManagementFee
??
0
),
0
)
*
item
.
Adjust
+
(
item
.
AdjustLaterOtherFee
??
0
);
item
.
OthePerfor
=
Math
.
Round
(
item
.
OthePerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
NightWorkPerfor
=
Math
.
Round
(
item
.
NightWorkPerfor
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ShouldGiveFee
=
Math
.
Round
((
perfor
+
item
.
AdjustLaterOtherFee
+
item
.
NightWorkPerfor
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
((
perfor
+
item
.
AdjustLaterOtherFee
+
item
.
NightWorkPerfor
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ShouldGiveFee
=
Math
.
Round
((
real
??
0
)
+
(
item
.
OthePerfor
??
0
)
+
(
item
.
NightWorkPerfor
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
ReservedRatio
=
empDic
?.
FirstOrDefault
(
w
=>
w
.
PersonnelNumber
==
item
.
JobNumber
)?.
ReservedRatio
??
0
;
item
.
ReservedRatioFee
=
Math
.
Round
((
real
??
0
)
*
(
item
.
ReservedRatio
??
0
),
0
,
MidpointRounding
.
AwayFromZero
);
item
.
RealGiveFee
=
Math
.
Round
(
item
.
ShouldGiveFee
-
(
item
.
ReservedRatioFee
??
0
)
??
0
,
0
,
MidpointRounding
.
AwayFromZero
);
}
}
...
...
@@ -1796,32 +1796,29 @@ private List<SecondPerforResponse> GetAllotPerformance(int allotId, List<res_com
JobNumber
=
t
.
JobNumber
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
AccountType
,
Adjust
=
t
.
Adjust
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
,
Scale
=
t
.
Scale
,
Efficiency
=
t
.
Efficiency
,
Grant
=
t
.
Grant
,
Punishment
=
t
.
Punishment
,
ShouldGiveFee
=
t
.
ShouldGiveFee
,
PerforSumFee
=
t
.
PerforSumFee
,
GiveFee
=
t
.
GiveFee
*
t
.
Adjust
,
AdjustLaterOtherFee
=
t
.
AdjustLaterOtherFee
??
0
,
OthePerfor
=
t
.
OtherPerfor
,
RealGiveFee
=
t
.
RealGiveFee
};
if
(
types1
.
Contains
(
t
.
AccountType
))
comp
.
PerforManagementFee
=
((
t
.
Efficiency
+
t
.
Scale
)
*
t
.
Grant
+
t
.
OtherManagePerfor
)
*
t
.
Attendance
*
t
.
ScoreAverageRate
;
else
comp
.
PerforManagementFee
=
t
.
RealGiveFee
;
// 行政中层 行政高层 补充 夜班费
if
(
types2
.
Contains
(
t
.
AccountType
))
comp
.
NightWorkPerfor
=
t
.
NightWorkPerfor
;
// 获取科主任系数,解决共用科主任重复计算人均问题
var
basics
=
empolyeeList
?.
FirstOrDefault
(
w
=>
w
.
AccountingUnit
==
t
.
AccountingUnit
&&
w
.
DoctorName
==
t
.
EmployeeName
&&
w
.
PersonnelNumber
==
t
.
JobNumber
)?.
Basics
;
// 科主任/护士长
if
(
types1
.
Contains
(
t
.
AccountType
))
{
// 等同于考核后管理绩效 AssessLaterManagementFee
comp
.
PerforManagementFee
=
Math
.
Round
(
t
.
ShouldGiveFee
*
t
.
ScoreAverageRate
*
t
.
Attendance
+
t
.
Punishment
??
0
);
// 仅显示管理绩效
if
(
isShowManage
==
2
)
comp
.
PerforSumFee
=
0
;
else
comp
.
PerforSumFee
=
Math
.
Round
((
t
.
Avg
*
(
basics
??
1
))
+
t
.
ShouldGiveFee
+
t
.
AssessBeforeOtherFee
??
0
);
comp
.
PerforSumFee
=
t
.
Avg
;
}
return
comp
;
}).
ToList
();
...
...
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