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
ee75db05
Commit
ee75db05
authored
Sep 27, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配保存,带出上次,加载科室字典BUG修复
parent
d66b10dc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
performance/Performance.Services/RedistributionService.cs
+8
-2
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+11
-7
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+2
-1
No files found.
performance/Performance.Services/RedistributionService.cs
View file @
ee75db05
...
...
@@ -143,7 +143,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
}
}
var
head
=
LoadHead
(
computeMode
,
allot
,
second
,
overrideMode
);
var
head
=
LoadHead
(
computeMode
,
allot
,
second
,
prevSecondAllot
,
overrideMode
);
var
dic
=
GetTableHeaderDictionary
(
computeMode
,
allot
,
second
,
loads
,
isAttachFactor
:
false
);
return
new
SecondDetailDto
{
Head
=
head
,
Body
=
handson
,
Dic
=
dic
};
}
...
...
@@ -430,7 +430,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
,
EmployeeSource
overrideMode
=
0
)
private
Dictionary
<
string
,
object
>
LoadHead
(
ComputeMode
computeMode
,
per_allot
allot
,
ag_secondallot
second
,
ag_secondallot
prevSecondAllot
=
null
,
EmployeeSource
overrideMode
=
0
)
{
/*
此处数据需要额外注意,前端显示规则:接口返回则显示
...
...
@@ -480,6 +480,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
var
headDynamic
=
_agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
)
??
new
List
<
ag_worktype_source
>();
// 已提交
if
(
second
.
Status
.
HasValue
&&
status
.
Contains
(
second
.
Status
.
Value
))
{
...
...
@@ -500,6 +501,11 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
var
tempWorkloadTypes
=
_agworkloadtypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
t
.
Department
==
second
.
Department
)
??
new
List
<
ag_workload_type
>();
var
workloadTypes
=
tempWorkloadTypes
.
Where
(
t
=>
UnitTypeUtil
.
Is
(
t
.
UnitType
,
second
.
UnitType
));
// 前二次绩效
if
(
headDynamic
.
Count
==
0
&&
prevSecondAllot
!=
null
)
{
headDynamic
=
_agworktypesourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
prevSecondAllot
.
Id
)
??
new
List
<
ag_worktype_source
>();
}
foreach
(
var
workitem
in
workloadTypes
)
{
var
name
=
$"Workload_Ratio_
{
workitem
.
Id
}
"
;
...
...
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
ee75db05
...
...
@@ -90,7 +90,8 @@ public SecondResponse GetSecondDetails(int userId, int secondId, int hospitalId,
var
prevSecondAllot
=
GetPreviousSecondAllot
(
hospitalId
,
secondAllot
);
int
tempId
=
(
int
)
Temp
.
other
;
var
userTemp
=
agusetempRepository
.
GetEntity
(
w
=>
w
.
HospitalId
==
hospitalId
&&
w
.
Department
==
secondAllot
.
Department
&&
w
.
UnitType
==
secondAllot
.
UnitType
);
var
temp
=
agusetempRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
&&
w
.
Department
==
secondAllot
.
Department
);
var
userTemp
=
temp
.
FirstOrDefault
(
w
=>
UnitTypeUtil
.
IsEqualsUnitType
(
w
.
UnitType
,
secondAllot
.
UnitType
));
if
(
userTemp
!=
null
)
tempId
=
userTemp
.
UseTempId
??
(
int
)
Temp
.
other
;
if
(
new
int
[]
{
2
,
3
}.
Contains
(
secondAllot
.
Status
??
1
))
//纪录被提交后,根据提交时的模板获取对应的数据
...
...
@@ -133,7 +134,8 @@ public List<HeadItem> GetHeadItems(int hospitalId, int tempId, ag_secondallot se
var
fixedHeaders
=
agtempitemRepository
.
GetEntities
(
w
=>
w
.
TempId
==
tempId
);
// 用户自定义的工作量、单项奖励
var
configHeaders
=
agworkloadRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
&&
w
.
Department
==
secondAllot
.
Department
&&
w
.
UnitType
==
secondAllot
.
UnitType
);
var
temp
=
agworkloadRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
&&
w
.
Department
==
secondAllot
.
Department
);
var
configHeaders
=
temp
.
Where
(
w
=>
UnitTypeUtil
.
IsEqualsUnitType
(
w
.
UnitType
,
secondAllot
.
UnitType
));
if
(
SecondAllotService
.
defaultValues
!=
null
&&
SecondAllotService
.
defaultValues
.
Any
())
configHeaders
=
configHeaders
?.
Where
(
w
=>
!
SecondAllotService
.
defaultValues
.
Select
(
t
=>
t
.
Item1
).
Contains
(
w
.
ItemName
)).
ToList
();
...
...
@@ -548,7 +550,7 @@ private void SupplementOtherPerfor(ag_secondallot secondAllot, List<BodyItem> bo
{
if
(
employeeList
.
Any
(
t
=>
t
.
PersonnelNumber
==
item
.
PersonnelNumber
)
&&
employeeList
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
item
.
PersonnelNumber
)
is
per_employee
employee
&&
employee
.
UnitType
==
secondAllot
.
UnitType
)
&&
UnitTypeUtil
.
IsEqualsUnitType
(
employee
.
UnitType
,
secondAllot
.
UnitType
)
)
{
var
headItem
=
otherShowColumns
.
FirstOrDefault
(
w
=>
w
.
FiledName
==
column
.
Item1
&&
w
.
FiledId
==
column
.
Item2
&&
w
.
Type
==
(
int
)
TempColumnType
.
TableFixedColumns
);
if
(
headItem
==
null
)
continue
;
...
...
@@ -597,7 +599,8 @@ private void SupplyHeaderByWorkItem(int hospitalId, SecondResponse result, ag_se
var
headerItems
=
new
List
<
HeadItem
>();
var
unit
=
secondAllot
.
UnitType
==
UnitType
.
医技组
.
ToString
()
?
UnitType
.
医生组
.
ToString
()
:
secondAllot
.
UnitType
;
var
deptHeader
=
agworkloadtypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
secondAllot
.
Department
&&
t
.
UnitType
==
unit
);
var
temp
=
agworkloadtypeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
secondAllot
.
Department
);
var
deptHeader
=
temp
.
Where
(
w
=>
UnitTypeUtil
.
IsEqualsUnitType
(
w
.
UnitType
,
unit
));
if
(
deptHeader
!=
null
&&
deptHeader
.
Any
())
{
int
sortindex
=
1
;
...
...
@@ -734,7 +737,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
if
(
isArchive
==
1
||
new
List
<
int
>
{
(
int
)
SecondAllotStatus
.
WaitReview
,
(
int
)
SecondAllotStatus
.
PassAudit
}.
Contains
(
secondAllot
.
Status
??
(
int
)
SecondAllotStatus
.
Uncommitted
))
employeeSource
=
(
int
)
EmployeeSource
.
Initial
;
var
employees
=
personService
.
GetPersons
(
secondAllot
.
AllotId
.
Value
,
userId
)?.
Where
(
t
=>
t
.
UnitType
==
secondAllot
.
UnitType
).
ToList
();
var
employees
=
personService
.
GetPersons
(
secondAllot
.
AllotId
.
Value
,
userId
)?.
Where
(
t
=>
UnitTypeUtil
.
IsEqualsUnitType
(
t
.
UnitType
,
secondAllot
.
UnitType
)
).
ToList
();
var
role
=
_userService
.
GetUserFirstRole
(
userId
);
//行政科室 只有两种逻辑,或从保存中加载,或加载EXCEL表
...
...
@@ -889,7 +892,7 @@ private void SupplementSecondDetail(ag_secondallot second, List<per_employee> em
{
if
(
employees
!=
null
&&
employees
.
Any
(
t
=>
t
.
PersonnelNumber
==
item
.
WorkNumber
)
&&
employees
.
FirstOrDefault
(
t
=>
t
.
PersonnelNumber
==
item
.
WorkNumber
)
is
per_employee
employee
&&
employee
.
UnitType
==
second
.
UnitType
)
&&
UnitTypeUtil
.
IsEqualsUnitType
(
employee
.
UnitType
,
second
.
UnitType
)
)
{
item
.
ReservedRatio
=
employee
.
ReservedRatio
;
item
.
Department
=
employee
.
AccountingUnit
;
...
...
@@ -944,7 +947,8 @@ public ag_secondallot GetPreviousSecondAllot(int hospitalId, ag_secondallot seco
if
(
index
==
0
)
return
null
;
var
prevAllot
=
allotList
[
index
-
1
];
var
prevSecondAllot
=
agsecondallotRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
prevAllot
.
ID
&&
w
.
UnitType
==
secondAllot
.
UnitType
&&
w
.
Department
==
secondAllot
.
Department
);
var
temp
=
agsecondallotRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
prevAllot
.
ID
&&
w
.
Department
==
secondAllot
.
Department
);
var
prevSecondAllot
=
temp
.
FirstOrDefault
(
w
=>
UnitTypeUtil
.
IsEqualsUnitType
(
w
.
UnitType
,
secondAllot
.
UnitType
));
return
prevSecondAllot
;
}
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
ee75db05
...
...
@@ -587,7 +587,8 @@ public void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dynam
}
if
(
body
==
null
||
!((
IEnumerable
<
dynamic
>)
body
).
Any
())
return
;
var
workloads
=
agworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
second
.
Department
&&
t
.
UnitType
==
second
.
UnitType
)?.
ToList
()
??
new
List
<
ag_workload
>();
var
temp
=
agworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
second
.
Department
);
var
workloads
=
temp
?.
Where
(
w
=>
UnitTypeUtil
.
IsEqualsUnitType
(
w
.
UnitType
,
second
.
UnitType
))?.
ToList
()
??
new
List
<
ag_workload
>();
string
[]
prefix
=
new
string
[]
{
"WorkloadScore_"
,
"AssessmentScore_"
,
"WorkPerformance_"
,
$"
{
AgWorkloadType
.
SingleAwards
}
_"
,
$"
{
AgWorkloadType
.
Workload
}
_"
,
$"
{
AgWorkloadType
.
PreAccountingReward
}
_"
};
List
<
ag_workload_source
>
workloadSources
=
new
List
<
ag_workload_source
>();
...
...
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