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
4ec73196
Commit
4ec73196
authored
May 12, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/二次分配自动匹配优化响应速度' into develop
parents
1c94729e
cc267f4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
27 deletions
+32
-27
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+5
-3
performance/Performance.Services/SecondAllotService.cs
+27
-24
No files found.
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
4ec73196
...
...
@@ -367,12 +367,14 @@ public JArray AutoComplete(int secodId, SecondEmployeeRequest request)
if
(
usetemp
==
null
)
throw
new
PerformanceException
(
"当前科室暂未配置绩效模板"
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
#
region
接口响应速度优化
var
employees
=
new
List
<
per_employee
>();
if
(!
string
.
IsNullOrEmpty
(
request
?.
EmployeeName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
request
?.
EmployeeName
?.
Trim
()).
ToList
(
);
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
DoctorName
==
request
.
EmployeeName
);
if
(!
string
.
IsNullOrEmpty
(
request
?.
JobNumber
))
employees
=
employees
?.
Where
(
w
=>
w
.
PersonnelNumber
.
Trim
()
==
request
?.
JobNumber
.
Trim
()).
ToList
();
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
PersonnelNumber
==
request
.
JobNumber
);
#
endregion
employees
=
employees
?.
OrderBy
(
t
=>
t
.
PersonnelNumber
).
ThenByDescending
(
t
=>
t
.
DoctorName
).
ToList
();
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
JArray
();
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
4ec73196
...
...
@@ -307,8 +307,8 @@ public List<BodyItem> AutoComplete(SecondEmpRequest request, int userId)
//获取固定模板列 + 工作量列
var
headItems
=
GetHeadItems
(
request
.
TempId
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
var
bodyItems
=
GetEmployees
(
employees
,
second
,
userId
,
headItems
,
second
.
UnitType
,
request
.
EmployeeName
,
request
.
JobNumber
);
//
var employees = personService.GetPerEmployee(second.AllotId.Value);
var
bodyItems
=
GetEmployees
(
second
,
userId
,
headItems
,
second
.
UnitType
,
request
.
EmployeeName
,
request
.
JobNumber
);
return
bodyItems
;
}
...
...
@@ -361,16 +361,16 @@ public SecondResponse GetSecondDetail(UseTempRequest request, int userId)
if
(
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
)
==
null
||
!
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Any
())
{
//更换模板时,会自动保存顶部数据
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
result
.
BodyItems
.
AddRange
(
GetEmployees
(
employees
,
second
,
userId
,
headItems
,
second
.
UnitType
));
//
var employees = personService.GetPersons(second.AllotId.Value, userId);
result
.
BodyItems
.
AddRange
(
GetEmployees
(
second
,
userId
,
headItems
,
second
.
UnitType
));
}
}
else
{
//无数据 根据IsBring带出历史二次绩效中需要带出的数据
//result.BodyItems = GetBringItems(request, headItems);
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
result
.
BodyItems
=
GetEmployees
(
employees
,
second
,
userId
,
headItems
,
second
.
UnitType
);
//
var employees = personService.GetPersons(second.AllotId.Value, userId);
result
.
BodyItems
=
GetEmployees
(
second
,
userId
,
headItems
,
second
.
UnitType
);
var
bodys
=
Mapper
.
Map
<
List
<
BodyItem
>>(
headItems
.
Where
(
t
=>
t
.
Type
==
1
));
if
(
bodys
!=
null
&&
bodys
.
Any
())
...
...
@@ -418,23 +418,20 @@ private void SupplementOtherPerfor(SecondResponse result, int allotId)
}
}
private
List
<
BodyItem
>
GetEmployees
(
List
<
per_employee
>
employees
,
ag_secondallot
second
,
int
userId
,
List
<
HeadItem
>
heads
,
string
unittype
,
string
empName
=
""
,
string
jobNumber
=
""
)
private
List
<
BodyItem
>
GetEmployees
(
ag_secondallot
second
,
int
userId
,
List
<
HeadItem
>
heads
,
string
unittype
,
string
empName
=
""
,
string
jobNumber
=
""
)
{
var
list
=
new
List
<
BodyItem
>();
//var employees = personService.GetPersons(allotId, userId);
if
(
employees
==
null
||
!
employees
.
Any
())
return
list
;
var
hospital
=
hospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
employees
.
First
().
HospitalId
);
if
(
hospital
==
null
)
return
list
;
#
region
接口响应速度优化
var
employees
=
new
List
<
per_employee
>();
if
(
string
.
IsNullOrEmpty
(
empName
)
&&
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
.
Where
(
t
=>
t
.
UnitType
==
unittype
).
ToList
();
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
UnitType
==
unittype
);
if
(!
string
.
IsNullOrEmpty
(
empName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
empName
?.
Trim
()).
ToList
(
);
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
DoctorName
==
empName
);
if
(!
string
.
IsNullOrEmpty
(
jobNumber
))
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
PersonnelNumber
.
Trim
()
==
jobNumber
.
Trim
()).
ToList
();
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
PersonnelNumber
==
jobNumber
);
#
endregion
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
BodyItem
>();
var
perapramounts
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
second
.
AllotId
&&
t
.
Status
==
3
);
Func
<
per_employee
,
decimal
?>
getAprAmount
=
(
t
)
=>
second
.
Department
==
t
.
AccountingUnit
&&
second
.
UnitType
==
t
.
UnitType
...
...
@@ -452,6 +449,7 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, ag_secondallot
{
(
"医院其他绩效"
,
"OtherPerformance"
),
(
t
)
=>
getAprAmount
(
t
)},
};
var
list
=
new
List
<
BodyItem
>();
int
rowNumber
=
1
;
foreach
(
var
employee
in
employees
)
{
...
...
@@ -469,6 +467,8 @@ private List<BodyItem> GetEmployees(List<per_employee> employees, ag_secondallot
rowNumber
++;
}
var
hospital
=
hospitalRepository
.
GetEntity
(
t
=>
t
.
ID
==
employees
.
First
().
HospitalId
);
if
(
hospital
==
null
)
return
list
;
if
(
hospital
.
IsShowSecondDirector
==
2
)
list
=
list
.
Where
(
t
=>
t
.
FiledName
==
"岗位"
&&
t
.
FiledId
==
"Post"
&&
t
.
Value
==
"其他"
)?.
ToList
();
...
...
@@ -1921,14 +1921,17 @@ public List<ag_othersource> OtherAutoComplete(SecondEmpRequest request, int user
//获取固定模板列 + 工作量列
var
headItems
=
GetHeadItems
(
request
.
TempId
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
employees
=
personService
.
GetPerEmployee
(
second
.
AllotId
.
Value
);
#
region
接口响应速度优化
var
employees
=
new
List
<
per_employee
>();
if
(!
string
.
IsNullOrEmpty
(
request
?.
EmployeeName
))
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
DoctorName
==
request
.
EmployeeName
);
if
(!
string
.
IsNullOrEmpty
(
request
?.
JobNumber
))
employees
=
peremployeeRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
second
.
AllotId
.
Value
&&
w
.
PersonnelNumber
==
request
.
JobNumber
);
#
endregion
if
(
employees
==
null
)
return
new
List
<
ag_othersource
>();
if
(!
string
.
IsNullOrEmpty
(
request
.
EmployeeName
))
employees
=
employees
?.
Where
(
w
=>
w
.
DoctorName
?.
Trim
()
==
request
.
EmployeeName
?.
Trim
()).
ToList
();
if
(!
string
.
IsNullOrEmpty
(
request
.
JobNumber
))
employees
=
employees
?.
Where
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
PersonnelNumber
)
&&
w
.
PersonnelNumber
.
Trim
()
==
request
.
JobNumber
.
Trim
()).
ToList
();
List
<
ag_othersource
>
result
=
employees
.
Select
(
t
=>
new
ag_othersource
...
...
@@ -2194,7 +2197,7 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
DeptDataDetails
>();
foreach
(
var
item
in
computes
)
{
if
(
item
.
AccountType
==
AccountUnitType
.
行政中层
.
ToString
())
if
(
item
.
AccountType
==
AccountUnitType
.
行政中层
.
ToString
())
deptDatas
.
Add
(
computeService
.
GetAdministration
(
item
.
ID
));
else
deptDatas
.
Add
(
computeService
.
GetDoctorDetail
(
item
.
ID
));
...
...
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