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
30e2ee1e
Commit
30e2ee1e
authored
Sep 14, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次分配切换模板带出数据
parent
78cb958e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
16 deletions
+24
-16
performance/Performance.Services/SecondAllotService.cs
+8
-0
performance/Performance.Services/UserService.cs
+16
-16
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
30e2ee1e
...
...
@@ -897,6 +897,7 @@ public bool UseTemp(UseTempRequest request)
:
configs
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
head
.
FiledName
)?.
Value
.
ToString
()
});
}
}
}
}
...
...
@@ -1348,6 +1349,13 @@ public List<HeadItem> GetHeadItems(int tempId, int hospitalId, string department
var
tempItem
=
perforAgtempitemRepository
.
GetEntities
(
t
=>
t
.
TempId
==
tempId
);
var
headItems
=
Mapper
.
Map
<
List
<
HeadItem
>>(
tempItem
)
??
new
List
<
HeadItem
>();
var
temp
=
perforAgtempRepository
.
GetEntity
(
w
=>
w
.
Id
==
tempId
);
// 其他来源不考虑工作量
if
(
temp
?.
Id
==
6
)
return
headItems
;
//获取工作量列头
var
workItem
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
Department
==
department
&&
t
.
UnitType
==
unitType
);
if
(
workItem
!=
null
&&
workItem
.
Count
>
0
)
...
...
performance/Performance.Services/UserService.cs
View file @
30e2ee1e
...
...
@@ -368,22 +368,22 @@ public List<TitleValue> Department(int hospitalId)
if
(
list
==
null
||
!
list
.
Any
())
return
new
List
<
TitleValue
>();
var
result
=
list
.
Select
(
t
=>
t
.
AccountingUnit
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
// 补充行政科室
var
states
=
new
int
[]
{
(
int
)
AllotStates
.
Archive
,
(
int
)
AllotStates
.
GenerateAccomplish
};
var
allots
=
_perallotRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
&&
states
.
Contains
(
w
.
States
));
if
(
allots
!=
null
&&
allots
.
Any
())
{
var
allot
=
allots
.
OrderByDescending
(
w
=>
w
.
Year
).
ThenByDescending
(
w
=>
w
.
Month
).
FirstOrDefault
();
if
(
allot
!=
null
)
{
var
types
=
new
int
[]
{
(
int
)
UnitType
.
行政中层
,
(
int
)
UnitType
.
行政后勤
};
var
accounts
=
_resaccountRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
allot
.
ID
&&
w
.
UnitType
.
HasValue
&&
types
.
Contains
(
w
.
UnitType
.
Value
));
if
(
accounts
!=
null
&&
accounts
.
Any
())
{
result
.
AddRange
(
accounts
.
Select
(
w
=>
w
.
AccountingUnit
));
}
}
}
//
//
补充行政科室
//
var states = new int[] { (int)AllotStates.Archive, (int)AllotStates.GenerateAccomplish };
//
var allots = _perallotRepository.GetEntities(w => w.HospitalId == hospitalId && states.Contains(w.States));
//
if (allots != null && allots.Any())
//
{
//
var allot = allots.OrderByDescending(w => w.Year).ThenByDescending(w => w.Month).FirstOrDefault();
//
if (allot != null)
//
{
//
var types = new int[] { (int)UnitType.行政中层, (int)UnitType.行政后勤 };
//
var accounts = _resaccountRepository.GetEntities(w => w.AllotID == allot.ID && w.UnitType.HasValue && types.Contains(w.UnitType.Value));
//
if (accounts != null && accounts.Any())
//
{
//
result.AddRange(accounts.Select(w => w.AccountingUnit));
//
}
//
}
//
}
return
result
?.
Select
(
t
=>
new
TitleValue
{
Title
=
t
,
Value
=
t
}).
ToList
();
}
...
...
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