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
18c76996
Commit
18c76996
authored
Nov 08, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效,首次录入自动带出上个月姓名岗位等数据
parent
3aaa548d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
16 deletions
+43
-16
performance/Performance.DtoModels/Response/SecondResponse.cs
+2
-0
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
+1
-1
performance/Performance.EntityModels/Entity/ag_tempitem.cs
+5
-0
performance/Performance.Services/SecondAllotService.cs
+35
-15
No files found.
performance/Performance.DtoModels/Response/SecondResponse.cs
View file @
18c76996
...
...
@@ -18,6 +18,8 @@ public class HeadItem
public
int
Type
{
get
;
set
;
}
public
decimal
FactorValue
{
get
;
set
;
}
public
int
SourceType
{
get
;
set
;
}
/// <summary> 1 带出历史数据 2不带出 </summary>
public
Nullable
<
int
>
IsBring
{
get
;
set
;
}
}
public
class
BodyItem
:
HeadItem
...
...
performance/Performance.EntityModels/Entity/ag_fixatitem.cs
View file @
18c76996
...
...
@@ -19,7 +19,7 @@ public class ag_fixatitem
///
/// </summary>
[
Key
]
public
int
I
d
{
get
;
set
;
}
public
int
I
D
{
get
;
set
;
}
/// <summary>
///
...
...
performance/Performance.EntityModels/Entity/ag_tempitem.cs
View file @
18c76996
...
...
@@ -50,5 +50,10 @@ public class ag_tempitem
/// 1 自动带出 2 计算得出
/// </summary>
public
Nullable
<
int
>
SourceType
{
get
;
set
;
}
/// <summary>
/// 1 带出历史数据 2不带出
/// </summary>
public
Nullable
<
int
>
IsBring
{
get
;
set
;
}
}
}
performance/Performance.Services/SecondAllotService.cs
View file @
18c76996
...
...
@@ -170,18 +170,9 @@ public bool UseTemp(UseTempRequest request)
result
=
perforAgusetempRepository
.
Update
(
entity
);
if
(
result
)
{
//获取固定模板列
头
var
tempItem
=
perforAgtempitemRepository
.
GetEntities
(
t
=>
t
.
TempId
==
request
.
TempId
);
//获取固定模板列
+ 工作量列
var
headItems
=
GetHeadItems
(
request
.
TempId
,
request
.
HospitalId
,
request
.
Department
,
request
.
UnitType
);
var
headItems
=
Mapper
.
Map
<
List
<
HeadItem
>>(
tempItem
)
??
new
List
<
HeadItem
>();
//获取工作量列头
var
workItem
=
perforAgworkloadRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
if
(
workItem
!=
null
&&
workItem
.
Count
>
0
)
{
var
workDtos
=
Mapper
.
Map
<
List
<
HeadItem
>>(
workItem
);
workDtos
.
ForEach
(
t
=>
{
t
.
Type
=
3
;
});
headItems
.
AddRange
(
workDtos
);
}
List
<
ag_fixatitem
>
list
=
new
List
<
ag_fixatitem
>();
var
addList
=
new
List
<
ag_fixatitem
>();
...
...
@@ -475,17 +466,46 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
Department
==
request
.
Department
)
??
new
List
<
cof_again
>();
config
.
Add
(
new
cof_again
{
TypeName
=
"绩效合计(考核后)"
,
Value
=
second
.
RealGiveFee
});
#
region
补充顶部数据
config
.
Add
(
new
cof_again
{
TypeName
=
"绩效合计(考核后)"
,
Value
=
second
.
RealGiveFee
});
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
headItems
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
(),
1
,
configs
:
config
));
result
.
BodyItems
.
FirstOrDefault
(
t
=>
t
.
FiledName
==
"发放月份"
).
Value
=
$"
{
second
.
Year
}
年
{
second
.
Month
}
月"
;
#
endregion
#
region
补充需要带出的数据
headItems
=
headItems
.
Where
(
t
=>
t
.
IsBring
==
1
).
ToList
();
if
(
headItems
!=
null
&&
headItems
.
Count
>
0
)
{
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
secondIdList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotList
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
.
Value
)).
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
Select
(
t
=>
t
.
Id
).
ToList
();
var
index
=
secondIdList
.
IndexOf
(
request
.
SecondId
);
if
(
index
!=
0
)
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondIdList
.
ElementAt
(
index
-
1
)
&&
t
.
RowNumber
.
HasValue
);
fixatList
=
fixatList
.
Where
(
t
=>
headItems
.
Select
(
h
=>
h
.
FiledName
).
Contains
(
t
.
ItemName
)).
ToList
();
if
(
fixatList
!=
null
&&
fixatList
.
Count
>
0
)
{
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
();
foreach
(
var
row
in
rows
)
{
var
header
=
row
==
-
1
?
headItems
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
()
:
headItems
.
Where
(
t
=>
t
.
Type
!=
1
).
ToList
();
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
header
,
2
,
fixatitems
:
fixatList
,
row
:
row
));
}
}
}
#
endregion
}
return
result
;
return
new
SecondResponse
{
HeadItems
=
result
.
HeadItems
.
OrderBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
Sort
).
ThenBy
(
t
=>
t
.
FiledName
).
ToList
(),
BodyItems
=
result
.
BodyItems
.
OrderBy
(
t
=>
t
.
RowNumber
).
ThenBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
Sort
).
ToList
(),
};
}
/// <summary>
///
///
获取 列
/// </summary>
/// <param name="tempId">模板Id</param>
/// <param name="hospitalId">医院Id</param>
...
...
@@ -524,7 +544,7 @@ public List<BodyItem> GetBodyItems(List<HeadItem> headItems, int source, List<co
{
var
bodyItem
=
new
BodyItem
{
RowNumber
=
-
1
,
RowNumber
=
source
==
1
?
-
1
:
row
.
Value
,
FiledId
=
item
.
FiledId
,
FiledName
=
item
.
FiledName
,
FactorValue
=
item
.
FactorValue
,
...
...
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