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
810cadcc
Commit
810cadcc
authored
Mar 26, 2019
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
特殊科室处理
parent
bb84d139
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
4 deletions
+34
-4
performance/Performance.Services/PerExcelService/PerExcelService.cs
+34
-4
No files found.
performance/Performance.Services/PerExcelService/PerExcelService.cs
View file @
810cadcc
...
...
@@ -95,8 +95,8 @@ public void Execute(per_allot allot)
var
baiscnorm
=
NurseBaiscnorm
(
list
);
// 计算最总数据
Compute
(
allot
,
excel
,
baiscnorm
);
SpecialUnitCompute
(
excel
,
allot
);
var
baiscnormList
=
Compute
(
allot
,
excel
,
baiscnorm
);
SpecialUnitCompute
(
excel
,
allot
,
baiscnormList
);
//发送邮件
SendEmail
(
allot
);
...
...
@@ -110,13 +110,41 @@ public void Execute(per_allot allot)
/// </summary>
/// <param name="excel"></param>
/// <param name="allot"></param>
private
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
)
private
void
SpecialUnitCompute
(
PerExcel
excel
,
per_allot
allot
,
List
<
res_baiscnorm
>
baiscnormList
)
{
var
specialUnit
=
excel
.
PerSheet
.
FirstOrDefault
(
t
=>
t
.
SheetType
==
SheetType
.
SpecialUnit
);
if
(
specialUnit
==
null
||
specialUnit
.
PerData
.
Count
==
0
)
return
;
var
dataList
=
specialUnit
.
PerData
.
Select
(
t
=>
(
PerDataSpecialUnit
)
t
);
BaiscNormService
baiscNormService
=
new
BaiscNormService
();
var
typeList
=
EnumHelper
.
GetItems
<
PerformanceType
>();
List
<
res_specialunit
>
resList
=
new
List
<
res_specialunit
>();
foreach
(
var
t
in
dataList
)
{
var
type
=
typeList
.
FirstOrDefault
(
o
=>
o
.
Description
==
t
.
QuantitativeIndicators
);
if
(
type
!=
null
)
t
.
QuantitativeIndicatorsValue
=
baiscNormService
.
GetBaiscNorm
(
baiscnormList
,
(
PerformanceType
)
type
.
Value
);
var
res
=
new
res_specialunit
{
AllotID
=
allot
.
ID
,
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
AccountingUnit
,
Number
=
t
.
Number
,
QuantitativeIndicators
=
t
.
QuantitativeIndicators
,
Quantity
=
t
.
Quantity
,
QuantitativeIndicatorsValue
=
t
.
QuantitativeIndicatorsValue
,
ScoringAverage
=
t
.
ScoringAverage
,
OtherPerfor
=
t
.
OtherPerfor
,
Punishment
=
t
.
Punishment
,
Adjust
=
t
.
Adjust
,
Avg
=
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
/
t
.
Number
,
ShouldFee
=
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
,
GiveFee
=
(
t
.
Quantity
*
t
.
QuantitativeIndicatorsValue
+
t
.
OtherPerfor
+
t
.
Punishment
)
*
t
.
Adjust
,
};
resList
.
Add
(
res
);
}
var
resDataList
=
dataList
.
Select
(
t
=>
new
res_specialunit
{
AllotID
=
allot
.
ID
,
...
...
@@ -450,7 +478,7 @@ private IRow CreateRow(ICellStyle cellstyle, ISheet exportSheet, IRow row, PerHe
/// 计算最终数据
/// </summary>
/// <param name="excel"></param>
public
void
Compute
(
per_allot
allot
,
PerExcel
excel
,
res_baiscnorm
baiscnorm
)
public
List
<
res_baiscnorm
>
Compute
(
per_allot
allot
,
PerExcel
excel
,
res_baiscnorm
baiscnorm
)
{
var
sheetList
=
_perforImSheetRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
//取出人员信息
...
...
@@ -485,6 +513,8 @@ public void Compute(per_allot allot, PerExcel excel, res_baiscnorm baiscnorm)
baiscnormList
.
ForEach
(
t
=>
t
.
AllotID
=
allot
.
ID
);
_perforResbaiscnormRepository
.
AddRange
(
baiscnormList
.
ToArray
());
return
baiscnormList
;
}
}
}
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