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
5e3b9fd4
Commit
5e3b9fd4
authored
Aug 03, 2022
by
Licx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配继承
parent
7b15f709
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
performance/Performance.Services/RedistributionService.cs
+13
-5
No files found.
performance/Performance.Services/RedistributionService.cs
View file @
5e3b9fd4
...
...
@@ -40,6 +40,7 @@ public class RedistributionService : IAutoInjection
private
readonly
PerforAgworkloadsourceRepository
_agworkloadsourceRepository
;
private
readonly
PerforAgworkloadtypeRepository
_agworkloadtypeRepository
;
private
readonly
PerforImemployeelogisticsRepository
_imemployeelogisticsRepository
;
private
ag_secondallot
prevSecondAllot
;
public
RedistributionService
(
ILogger
<
RedistributionService
>
logger
,
...
...
@@ -97,6 +98,10 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
var
allot
=
_perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效记录不存在!"
);
// 前二次绩效
prevSecondAllot
=
_secondAllotDetails
.
GetPreviousSecondAllot
(
allot
.
HospitalId
,
second
);
// 填报模板带出 行政工勤 绩效
var
computes
=
_rescomputeRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allot
.
ID
&&
UnitTypeUtil
.
Office
.
Contains
(
w
.
AccountType
));
...
...
@@ -135,7 +140,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
}
}
var
head
=
LoadHead
(
computeMode
,
allot
,
second
);
var
head
=
LoadHead
(
computeMode
,
allot
,
second
,
overrideMode
);
var
dic
=
GetTableHeaderDictionary
(
computeMode
,
allot
,
second
,
loads
,
isAttachFactor
:
false
);
return
new
SecondDetailDto
{
Head
=
head
,
Body
=
handson
,
Dic
=
dic
};
}
...
...
@@ -421,7 +426,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
/// <param name="second"></param>
/// <param name="allot"></param>
/// <returns></returns>
private
Dictionary
<
string
,
object
>
LoadHead
(
ComputeMode
computeMode
,
per_allot
allot
,
ag_secondallot
second
)
private
Dictionary
<
string
,
object
>
LoadHead
(
ComputeMode
computeMode
,
per_allot
allot
,
ag_secondallot
second
,
EmployeeSource
overrideMode
=
0
)
{
/*
此处数据需要额外注意,前端显示规则:接口返回则显示
...
...
@@ -455,7 +460,8 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
// 横向 纵向 特有顶部信息
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
{
var
history
=
_agheadsourceRepository
.
GetEntity
(
t
=>
t
.
SecondId
==
second
.
Id
);
int
secondId
=
overrideMode
==
EmployeeSource
.
PrevSecondAllot
?
prevSecondAllot
.
Id
:
second
.
Id
;
var
history
=
_agheadsourceRepository
.
GetEntity
(
t
=>
t
.
SecondId
==
secondId
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
history
?.
SeniorityTitlesAccountedPerformance
??
0.2
m
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
Workload_Ratio_Default
),
history
?.
Workload_Ratio_Default
??
0.8
m
);
...
...
@@ -463,7 +469,9 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
// 多工作量加载
var
status
=
(
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
});
var
headDynamic
=
_agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
)
??
new
List
<
ag_worktype_source
>();
var
headDynamic
=
_agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
)
??
new
List
<
ag_worktype_source
>();
// 已提交
if
(
second
.
Status
.
HasValue
&&
status
.
Contains
(
second
.
Status
.
Value
))
{
...
...
@@ -624,7 +632,7 @@ private List<ag_bodysource> LoadEmployees_PrevSecondAllot(per_allot allot, ag_se
{
List
<
ag_bodysource
>
numbers
=
new
List
<
ag_bodysource
>();
// 上次二次分配分三种情况,1.其他来源 2.单工作量 3.多工作量
var
prevSecondAllot
=
_secondAllotDetails
.
GetPreviousSecondAllot
(
allot
.
HospitalId
,
second
);
//
var prevSecondAllot = _secondAllotDetails.GetPreviousSecondAllot(allot.HospitalId, second);
var
status
=
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
};
if
(
prevSecondAllot
!=
null
&&
status
.
Contains
(
prevSecondAllot
.
Status
??
(
int
)
SecondAllotStatus
.
Uncommitted
))
{
...
...
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