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
73103dad
Commit
73103dad
authored
Aug 03, 2022
by
Licx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v22.4.18-Beta-wuzhou' into develop
parents
363a8768
5e3b9fd4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
performance/Performance.Services/BudgetService.cs
+5
-2
performance/Performance.Services/RedistributionService.cs
+13
-5
No files found.
performance/Performance.Services/BudgetService.cs
View file @
73103dad
...
@@ -109,7 +109,8 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
...
@@ -109,7 +109,8 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
if
(
request
==
null
||
!
request
.
Any
(
t
=>
t
.
Type
==
1
)
||
!
request
.
Any
(
t
=>
t
.
Type
==
2
))
if
(
request
==
null
||
!
request
.
Any
(
t
=>
t
.
Type
==
1
)
||
!
request
.
Any
(
t
=>
t
.
Type
==
2
))
throw
new
PerformanceException
(
"提交数据中含无效数据"
);
throw
new
PerformanceException
(
"提交数据中含无效数据"
);
var
amounts
=
perbudgetamountRepository
.
GetEntities
(
w
=>
request
.
Where
(
t
=>
t
.
Type
==
1
).
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
));
var
requestType1Ids
=
request
.
Where
(
t
=>
t
.
Type
==
1
).
Select
(
t
=>
t
.
Id
);
var
amounts
=
perbudgetamountRepository
.
GetEntities
(
w
=>
requestType1Ids
.
Contains
(
w
.
Id
));
if
(
amounts
!=
null
&&
amounts
.
Any
())
if
(
amounts
!=
null
&&
amounts
.
Any
())
{
{
foreach
(
var
item
in
amounts
)
foreach
(
var
item
in
amounts
)
...
@@ -139,7 +140,9 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
...
@@ -139,7 +140,9 @@ public bool ModifyBudgetData(List<BudgetResponse> request)
perbudgetamountRepository
.
UpdateRange
(
amounts
.
ToArray
());
perbudgetamountRepository
.
UpdateRange
(
amounts
.
ToArray
());
}
}
var
ratios
=
perbudgetratioRepository
.
GetEntities
(
w
=>
request
.
Where
(
t
=>
t
.
Type
==
2
).
Select
(
t
=>
t
.
Id
).
Contains
(
w
.
Id
));
var
requestType2Ids
=
request
.
Where
(
t
=>
t
.
Type
==
2
).
Select
(
t
=>
t
.
Id
);
var
ratios
=
perbudgetratioRepository
.
GetEntities
(
w
=>
requestType2Ids
.
Contains
(
w
.
Id
));
if
(
ratios
!=
null
&&
ratios
.
Any
())
if
(
ratios
!=
null
&&
ratios
.
Any
())
{
{
foreach
(
var
item
in
ratios
)
foreach
(
var
item
in
ratios
)
...
...
performance/Performance.Services/RedistributionService.cs
View file @
73103dad
...
@@ -41,6 +41,7 @@ public class RedistributionService : IAutoInjection
...
@@ -41,6 +41,7 @@ public class RedistributionService : IAutoInjection
private
readonly
PerforAgworkloadtypeRepository
_agworkloadtypeRepository
;
private
readonly
PerforAgworkloadtypeRepository
_agworkloadtypeRepository
;
private
readonly
PerforImemployeeclinicRepository
_imemployeeclinicRepository
;
private
readonly
PerforImemployeeclinicRepository
_imemployeeclinicRepository
;
private
readonly
PerforImemployeelogisticsRepository
_imemployeelogisticsRepository
;
private
readonly
PerforImemployeelogisticsRepository
_imemployeelogisticsRepository
;
private
ag_secondallot
prevSecondAllot
;
public
RedistributionService
(
public
RedistributionService
(
ILogger
<
RedistributionService
>
logger
,
ILogger
<
RedistributionService
>
logger
,
...
@@ -100,6 +101,10 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -100,6 +101,10 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
var
allot
=
_perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
var
allot
=
_perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"绩效记录不存在!"
);
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
));
var
computes
=
_rescomputeRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allot
.
ID
&&
UnitTypeUtil
.
Office
.
Contains
(
w
.
AccountType
));
...
@@ -138,7 +143,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -138,7 +143,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
);
var
dic
=
GetTableHeaderDictionary
(
computeMode
,
allot
,
second
,
loads
,
isAttachFactor
:
false
);
return
new
SecondDetailDto
{
Head
=
head
,
Body
=
handson
,
Dic
=
dic
};
return
new
SecondDetailDto
{
Head
=
head
,
Body
=
handson
,
Dic
=
dic
};
}
}
...
@@ -424,7 +429,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
...
@@ -424,7 +429,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
/// <param name="second"></param>
/// <param name="second"></param>
/// <param name="allot"></param>
/// <param name="allot"></param>
/// <returns></returns>
/// <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
)
{
{
/*
/*
此处数据需要额外注意,前端显示规则:接口返回则显示
此处数据需要额外注意,前端显示规则:接口返回则显示
...
@@ -461,7 +466,8 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
...
@@ -461,7 +466,8 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
// 横向 纵向 特有顶部信息
// 横向 纵向 特有顶部信息
if
(
computeMode
!=
ComputeMode
.
NotCalculate
)
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
.
SeniorityTitlesAccountedPerformance
),
history
?.
SeniorityTitlesAccountedPerformance
??
0.2
m
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
Workload_Ratio_Default
),
history
?.
Workload_Ratio_Default
??
0.8
m
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
Workload_Ratio_Default
),
history
?.
Workload_Ratio_Default
??
0.8
m
);
...
@@ -469,7 +475,9 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
...
@@ -469,7 +475,9 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
// 多工作量加载
// 多工作量加载
var
status
=
(
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
});
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
))
if
(
second
.
Status
.
HasValue
&&
status
.
Contains
(
second
.
Status
.
Value
))
{
{
...
@@ -630,7 +638,7 @@ private List<ag_bodysource> LoadEmployees_PrevSecondAllot(per_allot allot, ag_se
...
@@ -630,7 +638,7 @@ private List<ag_bodysource> LoadEmployees_PrevSecondAllot(per_allot allot, ag_se
{
{
List
<
ag_bodysource
>
numbers
=
new
List
<
ag_bodysource
>();
List
<
ag_bodysource
>
numbers
=
new
List
<
ag_bodysource
>();
// 上次二次分配分三种情况,1.其他来源 2.单工作量 3.多工作量
// 上次二次分配分三种情况,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
};
var
status
=
new
int
[]
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
};
if
(
prevSecondAllot
!=
null
&&
status
.
Contains
(
prevSecondAllot
.
Status
??
(
int
)
SecondAllotStatus
.
Uncommitted
))
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